Search in sources :

Example 16 with IamClient

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();
}
Also used : IamClient(software.amazon.awssdk.services.iam.IamClient) Region(software.amazon.awssdk.regions.Region)

Example 17 with IamClient

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();
}
Also used : IamClient(software.amazon.awssdk.services.iam.IamClient) Region(software.amazon.awssdk.regions.Region)

Example 18 with IamClient

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();
}
Also used : IamClient(software.amazon.awssdk.services.iam.IamClient) Region(software.amazon.awssdk.regions.Region)

Example 19 with IamClient

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();
}
Also used : IamClient(software.amazon.awssdk.services.iam.IamClient) Region(software.amazon.awssdk.regions.Region)

Example 20 with IamClient

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();
}
Also used : IamClient(software.amazon.awssdk.services.iam.IamClient) Region(software.amazon.awssdk.regions.Region)

Aggregations

IamClient (software.amazon.awssdk.services.iam.IamClient)24 Region (software.amazon.awssdk.regions.Region)23 DatasetProvider (com.amazonaws.personalize.client.datasets.DatasetProvider)1 MovieLensDatasetProvider (com.amazonaws.personalize.client.datasets.MovieLensDatasetProvider)1 CampaignManager (com.amazonaws.personalize.client.resource.CampaignManager)1 EventTrackerManager (com.amazonaws.personalize.client.resource.EventTrackerManager)1 PersonalizeClient (software.amazon.awssdk.services.personalize.PersonalizeClient)1 PersonalizeEventsClient (software.amazon.awssdk.services.personalizeevents.PersonalizeEventsClient)1 PersonalizeRuntimeClient (software.amazon.awssdk.services.personalizeruntime.PersonalizeRuntimeClient)1 S3Client (software.amazon.awssdk.services.s3.S3Client)1