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 software.amazon.awssdk.services.s3.model.CreateBucketResponse
    createBucket(@NotNull String bucketName)
     
    static void
    deleteBucket(@NotNull String bucketName)
     
    static software.amazon.awssdk.auth.credentials.AwsCredentials
    Get AWS credentials from environment/properties/profile/instance profile
    static software.amazon.awssdk.regions.Region
    Get default AWS region for tests
    static @NotNull software.amazon.awssdk.services.s3.S3Client
    Create S3 client using default credentials and region
    static @NotNull software.amazon.awssdk.services.s3.S3Client
    newS3Client(@NotNull software.amazon.awssdk.auth.credentials.AwsCredentials awsCredentials)
    Create S3 client using given credentials and default region
    static @NotNull software.amazon.awssdk.services.s3.S3ClientBuilder
     
    static @NotNull software.amazon.awssdk.services.s3.S3ClientBuilder
    newS3ClientBuilder(@NotNull software.amazon.awssdk.auth.credentials.AwsCredentials awsCredentials)
     

    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 software.amazon.awssdk.auth.credentials.AwsCredentials getAwsCredentials()
      Get AWS credentials from environment/properties/profile/instance profile
    • getDefaultRegion

      public static software.amazon.awssdk.regions.Region getDefaultRegion()
      Get default AWS region for tests
    • newS3Client

      @NotNull public static @NotNull software.amazon.awssdk.services.s3.S3Client newS3Client()
      Create S3 client using default credentials and region
    • newS3Client

      @NotNull public static @NotNull software.amazon.awssdk.services.s3.S3Client newS3Client(@NotNull @NotNull software.amazon.awssdk.auth.credentials.AwsCredentials awsCredentials)
      Create S3 client using given credentials and default region
    • newS3ClientBuilder

      @NotNull public static @NotNull software.amazon.awssdk.services.s3.S3ClientBuilder newS3ClientBuilder()
    • newS3ClientBuilder

      @NotNull public static @NotNull software.amazon.awssdk.services.s3.S3ClientBuilder newS3ClientBuilder(@NotNull @NotNull software.amazon.awssdk.auth.credentials.AwsCredentials awsCredentials)
    • createBucket

      public static software.amazon.awssdk.services.s3.model.CreateBucketResponse createBucket(@NotNull @NotNull String bucketName)
    • deleteBucket

      public static void deleteBucket(@NotNull @NotNull String bucketName)