Class AwsTestHelper
- java.lang.Object
-
- com.atlassian.bamboo.testutils.aws.AwsTestHelper
-
public class AwsTestHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
AWS_S3_EMPTY_BUCKET_NAME
-
Constructor Summary
Constructors Constructor Description AwsTestHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.amazonaws.services.s3.model.Bucket
createBucket(@NotNull String bucketName)
static void
deleteBucket(@NotNull String bucketName)
static com.amazonaws.auth.AWSCredentials
getAwsCredentials()
Get AWS credentials from environment/properties/profile/instance profilestatic com.amazonaws.regions.Regions
getDefaultRegion()
Get default AWS region for testsstatic @NotNull com.atlassian.aws.s3.BambooAmazonS3Client
newS3Client()
Create S3 client using default credentials and regionstatic @NotNull com.atlassian.aws.s3.BambooAmazonS3Client
newS3Client(@NotNull com.amazonaws.auth.AWSCredentials awsCredentials)
Create S3 client using given credentials and default region
-
-
-
Field Detail
-
AWS_S3_EMPTY_BUCKET_NAME
public static final String AWS_S3_EMPTY_BUCKET_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAwsCredentials
public static com.amazonaws.auth.AWSCredentials getAwsCredentials()
Get AWS credentials from environment/properties/profile/instance profile
-
getDefaultRegion
public static com.amazonaws.regions.Regions getDefaultRegion()
Get default AWS region for tests
-
newS3Client
@NotNull public static @NotNull com.atlassian.aws.s3.BambooAmazonS3Client newS3Client()
Create S3 client using default credentials and region
-
newS3Client
@NotNull public static @NotNull com.atlassian.aws.s3.BambooAmazonS3Client newS3Client(@NotNull @NotNull com.amazonaws.auth.AWSCredentials awsCredentials)
Create S3 client using given credentials and default region
-
createBucket
public static com.amazonaws.services.s3.model.Bucket createBucket(@NotNull @NotNull String bucketName)
-
deleteBucket
public static void deleteBucket(@NotNull @NotNull String bucketName)
-
-