change github.com/aws/aws-sdk-go to be the same revision in kubernetes

This commit is contained in:
Jingfang Liu
2018-10-16 09:34:22 -07:00
parent e0958159f3
commit c6a78cee92
462 changed files with 20605 additions and 85780 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -42,16 +42,9 @@ const (
// "InvalidRequestException".
//
// You provided a parameter value that is not valid for the current state of
// the resource.
//
// Possible causes:
//
// * You tried to perform the operation on a secret that's currently marked
// deleted.
//
// * You tried to enable rotation on a secret that doesn't already have a
// Lambda function ARN configured and you didn't include such an ARN as a
// parameter in this call.
// the resource. For example, if you try to enable rotation on a secret, you
// must already have a Lambda function ARN configured or included as a parameter
// in this call.
ErrCodeInvalidRequestException = "InvalidRequestException"
// ErrCodeLimitExceededException for service response error code
@@ -67,12 +60,6 @@ const (
// The policy document that you provided isn't valid.
ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException"
// ErrCodePreconditionNotMetException for service response error code
// "PreconditionNotMetException".
//
// The request failed because you did not complete all the prerequisite steps.
ErrCodePreconditionNotMetException = "PreconditionNotMetException"
// ErrCodeResourceExistsException for service response error code
// "ResourceExistsException".
//

View File

@@ -95,42 +95,6 @@ func ExampleSecretsManager_CreateSecret_shared00() {
fmt.Println(secretsmanager.ErrCodeMalformedPolicyDocumentException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
fmt.Println(secretsmanager.ErrCodeInternalServiceError, aerr.Error())
case secretsmanager.ErrCodePreconditionNotMetException:
fmt.Println(secretsmanager.ErrCodePreconditionNotMetException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// To delete the resource-based policy attached to a secret
//
// The following example shows how to delete the resource-based policy that is attached
// to a secret.
func ExampleSecretsManager_DeleteResourcePolicy_shared00() {
svc := secretsmanager.New(session.New())
input := &secretsmanager.DeleteResourcePolicyInput{
SecretId: aws.String("MyTestDatabaseSecret"),
}
result, err := svc.DeleteResourcePolicy(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case secretsmanager.ErrCodeResourceNotFoundException:
fmt.Println(secretsmanager.ErrCodeResourceNotFoundException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
fmt.Println(secretsmanager.ErrCodeInternalServiceError, aerr.Error())
case secretsmanager.ErrCodeInvalidRequestException:
fmt.Println(secretsmanager.ErrCodeInvalidRequestException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
@@ -252,40 +216,6 @@ func ExampleSecretsManager_GetRandomPassword_shared00() {
fmt.Println(result)
}
// To retrieve the resource-based policy attached to a secret
//
// The following example shows how to retrieve the resource-based policy that is attached
// to a secret.
func ExampleSecretsManager_GetResourcePolicy_shared00() {
svc := secretsmanager.New(session.New())
input := &secretsmanager.GetResourcePolicyInput{
SecretId: aws.String("MyTestDatabaseSecret"),
}
result, err := svc.GetResourcePolicy(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case secretsmanager.ErrCodeResourceNotFoundException:
fmt.Println(secretsmanager.ErrCodeResourceNotFoundException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
fmt.Println(secretsmanager.ErrCodeInternalServiceError, aerr.Error())
case secretsmanager.ErrCodeInvalidRequestException:
fmt.Println(secretsmanager.ErrCodeInvalidRequestException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// To retrieve the encrypted secret value of a secret
//
// The following example shows how to retrieve the secret string value from the version
@@ -393,44 +323,6 @@ func ExampleSecretsManager_ListSecrets_shared00() {
fmt.Println(result)
}
// To add a resource-based policy to a secret
//
// The following example shows how to add a resource-based policy to a secret.
func ExampleSecretsManager_PutResourcePolicy_shared00() {
svc := secretsmanager.New(session.New())
input := &secretsmanager.PutResourcePolicyInput{
ResourcePolicy: aws.String("{\n\"Version\":\"2012-10-17\",\n\"Statement\":[{\n\"Effect\":\"Allow\",\n\"Principal\":{\n\"AWS\":\"arn:aws:iam::123456789012:root\"\n},\n\"Action\":\"secretsmanager:GetSecretValue\",\n\"Resource\":\"*\"\n}]\n}"),
SecretId: aws.String("MyTestDatabaseSecret"),
}
result, err := svc.PutResourcePolicy(input)
if err != nil {
if aerr, ok := err.(awserr.Error); ok {
switch aerr.Code() {
case secretsmanager.ErrCodeMalformedPolicyDocumentException:
fmt.Println(secretsmanager.ErrCodeMalformedPolicyDocumentException, aerr.Error())
case secretsmanager.ErrCodeResourceNotFoundException:
fmt.Println(secretsmanager.ErrCodeResourceNotFoundException, aerr.Error())
case secretsmanager.ErrCodeInvalidParameterException:
fmt.Println(secretsmanager.ErrCodeInvalidParameterException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
fmt.Println(secretsmanager.ErrCodeInternalServiceError, aerr.Error())
case secretsmanager.ErrCodeInvalidRequestException:
fmt.Println(secretsmanager.ErrCodeInvalidRequestException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
} else {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
}
return
}
fmt.Println(result)
}
// To store a secret value in a new version of a secret
//
// The following example shows how to create a new version of the secret. Alternatively,
@@ -617,8 +509,6 @@ func ExampleSecretsManager_TagResource_shared00() {
switch aerr.Code() {
case secretsmanager.ErrCodeResourceNotFoundException:
fmt.Println(secretsmanager.ErrCodeResourceNotFoundException, aerr.Error())
case secretsmanager.ErrCodeInvalidRequestException:
fmt.Println(secretsmanager.ErrCodeInvalidRequestException, aerr.Error())
case secretsmanager.ErrCodeInvalidParameterException:
fmt.Println(secretsmanager.ErrCodeInvalidParameterException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
@@ -658,8 +548,6 @@ func ExampleSecretsManager_UntagResource_shared00() {
switch aerr.Code() {
case secretsmanager.ErrCodeResourceNotFoundException:
fmt.Println(secretsmanager.ErrCodeResourceNotFoundException, aerr.Error())
case secretsmanager.ErrCodeInvalidRequestException:
fmt.Println(secretsmanager.ErrCodeInvalidRequestException, aerr.Error())
case secretsmanager.ErrCodeInvalidParameterException:
fmt.Println(secretsmanager.ErrCodeInvalidParameterException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
@@ -709,8 +597,6 @@ func ExampleSecretsManager_UpdateSecret_shared00() {
fmt.Println(secretsmanager.ErrCodeMalformedPolicyDocumentException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
fmt.Println(secretsmanager.ErrCodeInternalServiceError, aerr.Error())
case secretsmanager.ErrCodePreconditionNotMetException:
fmt.Println(secretsmanager.ErrCodePreconditionNotMetException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
@@ -756,8 +642,6 @@ func ExampleSecretsManager_UpdateSecret_shared01() {
fmt.Println(secretsmanager.ErrCodeMalformedPolicyDocumentException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
fmt.Println(secretsmanager.ErrCodeInternalServiceError, aerr.Error())
case secretsmanager.ErrCodePreconditionNotMetException:
fmt.Println(secretsmanager.ErrCodePreconditionNotMetException, aerr.Error())
default:
fmt.Println(aerr.Error())
}
@@ -803,8 +687,6 @@ func ExampleSecretsManager_UpdateSecret_shared02() {
fmt.Println(secretsmanager.ErrCodeMalformedPolicyDocumentException, aerr.Error())
case secretsmanager.ErrCodeInternalServiceError:
fmt.Println(secretsmanager.ErrCodeInternalServiceError, aerr.Error())
case secretsmanager.ErrCodePreconditionNotMetException:
fmt.Println(secretsmanager.ErrCodePreconditionNotMetException, aerr.Error())
default:
fmt.Println(aerr.Error())
}

View File

@@ -68,10 +68,6 @@ type SecretsManagerAPI interface {
CreateSecretWithContext(aws.Context, *secretsmanager.CreateSecretInput, ...request.Option) (*secretsmanager.CreateSecretOutput, error)
CreateSecretRequest(*secretsmanager.CreateSecretInput) (*request.Request, *secretsmanager.CreateSecretOutput)
DeleteResourcePolicy(*secretsmanager.DeleteResourcePolicyInput) (*secretsmanager.DeleteResourcePolicyOutput, error)
DeleteResourcePolicyWithContext(aws.Context, *secretsmanager.DeleteResourcePolicyInput, ...request.Option) (*secretsmanager.DeleteResourcePolicyOutput, error)
DeleteResourcePolicyRequest(*secretsmanager.DeleteResourcePolicyInput) (*request.Request, *secretsmanager.DeleteResourcePolicyOutput)
DeleteSecret(*secretsmanager.DeleteSecretInput) (*secretsmanager.DeleteSecretOutput, error)
DeleteSecretWithContext(aws.Context, *secretsmanager.DeleteSecretInput, ...request.Option) (*secretsmanager.DeleteSecretOutput, error)
DeleteSecretRequest(*secretsmanager.DeleteSecretInput) (*request.Request, *secretsmanager.DeleteSecretOutput)
@@ -84,10 +80,6 @@ type SecretsManagerAPI interface {
GetRandomPasswordWithContext(aws.Context, *secretsmanager.GetRandomPasswordInput, ...request.Option) (*secretsmanager.GetRandomPasswordOutput, error)
GetRandomPasswordRequest(*secretsmanager.GetRandomPasswordInput) (*request.Request, *secretsmanager.GetRandomPasswordOutput)
GetResourcePolicy(*secretsmanager.GetResourcePolicyInput) (*secretsmanager.GetResourcePolicyOutput, error)
GetResourcePolicyWithContext(aws.Context, *secretsmanager.GetResourcePolicyInput, ...request.Option) (*secretsmanager.GetResourcePolicyOutput, error)
GetResourcePolicyRequest(*secretsmanager.GetResourcePolicyInput) (*request.Request, *secretsmanager.GetResourcePolicyOutput)
GetSecretValue(*secretsmanager.GetSecretValueInput) (*secretsmanager.GetSecretValueOutput, error)
GetSecretValueWithContext(aws.Context, *secretsmanager.GetSecretValueInput, ...request.Option) (*secretsmanager.GetSecretValueOutput, error)
GetSecretValueRequest(*secretsmanager.GetSecretValueInput) (*request.Request, *secretsmanager.GetSecretValueOutput)
@@ -106,10 +98,6 @@ type SecretsManagerAPI interface {
ListSecretsPages(*secretsmanager.ListSecretsInput, func(*secretsmanager.ListSecretsOutput, bool) bool) error
ListSecretsPagesWithContext(aws.Context, *secretsmanager.ListSecretsInput, func(*secretsmanager.ListSecretsOutput, bool) bool, ...request.Option) error
PutResourcePolicy(*secretsmanager.PutResourcePolicyInput) (*secretsmanager.PutResourcePolicyOutput, error)
PutResourcePolicyWithContext(aws.Context, *secretsmanager.PutResourcePolicyInput, ...request.Option) (*secretsmanager.PutResourcePolicyOutput, error)
PutResourcePolicyRequest(*secretsmanager.PutResourcePolicyInput) (*request.Request, *secretsmanager.PutResourcePolicyOutput)
PutSecretValue(*secretsmanager.PutSecretValueInput) (*secretsmanager.PutSecretValueOutput, error)
PutSecretValueWithContext(aws.Context, *secretsmanager.PutSecretValueInput, ...request.Option) (*secretsmanager.PutSecretValueOutput, error)
PutSecretValueRequest(*secretsmanager.PutSecretValueInput) (*request.Request, *secretsmanager.PutSecretValueOutput)