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 final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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
    Get AWS credentials from environment/properties/profile/instance profile
    static com.amazonaws.regions.Regions
    Get default AWS region for tests
    static @NotNull com.atlassian.aws.s3.BambooAmazonS3Client
    Create S3 client using default credentials and region
    static @NotNull com.atlassian.aws.s3.BambooAmazonS3Client
    newS3Client(@NotNull com.amazonaws.auth.AWSCredentials awsCredentials)
    Create S3 client using given credentials and default region

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • AwsTestHelper

      public AwsTestHelper()
  • Method Details

    • 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)