Search in sources :

Example 6 with CodeDeployClient

use of software.amazon.awssdk.services.codedeploy.CodeDeployClient in project aws-doc-sdk-examples by awsdocs.

the class CreateDeploymentGroup method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <deploymentGroupName> <appName> <serviceRoleArn> <tagKey> <tagValue> \n\n" + "Where:\n" + "    deploymentGroupName - the name of the deployment group. \n" + "    appName - the name of the application. \n" + "    serviceRoleArn - a service role Amazon Resource Name (ARN) that allows AWS CodeDeploy to act on the user's behalf.  \n" + "    tagKey - the tag filter key (ie, AppName). \n" + "    tagValue - the tag filter value (ie, mywebapp).\n";
    if (args.length != 5) {
        System.out.println(USAGE);
        System.exit(1);
    }
    String deploymentGroupName = args[0];
    String appName = args[1];
    String serviceRoleArn = args[2];
    String tagKey = args[3];
    String tagValue = args[4];
    Region region = Region.US_EAST_1;
    CodeDeployClient deployClient = CodeDeployClient.builder().region(region).build();
    String groupId = createNewDeploymentGroup(deployClient, deploymentGroupName, appName, serviceRoleArn, tagKey, tagValue);
    System.out.println("The group deployment ID is " + groupId);
    deployClient.close();
}
Also used : CodeDeployClient(software.amazon.awssdk.services.codedeploy.CodeDeployClient) Region(software.amazon.awssdk.regions.Region)

Example 7 with CodeDeployClient

use of software.amazon.awssdk.services.codedeploy.CodeDeployClient in project aws-doc-sdk-examples by awsdocs.

the class GetDeployment method main.

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

Example 8 with CodeDeployClient

use of software.amazon.awssdk.services.codedeploy.CodeDeployClient in project aws-doc-sdk-examples by awsdocs.

the class ListDeploymentGroups method main.

public static void main(String[] args) {
    final String USAGE = "\n" + "Usage:\n" + "    <appName> \n\n" + "Where:\n" + "    appName - the application name. \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();
    listDeployGroups(deployClient, appName);
    deployClient.close();
}
Also used : CodeDeployClient(software.amazon.awssdk.services.codedeploy.CodeDeployClient) Region(software.amazon.awssdk.regions.Region)

Aggregations

Region (software.amazon.awssdk.regions.Region)8 CodeDeployClient (software.amazon.awssdk.services.codedeploy.CodeDeployClient)8