use of software.amazon.awssdk.services.s3control.S3ControlClient in project aws-doc-sdk-examples by awsdocs.
the class VPCCreateJob method main.
public static void main(String[] args) throws URISyntaxException {
final String USAGE = "\n" + "Usage:\n" + " <accountId> <iamRoleArn> <manifestLocation> <reportBucketName> <tagKey> <tagValue> <eTag> <vpcBucketURL>\n\n" + "Where:\n" + " accountId - the account id value that owns the Amazon S3 bucket.\n\n" + " iamRoleArn - the ARN of the AWS Identity and Access Management (IAM) role that has permissions to create a batch job.\n" + " manifestLocation - the location where the manaifest file required for the job (for example, arn:aws:s3:::<BUCKETNAME>/manifest.csv).\n" + " reportBucketName - the Amazon S3 bucket where the report is written to (for example, arn:aws:s3:::<BUCKETNAME>).\n" + " tagKey - the key used for a tag (for example, keyOne).\n" + " tagValue - the value for the key (for example, ValueOne).\n" + " eTag - the ETag for the specified manifest object (for example, 000000c9d1046e73f7dde5043ac3ae85).\n" + " vpcBucketURL - the URL of the bucket located in your virtual private cloud (VPC) (for example, https://bucket.vpce-xxxxxc4d-5e6f.s3.us-east-1.vpce.amazonaws.com)";
if (args.length != 8) {
System.out.println(USAGE);
System.exit(1);
}
String accountId = args[0];
String iamRoleArn = args[1];
String manifestLocation = args[2];
String reportBucketName = args[3];
String tagKey = args[4];
String tagValue = args[5];
String eTag = args[6];
String vpcBucketURL = args[7];
String uuid = java.util.UUID.randomUUID().toString();
URI myURI = new URI(vpcBucketURL);
S3ControlClient s3ControlClient = S3ControlClient.builder().region(Region.US_EAST_1).endpointOverride(myURI).build();
createS3Job(s3ControlClient, accountId, iamRoleArn, manifestLocation, reportBucketName, tagKey, tagValue, eTag, uuid);
s3ControlClient.close();
}
use of software.amazon.awssdk.services.s3control.S3ControlClient in project aws-doc-sdk-examples by awsdocs.
the class CreateAccessPoint method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <accountId> <bucketName> <accessPointName>\n\n" + "Where:\n" + " accountId - the account id that owns the Amazon S3 bucket. \n\n" + " bucketName - the Amazon S3 bucket name. \n" + " accessPointName - the access point name (for example, myaccesspoint). \n";
if (args.length != 3) {
System.out.println(USAGE);
System.exit(1);
}
String accountId = args[0];
String bucketName = args[1];
String accessPointName = args[2];
Region region = Region.US_EAST_1;
S3ControlClient s3ControlClient = S3ControlClient.builder().region(region).build();
createSpecificAccessPoint(s3ControlClient, accountId, bucketName, accessPointName);
deleteSpecificAccessPoint(s3ControlClient, accountId, accessPointName);
s3ControlClient.close();
;
}
use of software.amazon.awssdk.services.s3control.S3ControlClient in project aws-doc-sdk-examples by awsdocs.
the class CreateJob method main.
public static void main(String[] args) {
final String USAGE = "\n" + "Usage:\n" + " <accountId> <iamRoleArn> <manifestLocation> <reportBucketName>>\n\n" + "Where:\n" + " accountId - the account id value that owns the Amazon S3 bucket.\n\n" + " iamRoleArn - the ARN of the AWS Identity and Access Management (IAM) role that has permissions to create a batch job.\n" + " manifestLocation - the location where the manaifest file required for the job (for example, arn:aws:s3:::<BUCKETNAME>/manifest.csv).\n" + " reportBucketName - the Amazon S3 bucket where the report is written to (for example, arn:aws:s3:::<BUCKETNAME>).\n";
if (args.length != 4) {
System.out.println(USAGE);
System.exit(1);
}
String accountId = args[0];
String iamRoleArn = args[1];
String manifestLocation = args[2];
String reportBucketName = args[3];
;
String uuid = java.util.UUID.randomUUID().toString();
S3ControlClient s3ControlClient = S3ControlClient.builder().region(Region.US_EAST_1).build();
createS3Job(s3ControlClient, accountId, iamRoleArn, manifestLocation, reportBucketName, uuid);
s3ControlClient.close();
}
Aggregations