use of software.amazon.awssdk.services.iam.IamClient in project aws-doc-sdk-examples by awsdocs.
the class ListAccountAliases method main.
public static void main(String[] args) {
Region region = Region.AWS_GLOBAL;
IamClient iam = IamClient.builder().region(region).build();
listAliases(iam);
System.out.println("Done");
iam.close();
}
use of software.amazon.awssdk.services.iam.IamClient in project aws-doc-sdk-examples by awsdocs.
the class UpdateServerCertificate method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <curName> <newName> \n\n" + "Where:\n" + " curName - the current certificate name. \n\n" + " newName - an updated certificate name. \n\n";
if (args.length != 2) {
System.out.println(USAGE);
System.exit(1);
}
String curName = args[0];
String newName = args[1];
Region region = Region.AWS_GLOBAL;
IamClient iam = IamClient.builder().region(region).build();
updateCertificate(iam, curName, newName);
System.out.println("Done");
iam.close();
}
use of software.amazon.awssdk.services.iam.IamClient in project aws-doc-sdk-examples by awsdocs.
the class GetPolicy method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <policyArn> \n\n" + "Where:\n" + " policyArn - a policy ARN that you can obtain from the AWS Management Console. \n\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String policyArn = args[0];
Region region = Region.AWS_GLOBAL;
IamClient iam = IamClient.builder().region(region).build();
getIAMPolicy(iam, policyArn);
System.out.println("Done");
iam.close();
}
use of software.amazon.awssdk.services.iam.IamClient in project aws-doc-sdk-examples by awsdocs.
the class GetServerCertificate method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <certName> \n\n" + "Where:\n" + " certName - a certificate name. \n\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String certName = args[0];
Region region = Region.AWS_GLOBAL;
IamClient iam = IamClient.builder().region(region).build();
getCertificate(iam, certName);
System.out.println("Done");
iam.close();
}
use of software.amazon.awssdk.services.iam.IamClient in project aws-doc-sdk-examples by awsdocs.
the class ListAccessKeys method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <userName> \n\n" + "Where:\n" + " userName - the name of the user for which access keys are retrieved. \n\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String userName = args[0];
Region region = Region.AWS_GLOBAL;
IamClient iam = IamClient.builder().region(region).build();
listKeys(iam, userName);
System.out.println("Done");
iam.close();
}
Aggregations