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();
}
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();
}
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();
}
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();
}
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();
}
Aggregations