Search in sources :

Example 31 with Region

use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.

the class DeletePipeline method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage: " + "   <name>\n\n" + "Where:\n" + "   name - the name of the pipeline to delete \n\n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String name = args[0];
    Region region = Region.US_EAST_1;
    CodePipelineClient pipelineClient = CodePipelineClient.builder().region(region).build();
    deleteSpecificPipeline(pipelineClient, name);
    pipelineClient.close();
}
Also used : CodePipelineClient(software.amazon.awssdk.services.codepipeline.CodePipelineClient) Region(software.amazon.awssdk.regions.Region)

Example 32 with Region

use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.

the class StartPipelineExecution method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage: " + "   <name>\n\n" + "Where:\n" + "   name - the name of the pipeline to execute \n\n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String name = args[0];
    Region region = Region.US_EAST_1;
    CodePipelineClient pipelineClient = CodePipelineClient.builder().region(region).build();
    executePipeline(pipelineClient, name);
    pipelineClient.close();
}
Also used : CodePipelineClient(software.amazon.awssdk.services.codepipeline.CodePipelineClient) Region(software.amazon.awssdk.regions.Region)

Example 33 with Region

use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.

the class CreateApplication method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <appName> \n\n" + "Where:\n" + "    appName - the name of the application. \n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String appName = args[0];
    Region region = Region.US_EAST_1;
    CodeDeployClient deployClient = CodeDeployClient.builder().region(region).build();
    createApp(deployClient, appName);
    deployClient.close();
}
Also used : CodeDeployClient(software.amazon.awssdk.services.codedeploy.CodeDeployClient) Region(software.amazon.awssdk.regions.Region)

Example 34 with Region

use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.

the class DeleteApplication method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <appName> \n\n" + "Where:\n" + "    appName -  the name of the application. \n";
    if (args.length != 1) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String appName = args[0];
    Region region = Region.US_EAST_1;
    CodeDeployClient deployClient = CodeDeployClient.builder().region(region).build();
    delApplication(deployClient, appName);
    deployClient.close();
}
Also used : CodeDeployClient(software.amazon.awssdk.services.codedeploy.CodeDeployClient) Region(software.amazon.awssdk.regions.Region)

Example 35 with Region

use of software.amazon.awssdk.regions.Region in project aws-doc-sdk-examples by awsdocs.

the class DeployApplication method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <appName> <bucketName> <bundleType> <key> <deploymentGroup> \n\n" + "Where:\n" + "    appName - the name of the application. \n" + "    bucketName - the name of the Amazon S3 bucket that contains the ZIP to deploy. \n" + "    bundleType - the bundle type (for example, zip). \n" + "    key - the key located in the S3 bucket (for example, mywebapp.zip). \n" + "    deploymentGroup - the name of the deployment group (for example, group1). \n";
    if (args.length != 5) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String appName = args[0];
    String bucketName = args[1];
    String bundleType = args[2];
    String key = args[3];
    String deploymentGroup = args[4];
    Region region = Region.US_EAST_1;
    CodeDeployClient deployClient = CodeDeployClient.builder().region(region).build();
    String deploymentId = createAppDeployment(deployClient, appName, bucketName, bundleType, key, deploymentGroup);
    System.out.println("The deployment Id is " + deploymentId);
    deployClient.close();
}
Also used : CodeDeployClient(software.amazon.awssdk.services.codedeploy.CodeDeployClient) Region(software.amazon.awssdk.regions.Region)

Aggregations

Region (software.amazon.awssdk.regions.Region)534 S3Client (software.amazon.awssdk.services.s3.S3Client)43 RekognitionClient (software.amazon.awssdk.services.rekognition.RekognitionClient)32 DynamoDbClient (software.amazon.awssdk.services.dynamodb.DynamoDbClient)31 IamClient (software.amazon.awssdk.services.iam.IamClient)23 PersonalizeClient (software.amazon.awssdk.services.personalize.PersonalizeClient)22 Ec2Client (software.amazon.awssdk.services.ec2.Ec2Client)20 Test (org.junit.Test)17 AwsCredentialsProvider (software.amazon.awssdk.auth.credentials.AwsCredentialsProvider)15 KmsClient (software.amazon.awssdk.services.kms.KmsClient)15 URI (java.net.URI)13 CodeCommitClient (software.amazon.awssdk.services.codecommit.CodeCommitClient)13 GlueClient (software.amazon.awssdk.services.glue.GlueClient)12 Properties (java.util.Properties)11 DynamoDbEnhancedClient (software.amazon.awssdk.enhanced.dynamodb.DynamoDbEnhancedClient)11 SesClient (software.amazon.awssdk.services.ses.SesClient)11 SdkBytes (software.amazon.awssdk.core.SdkBytes)9 Route53Client (software.amazon.awssdk.services.route53.Route53Client)9 CloudTrailClient (software.amazon.awssdk.services.cloudtrail.CloudTrailClient)8 CloudWatchClient (software.amazon.awssdk.services.cloudwatch.CloudWatchClient)8