Documentation ¶
Overview ¶
Package aws allows to interact with resources on Amazon Web Services.
Index ¶
- Constants
- func AddTagsToResource(t testing.TestingT, region string, resource string, tags map[string]string)
- func AddTagsToResourceE(t testing.TestingT, region string, resource string, tags map[string]string) error
- func AssertS3BucketExists(t testing.TestingT, region string, name string)
- func AssertS3BucketExistsE(t testing.TestingT, region string, name string) error
- func AssertS3BucketPolicyExists(t testing.TestingT, region string, bucketName string)
- func AssertS3BucketPolicyExistsE(t testing.TestingT, region string, bucketName string) error
- func AssertS3BucketVersioningExists(t testing.TestingT, region string, bucketName string)
- func AssertS3BucketVersioningExistsE(t testing.TestingT, region string, bucketName string) error
- func CreateAwsSessionWithCreds(region string, accessKeyID string, secretAccessKey string) (*aws.Config, error)
- func CreateAwsSessionWithMfa(region string, stsClient *sts.Client, mfaDevice *types.VirtualMFADevice) (*aws.Config, error)
- func CreateECRRepo(t testing.TestingT, region string, name string) *types.Repository
- func CreateECRRepoE(t testing.TestingT, region string, name string) (*types.Repository, error)
- func CreateEcsCluster(t testing.TestingT, region string, name string) *types.Cluster
- func CreateEcsClusterE(t testing.TestingT, region string, name string) (*types.Cluster, error)
- func CreateMfaDevice(t testing.TestingT, iamClient *iam.Client, deviceName string) *types.VirtualMFADevice
- func CreateMfaDeviceE(t testing.TestingT, iamClient *iam.Client, deviceName string) (*types.VirtualMFADevice, error)
- func CreateRandomFifoQueue(t testing.TestingT, awsRegion string, prefix string) string
- func CreateRandomFifoQueueE(t testing.TestingT, awsRegion string, prefix string) (string, error)
- func CreateRandomQueue(t testing.TestingT, awsRegion string, prefix string) string
- func CreateRandomQueueE(t testing.TestingT, awsRegion string, prefix string) (string, error)
- func CreateS3Bucket(t testing.TestingT, region string, name string)
- func CreateS3BucketE(t testing.TestingT, region string, name string) error
- func CreateSecretStringWithDefaultKey(t testing.TestingT, awsRegion, description, name, secretString string) string
- func CreateSecretStringWithDefaultKeyE(t testing.TestingT, awsRegion, description, name, secretString string) (string, error)
- func CreateSnsTopic(t testing.TestingT, region string, snsTopicName string) string
- func CreateSnsTopicE(t testing.TestingT, region string, snsTopicName string) (string, error)
- func DeleteAmi(t testing.TestingT, region string, imageID string)
- func DeleteAmiAndAllSnapshots(t testing.TestingT, region string, ami string)
- func DeleteAmiAndAllSnapshotsE(t testing.TestingT, region string, ami string) error
- func DeleteAmiE(t testing.TestingT, region string, imageID string) error
- func DeleteEC2KeyPair(t testing.TestingT, keyPair *Ec2Keypair)
- func DeleteEC2KeyPairE(t testing.TestingT, keyPair *Ec2Keypair) error
- func DeleteECRRepo(t testing.TestingT, region string, repo *types.Repository)
- func DeleteECRRepoE(t testing.TestingT, region string, repo *types.Repository) error
- func DeleteEbsSnapshot(t testing.TestingT, region string, snapshot string)
- func DeleteEbsSnapshotE(t testing.TestingT, region string, snapshot string) error
- func DeleteEcsCluster(t testing.TestingT, region string, cluster *types.Cluster)
- func DeleteEcsClusterE(t testing.TestingT, region string, cluster *types.Cluster) error
- func DeleteMessageFromQueue(t testing.TestingT, awsRegion string, queueURL string, receipt string)
- func DeleteMessageFromQueueE(t testing.TestingT, awsRegion string, queueURL string, receipt string) error
- func DeleteParameter(t testing.TestingT, awsRegion string, keyName string)
- func DeleteParameterE(t testing.TestingT, awsRegion string, keyName string) error
- func DeleteParameterWithClientE(t testing.TestingT, client *ssm.Client, keyName string) error
- func DeleteQueue(t testing.TestingT, awsRegion string, queueURL string)
- func DeleteQueueE(t testing.TestingT, awsRegion string, queueURL string) error
- func DeleteS3Bucket(t testing.TestingT, region string, name string)
- func DeleteS3BucketE(t testing.TestingT, region string, name string) error
- func DeleteSNSTopic(t testing.TestingT, region string, snsTopicArn string)
- func DeleteSNSTopicE(t testing.TestingT, region string, snsTopicArn string) error
- func DeleteSecret(t testing.TestingT, awsRegion, id string, forceDelete bool)
- func DeleteSecretE(t testing.TestingT, awsRegion, id string, forceDelete bool) error
- func EmptyS3Bucket(t testing.TestingT, region string, name string)
- func EmptyS3BucketE(t testing.TestingT, region string, name string) error
- func EnableMfaDevice(t testing.TestingT, iamClient *iam.Client, mfaDevice *types.VirtualMFADevice)
- func EnableMfaDeviceE(t testing.TestingT, iamClient *iam.Client, mfaDevice *types.VirtualMFADevice) error
- func FetchContentsOfFileFromAsg(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) map[string]string
- func FetchContentsOfFileFromAsgE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) (map[string]string, error)
- func FetchContentsOfFileFromInstance(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) string
- func FetchContentsOfFileFromInstanceE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) (string, error)
- func FetchContentsOfFilesFromAsg(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) map[string]map[string]string
- func FetchContentsOfFilesFromAsgE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) (map[string]map[string]string, error)
- func FetchContentsOfFilesFromInstance(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) map[string]string
- func FetchContentsOfFilesFromInstanceE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) (map[string]string, error)
- func FetchFilesFromAsgs(t testing.TestingT, awsRegion string, spec RemoteFileSpecification)
- func FetchFilesFromAsgsE(t testing.TestingT, awsRegion string, spec RemoteFileSpecification) error
- func FetchFilesFromInstance(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...)
- func FetchFilesFromInstanceE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, ...) error
- func FindS3BucketWithTag(t testing.TestingT, awsRegion string, key string, value string) string
- func FindS3BucketWithTagE(t testing.TestingT, awsRegion string, key string, value string) (string, error)
- func FindVpcName(vpc types.Vpc) string
- func GetAccountId(t testing.TestingT) string
- func GetAccountIdE(t testing.TestingT) (string, error)
- func GetAccountsWithLaunchPermissionsForAmi(t testing.TestingT, awsRegion string, amiID string) []string
- func GetAccountsWithLaunchPermissionsForAmiE(t testing.TestingT, awsRegion string, amiID string) ([]string, error)
- func GetAcmCertificateArn(t testing.TestingT, awsRegion string, certDomainName string) string
- func GetAcmCertificateArnE(t testing.TestingT, awsRegion string, certDomainName string) (string, error)
- func GetAddressOfRdsInstance(t testing.TestingT, dbInstanceID string, awsRegion string) string
- func GetAddressOfRdsInstanceE(t testing.TestingT, dbInstanceID string, awsRegion string) (string, error)
- func GetAllAwsRegions(t testing.TestingT) []string
- func GetAllAwsRegionsE(t testing.TestingT) ([]string, error)
- func GetAllParametersOfRdsInstance(t testing.TestingT, dbInstanceID string, awsRegion string) []types.Parameter
- func GetAllParametersOfRdsInstanceE(t testing.TestingT, dbInstanceID string, awsRegion string) ([]types.Parameter, error)
- func GetAmazonLinuxAmi(t testing.TestingT, region string) string
- func GetAmazonLinuxAmiE(t testing.TestingT, region string) (string, error)
- func GetAmiPubliclyAccessible(t testing.TestingT, awsRegion string, amiID string) bool
- func GetAmiPubliclyAccessibleE(t testing.TestingT, awsRegion string, amiID string) (bool, error)
- func GetAvailabilityZones(t testing.TestingT, region string) []string
- func GetAvailabilityZonesE(t testing.TestingT, region string) ([]string, error)
- func GetCentos7Ami(t testing.TestingT, region string) string
- func GetCentos7AmiE(t testing.TestingT, region string) (string, error)
- func GetCloudWatchLogEntries(t testing.TestingT, awsRegion string, logStreamName string, ...) []string
- func GetCloudWatchLogEntriesE(t testing.TestingT, awsRegion string, logStreamName string, ...) ([]string, error)
- func GetCmkArn(t testing.TestingT, region string, cmkID string) string
- func GetCmkArnE(t testing.TestingT, region string, cmkID string) (string, error)
- func GetDefaultEcsCluster(t testing.TestingT, region string) *types.Cluster
- func GetDefaultEcsClusterE(t testing.TestingT, region string) (*types.Cluster, error)
- func GetDefaultSubnetIDsForVpc(t testing.TestingT, vpc Vpc) []string
- func GetDefaultSubnetIDsForVpcE(t testing.TestingT, vpc Vpc) ([]string, error)
- func GetDynamoDBTable(t testing.TestingT, region string, tableName string) *types.TableDescription
- func GetDynamoDBTableE(t testing.TestingT, region string, tableName string) (*types.TableDescription, error)
- func GetDynamoDBTableTimeToLive(t testing.TestingT, region string, tableName string) *types.TimeToLiveDescription
- func GetDynamoDBTableTimeToLiveE(t testing.TestingT, region string, tableName string) (*types.TimeToLiveDescription, error)
- func GetDynamoDbTableTags(t testing.TestingT, region string, tableName string) []types.Tag
- func GetDynamoDbTableTagsE(t testing.TestingT, region string, tableName string) ([]types.Tag, error)
- func GetECRRepo(t testing.TestingT, region string, name string) *types.Repository
- func GetECRRepoE(t testing.TestingT, region string, name string) (*types.Repository, error)
- func GetECRRepoLifecyclePolicy(t testing.TestingT, region string, repo *types.Repository) string
- func GetECRRepoLifecyclePolicyE(t testing.TestingT, region string, repo *types.Repository) (string, error)
- func GetEbsSnapshotsForAmi(t testing.TestingT, region string, ami string) []string
- func GetEbsSnapshotsForAmiE(t testing.TestingT, region string, ami string) ([]string, error)
- func GetEc2InstanceIdsByFilters(t testing.TestingT, region string, ec2Filters map[string][]string) []string
- func GetEc2InstanceIdsByFiltersE(t testing.TestingT, region string, ec2Filters map[string][]string) ([]string, error)
- func GetEc2InstanceIdsByTag(t testing.TestingT, region string, tagName string, tagValue string) []string
- func GetEc2InstanceIdsByTagE(t testing.TestingT, region string, tagName string, tagValue string) ([]string, error)
- func GetEcsCluster(t testing.TestingT, region string, name string) *types.Cluster
- func GetEcsClusterE(t testing.TestingT, region string, name string) (*types.Cluster, error)
- func GetEcsClusterWithInclude(t testing.TestingT, region string, name string, include []types.ClusterField) *types.Cluster
- func GetEcsClusterWithIncludeE(t testing.TestingT, region string, name string, include []types.ClusterField) (*types.Cluster, error)
- func GetEcsOptimizedAmazonLinuxAmi(t testing.TestingT, region string) string
- func GetEcsOptimizedAmazonLinuxAmiE(t testing.TestingT, region string) (string, error)
- func GetEcsService(t testing.TestingT, region string, clusterName string, serviceName string) *types.Service
- func GetEcsServiceE(t testing.TestingT, region string, clusterName string, serviceName string) (*types.Service, error)
- func GetEcsTaskDefinition(t testing.TestingT, region string, taskDefinition string) *types.TaskDefinition
- func GetEcsTaskDefinitionE(t testing.TestingT, region string, taskDefinition string) (*types.TaskDefinition, error)
- func GetFirstTwoOctets(cidrBlock string) string
- func GetIamCurrentUserArn(t testing.TestingT) string
- func GetIamCurrentUserArnE(t testing.TestingT) (string, error)
- func GetIamCurrentUserName(t testing.TestingT) string
- func GetIamCurrentUserNameE(t testing.TestingT) (string, error)
- func GetIamPolicyDocument(t testing.TestingT, region string, policyARN string) string
- func GetIamPolicyDocumentE(t testing.TestingT, region string, policyARN string) (string, error)
- func GetInstanceIdsForAsg(t testing.TestingT, asgName string, awsRegion string) []string
- func GetInstanceIdsForAsgE(t testing.TestingT, asgName string, awsRegion string) ([]string, error)
- func GetLaunchPermissionsForAmiE(t testing.TestingT, awsRegion string, amiID string) ([]types.LaunchPermission, error)
- func GetMostRecentAmiId(t testing.TestingT, region string, ownerId string, filters map[string][]string) string
- func GetMostRecentAmiIdE(t testing.TestingT, region string, ownerId string, filters map[string][]string) (string, error)
- func GetOptionGroupNameOfRdsInstance(t testing.TestingT, dbInstanceID string, awsRegion string) string
- func GetOptionGroupNameOfRdsInstanceE(t testing.TestingT, dbInstanceID string, awsRegion string) (string, error)
- func GetOptionSettingForOfRdsInstance(t testing.TestingT, optionName string, optionSettingName string, ...) string
- func GetOptionSettingForOfRdsInstanceE(t testing.TestingT, optionName string, optionSettingName string, ...) (string, error)
- func GetOptionsOfOptionGroup(t testing.TestingT, optionGroupName string, awsRegion string) []types.Option
- func GetOptionsOfOptionGroupE(t testing.TestingT, optionGroupName string, awsRegion string) ([]types.Option, error)
- func GetParameter(t testing.TestingT, awsRegion string, keyName string) string
- func GetParameterE(t testing.TestingT, awsRegion string, keyName string) (string, error)
- func GetParameterValueForParameterOfRdsInstance(t testing.TestingT, parameterName string, dbInstanceID string, ...) string
- func GetParameterValueForParameterOfRdsInstanceE(t testing.TestingT, parameterName string, dbInstanceID string, ...) (string, error)
- func GetParameterWithClientE(t testing.TestingT, client *ssm.Client, keyName string) (string, error)
- func GetPortOfRdsInstance(t testing.TestingT, dbInstanceID string, awsRegion string) int32
- func GetPortOfRdsInstanceE(t testing.TestingT, dbInstanceID string, awsRegion string) (int32, error)
- func GetPrivateHostnameOfEc2Instance(t testing.TestingT, instanceID string, awsRegion string) string
- func GetPrivateHostnameOfEc2InstanceE(t testing.TestingT, instanceID string, awsRegion string) (string, error)
- func GetPrivateHostnamesOfEc2Instances(t testing.TestingT, instanceIDs []string, awsRegion string) map[string]string
- func GetPrivateHostnamesOfEc2InstancesE(t testing.TestingT, instanceIDs []string, awsRegion string) (map[string]string, error)
- func GetPrivateIpOfEc2Instance(t testing.TestingT, instanceID string, awsRegion string) string
- func GetPrivateIpOfEc2InstanceE(t testing.TestingT, instanceID string, awsRegion string) (string, error)
- func GetPrivateIpsOfEc2Instances(t testing.TestingT, instanceIDs []string, awsRegion string) map[string]string
- func GetPrivateIpsOfEc2InstancesE(t testing.TestingT, instanceIDs []string, awsRegion string) (map[string]string, error)
- func GetPublicIpOfEc2Instance(t testing.TestingT, instanceID string, awsRegion string) string
- func GetPublicIpOfEc2InstanceE(t testing.TestingT, instanceID string, awsRegion string) (string, error)
- func GetPublicIpsOfEc2Instances(t testing.TestingT, instanceIDs []string, awsRegion string) map[string]string
- func GetPublicIpsOfEc2InstancesE(t testing.TestingT, instanceIDs []string, awsRegion string) (map[string]string, error)
- func GetRandomPrivateCidrBlock(routingPrefix int) string
- func GetRandomRegion(t testing.TestingT, approvedRegions []string, forbiddenRegions []string) string
- func GetRandomRegionE(t testing.TestingT, approvedRegions []string, forbiddenRegions []string) (string, error)
- func GetRandomRegionForService(t testing.TestingT, serviceName string) string
- func GetRandomStableRegion(t testing.TestingT, approvedRegions []string, forbiddenRegions []string) string
- func GetRdsInstanceDetailsE(t testing.TestingT, dbInstanceID string, awsRegion string) (*types.DBInstance, error)
- func GetRecommendedInstanceType(t testing.TestingT, region string, instanceTypeOptions []string) string
- func GetRecommendedInstanceTypeE(t testing.TestingT, region string, instanceTypeOptions []string) (string, error)
- func GetRecommendedInstanceTypeWithClientE(t testing.TestingT, ec2Client *ec2.Client, instanceTypeOptions []string) (string, error)
- func GetRecommendedRdsInstanceType(t testing.TestingT, region string, engine string, engineVersion string, ...) string
- func GetRecommendedRdsInstanceTypeE(t testing.TestingT, region string, engine string, engineVersion string, ...) (string, error)
- func GetRecommendedRdsInstanceTypeWithClientE(t testing.TestingT, rdsClient *rds.Client, engine string, engineVersion string, ...) (string, error)
- func GetRegionsForService(t testing.TestingT, serviceName string) []string
- func GetRegionsForServiceE(t testing.TestingT, serviceName string) ([]string, error)
- func GetRoute53Record(t *testing.T, hostedZoneID, recordName, recordType, awsRegion string) *types.ResourceRecordSet
- func GetRoute53RecordE(t *testing.T, hostedZoneID, recordName, recordType, awsRegion string) (*types.ResourceRecordSet, error)
- func GetS3BucketLoggingTarget(t testing.TestingT, awsRegion string, bucket string) string
- func GetS3BucketLoggingTargetE(t testing.TestingT, awsRegion string, bucket string) (string, error)
- func GetS3BucketLoggingTargetPrefix(t testing.TestingT, awsRegion string, bucket string) string
- func GetS3BucketLoggingTargetPrefixE(t testing.TestingT, awsRegion string, bucket string) (string, error)
- func GetS3BucketPolicy(t testing.TestingT, awsRegion string, bucket string) string
- func GetS3BucketPolicyE(t testing.TestingT, awsRegion string, bucket string) (string, error)
- func GetS3BucketTags(t testing.TestingT, awsRegion string, bucket string) map[string]string
- func GetS3BucketTagsE(t testing.TestingT, awsRegion string, bucket string) (map[string]string, error)
- func GetS3BucketVersioning(t testing.TestingT, awsRegion string, bucket string) string
- func GetS3BucketVersioningE(t testing.TestingT, awsRegion string, bucket string) (string, error)
- func GetS3ObjectContents(t testing.TestingT, awsRegion string, bucket string, key string) string
- func GetS3ObjectContentsE(t testing.TestingT, awsRegion string, bucket string, key string) (string, error)
- func GetSecretValue(t testing.TestingT, awsRegion, id string) string
- func GetSecretValueE(t testing.TestingT, awsRegion, id string) (string, error)
- func GetSyslogForInstance(t testing.TestingT, instanceID string, awsRegion string) string
- func GetSyslogForInstanceE(t testing.TestingT, instanceID string, region string) (string, error)
- func GetSyslogForInstancesInAsg(t testing.TestingT, asgName string, awsRegion string) map[string]string
- func GetSyslogForInstancesInAsgE(t testing.TestingT, asgName string, awsRegion string) (map[string]string, error)
- func GetTagsForEc2Instance(t testing.TestingT, region string, instanceID string) map[string]string
- func GetTagsForEc2InstanceE(t testing.TestingT, region string, instanceID string) (map[string]string, error)
- func GetTagsForSubnet(t testing.TestingT, subnetId string, region string) map[string]string
- func GetTagsForSubnetE(t testing.TestingT, subnetId string, region string) (map[string]string, error)
- func GetTagsForVpc(t testing.TestingT, vpcID string, region string) map[string]string
- func GetTagsForVpcE(t testing.TestingT, vpcID string, region string) (map[string]string, error)
- func GetTimeBasedOneTimePassword(mfaDevice *types.VirtualMFADevice) (string, error)
- func GetUbuntu1404Ami(t testing.TestingT, region string) string
- func GetUbuntu1404AmiE(t testing.TestingT, region string) (string, error)
- func GetUbuntu1604Ami(t testing.TestingT, region string) string
- func GetUbuntu1604AmiE(t testing.TestingT, region string) (string, error)
- func GetUbuntu2004Ami(t testing.TestingT, region string) string
- func GetUbuntu2004AmiE(t testing.TestingT, region string) (string, error)
- func GetUbuntu2204Ami(t testing.TestingT, region string) string
- func GetUbuntu2204AmiE(t testing.TestingT, region string) (string, error)
- func GetValidEngineVersion(t testing.TestingT, region string, engine string, majorVersion string) string
- func GetValidEngineVersionE(t testing.TestingT, region string, engine string, majorVersion string) (string, error)
- func GetWhetherSchemaExistsInRdsMySqlInstance(t testing.TestingT, dbUrl string, dbPort int32, dbUsername string, ...) bool
- func GetWhetherSchemaExistsInRdsMySqlInstanceE(t testing.TestingT, dbUrl string, dbPort int32, dbUsername string, ...) (bool, error)
- func GetWhetherSchemaExistsInRdsPostgresInstance(t testing.TestingT, dbUrl string, dbPort int32, dbUsername string, ...) bool
- func GetWhetherSchemaExistsInRdsPostgresInstanceE(t testing.TestingT, dbUrl string, dbPort int32, dbUsername string, ...) (bool, error)
- func InvokeFunction(t testing.TestingT, region, functionName string, payload interface{}) []byte
- func InvokeFunctionE(t testing.TestingT, region, functionName string, payload interface{}) ([]byte, error)
- func IsPublicSubnet(t testing.TestingT, subnetId string, region string) bool
- func IsPublicSubnetE(t testing.TestingT, subnetId string, region string) (bool, error)
- func NewAcmClient(t testing.TestingT, region string) *acm.Client
- func NewAcmClientE(t testing.TestingT, awsRegion string) (*acm.Client, error)
- func NewAsgClient(t testing.TestingT, region string) *autoscaling.Client
- func NewAsgClientE(t testing.TestingT, region string) (*autoscaling.Client, error)
- func NewAuthenticatedSession(region string) (*aws.Config, error)
- func NewAuthenticatedSessionFromDefaultCredentials(region string) (*aws.Config, error)
- func NewAuthenticatedSessionFromRole(region string, roleARN string) (*aws.Config, error)
- func NewCloudWatchLogsClient(t testing.TestingT, region string) *cloudwatchlogs.Client
- func NewCloudWatchLogsClientE(t testing.TestingT, region string) (*cloudwatchlogs.Client, error)
- func NewDynamoDBClient(t testing.TestingT, region string) *dynamodb.Client
- func NewDynamoDBClientE(t testing.TestingT, region string) (*dynamodb.Client, error)
- func NewECRClient(t testing.TestingT, region string) *ecr.Client
- func NewECRClientE(t testing.TestingT, region string) (*ecr.Client, error)
- func NewEc2Client(t testing.TestingT, region string) *ec2.Client
- func NewEc2ClientE(t testing.TestingT, region string) (*ec2.Client, error)
- func NewEcsClient(t testing.TestingT, region string) *ecs.Client
- func NewEcsClientE(t testing.TestingT, region string) (*ecs.Client, error)
- func NewIamClient(t testing.TestingT, region string) *iam.Client
- func NewIamClientE(t testing.TestingT, region string) (*iam.Client, error)
- func NewKmsClient(t testing.TestingT, region string) *kms.Client
- func NewKmsClientE(t testing.TestingT, region string) (*kms.Client, error)
- func NewLambdaClient(t testing.TestingT, region string) *lambda.Client
- func NewLambdaClientE(t testing.TestingT, region string) (*lambda.Client, error)
- func NewRdsClient(t testing.TestingT, region string) *rds.Client
- func NewRdsClientE(t testing.TestingT, region string) (*rds.Client, error)
- func NewRoute53Client(t *testing.T, region string) *route53.Client
- func NewRoute53ClientE(t *testing.T, region string) (*route53.Client, error)
- func NewS3Client(t testing.TestingT, region string) *s3.Client
- func NewS3ClientE(t testing.TestingT, region string) (*s3.Client, error)
- func NewS3Uploader(t testing.TestingT, region string) *manager.Uploader
- func NewS3UploaderE(t testing.TestingT, region string) (*manager.Uploader, error)
- func NewSecretsManagerClient(t testing.TestingT, region string) *secretsmanager.Client
- func NewSecretsManagerClientE(t testing.TestingT, region string) (*secretsmanager.Client, error)
- func NewSnsClient(t testing.TestingT, region string) *sns.Client
- func NewSnsClientE(t testing.TestingT, region string) (*sns.Client, error)
- func NewSqsClient(t testing.TestingT, region string) *sqs.Client
- func NewSqsClientE(t testing.TestingT, region string) (*sqs.Client, error)
- func NewSsmClient(t testing.TestingT, region string) *ssm.Client
- func NewSsmClientE(t testing.TestingT, region string) (*ssm.Client, error)
- func NewStsClientE(t testing.TestingT, region string) (*sts.Client, error)
- func PutECRRepoLifecyclePolicy(t testing.TestingT, region string, repo *types.Repository, policy string)
- func PutECRRepoLifecyclePolicyE(t testing.TestingT, region string, repo *types.Repository, policy string) error
- func PutParameter(t testing.TestingT, awsRegion string, keyName string, keyDescription string, ...) int64
- func PutParameterE(t testing.TestingT, awsRegion string, keyName string, keyDescription string, ...) (int64, error)
- func PutParameterWithClientE(t testing.TestingT, client *ssm.Client, keyName string, keyDescription string, ...) (int64, error)
- func PutS3BucketPolicy(t testing.TestingT, region string, bucketName string, policyJSONString string)
- func PutS3BucketPolicyE(t testing.TestingT, region string, bucketName string, policyJSONString string) error
- func PutS3BucketVersioning(t testing.TestingT, region string, bucketName string)
- func PutS3BucketVersioningE(t testing.TestingT, region string, bucketName string) error
- func PutSecretString(t testing.TestingT, awsRegion, id string, secretString string)
- func PutSecretStringE(t testing.TestingT, awsRegion, id string, secretString string) error
- func ReadPasswordPolicyMinPasswordLength(iamClient *iam.Client) (int, error)
- func SendMessageFifoToQueue(t testing.TestingT, awsRegion string, queueURL string, message string, ...)
- func SendMessageToFifoQueueE(t testing.TestingT, awsRegion string, queueURL string, message string, ...) error
- func SendMessageToQueue(t testing.TestingT, awsRegion string, queueURL string, message string)
- func SendMessageToQueueE(t testing.TestingT, awsRegion string, queueURL string, message string) error
- func TerminateInstance(t testing.TestingT, region string, instanceID string)
- func TerminateInstanceE(t testing.TestingT, region string, instanceID string) error
- func WaitForCapacity(t testing.TestingT, asgName string, region string, maxRetries int, ...)
- func WaitForCapacityE(t testing.TestingT, asgName string, region string, maxRetries int, ...) error
- func WaitForSsmInstance(t testing.TestingT, awsRegion, instanceID string, timeout time.Duration)
- func WaitForSsmInstanceE(t testing.TestingT, awsRegion, instanceID string, timeout time.Duration) error
- func WaitForSsmInstanceWithClientE(t testing.TestingT, client *ssm.Client, instanceID string, ...) error
- type AsgCapacityInfo
- type AsgCapacityNotMetError
- type BucketVersioningNotEnabledError
- type CommandOutput
- func CheckSSMCommandWithClientE(t testing.TestingT, client *ssm.Client, instanceID, command string, ...) (*CommandOutput, error)
- func CheckSSMCommandWithClientWithDocumentE(t testing.TestingT, client *ssm.Client, instanceID, command string, ...) (*CommandOutput, error)
- func CheckSsmCommand(t testing.TestingT, awsRegion, instanceID, command string, ...) *CommandOutput
- func CheckSsmCommandE(t testing.TestingT, awsRegion, instanceID, command string, ...) (*CommandOutput, error)
- func CheckSsmCommandWithDocument(t testing.TestingT, awsRegion, instanceID, command string, ...) *CommandOutput
- func CheckSsmCommandWithDocumentE(t testing.TestingT, awsRegion, instanceID, command string, ...) (*CommandOutput, error)
- type CredentialsError
- type Ec2Keypair
- func CreateAndImportEC2KeyPair(t testing.TestingT, region string, name string) *Ec2Keypair
- func CreateAndImportEC2KeyPairE(t testing.TestingT, region string, name string) (*Ec2Keypair, error)
- func ImportEC2KeyPair(t testing.TestingT, region string, name string, keyPair *ssh.KeyPair) *Ec2Keypair
- func ImportEC2KeyPairE(t testing.TestingT, region string, name string, keyPair *ssh.KeyPair) (*Ec2Keypair, error)
- type FunctionError
- type HostnameForEc2InstanceNotFound
- type InvocationTypeOption
- type IpForEc2InstanceNotFound
- type LambdaOptions
- type LambdaOutput
- type NoBucketPolicyError
- type NoImagesFound
- type NoInstanceTypeError
- type NoRdsInstanceTypeError
- type NotFoundError
- type OptionGroupOptionSettingForDbInstanceNotFound
- type ParameterForDbInstanceNotFound
- type QueueMessageResponse
- type ReceiveMessageTimeout
- type RemoteFileSpecification
- type S3AccessLoggingNotEnabledErr
- type Subnet
- type Vpc
- func GetDefaultVpc(t testing.TestingT, region string) *Vpc
- func GetDefaultVpcE(t testing.TestingT, region string) (*Vpc, error)
- func GetVpcById(t testing.TestingT, vpcId string, region string) *Vpc
- func GetVpcByIdE(t testing.TestingT, vpcId string, region string) (*Vpc, error)
- func GetVpcsE(t testing.TestingT, filters []types.Filter, region string) ([]*Vpc, error)
Constants ¶
const ( CanonicalAccountId = "099720109477" CentOsAccountId = "679593333241" AmazonAccountId = "amazon" )
These are commonly used AMI account IDs.
const (
AuthAssumeRoleEnvVar = "TERRATEST_IAM_ROLE" // OS environment variable name through which Assume Role ARN may be passed for authentication
)
Variables ¶
This section is empty.
Functions ¶
func AddTagsToResource ¶ added in v0.9.11
AddTagsToResource adds the tags to the given taggable AWS resource such as EC2, AMI or VPC.
func AddTagsToResourceE ¶ added in v0.9.11
func AddTagsToResourceE(t testing.TestingT, region string, resource string, tags map[string]string) error
AddTagsToResourceE adds the tags to the given taggable AWS resource such as EC2, AMI or VPC.
func AssertS3BucketExists ¶
AssertS3BucketExists checks if the given S3 bucket exists in the given region and fail the test if it does not.
func AssertS3BucketExistsE ¶
AssertS3BucketExistsE checks if the given S3 bucket exists in the given region and return an error if it does not.
func AssertS3BucketPolicyExists ¶ added in v0.15.5
AssertS3BucketPolicyExists checks if the given S3 bucket has a resource policy attached and returns an error if it does not
func AssertS3BucketPolicyExistsE ¶ added in v0.15.5
AssertS3BucketPolicyExistsE checks if the given S3 bucket has a resource policy attached and returns an error if it does not
func AssertS3BucketVersioningExists ¶ added in v0.15.4
AssertS3BucketVersioningExists checks if the given S3 bucket has a versioning configuration enabled and returns an error if it does not.
func AssertS3BucketVersioningExistsE ¶ added in v0.15.4
AssertS3BucketVersioningExistsE checks if the given S3 bucket has a versioning configuration enabled and returns an error if it does not.
func CreateAwsSessionWithCreds ¶
func CreateAwsSessionWithCreds(region string, accessKeyID string, secretAccessKey string) (*aws.Config, error)
CreateAwsSessionWithCreds creates a new AWS Config using explicit credentials. This is useful if you want to create an IAM User dynamically and create an AWS Config authenticated as the new IAM User.
func CreateAwsSessionWithMfa ¶
func CreateAwsSessionWithMfa(region string, stsClient *sts.Client, mfaDevice *types.VirtualMFADevice) (*aws.Config, error)
CreateAwsSessionWithMfa creates a new AWS Config authenticated using an MFA token retrieved using the given STS client and MFA Device.
func CreateECRRepo ¶ added in v0.30.5
CreateECRRepo creates a new ECR Repository. This will fail the test and stop execution if there is an error.
func CreateECRRepoE ¶ added in v0.30.5
CreateECRRepoE creates a new ECR Repository.
func CreateEcsCluster ¶ added in v0.14.3
CreateEcsCluster creates ECS cluster in the given region under the given name.
func CreateEcsClusterE ¶ added in v0.14.3
CreateEcsClusterE creates ECS cluster in the given region under the given name.
func CreateMfaDevice ¶
func CreateMfaDevice(t testing.TestingT, iamClient *iam.Client, deviceName string) *types.VirtualMFADevice
CreateMfaDevice creates an MFA device using the given IAM client.
func CreateMfaDeviceE ¶
func CreateMfaDeviceE(t testing.TestingT, iamClient *iam.Client, deviceName string) (*types.VirtualMFADevice, error)
CreateMfaDeviceE creates an MFA device using the given IAM client.
func CreateRandomFifoQueue ¶ added in v0.18.3
CreateRandomFifoQueue creates a new FIFO SQS queue with a random name that starts with the given prefix and return the queue URL.
func CreateRandomFifoQueueE ¶ added in v0.18.3
CreateRandomFifoQueueE creates a new FIFO SQS queue with a random name that starts with the given prefix and return the queue URL.
func CreateRandomQueue ¶
CreateRandomQueue creates a new SQS queue with a random name that starts with the given prefix and return the queue URL.
func CreateRandomQueueE ¶
CreateRandomQueueE creates a new SQS queue with a random name that starts with the given prefix and return the queue URL.
func CreateS3Bucket ¶
CreateS3Bucket creates an S3 bucket in the given region with the given name. Note that S3 bucket names must be globally unique.
func CreateS3BucketE ¶
CreateS3BucketE creates an S3 bucket in the given region with the given name. Note that S3 bucket names must be globally unique.
func CreateSecretStringWithDefaultKey ¶ added in v0.28.12
func CreateSecretStringWithDefaultKey(t testing.TestingT, awsRegion, description, name, secretString string) string
CreateSecretStringWithDefaultKey creates a new secret in Secrets Manager using the default "aws/secretsmanager" KMS key and returns the secret ARN
func CreateSecretStringWithDefaultKeyE ¶ added in v0.28.12
func CreateSecretStringWithDefaultKeyE(t testing.TestingT, awsRegion, description, name, secretString string) (string, error)
CreateSecretStringWithDefaultKeyE creates a new secret in Secrets Manager using the default "aws/secretsmanager" KMS key and returns the secret ARN
func CreateSnsTopic ¶
CreateSnsTopic creates an SNS Topic and return the ARN.
func CreateSnsTopicE ¶
CreateSnsTopicE creates an SNS Topic and return the ARN.
func DeleteAmiAndAllSnapshots ¶ added in v0.9.9
DeleteAmiAndAllSnapshots will delete the given AMI along with all EBS snapshots that backed that AMI
func DeleteAmiAndAllSnapshotsE ¶ added in v0.9.9
DeleteAmiAndAllSnapshotsE will delete the given AMI along with all EBS snapshots that backed that AMI
func DeleteAmiE ¶
DeleteAmiE deletes the given AMI in the given region.
func DeleteEC2KeyPair ¶
func DeleteEC2KeyPair(t testing.TestingT, keyPair *Ec2Keypair)
DeleteEC2KeyPair deletes an EC2 key pair.
func DeleteEC2KeyPairE ¶
func DeleteEC2KeyPairE(t testing.TestingT, keyPair *Ec2Keypair) error
DeleteEC2KeyPairE deletes an EC2 key pair.
func DeleteECRRepo ¶ added in v0.30.5
func DeleteECRRepo(t testing.TestingT, region string, repo *types.Repository)
DeleteECRRepo will force delete the ECR repo by deleting all images prior to deleting the ECR repository. This will fail the test and stop execution if there is an error.
func DeleteECRRepoE ¶ added in v0.30.5
DeleteECRRepoE will force delete the ECR repo by deleting all images prior to deleting the ECR repository.
func DeleteEbsSnapshot ¶ added in v0.9.9
DeleteEbsSnapshot deletes the given EBS snapshot
func DeleteEbsSnapshotE ¶ added in v0.9.9
DeleteEbsSnapshotE deletes the given EBS snapshot
func DeleteEcsCluster ¶ added in v0.14.3
func DeleteEcsClusterE ¶ added in v0.14.3
DeleteEcsClusterE deletes existing ECS cluster in the given region.
func DeleteMessageFromQueue ¶
DeleteMessageFromQueue deletes the message with the given receipt from the SQS queue with the given URL.
func DeleteMessageFromQueueE ¶
func DeleteMessageFromQueueE(t testing.TestingT, awsRegion string, queueURL string, receipt string) error
DeleteMessageFromQueueE deletes the message with the given receipt from the SQS queue with the given URL.
func DeleteParameter ¶ added in v0.30.24
DeleteParameter deletes all versions of SSM Parameter at keyName.
func DeleteParameterE ¶ added in v0.30.24
DeleteParameterE deletes all versions of SSM Parameter at keyName.
func DeleteParameterWithClientE ¶ added in v0.36.3
DeleteParameterWithClientE deletes all versions of SSM Parameter at keyName with the ability to provide the SSM client.
func DeleteQueue ¶
DeleteQueue deletes the SQS queue with the given URL.
func DeleteQueueE ¶
DeleteQueueE deletes the SQS queue with the given URL.
func DeleteS3Bucket ¶
DeleteS3Bucket destroys the S3 bucket in the given region with the given name.
func DeleteS3BucketE ¶
DeleteS3BucketE destroys the S3 bucket in the given region with the given name.
func DeleteSNSTopic ¶
DeleteSNSTopic deletes an SNS Topic.
func DeleteSNSTopicE ¶
DeleteSNSTopicE deletes an SNS Topic.
func DeleteSecret ¶ added in v0.28.12
DeleteSecret deletes a secret. If forceDelete is true, the secret will be deleted after a short delay. If forceDelete is false, the secret will be deleted after a 30-day recovery window.
func DeleteSecretE ¶ added in v0.28.12
DeleteSecretE deletes a secret. If forceDelete is true, the secret will be deleted after a short delay. If forceDelete is false, the secret will be deleted after a 30-day recovery window.
func EmptyS3Bucket ¶ added in v0.9.15
EmptyS3Bucket removes the contents of an S3 bucket in the given region with the given name.
func EmptyS3BucketE ¶ added in v0.9.15
EmptyS3BucketE removes the contents of an S3 bucket in the given region with the given name.
func EnableMfaDevice ¶
EnableMfaDevice enables a newly created MFA Device by supplying the first two one-time passwords, so that it can be used for future logins by the given IAM User.
func EnableMfaDeviceE ¶
func EnableMfaDeviceE(t testing.TestingT, iamClient *iam.Client, mfaDevice *types.VirtualMFADevice) error
EnableMfaDeviceE enables a newly created MFA Device by supplying the first two one-time passwords, so that it can be used for future logins by the given IAM User.
func FetchContentsOfFileFromAsg ¶ added in v0.9.17
func FetchContentsOfFileFromAsg(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, asgName string, useSudo bool, filePath string) map[string]string
FetchContentsOfFileFromAsg looks up the EC2 Instances in the given ASG, looks up the public IPs of those EC2 Instances, connects to each Instance via SSH using the given username and Key Pair, fetches the contents of the file at the given path (using sudo if useSudo is true), and returns a map from Instance ID to the contents of that file as a string.
func FetchContentsOfFileFromAsgE ¶ added in v0.9.17
func FetchContentsOfFileFromAsgE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, asgName string, useSudo bool, filePath string) (map[string]string, error)
FetchContentsOfFileFromAsgE looks up the EC2 Instances in the given ASG, looks up the public IPs of those EC2 Instances, connects to each Instance via SSH using the given username and Key Pair, fetches the contents of the file at the given path (using sudo if useSudo is true), and returns a map from Instance ID to the contents of that file as a string.
func FetchContentsOfFileFromInstance ¶ added in v0.9.17
func FetchContentsOfFileFromInstance(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, instanceID string, useSudo bool, filePath string) string
FetchContentsOfFileFromInstance looks up the public IP address of the EC2 Instance with the given ID, connects to the Instance via SSH using the given username and Key Pair, fetches the contents of the file at the given path (using sudo if useSudo is true), and returns the contents of that file as a string.
func FetchContentsOfFileFromInstanceE ¶ added in v0.9.17
func FetchContentsOfFileFromInstanceE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, instanceID string, useSudo bool, filePath string) (string, error)
FetchContentsOfFileFromInstanceE looks up the public IP address of the EC2 Instance with the given ID, connects to the Instance via SSH using the given username and Key Pair, fetches the contents of the file at the given path (using sudo if useSudo is true), and returns the contents of that file as a string.
func FetchContentsOfFilesFromAsg ¶ added in v0.9.17
func FetchContentsOfFilesFromAsg(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, asgName string, useSudo bool, filePaths ...string) map[string]map[string]string
FetchContentsOfFilesFromAsg looks up the EC2 Instances in the given ASG, looks up the public IPs of those EC2 Instances, connects to each Instance via SSH using the given username and Key Pair, fetches the contents of the files at the given paths (using sudo if useSudo is true), and returns a map from Instance ID to a map of file path to the contents of that file as a string.
func FetchContentsOfFilesFromAsgE ¶ added in v0.9.17
func FetchContentsOfFilesFromAsgE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, asgName string, useSudo bool, filePaths ...string) (map[string]map[string]string, error)
FetchContentsOfFilesFromAsgE looks up the EC2 Instances in the given ASG, looks up the public IPs of those EC2 Instances, connects to each Instance via SSH using the given username and Key Pair, fetches the contents of the files at the given paths (using sudo if useSudo is true), and returns a map from Instance ID to a map of file path to the contents of that file as a string.
func FetchContentsOfFilesFromInstance ¶ added in v0.9.17
func FetchContentsOfFilesFromInstance(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, instanceID string, useSudo bool, filePaths ...string) map[string]string
FetchContentsOfFilesFromInstance looks up the public IP address of the EC2 Instance with the given ID, connects to the Instance via SSH using the given username and Key Pair, fetches the contents of the files at the given paths (using sudo if useSudo is true), and returns a map from file path to the contents of that file as a string.
func FetchContentsOfFilesFromInstanceE ¶ added in v0.9.17
func FetchContentsOfFilesFromInstanceE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, instanceID string, useSudo bool, filePaths ...string) (map[string]string, error)
FetchContentsOfFilesFromInstanceE looks up the public IP address of the EC2 Instance with the given ID, connects to the Instance via SSH using the given username and Key Pair, fetches the contents of the files at the given paths (using sudo if useSudo is true), and returns a map from file path to the contents of that file as a string.
func FetchFilesFromAsgs ¶ added in v0.13.0
func FetchFilesFromAsgs(t testing.TestingT, awsRegion string, spec RemoteFileSpecification)
FetchFilesFromAsgs looks up the EC2 Instances in all the ASGs given in the RemoteFileSpecification, looks up the public IPs of those EC2 Instances, connects to each Instance via SSH using the given username and Key Pair, downloads the files matching filenameFilters at the given remoteDirectory (using sudo if useSudo is true), and stores the files locally at localDirectory/<publicip>/<remoteFolderName>
func FetchFilesFromAsgsE ¶ added in v0.13.0
func FetchFilesFromAsgsE(t testing.TestingT, awsRegion string, spec RemoteFileSpecification) error
FetchFilesFromAsgsE looks up the EC2 Instances in all the ASGs given in the RemoteFileSpecification, looks up the public IPs of those EC2 Instances, connects to each Instance via SSH using the given username and Key Pair, downloads the files matching filenameFilters at the given remoteDirectory (using sudo if useSudo is true), and stores the files locally at localDirectory/<publicip>/<remoteFolderName>
func FetchFilesFromInstance ¶ added in v0.13.0
func FetchFilesFromInstance(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, instanceID string, useSudo bool, remoteDirectory string, localDirectory string, filenameFilters []string)
FetchFilesFromInstance looks up the EC2 Instances in the given ASG, looks up the public IPs of those EC2 Instances, connects to each Instance via SSH using the given username and Key Pair, downloads the files matching filenameFilters at the given remoteDirectory (using sudo if useSudo is true), and stores the files locally at localDirectory/<publicip>/<remoteFolderName>
func FetchFilesFromInstanceE ¶ added in v0.13.0
func FetchFilesFromInstanceE(t testing.TestingT, awsRegion string, sshUserName string, keyPair *Ec2Keypair, instanceID string, useSudo bool, remoteDirectory string, localDirectory string, filenameFilters []string) error
FetchFilesFromInstanceE looks up the EC2 Instances in the given ASG, looks up the public IPs of those EC2 Instances, connects to each Instance via SSH using the given username and Key Pair, downloads the files matching filenameFilters at the given remoteDirectory (using sudo if useSudo is true), and stores the files locally at localDirectory/<publicip>/<remoteFolderName>
func FindS3BucketWithTag ¶
FindS3BucketWithTag finds the name of the S3 bucket in the given region with the given tag key=value.
func FindS3BucketWithTagE ¶
func FindS3BucketWithTagE(t testing.TestingT, awsRegion string, key string, value string) (string, error)
FindS3BucketWithTagE finds the name of the S3 bucket in the given region with the given tag key=value.
func FindVpcName ¶
FindVpcName extracts the VPC name from its tags (if any). Fall back to "Default" if it's the default VPC or empty string otherwise.
func GetAccountId ¶
GetAccountId gets the Account ID for the currently logged in IAM User.
func GetAccountIdE ¶
GetAccountIdE gets the Account ID for the currently logged in IAM User.
func GetAccountsWithLaunchPermissionsForAmi ¶ added in v0.13.2
func GetAccountsWithLaunchPermissionsForAmi(t testing.TestingT, awsRegion string, amiID string) []string
GetAccountsWithLaunchPermissionsForAmi returns list of accounts that the AMI is shared with
func GetAccountsWithLaunchPermissionsForAmiE ¶ added in v0.13.2
func GetAccountsWithLaunchPermissionsForAmiE(t testing.TestingT, awsRegion string, amiID string) ([]string, error)
GetAccountsWithLaunchPermissionsForAmiE returns list of accounts that the AMI is shared with
func GetAcmCertificateArn ¶
GetAcmCertificateArn gets the ACM certificate for the given domain name in the given region.
func GetAcmCertificateArnE ¶ added in v0.9.0
func GetAcmCertificateArnE(t testing.TestingT, awsRegion string, certDomainName string) (string, error)
GetAcmCertificateArnE gets the ACM certificate for the given domain name in the given region.
func GetAddressOfRdsInstance ¶ added in v0.10.3
GetAddressOfRdsInstance gets the address of the given RDS Instance in the given region.
func GetAddressOfRdsInstanceE ¶ added in v0.10.3
func GetAddressOfRdsInstanceE(t testing.TestingT, dbInstanceID string, awsRegion string) (string, error)
GetAddressOfRdsInstanceE gets the address of the given RDS Instance in the given region.
func GetAllAwsRegions ¶
GetAllAwsRegions gets the list of AWS regions available in this account.
func GetAllAwsRegionsE ¶
GetAllAwsRegionsE gets the list of AWS regions available in this account.
func GetAllParametersOfRdsInstance ¶ added in v0.10.3
func GetAllParametersOfRdsInstance(t testing.TestingT, dbInstanceID string, awsRegion string) []types.Parameter
GetAllParametersOfRdsInstance gets all the parameters defined in the parameter group for the RDS instance in the given region.
func GetAllParametersOfRdsInstanceE ¶ added in v0.10.3
func GetAllParametersOfRdsInstanceE(t testing.TestingT, dbInstanceID string, awsRegion string) ([]types.Parameter, error)
GetAllParametersOfRdsInstanceE gets all the parameters defined in the parameter group for the RDS instance in the given region.
func GetAmazonLinuxAmi ¶
GetAmazonLinuxAmi returns an Amazon Linux AMI HVM, SSD Volume Type public AMI for the given region.
func GetAmazonLinuxAmiE ¶
GetAmazonLinuxAmiE returns an Amazon Linux AMI HVM, SSD Volume Type public AMI for the given region.
func GetAmiPubliclyAccessible ¶ added in v0.13.2
GetAmiPubliclyAccessible returns whether the AMI is publicly accessible or not
func GetAmiPubliclyAccessibleE ¶ added in v0.13.2
GetAmiPubliclyAccessibleE returns whether the AMI is publicly accessible or not
func GetAvailabilityZones ¶
GetAvailabilityZones gets the Availability Zones for a given AWS region. Note that for certain regions (e.g. us-east-1), different AWS accounts have access to different availability zones.
func GetAvailabilityZonesE ¶
GetAvailabilityZonesE gets the Availability Zones for a given AWS region. Note that for certain regions (e.g. us-east-1), different AWS accounts have access to different availability zones.
func GetCentos7Ami ¶
GetCentos7Ami returns a CentOS 7 public AMI from the given region. WARNING: you may have to accept the terms & conditions of this AMI in AWS MarketPlace for your AWS Account before you can successfully launch the AMI.
func GetCentos7AmiE ¶
GetCentos7AmiE returns a CentOS 7 public AMI from the given region. WARNING: you may have to accept the terms & conditions of this AMI in AWS MarketPlace for your AWS Account before you can successfully launch the AMI.
func GetCloudWatchLogEntries ¶
func GetCloudWatchLogEntries(t testing.TestingT, awsRegion string, logStreamName string, logGroupName string) []string
GetCloudWatchLogEntries returns the CloudWatch log messages in the given region for the given log stream and log group.
func GetCloudWatchLogEntriesE ¶
func GetCloudWatchLogEntriesE(t testing.TestingT, awsRegion string, logStreamName string, logGroupName string) ([]string, error)
GetCloudWatchLogEntriesE returns the CloudWatch log messages in the given region for the given log stream and log group.
func GetCmkArn ¶
GetCmkArn gets the ARN of a KMS Customer Master Key (CMK) in the given region with the given ID. The ID can be an alias, such as "alias/my-cmk".
func GetCmkArnE ¶
GetCmkArnE gets the ARN of a KMS Customer Master Key (CMK) in the given region with the given ID. The ID can be an alias, such as "alias/my-cmk".
func GetDefaultEcsCluster ¶ added in v0.14.3
GetDefaultEcsCluster fetches information about default ECS cluster.
func GetDefaultEcsClusterE ¶ added in v0.14.3
GetDefaultEcsClusterE fetches information about default ECS cluster.
func GetDefaultSubnetIDsForVpc ¶ added in v0.40.17
GetDefaultSubnetIDsForVpc gets the ids of the subnets that are the default subnet for the AvailabilityZone
func GetDefaultSubnetIDsForVpcE ¶ added in v0.40.17
GetDefaultSubnetIDsForVpcE gets the ids of the subnets that are the default subnet for the AvailabilityZone
func GetDynamoDBTable ¶ added in v0.15.11
GetDynamoDBTable fetches information about the specified dynamoDB table. This will fail the test if there are any errors.
func GetDynamoDBTableE ¶ added in v0.15.11
func GetDynamoDBTableE(t testing.TestingT, region string, tableName string) (*types.TableDescription, error)
GetDynamoDBTableE fetches information about the specified dynamoDB table.
func GetDynamoDBTableTimeToLive ¶ added in v0.15.11
func GetDynamoDBTableTimeToLive(t testing.TestingT, region string, tableName string) *types.TimeToLiveDescription
GetDynamoDBTableTimeToLive fetches information about the TTL configuration of a specified dynamoDB table. This will fail the test if there are any errors.
func GetDynamoDBTableTimeToLiveE ¶ added in v0.15.11
func GetDynamoDBTableTimeToLiveE(t testing.TestingT, region string, tableName string) (*types.TimeToLiveDescription, error)
GetDynamoDBTableTimeToLiveE fetches information about the TTL configuration of a specified dynamoDB table.
func GetDynamoDbTableTags ¶ added in v0.15.11
GetDynamoDbTableTags fetches resource tags of a specified dynamoDB table. This will fail the test if there are any errors
func GetDynamoDbTableTagsE ¶ added in v0.15.11
func GetDynamoDbTableTagsE(t testing.TestingT, region string, tableName string) ([]types.Tag, error)
GetDynamoDbTableTagsE fetches resource tags of a specified dynamoDB table.
func GetECRRepo ¶ added in v0.30.5
GetECRRepo gets an ECR repository by name. This will fail the test and stop execution if there is an error. An error occurs if a repository with the given name does not exist in the given region.
func GetECRRepoE ¶ added in v0.30.5
GetECRRepoE gets an ECR Repository by name. An error occurs if a repository with the given name does not exist in the given region.
func GetECRRepoLifecyclePolicy ¶ added in v0.41.5
GetECRRepoLifecyclePolicy gets the policies for the given ECR repository. This will fail the test and stop execution if there is an error.
func GetECRRepoLifecyclePolicyE ¶ added in v0.41.5
func GetECRRepoLifecyclePolicyE(t testing.TestingT, region string, repo *types.Repository) (string, error)
GetECRRepoLifecyclePolicyE gets the policies for the given ECR repository.
func GetEbsSnapshotsForAmi ¶ added in v0.9.9
GetEbsSnapshotsForAmi retrieves the EBS snapshots which back the given AMI
func GetEbsSnapshotsForAmiE ¶ added in v0.9.9
GetEbsSnapshotsForAmiE retrieves the EBS snapshots which back the given AMI
func GetEc2InstanceIdsByFilters ¶ added in v0.15.11
func GetEc2InstanceIdsByFilters(t testing.TestingT, region string, ec2Filters map[string][]string) []string
GetEc2InstanceIdsByFilters returns all the IDs of EC2 instances in the given region which match to EC2 filter list as per https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeInstancesInput.
func GetEc2InstanceIdsByFiltersE ¶ added in v0.15.11
func GetEc2InstanceIdsByFiltersE(t testing.TestingT, region string, ec2Filters map[string][]string) ([]string, error)
GetEc2InstanceIdsByFiltersE returns all the IDs of EC2 instances in the given region which match to EC2 filter list as per https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeInstancesInput.
func GetEc2InstanceIdsByTag ¶
func GetEc2InstanceIdsByTag(t testing.TestingT, region string, tagName string, tagValue string) []string
GetEc2InstanceIdsByTag returns all the IDs of EC2 instances in the given region with the given tag.
func GetEc2InstanceIdsByTagE ¶
func GetEc2InstanceIdsByTagE(t testing.TestingT, region string, tagName string, tagValue string) ([]string, error)
GetEc2InstanceIdsByTagE returns all the IDs of EC2 instances in the given region with the given tag.
func GetEcsCluster ¶ added in v0.14.3
GetEcsCluster fetches information about specified ECS cluster.
func GetEcsClusterE ¶ added in v0.14.3
GetEcsClusterE fetches information about specified ECS cluster.
func GetEcsClusterWithInclude ¶ added in v0.30.8
func GetEcsClusterWithInclude(t testing.TestingT, region string, name string, include []types.ClusterField) *types.Cluster
GetEcsClusterWithInclude fetches extended information about specified ECS cluster. The `include` parameter specifies a list of `ecs.ClusterField*` constants, such as `ecs.ClusterFieldTags`.
func GetEcsClusterWithIncludeE ¶ added in v0.30.8
func GetEcsClusterWithIncludeE(t testing.TestingT, region string, name string, include []types.ClusterField) (*types.Cluster, error)
GetEcsClusterWithIncludeE fetches extended information about specified ECS cluster. The `include` parameter specifies a list of `ecs.ClusterField*` constants, such as `ecs.ClusterFieldTags`.
func GetEcsOptimizedAmazonLinuxAmi ¶
GetEcsOptimizedAmazonLinuxAmi returns an Amazon ECS-Optimized Amazon Linux AMI for the given region. This AMI is useful for running an ECS cluster.
func GetEcsOptimizedAmazonLinuxAmiE ¶
GetEcsOptimizedAmazonLinuxAmiE returns an Amazon ECS-Optimized Amazon Linux AMI for the given region. This AMI is useful for running an ECS cluster.
func GetEcsService ¶ added in v0.15.1
func GetEcsService(t testing.TestingT, region string, clusterName string, serviceName string) *types.Service
GetEcsService fetches information about specified ECS service.
func GetEcsServiceE ¶ added in v0.15.1
func GetEcsServiceE(t testing.TestingT, region string, clusterName string, serviceName string) (*types.Service, error)
GetEcsServiceE fetches information about specified ECS service.
func GetEcsTaskDefinition ¶ added in v0.15.1
func GetEcsTaskDefinition(t testing.TestingT, region string, taskDefinition string) *types.TaskDefinition
GetEcsTaskDefinition fetches information about specified ECS task definition.
func GetEcsTaskDefinitionE ¶ added in v0.15.1
func GetEcsTaskDefinitionE(t testing.TestingT, region string, taskDefinition string) (*types.TaskDefinition, error)
GetEcsTaskDefinitionE fetches information about specified ECS task definition.
func GetFirstTwoOctets ¶
GetFirstTwoOctets gets the first two octets from a CIDR block.
func GetIamCurrentUserArn ¶
GetIamCurrentUserArn gets the ARN for the current IAM user.
func GetIamCurrentUserArnE ¶
GetIamCurrentUserArnE gets the ARN for the current IAM user.
func GetIamCurrentUserName ¶
GetIamCurrentUserName gets the username for the current IAM user.
func GetIamCurrentUserNameE ¶
GetIamCurrentUserNameE gets the username for the current IAM user.
func GetIamPolicyDocument ¶ added in v0.48.1
GetIamPolicyDocument gets the most recent policy (JSON) document for an IAM policy.
func GetIamPolicyDocumentE ¶ added in v0.48.1
GetIamPolicyDocumentE gets the most recent policy (JSON) document for an IAM policy.
func GetInstanceIdsForAsg ¶ added in v0.9.0
GetInstanceIdsForAsg gets the IDs of EC2 Instances in the given ASG.
func GetInstanceIdsForAsgE ¶ added in v0.9.0
GetInstanceIdsForAsgE gets the IDs of EC2 Instances in the given ASG.
func GetLaunchPermissionsForAmiE ¶ added in v0.13.2
func GetLaunchPermissionsForAmiE(t testing.TestingT, awsRegion string, amiID string) ([]types.LaunchPermission, error)
GetLaunchPermissionsForAmiE returns launchPermissions as configured in AWS
func GetMostRecentAmiId ¶
func GetMostRecentAmiId(t testing.TestingT, region string, ownerId string, filters map[string][]string) string
GetMostRecentAmiId gets the ID of the most recent AMI in the given region that has the given owner and matches the given filters. Each filter should correspond to the name and values of a filter supported by DescribeImagesInput: https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeImagesInput
func GetMostRecentAmiIdE ¶
func GetMostRecentAmiIdE(t testing.TestingT, region string, ownerId string, filters map[string][]string) (string, error)
GetMostRecentAmiIdE gets the ID of the most recent AMI in the given region that has the given owner and matches the given filters. Each filter should correspond to the name and values of a filter supported by DescribeImagesInput: https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#DescribeImagesInput
func GetOptionGroupNameOfRdsInstance ¶ added in v0.10.3
func GetOptionGroupNameOfRdsInstance(t testing.TestingT, dbInstanceID string, awsRegion string) string
GetOptionGroupNameOfRdsInstance gets the name of the option group associated with the RDS instance
func GetOptionGroupNameOfRdsInstanceE ¶ added in v0.10.3
func GetOptionGroupNameOfRdsInstanceE(t testing.TestingT, dbInstanceID string, awsRegion string) (string, error)
GetOptionGroupNameOfRdsInstanceE gets the name of the option group associated with the RDS instance
func GetOptionSettingForOfRdsInstance ¶ added in v0.10.3
func GetOptionSettingForOfRdsInstance(t testing.TestingT, optionName string, optionSettingName string, dbInstanceID, awsRegion string) string
GetOptionSettingForOfRdsInstance gets the value of the option name in the option group specified for the RDS instance in the given region.
func GetOptionSettingForOfRdsInstanceE ¶ added in v0.10.3
func GetOptionSettingForOfRdsInstanceE(t testing.TestingT, optionName string, optionSettingName string, dbInstanceID, awsRegion string) (string, error)
GetOptionSettingForOfRdsInstanceE gets the value of the option name in the option group specified for the RDS instance in the given region.
func GetOptionsOfOptionGroup ¶ added in v0.10.3
func GetOptionsOfOptionGroup(t testing.TestingT, optionGroupName string, awsRegion string) []types.Option
GetOptionsOfOptionGroup gets the options of the option group specified
func GetOptionsOfOptionGroupE ¶ added in v0.10.3
func GetOptionsOfOptionGroupE(t testing.TestingT, optionGroupName string, awsRegion string) ([]types.Option, error)
GetOptionsOfOptionGroupE gets the options of the option group specified
func GetParameter ¶ added in v0.15.3
GetParameter retrieves the latest version of SSM Parameter at keyName with decryption.
func GetParameterE ¶ added in v0.15.3
GetParameterE retrieves the latest version of SSM Parameter at keyName with decryption.
func GetParameterValueForParameterOfRdsInstance ¶ added in v0.10.3
func GetParameterValueForParameterOfRdsInstance(t testing.TestingT, parameterName string, dbInstanceID string, awsRegion string) string
GetParameterValueForParameterOfRdsInstance gets the value of the parameter name specified for the RDS instance in the given region.
func GetParameterValueForParameterOfRdsInstanceE ¶ added in v0.10.3
func GetParameterValueForParameterOfRdsInstanceE(t testing.TestingT, parameterName string, dbInstanceID string, awsRegion string) (string, error)
GetParameterValueForParameterOfRdsInstanceE gets the value of the parameter name specified for the RDS instance in the given region.
func GetParameterWithClientE ¶ added in v0.36.3
func GetParameterWithClientE(t testing.TestingT, client *ssm.Client, keyName string) (string, error)
GetParameterWithClientE retrieves the latest version of SSM Parameter at keyName with decryption with the ability to provide the SSM client.
func GetPortOfRdsInstance ¶ added in v0.10.3
GetPortOfRdsInstance gets the address of the given RDS Instance in the given region.
func GetPortOfRdsInstanceE ¶ added in v0.10.3
func GetPortOfRdsInstanceE(t testing.TestingT, dbInstanceID string, awsRegion string) (int32, error)
GetPortOfRdsInstanceE gets the address of the given RDS Instance in the given region.
func GetPrivateHostnameOfEc2Instance ¶ added in v0.13.20
func GetPrivateHostnameOfEc2Instance(t testing.TestingT, instanceID string, awsRegion string) string
GetPrivateHostnameOfEc2Instance gets the private IP address of the given EC2 Instance in the given region.
func GetPrivateHostnameOfEc2InstanceE ¶ added in v0.13.20
func GetPrivateHostnameOfEc2InstanceE(t testing.TestingT, instanceID string, awsRegion string) (string, error)
GetPrivateHostnameOfEc2InstanceE gets the private IP address of the given EC2 Instance in the given region.
func GetPrivateHostnamesOfEc2Instances ¶ added in v0.13.20
func GetPrivateHostnamesOfEc2Instances(t testing.TestingT, instanceIDs []string, awsRegion string) map[string]string
GetPrivateHostnamesOfEc2Instances gets the private IP address of the given EC2 Instance in the given region. Returns a map of instance ID to IP address.
func GetPrivateHostnamesOfEc2InstancesE ¶ added in v0.13.20
func GetPrivateHostnamesOfEc2InstancesE(t testing.TestingT, instanceIDs []string, awsRegion string) (map[string]string, error)
GetPrivateHostnamesOfEc2InstancesE gets the private IP address of the given EC2 Instance in the given region. Returns a map of instance ID to IP address.
func GetPrivateIpOfEc2Instance ¶ added in v0.13.18
GetPrivateIpOfEc2Instance gets the private IP address of the given EC2 Instance in the given region.
func GetPrivateIpOfEc2InstanceE ¶ added in v0.13.18
func GetPrivateIpOfEc2InstanceE(t testing.TestingT, instanceID string, awsRegion string) (string, error)
GetPrivateIpOfEc2InstanceE gets the private IP address of the given EC2 Instance in the given region.
func GetPrivateIpsOfEc2Instances ¶ added in v0.13.18
func GetPrivateIpsOfEc2Instances(t testing.TestingT, instanceIDs []string, awsRegion string) map[string]string
GetPrivateIpsOfEc2Instances gets the private IP address of the given EC2 Instance in the given region. Returns a map of instance ID to IP address.
func GetPrivateIpsOfEc2InstancesE ¶ added in v0.13.18
func GetPrivateIpsOfEc2InstancesE(t testing.TestingT, instanceIDs []string, awsRegion string) (map[string]string, error)
GetPrivateIpsOfEc2InstancesE gets the private IP address of the given EC2 Instance in the given region. Returns a map of instance ID to IP address.
func GetPublicIpOfEc2Instance ¶ added in v0.9.0
GetPublicIpOfEc2Instance gets the public IP address of the given EC2 Instance in the given region.
func GetPublicIpOfEc2InstanceE ¶ added in v0.9.0
func GetPublicIpOfEc2InstanceE(t testing.TestingT, instanceID string, awsRegion string) (string, error)
GetPublicIpOfEc2InstanceE gets the public IP address of the given EC2 Instance in the given region.
func GetPublicIpsOfEc2Instances ¶ added in v0.9.1
func GetPublicIpsOfEc2Instances(t testing.TestingT, instanceIDs []string, awsRegion string) map[string]string
GetPublicIpsOfEc2Instances gets the public IP address of the given EC2 Instance in the given region. Returns a map of instance ID to IP address.
func GetPublicIpsOfEc2InstancesE ¶ added in v0.9.1
func GetPublicIpsOfEc2InstancesE(t testing.TestingT, instanceIDs []string, awsRegion string) (map[string]string, error)
GetPublicIpsOfEc2InstancesE gets the public IP address of the given EC2 Instance in the given region. Returns a map of instance ID to IP address.
func GetRandomPrivateCidrBlock ¶
GetRandomPrivateCidrBlock gets a random CIDR block from the range of acceptable private IP addresses per RFC 1918 (https://tools.ietf.org/html/rfc1918#section-3) The routingPrefix refers to the "/28" in 1.2.3.4/28. Note that, as written, this function will return a subset of all valid ranges. Since we will probably use this function mostly for generating random CIDR ranges for VPCs and Subnets, having comprehensive set coverage is not essential.
func GetRandomRegion ¶
func GetRandomRegion(t testing.TestingT, approvedRegions []string, forbiddenRegions []string) string
GetRandomRegion gets a randomly chosen AWS region. If approvedRegions is not empty, this will be a region from the approvedRegions list; otherwise, this method will fetch the latest list of regions from the AWS APIs and pick one of those. If forbiddenRegions is not empty, this method will make sure the returned region is not in the forbiddenRegions list.
func GetRandomRegionE ¶
func GetRandomRegionE(t testing.TestingT, approvedRegions []string, forbiddenRegions []string) (string, error)
GetRandomRegionE gets a randomly chosen AWS region. If approvedRegions is not empty, this will be a region from the approvedRegions list; otherwise, this method will fetch the latest list of regions from the AWS APIs and pick one of those. If forbiddenRegions is not empty, this method will make sure the returned region is not in the forbiddenRegions list.
func GetRandomRegionForService ¶ added in v0.41.18
GetRandomRegionForService retrieves a list of AWS regions in which a service is available Then returns one region randomly from the list
func GetRandomStableRegion ¶ added in v0.13.16
func GetRandomStableRegion(t testing.TestingT, approvedRegions []string, forbiddenRegions []string) string
GetRandomStableRegion gets a randomly chosen AWS region that is considered stable. Like GetRandomRegion, you can further restrict the stable region list using approvedRegions and forbiddenRegions. We consider stable regions to be those that have been around for at least 1 year. Note that regions in the approvedRegions list that are not considered stable are ignored.
func GetRdsInstanceDetailsE ¶ added in v0.10.3
func GetRdsInstanceDetailsE(t testing.TestingT, dbInstanceID string, awsRegion string) (*types.DBInstance, error)
GetRdsInstanceDetailsE gets the details of a single DB instance whose identifier is passed.
func GetRecommendedInstanceType ¶ added in v0.28.11
func GetRecommendedInstanceType(t testing.TestingT, region string, instanceTypeOptions []string) string
GetRecommendedInstanceType takes in a list of EC2 instance types (e.g., "t2.micro", "t3.micro") and returns the first instance type in the list that is available in all Availability Zones (AZs) in the given region. If there's no instance available in all AZs, this function exits with an error. This is useful because certain instance types, such as t2.micro, are not available in some of the newer AZs, while t3.micro is not available in some of the older AZs, and if you have code that needs to run on a "small" instance across all AZs in many different regions, you can use this function to automatically figure out which instance type you should use. This function will fail the test if there is an error.
func GetRecommendedInstanceTypeE ¶ added in v0.28.11
func GetRecommendedInstanceTypeE(t testing.TestingT, region string, instanceTypeOptions []string) (string, error)
GetRecommendedInstanceTypeE takes in a list of EC2 instance types (e.g., "t2.micro", "t3.micro") and returns the first instance type in the list that is available in all Availability Zones (AZs) in the given region. If there's no instance available in all AZs, this function exits with an error. This is useful because certain instance types, such as t2.micro, are not available in some of the newer AZs, while t3.micro is not available in some of the older AZs. If you have code that needs to run on a "small" instance across all AZs in many different regions, you can use this function to automatically figure out which instance type you should use.
func GetRecommendedInstanceTypeWithClientE ¶ added in v0.28.15
func GetRecommendedInstanceTypeWithClientE(t testing.TestingT, ec2Client *ec2.Client, instanceTypeOptions []string) (string, error)
GetRecommendedInstanceTypeWithClientE takes in a list of EC2 instance types (e.g., "t2.micro", "t3.micro") and returns the first instance type in the list that is available in all Availability Zones (AZs) in the given region. If there's no instance available in all AZs, this function exits with an error. This is useful because certain instance types, such as t2.micro, are not available in some of the newer AZs, while t3.micro is not available in some of the older AZs. If you have code that needs to run on a "small" instance across all AZs in many different regions, you can use this function to automatically figure out which instance type you should use. This function expects an authenticated EC2 client from the AWS SDK Go library.
func GetRecommendedRdsInstanceType ¶ added in v0.32.11
func GetRecommendedRdsInstanceType(t testing.TestingT, region string, engine string, engineVersion string, instanceTypeOptions []string) string
GetRecommendedRdsInstanceType takes in a list of RDS instance types (e.g., "db.t2.micro", "db.t3.micro") and returns the first instance type in the list that is available in the given region and for the given database engine type. If none of the instances provided are available for your combination of region and database engine, this function will exit with an error.
func GetRecommendedRdsInstanceTypeE ¶ added in v0.32.11
func GetRecommendedRdsInstanceTypeE(t testing.TestingT, region string, engine string, engineVersion string, instanceTypeOptions []string) (string, error)
GetRecommendedRdsInstanceTypeE takes in a list of RDS instance types (e.g., "db.t2.micro", "db.t3.micro") and returns the first instance type in the list that is available in the given region and for the given database engine type. If none of the instances provided are available for your combination of region and database engine, this function will return an error.
func GetRecommendedRdsInstanceTypeWithClientE ¶ added in v0.32.11
func GetRecommendedRdsInstanceTypeWithClientE(t testing.TestingT, rdsClient *rds.Client, engine string, engineVersion string, instanceTypeOptions []string) (string, error)
GetRecommendedRdsInstanceTypeWithClientE takes in a list of RDS instance types (e.g., "db.t2.micro", "db.t3.micro") and returns the first instance type in the list that is available in the given region and for the given database engine type. If none of the instances provided are available for your combination of region and database engine, this function will return an error. This function expects an authenticated RDS client from the AWS SDK Go library.
func GetRegionsForService ¶ added in v0.41.18
GetRegionsForService gets all AWS regions in which a service is available.
func GetRegionsForServiceE ¶ added in v0.41.18
GetRegionsForServiceE gets all AWS regions in which a service is available and returns errors. See https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-public-parameters-global-infrastructure.html
func GetRoute53Record ¶ added in v0.47.1
func GetRoute53Record(t *testing.T, hostedZoneID, recordName, recordType, awsRegion string) *types.ResourceRecordSet
GetRoute53Record returns a Route 53 Record
func GetRoute53RecordE ¶ added in v0.47.1
func GetRoute53RecordE(t *testing.T, hostedZoneID, recordName, recordType, awsRegion string) (*types.ResourceRecordSet, error)
GetRoute53RecordE returns a Route 53 Record
func GetS3BucketLoggingTarget ¶ added in v0.30.22
GetS3BucketLoggingTarget fetches the given bucket's logging target bucket and returns it as a string
func GetS3BucketLoggingTargetE ¶ added in v0.30.22
GetS3BucketLoggingTargetE fetches the given bucket's logging target bucket and returns it as the following string: `TargetBucket` of the `LoggingEnabled` property for an S3 bucket
func GetS3BucketLoggingTargetPrefix ¶ added in v0.32.4
GetS3BucketLoggingTargetPrefix fetches the given bucket's logging object prefix and returns it as a string
func GetS3BucketLoggingTargetPrefixE ¶ added in v0.32.4
func GetS3BucketLoggingTargetPrefixE(t testing.TestingT, awsRegion string, bucket string) (string, error)
GetS3BucketLoggingTargetPrefixE fetches the given bucket's logging object prefix and returns it as the following string: `TargetPrefix` of the `LoggingEnabled` property for an S3 bucket
func GetS3BucketPolicy ¶ added in v0.15.5
GetS3BucketPolicy fetches the given bucket's resource policy and returns it as a string
func GetS3BucketPolicyE ¶ added in v0.15.5
GetS3BucketPolicyE fetches the given bucket's resource policy and returns it as a string
func GetS3BucketTags ¶ added in v0.37.13
GetS3BucketTags fetches the given bucket's tags and returns them as a string map of strings.
func GetS3BucketTagsE ¶ added in v0.37.13
func GetS3BucketTagsE(t testing.TestingT, awsRegion string, bucket string) (map[string]string, error)
GetS3BucketTagsE fetches the given bucket's tags and returns them as a string map of strings.
func GetS3BucketVersioning ¶ added in v0.15.4
GetS3BucketVersioning fetches the given bucket's versioning configuration status and returns it as a string
func GetS3BucketVersioningE ¶ added in v0.15.4
GetS3BucketVersioningE fetches the given bucket's versioning configuration status and returns it as a string
func GetS3ObjectContents ¶
GetS3ObjectContents fetches the contents of the object in the given bucket with the given key and return it as a string.
func GetS3ObjectContentsE ¶
func GetS3ObjectContentsE(t testing.TestingT, awsRegion string, bucket string, key string) (string, error)
GetS3ObjectContentsE fetches the contents of the object in the given bucket with the given key and return it as a string.
func GetSecretValue ¶ added in v0.28.12
GetSecretValue takes the friendly name or ARN of a secret and returns the plaintext value
func GetSecretValueE ¶ added in v0.28.12
GetSecretValueE takes the friendly name or ARN of a secret and returns the plaintext value
func GetSyslogForInstance ¶
GetSyslogForInstance (Deprecated) See the FetchContentsOfFileFromInstance method for a more powerful solution.
GetSyslogForInstance gets the syslog for the Instance with the given ID in the given region. This should be available ~1 minute after an Instance boots and is very useful for debugging boot-time issues, such as an error in User Data.
func GetSyslogForInstanceE ¶
GetSyslogForInstanceE (Deprecated) See the FetchContentsOfFileFromInstanceE method for a more powerful solution.
GetSyslogForInstanceE gets the syslog for the Instance with the given ID in the given region. This should be available ~1 minute after an Instance boots and is very useful for debugging boot-time issues, such as an error in User Data.
func GetSyslogForInstancesInAsg ¶
func GetSyslogForInstancesInAsg(t testing.TestingT, asgName string, awsRegion string) map[string]string
GetSyslogForInstancesInAsg (Deprecated) See the FetchContentsOfFilesFromAsg method for a more powerful solution.
GetSyslogForInstancesInAsg gets the syslog for each of the Instances in the given ASG in the given region. These logs should be available ~1 minute after the Instance boots and are very useful for debugging boot-time issues, such as an error in User Data. Returns a map of Instance ID -> Syslog for that Instance.
func GetSyslogForInstancesInAsgE ¶
func GetSyslogForInstancesInAsgE(t testing.TestingT, asgName string, awsRegion string) (map[string]string, error)
GetSyslogForInstancesInAsgE (Deprecated) See the FetchContentsOfFilesFromAsgE method for a more powerful solution.
GetSyslogForInstancesInAsgE gets the syslog for each of the Instances in the given ASG in the given region. These logs should be available ~1 minute after the Instance boots and are very useful for debugging boot-time issues, such as an error in User Data. Returns a map of Instance ID -> Syslog for that Instance.
func GetTagsForEc2Instance ¶
GetTagsForEc2Instance returns all the tags for the given EC2 Instance.
func GetTagsForEc2InstanceE ¶
func GetTagsForEc2InstanceE(t testing.TestingT, region string, instanceID string) (map[string]string, error)
GetTagsForEc2InstanceE returns all the tags for the given EC2 Instance.
func GetTagsForSubnet ¶ added in v0.38.3
GetTagsForSubnet gets the tags for the specified subnet.
func GetTagsForSubnetE ¶ added in v0.38.3
func GetTagsForSubnetE(t testing.TestingT, subnetId string, region string) (map[string]string, error)
GetTagsForSubnetE gets the tags for the specified subnet.
func GetTagsForVpc ¶ added in v0.37.12
GetTagsForVpc gets the tags for the specified VPC.
func GetTagsForVpcE ¶ added in v0.37.12
GetTagsForVpcE gets the tags for the specified VPC.
func GetTimeBasedOneTimePassword ¶
func GetTimeBasedOneTimePassword(mfaDevice *types.VirtualMFADevice) (string, error)
GetTimeBasedOneTimePassword gets a One-Time Password from the given mfaDevice. Per the RFC 6238 standard, this value will be different every 30 seconds.
func GetUbuntu1404Ami ¶
GetUbuntu1404Ami gets the ID of the most recent Ubuntu 14.04 HVM x86_64 EBS GP2 AMI in the given region.
func GetUbuntu1404AmiE ¶
GetUbuntu1404AmiE gets the ID of the most recent Ubuntu 14.04 HVM x86_64 EBS GP2 AMI in the given region.
func GetUbuntu1604Ami ¶
GetUbuntu1604Ami gets the ID of the most recent Ubuntu 16.04 HVM x86_64 EBS GP2 AMI in the given region.
func GetUbuntu1604AmiE ¶
GetUbuntu1604AmiE gets the ID of the most recent Ubuntu 16.04 HVM x86_64 EBS GP2 AMI in the given region.
func GetUbuntu2004Ami ¶ added in v0.44.1
GetUbuntu2004Ami gets the ID of the most recent Ubuntu 20.04 HVM x86_64 EBS GP2 AMI in the given region.
func GetUbuntu2004AmiE ¶ added in v0.44.1
GetUbuntu2004AmiE gets the ID of the most recent Ubuntu 20.04 HVM x86_64 EBS GP2 AMI in the given region.
func GetUbuntu2204Ami ¶ added in v0.44.1
GetUbuntu2204Ami gets the ID of the most recent Ubuntu 22.04 HVM x86_64 EBS GP2 AMI in the given region.
func GetUbuntu2204AmiE ¶ added in v0.44.1
GetUbuntu2204AmiE gets the ID of the most recent Ubuntu 22.04 HVM x86_64 EBS GP2 AMI in the given region.
func GetValidEngineVersion ¶ added in v0.41.20
func GetValidEngineVersion(t testing.TestingT, region string, engine string, majorVersion string) string
GetValidEngineVersion returns a string containing a valid RDS engine version for the provided region and engine type. This function will fail the test if no valid engine is found.
func GetValidEngineVersionE ¶ added in v0.41.20
func GetValidEngineVersionE(t testing.TestingT, region string, engine string, majorVersion string) (string, error)
GetValidEngineVersionE returns a string containing a valid RDS engine version or an error if no valid version is found.
func GetWhetherSchemaExistsInRdsMySqlInstance ¶ added in v0.10.3
func GetWhetherSchemaExistsInRdsMySqlInstance(t testing.TestingT, dbUrl string, dbPort int32, dbUsername string, dbPassword string, expectedSchemaName string) bool
GetWhetherSchemaExistsInRdsMySqlInstance checks whether the specified schema/table name exists in the RDS instance
func GetWhetherSchemaExistsInRdsMySqlInstanceE ¶ added in v0.10.3
func GetWhetherSchemaExistsInRdsMySqlInstanceE(t testing.TestingT, dbUrl string, dbPort int32, dbUsername string, dbPassword string, expectedSchemaName string) (bool, error)
GetWhetherSchemaExistsInRdsMySqlInstanceE checks whether the specified schema/table name exists in the RDS instance
func GetWhetherSchemaExistsInRdsPostgresInstance ¶ added in v0.48.0
func GetWhetherSchemaExistsInRdsPostgresInstance(t testing.TestingT, dbUrl string, dbPort int32, dbUsername string, dbPassword string, expectedSchemaName string) bool
GetWhetherSchemaExistsInRdsPostgresInstance checks whether the specified schema/table name exists in the RDS instance
func GetWhetherSchemaExistsInRdsPostgresInstanceE ¶ added in v0.48.0
func GetWhetherSchemaExistsInRdsPostgresInstanceE(t testing.TestingT, dbUrl string, dbPort int32, dbUsername string, dbPassword string, expectedSchemaName string) (bool, error)
GetWhetherSchemaExistsInRdsPostgresInstanceE checks whether the specified schema/table name exists in the RDS instance
func InvokeFunction ¶ added in v0.24.1
InvokeFunction invokes a lambda function.
func InvokeFunctionE ¶ added in v0.24.1
func InvokeFunctionE(t testing.TestingT, region, functionName string, payload interface{}) ([]byte, error)
InvokeFunctionE invokes a lambda function.
func IsPublicSubnet ¶ added in v0.19.3
IsPublicSubnet returns True if the subnet identified by the given id in the provided region is public.
func IsPublicSubnetE ¶ added in v0.19.3
IsPublicSubnetE returns True if the subnet identified by the given id in the provided region is public.
func NewAcmClient ¶
NewAcmClient create a new ACM client.
func NewAcmClientE ¶ added in v0.9.0
NewAcmClientE creates a new ACM client.
func NewAsgClient ¶ added in v0.9.0
func NewAsgClient(t testing.TestingT, region string) *autoscaling.Client
NewAsgClient creates an Auto Scaling Group client.
func NewAsgClientE ¶ added in v0.9.0
NewAsgClientE creates an Auto Scaling Group client.
func NewAuthenticatedSession ¶
NewAuthenticatedSession creates an AWS Config following to standard AWS authentication workflow. If AuthAssumeIamRoleEnvVar environment variable is set, assumes IAM role specified in it.
func NewAuthenticatedSessionFromDefaultCredentials ¶ added in v0.16.1
NewAuthenticatedSessionFromDefaultCredentials gets an AWS Config, checking that the user has credentials properly configured in their environment.
func NewAuthenticatedSessionFromRole ¶ added in v0.9.3
NewAuthenticatedSessionFromRole returns a new AWS Config after assuming the role whose ARN is provided in roleARN. If the credentials are not properly configured in the underlying environment, an error is returned.
func NewCloudWatchLogsClient ¶
func NewCloudWatchLogsClient(t testing.TestingT, region string) *cloudwatchlogs.Client
NewCloudWatchLogsClient creates a new CloudWatch Logs client.
func NewCloudWatchLogsClientE ¶ added in v0.9.0
NewCloudWatchLogsClientE creates a new CloudWatch Logs client.
func NewDynamoDBClient ¶ added in v0.15.11
NewDynamoDBClient creates a DynamoDB client.
func NewDynamoDBClientE ¶ added in v0.15.11
NewDynamoDBClientE creates a DynamoDB client.
func NewECRClient ¶ added in v0.30.5
NewECRClient returns a client for the Elastic Container Registry. This will fail the test and stop execution if there is an error.
func NewECRClientE ¶ added in v0.30.5
NewECRClientE returns a client for the Elastic Container Registry.
func NewEc2Client ¶
NewEc2Client creates an EC2 client.
func NewEc2ClientE ¶ added in v0.9.0
NewEc2ClientE creates an EC2 client.
func NewEcsClient ¶ added in v0.14.3
NewEcsClient creates en ECS client.
func NewEcsClientE ¶ added in v0.14.3
NewEcsClientE creates an ECS client.
func NewIamClient ¶
NewIamClient creates a new IAM client.
func NewIamClientE ¶ added in v0.9.0
NewIamClientE creates a new IAM client.
func NewKmsClient ¶
NewKmsClient creates a KMS client.
func NewKmsClientE ¶ added in v0.9.0
NewKmsClientE creates a KMS client.
func NewLambdaClient ¶ added in v0.24.1
NewLambdaClient creates a new Lambda client.
func NewLambdaClientE ¶ added in v0.24.1
NewLambdaClientE creates a new Lambda client.
func NewRdsClient ¶ added in v0.10.3
NewRdsClient creates an RDS client.
func NewRdsClientE ¶ added in v0.10.3
NewRdsClientE creates an RDS client.
func NewRoute53Client ¶ added in v0.47.1
NewRoute53Client creates a route 53 client.
func NewRoute53ClientE ¶ added in v0.47.1
NewRoute53ClientE creates a route 53 client.
func NewS3Client ¶
NewS3Client creates an S3 client.
func NewS3ClientE ¶ added in v0.9.0
NewS3ClientE creates an S3 client.
func NewS3Uploader ¶ added in v0.9.15
NewS3Uploader creates an S3 Uploader.
func NewS3UploaderE ¶ added in v0.9.15
NewS3UploaderE creates an S3 Uploader.
func NewSecretsManagerClient ¶ added in v0.28.12
func NewSecretsManagerClient(t testing.TestingT, region string) *secretsmanager.Client
NewSecretsManagerClient creates a new SecretsManager client.
func NewSecretsManagerClientE ¶ added in v0.28.12
NewSecretsManagerClientE creates a new SecretsManager client.
func NewSnsClient ¶
NewSnsClient creates a new SNS client.
func NewSnsClientE ¶ added in v0.9.0
NewSnsClientE creates a new SNS client.
func NewSqsClient ¶
NewSqsClient creates a new SQS client.
func NewSqsClientE ¶ added in v0.9.0
NewSqsClientE creates a new SQS client.
func NewSsmClient ¶ added in v0.15.3
NewSsmClient creates an SSM client.
func NewSsmClientE ¶ added in v0.15.3
NewSsmClientE creates an SSM client.
func NewStsClientE ¶ added in v0.15.0
NewStsClientE creates a new STS client.
func PutECRRepoLifecyclePolicy ¶ added in v0.41.5
func PutECRRepoLifecyclePolicy(t testing.TestingT, region string, repo *types.Repository, policy string)
PutECRRepoLifecyclePolicy puts the given policy for the given ECR repository. This will fail the test and stop execution if there is an error.
func PutECRRepoLifecyclePolicyE ¶ added in v0.41.5
func PutECRRepoLifecyclePolicyE(t testing.TestingT, region string, repo *types.Repository, policy string) error
PutECRRepoLifecyclePolicyE puts the given policy for the given ECR repository.
func PutParameter ¶ added in v0.15.3
func PutParameter(t testing.TestingT, awsRegion string, keyName string, keyDescription string, keyValue string) int64
PutParameter creates new version of SSM Parameter at keyName with keyValue as SecureString.
func PutParameterE ¶ added in v0.15.3
func PutParameterE(t testing.TestingT, awsRegion string, keyName string, keyDescription string, keyValue string) (int64, error)
PutParameterE creates new version of SSM Parameter at keyName with keyValue as SecureString.
func PutParameterWithClientE ¶ added in v0.36.3
func PutParameterWithClientE(t testing.TestingT, client *ssm.Client, keyName string, keyDescription string, keyValue string) (int64, error)
PutParameterWithClientE creates new version of SSM Parameter at keyName with keyValue as SecureString with the ability to provide the SSM client.
func PutS3BucketPolicy ¶ added in v0.15.5
func PutS3BucketPolicy(t testing.TestingT, region string, bucketName string, policyJSONString string)
PutS3BucketPolicy applies an IAM resource policy to a given S3 bucket to create its bucket policy
func PutS3BucketPolicyE ¶ added in v0.15.5
func PutS3BucketPolicyE(t testing.TestingT, region string, bucketName string, policyJSONString string) error
PutS3BucketPolicyE applies an IAM resource policy to a given S3 bucket to create its bucket policy
func PutS3BucketVersioning ¶ added in v0.15.4
PutS3BucketVersioning creates an S3 bucket versioning configuration in the given region against the given bucket name, WITHOUT requiring MFA to remove versioning.
func PutS3BucketVersioningE ¶ added in v0.15.4
PutS3BucketVersioningE creates an S3 bucket versioning configuration in the given region against the given bucket name, WITHOUT requiring MFA to remove versioning.
func PutSecretString ¶ added in v0.48.0
PutSecretString updates a secret in Secrets Manager to a new string value
func PutSecretStringE ¶ added in v0.48.0
PutSecretStringE updates a secret in Secrets Manager to a new string value
func ReadPasswordPolicyMinPasswordLength ¶
ReadPasswordPolicyMinPasswordLength returns the minimal password length.
func SendMessageFifoToQueue ¶ added in v0.18.3
func SendMessageFifoToQueue(t testing.TestingT, awsRegion string, queueURL string, message string, messageGroupID string)
SendMessageFifoToQueue sends the given message to the FIFO SQS queue with the given URL.
func SendMessageToFifoQueueE ¶ added in v0.18.3
func SendMessageToFifoQueueE(t testing.TestingT, awsRegion string, queueURL string, message string, messageGroupID string) error
SendMessageToFifoQueueE sends the given message to the FIFO SQS queue with the given URL.
func SendMessageToQueue ¶
SendMessageToQueue sends the given message to the SQS queue with the given URL.
func SendMessageToQueueE ¶
func SendMessageToQueueE(t testing.TestingT, awsRegion string, queueURL string, message string) error
SendMessageToQueueE sends the given message to the SQS queue with the given URL.
func TerminateInstance ¶
TerminateInstance terminates the EC2 instance with the given ID in the given region.
func TerminateInstanceE ¶
TerminateInstanceE terminates the EC2 instance with the given ID in the given region.
func WaitForCapacity ¶ added in v0.13.20
func WaitForCapacity( t testing.TestingT, asgName string, region string, maxRetries int, sleepBetweenRetries time.Duration, )
WaitForCapacity waits for the currently set desired capacity to be reached on the ASG
func WaitForCapacityE ¶ added in v0.13.20
func WaitForCapacityE( t testing.TestingT, asgName string, region string, maxRetries int, sleepBetweenRetries time.Duration, ) error
WaitForCapacityE waits for the currently set desired capacity to be reached on the ASG
func WaitForSsmInstance ¶ added in v0.28.1
WaitForSsmInstance waits until the instance get registered to the SSM inventory.
func WaitForSsmInstanceE ¶ added in v0.28.1
func WaitForSsmInstanceE(t testing.TestingT, awsRegion, instanceID string, timeout time.Duration) error
WaitForSsmInstanceE waits until the instance get registered to the SSM inventory.
func WaitForSsmInstanceWithClientE ¶ added in v0.36.3
func WaitForSsmInstanceWithClientE(t testing.TestingT, client *ssm.Client, instanceID string, timeout time.Duration) error
WaitForSsmInstanceWithClientE waits until the instance get registered to the SSM inventory with the ability to provide the SSM client.
Types ¶
type AsgCapacityInfo ¶ added in v0.13.20
type AsgCapacityInfo struct { MinCapacity int64 MaxCapacity int64 CurrentCapacity int64 DesiredCapacity int64 }
func GetCapacityInfoForAsg ¶ added in v0.13.20
func GetCapacityInfoForAsg(t testing.TestingT, asgName string, awsRegion string) AsgCapacityInfo
GetCapacityInfoForAsg returns the capacity info for the queried asg as a struct, AsgCapacityInfo.
func GetCapacityInfoForAsgE ¶ added in v0.13.20
func GetCapacityInfoForAsgE(t testing.TestingT, asgName string, awsRegion string) (AsgCapacityInfo, error)
GetCapacityInfoForAsgE returns the capacity info for the queried asg as a struct, AsgCapacityInfo.
type AsgCapacityNotMetError ¶ added in v0.13.20
type AsgCapacityNotMetError struct {
// contains filtered or unexported fields
}
AsgCapacityNotMetError is returned when the ASG capacity is not yet at the desired capacity.
func NewAsgCapacityNotMetError ¶ added in v0.13.20
func NewAsgCapacityNotMetError(asgName string, desiredCapacity int64, currentCapacity int64) AsgCapacityNotMetError
func (AsgCapacityNotMetError) Error ¶ added in v0.13.20
func (err AsgCapacityNotMetError) Error() string
type BucketVersioningNotEnabledError ¶ added in v0.15.4
type BucketVersioningNotEnabledError struct {
// contains filtered or unexported fields
}
BucketVersioningNotEnabledError is returned when an S3 bucket that should have versioning does not have it applied
func NewBucketVersioningNotEnabledError ¶ added in v0.15.4
func NewBucketVersioningNotEnabledError(s3BucketName string, awsRegion string, versioningStatus string) BucketVersioningNotEnabledError
func (BucketVersioningNotEnabledError) Error ¶ added in v0.15.4
func (err BucketVersioningNotEnabledError) Error() string
type CommandOutput ¶ added in v0.28.1
CommandOutput contains the result of the SSM command.
func CheckSSMCommandWithClientE ¶ added in v0.36.3
func CheckSSMCommandWithClientE(t testing.TestingT, client *ssm.Client, instanceID, command string, timeout time.Duration) (*CommandOutput, error)
CheckSSMCommandWithClientE checks that you can run the given command on the given instance through AWS SSM with the ability to provide the SSM client. Returns the result and an error if one occurs.
func CheckSSMCommandWithClientWithDocumentE ¶ added in v0.37.9
func CheckSSMCommandWithClientWithDocumentE(t testing.TestingT, client *ssm.Client, instanceID, command string, commandDocName string, timeout time.Duration) (*CommandOutput, error)
CheckSSMCommandWithClientWithDocumentE checks that you can run the given command on the given instance through AWS SSM with the ability to provide the SSM client with specified Command Doc type. Returns the result and an error if one occurs.
func CheckSsmCommand ¶ added in v0.28.1
func CheckSsmCommand(t testing.TestingT, awsRegion, instanceID, command string, timeout time.Duration) *CommandOutput
CheckSsmCommand checks that you can run the given command on the given instance through AWS SSM.
func CheckSsmCommandE ¶ added in v0.28.1
func CheckSsmCommandE(t testing.TestingT, awsRegion, instanceID, command string, timeout time.Duration) (*CommandOutput, error)
CheckSsmCommandE checks that you can run the given command on the given instance through AWS SSM. Returns the result and an error if one occurs.
func CheckSsmCommandWithDocument ¶ added in v0.37.9
func CheckSsmCommandWithDocument(t testing.TestingT, awsRegion, instanceID, command string, commandDocName string, timeout time.Duration) *CommandOutput
CheckSsmCommandWithDocument checks that you can run the given command on the given instance through AWS SSM with specified Command Doc type.
func CheckSsmCommandWithDocumentE ¶ added in v0.37.9
func CheckSsmCommandWithDocumentE(t testing.TestingT, awsRegion, instanceID, command string, commandDocName string, timeout time.Duration) (*CommandOutput, error)
CheckSsmCommandWithDocumentE checks that you can run the given command on the given instance through AWS SSM with specified Command Doc type. Returns the result and an error if one occurs.
type CredentialsError ¶
type CredentialsError struct {
UnderlyingErr error
}
CredentialsError is an error that occurs because AWS credentials can't be found.
func (CredentialsError) Error ¶
func (err CredentialsError) Error() string
type Ec2Keypair ¶
type Ec2Keypair struct { *ssh.KeyPair Name string // The name assigned in AWS to the EC2 Key Pair Region string // The AWS region where the EC2 Key Pair lives }
Ec2Keypair is an EC2 key pair.
func CreateAndImportEC2KeyPair ¶
func CreateAndImportEC2KeyPair(t testing.TestingT, region string, name string) *Ec2Keypair
CreateAndImportEC2KeyPair generates a public/private KeyPair and import it into EC2 in the given region under the given name.
func CreateAndImportEC2KeyPairE ¶
func CreateAndImportEC2KeyPairE(t testing.TestingT, region string, name string) (*Ec2Keypair, error)
CreateAndImportEC2KeyPairE generates a public/private KeyPair and import it into EC2 in the given region under the given name.
func ImportEC2KeyPair ¶
func ImportEC2KeyPair(t testing.TestingT, region string, name string, keyPair *ssh.KeyPair) *Ec2Keypair
ImportEC2KeyPair creates a Key Pair in EC2 by importing an existing public key.
func ImportEC2KeyPairE ¶
func ImportEC2KeyPairE(t testing.TestingT, region string, name string, keyPair *ssh.KeyPair) (*Ec2Keypair, error)
ImportEC2KeyPairE creates a Key Pair in EC2 by importing an existing public key.
type FunctionError ¶ added in v0.24.1
func (*FunctionError) Error ¶ added in v0.24.1
func (err *FunctionError) Error() string
type HostnameForEc2InstanceNotFound ¶ added in v0.13.20
HostnameForEc2InstanceNotFound is an error that occurs when the IP for an EC2 instance is not found.
func (HostnameForEc2InstanceNotFound) Error ¶ added in v0.13.20
func (err HostnameForEc2InstanceNotFound) Error() string
type InvocationTypeOption ¶ added in v0.32.21
type InvocationTypeOption string
const ( InvocationTypeRequestResponse InvocationTypeOption = "RequestResponse" InvocationTypeDryRun = "DryRun" )
func (*InvocationTypeOption) Value ¶ added in v0.32.21
func (itype *InvocationTypeOption) Value() (string, error)
type IpForEc2InstanceNotFound ¶ added in v0.9.0
IpForEc2InstanceNotFound is an error that occurs when the IP for an EC2 instance is not found.
func (IpForEc2InstanceNotFound) Error ¶ added in v0.9.0
func (err IpForEc2InstanceNotFound) Error() string
type LambdaOptions ¶ added in v0.32.21
type LambdaOptions struct { // InvocationType can be one of InvocationTypeOption values: // * InvocationTypeRequestResponse (default) - Invoke the function // synchronously. Keep the connection open until the function // returns a response or times out. // * InvocationTypeDryRun - Validate parameter values and verify // that the user or role has permission to invoke the function. InvocationType *InvocationTypeOption // Lambda function input; will be converted to JSON. Payload interface{} }
LambdaOptions contains additional parameters for InvokeFunctionWithParams(). It contains a subset of the fields found in the lambda.InvokeInput struct.
type LambdaOutput ¶ added in v0.32.21
type LambdaOutput struct { // The response from the function, or an error object. Payload []byte // The HTTP status code for a successful request is in the 200 range. // For RequestResponse invocation type, the status code is 200. // For the DryRun invocation type, the status code is 204. StatusCode int32 }
LambdaOutput contains the output from InvokeFunctionWithParams(). The fields may or may not have a value depending on the invocation type and whether an error occurred or not.
func InvokeFunctionWithParams ¶ added in v0.32.21
func InvokeFunctionWithParams(t testing.TestingT, region, functionName string, input *LambdaOptions) *LambdaOutput
InvokeFunctionWithParams invokes a lambda function using parameters supplied in the LambdaOptions struct and returns values in a LambdaOutput struct. Checks for failure using "require".
func InvokeFunctionWithParamsE ¶ added in v0.32.21
func InvokeFunctionWithParamsE(t testing.TestingT, region, functionName string, input *LambdaOptions) (*LambdaOutput, error)
InvokeFunctionWithParamsE invokes a lambda function using parameters supplied in the LambdaOptions struct. Returns the status code and payload in a LambdaOutput struct and the error. A non-nil error will either reflect a problem with the parameters supplied to this function or an error returned by the Lambda.
type NoBucketPolicyError ¶ added in v0.15.5
type NoBucketPolicyError struct {
// contains filtered or unexported fields
}
NoBucketPolicyError is returned when an S3 bucket that should have a policy applied does not
func NewNoBucketPolicyError ¶ added in v0.15.5
func NewNoBucketPolicyError(s3BucketName string, awsRegion string, bucketPolicy string) NoBucketPolicyError
func (NoBucketPolicyError) Error ¶ added in v0.15.5
func (err NoBucketPolicyError) Error() string
type NoImagesFound ¶
NoImagesFound is an error that occurs if no images were found.
func (NoImagesFound) Error ¶
func (err NoImagesFound) Error() string
type NoInstanceTypeError ¶ added in v0.28.11
NoInstanceTypeError is returned when none of the given instance type options are available in all AZs in a region
func (NoInstanceTypeError) Error ¶ added in v0.28.11
func (err NoInstanceTypeError) Error() string
type NoRdsInstanceTypeError ¶ added in v0.32.11
type NoRdsInstanceTypeError struct { InstanceTypeOptions []string DatabaseEngine string DatabaseEngineVersion string }
NoRdsInstanceTypeError is returned when none of the given instance types are avaiable for the region, database engine, and database engine combination given
func (NoRdsInstanceTypeError) Error ¶ added in v0.32.11
func (err NoRdsInstanceTypeError) Error() string
type NotFoundError ¶ added in v0.13.20
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError is returned when an expected object is not found
func NewNotFoundError ¶ added in v0.13.20
func NewNotFoundError(objectType string, objectID string, region string) NotFoundError
func (NotFoundError) Error ¶ added in v0.13.20
func (err NotFoundError) Error() string
type OptionGroupOptionSettingForDbInstanceNotFound ¶ added in v0.10.3
type OptionGroupOptionSettingForDbInstanceNotFound struct { OptionName string OptionSettingName string DbInstanceID string AwsRegion string }
OptionGroupOptionSettingForDbInstanceNotFound is an error that occurs when the option setting specified is not found in the option group of the DB instance
func (OptionGroupOptionSettingForDbInstanceNotFound) Error ¶ added in v0.10.3
func (err OptionGroupOptionSettingForDbInstanceNotFound) Error() string
type ParameterForDbInstanceNotFound ¶ added in v0.10.3
type ParameterForDbInstanceNotFound struct { ParameterName string DbInstanceID string AwsRegion string }
ParameterForDbInstanceNotFound is an error that occurs when the parameter group specified is not found for the DB instance
func (ParameterForDbInstanceNotFound) Error ¶ added in v0.10.3
func (err ParameterForDbInstanceNotFound) Error() string
type QueueMessageResponse ¶
QueueMessageResponse contains a queue message.
func WaitForQueueMessage ¶
func WaitForQueueMessage(t testing.TestingT, awsRegion string, queueURL string, timeout int) QueueMessageResponse
WaitForQueueMessage waits to receive a message from on the queueURL. Since the API only allows us to wait a max 20 seconds for a new message to arrive, we must loop TIMEOUT/20 number of times to be able to wait for a total of TIMEOUT seconds
type ReceiveMessageTimeout ¶
ReceiveMessageTimeout is an error that occurs if receiving a message times out.
func (ReceiveMessageTimeout) Error ¶
func (err ReceiveMessageTimeout) Error() string
type RemoteFileSpecification ¶ added in v0.13.0
type RemoteFileSpecification struct { AsgNames []string //ASGs where our instances will be RemotePathToFileFilter map[string][]string //A map of the files to fetch, where the keys are directories on the remote host and the values are filters for what files to fetch from the directory. The filters support bash-style wildcards. UseSudo bool SshUser string KeyPair *Ec2Keypair LocalDestinationDir string //base path where to store downloaded artifacts locally. The final path of each resource will include the ip of the host and the name of the immediate parent folder. }
RemoteFileSpecification describes which files you want to copy from your instances
type S3AccessLoggingNotEnabledErr ¶ added in v0.30.22
S3AccessLoggingNotEnabledErr is a custom error that occurs when acess logging hasn't been enabled on the S3 Bucket
func (S3AccessLoggingNotEnabledErr) Error ¶ added in v0.30.22
func (err S3AccessLoggingNotEnabledErr) Error() string
type Subnet ¶
type Subnet struct { Id string // The ID of the Subnet AvailabilityZone string // The Availability Zone the subnet is in DefaultForAz bool // If the subnet is default for the Availability Zone Tags map[string]string // The tags associated with the subnet }
Subnet is a subnet in an availability zone.
func GetAzDefaultSubnetsForVpc ¶ added in v0.41.11
GetAzDefaultSubnetsForVpc gets the default az subnets in the specified VPC.
func GetSubnetsForVpc ¶
GetSubnetsForVpc gets the subnets in the specified VPC.
type Vpc ¶
type Vpc struct { Id string // The ID of the VPC Name string // The name of the VPC Subnets []Subnet // A list of subnets in the VPC Tags map[string]string // The tags associated with the VPC CidrBlock *string // The primary IPv4 CIDR block for the VPC. CidrAssociations []*string // Information about the IPv4 CIDR blocks associated with the VPC. Ipv6CidrAssociations []*string // Information about the IPv6 CIDR blocks associated with the VPC. }
Vpc is an Amazon Virtual Private Cloud.
func GetDefaultVpc ¶
GetDefaultVpc fetches information about the default VPC in the given region.
func GetDefaultVpcE ¶
GetDefaultVpcE fetches information about the default VPC in the given region.
func GetVpcById ¶ added in v0.18.6
GetVpcById fetches information about a VPC with given ID in the given region.
func GetVpcByIdE ¶ added in v0.18.6
GetVpcByIdE fetches information about a VPC with given ID in the given region.