diff --git a/go.mod b/go.mod
index d6a5c5898..c414e79fd 100644
--- a/go.mod
+++ b/go.mod
@@ -13,10 +13,8 @@ require (
github.com/aws/aws-sdk-go-v2 v1.41.5
github.com/aws/aws-sdk-go-v2/config v1.31.12
github.com/aws/aws-sdk-go-v2/credentials v1.18.16
- github.com/aws/aws-sdk-go-v2/service/organizations v1.51.1-0.20260401181752-9074b3ddace9
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.4
github.com/basgys/goxml2json v1.1.1-0.20181031222924-996d9fc8d313
- github.com/coredns/coredns v1.3.0
github.com/fatih/color v1.13.0
github.com/golang-plus/errors v1.0.0
github.com/huaweicloud/huaweicloud-sdk-go v1.0.26
@@ -39,7 +37,7 @@ require (
moul.io/http2curl/v2 v2.3.0
yunion.io/x/jsonutils v1.0.1-0.20250507052344-1abcf4f443b1
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91
- yunion.io/x/pkg v1.10.4-0.20260224071200-5c269fa62429
+ yunion.io/x/pkg v1.10.4-0.20260422030155-01b100134978
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c
)
diff --git a/go.sum b/go.sum
index 611537dfb..ae99c1818 100644
--- a/go.sum
+++ b/go.sum
@@ -71,8 +71,6 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 h1:5r34CgVOD
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9/go.mod h1:dB12CEbNWPbzO2uC6QSWHteqOg4JfBVJOojbAoAUb5I=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.9 h1:wuZ5uW2uhJR63zwNlqWH2W4aL4ZjeJP3o92/W+odDY4=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.9/go.mod h1:/G58M2fGszCrOzvJUkDdY8O9kycodunH4VdT5oBAqls=
-github.com/aws/aws-sdk-go-v2/service/organizations v1.51.1-0.20260401181752-9074b3ddace9 h1:qi11riT4zVjV41Nh74zbBgK0EQbkbZG8rPm4shDFlJk=
-github.com/aws/aws-sdk-go-v2/service/organizations v1.51.1-0.20260401181752-9074b3ddace9/go.mod h1:urLFj1twuR/h5T0wN/2/kmY1gxBFa1tTKr+c60lZ2fA=
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.4 h1:mUI3b885qJgfqKDUSj6RgbRqLdX0wGmg8ruM03zNfQA=
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.4/go.mod h1:6v8ukAxc7z4x4oBjGUsLnH7KGLY9Uhcgij19UJNkiMg=
github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 h1:A1oRkiSQOWstGh61y4Wc/yQ04sqrQZr1Si/oAXj20/s=
@@ -96,8 +94,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ=
github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM=
-github.com/coredns/coredns v1.3.0 h1:Ubjr8ZrOpEj95/A9dqQqQAG2k5DWEFdg2ZB3tUXuULA=
-github.com/coredns/coredns v1.3.0/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -451,8 +447,8 @@ yunion.io/x/log v0.0.0-20190514041436-04ce53b17c6b/go.mod h1:+gauLs73omeJAPlsXce
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91 h1:inY5o3LDa/zgsIZuPN0HmpzKIsu/lLgsBmMttuDPGj4=
yunion.io/x/log v1.0.1-0.20240305175729-7cf2d6cd5a91/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
-yunion.io/x/pkg v1.10.4-0.20260224071200-5c269fa62429 h1:yskc2HFnBZXEzfYeQBFdL2gXzVfdPQ8yT4qVDyuhajM=
-yunion.io/x/pkg v1.10.4-0.20260224071200-5c269fa62429/go.mod h1:0Bwxqd9MA3ACi119/l02FprY/o9gHahmYC2bsSbnVpM=
+yunion.io/x/pkg v1.10.4-0.20260422030155-01b100134978 h1:+BS9DValwi0xHa92xrB+RR6Cxp7bDbXVysa/KiC18rY=
+yunion.io/x/pkg v1.10.4-0.20260422030155-01b100134978/go.mod h1:0Bwxqd9MA3ACi119/l02FprY/o9gHahmYC2bsSbnVpM=
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1 h1:1KJ3YYinydPHpDEQRXdr/T8SYcKZ5Er+m489H+PnaQ4=
yunion.io/x/s3cli v0.0.0-20241221171442-1c11599d28e1/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/structarg v0.0.0-20231017124457-df4d5009457c h1:QuLab2kSRECZRxo4Lo2KcYn6XjQFDGaZ1+x0pYDVVwQ=
diff --git a/pkg/multicloud/aws/aws.go b/pkg/multicloud/aws/aws.go
index d14d310ff..7ade7830f 100644
--- a/pkg/multicloud/aws/aws.go
+++ b/pkg/multicloud/aws/aws.go
@@ -16,19 +16,20 @@ package aws
import (
"bytes"
+ "context"
"fmt"
"io/ioutil"
"net/http"
"net/url"
"strings"
+ "time"
"github.com/aws/aws-sdk-go/aws"
sdk "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/s3"
+ "github.com/aws/aws-sdk-go-v2/service/s3"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
@@ -301,40 +302,33 @@ func (client *SAwsClient) fetchOwnerId() error {
}
func (client *SAwsClient) fetchBuckets() error {
- s, err := client.getDefaultSession(true)
+ s3cli, err := client.GetS3Client()
if err != nil {
- return errors.Wrap(err, "getDefaultSession")
+ return errors.Wrap(err, "GetS3Client")
}
- s3cli := s3.New(s)
- output, err := s3cli.ListBuckets(&s3.ListBucketsInput{})
+ output, err := s3cli.ListBuckets(context.Background(), &s3.ListBucketsInput{})
if err != nil {
- if e, ok := err.(awserr.Error); ok && e.Code() == "AccessDenied" {
- return errors.Wrapf(cloudprovider.ErrForbidden, "%s", e.Message())
+ if strings.Contains(err.Error(), "AccessDenied") {
+ return errors.Wrapf(cloudprovider.ErrForbidden, "%s", err.Error())
}
return errors.Wrap(err, "ListBuckets")
}
ret := make([]cloudprovider.ICloudBucket, 0)
for _, bInfo := range output.Buckets {
- if err := FillZero(bInfo); err != nil {
- log.Errorf("s3cli.Binfo.FillZero error %s", err)
+ if bInfo.Name == nil {
continue
}
- input := &s3.GetBucketLocationInput{}
- input.Bucket = bInfo.Name
- output, err := s3cli.GetBucketLocation(input)
+ locOutput, err := s3cli.GetBucketLocation(context.Background(), &s3.GetBucketLocationInput{
+ Bucket: bInfo.Name,
+ })
if err != nil {
log.Errorf("s3cli.GetBucketLocation error %s", err)
continue
}
- if err := FillZero(output); err != nil {
- log.Errorf("s3cli.GetBucketLocation.FillZero error %s", err)
- continue
- }
-
- location := *output.LocationConstraint
+ location := string(locOutput.LocationConstraint)
if len(location) == 0 {
// https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html
// Buckets in Region us-east-1 have a LocationConstraint of null.
@@ -345,11 +339,15 @@ func (client *SAwsClient) fetchBuckets() error {
log.Errorf("client.getIRegionByRegionId %s fail %s", location, err)
continue
}
+ creationDate := time.Time{}
+ if bInfo.CreationDate != nil {
+ creationDate = *bInfo.CreationDate
+ }
b := SBucket{
region: region.(*SRegion),
Name: *bInfo.Name,
Location: location,
- CreationDate: *bInfo.CreationDate,
+ CreationDate: creationDate,
}
ret = append(ret, &b)
}
@@ -531,6 +529,14 @@ func (self *SAwsClient) stsRequest(apiName string, params map[string]string, ret
return self.request("", STS_SERVICE_NAME, STS_SERVICE_ID, "2011-06-15", apiName, params, retval, false)
}
+func (self *SAwsClient) orgRequest(apiName string, params map[string]interface{}, retval interface{}) error {
+ return self.invoke("", ORG_SERVICE_NAME, ORG_SERVICE_ID, "2016-11-28", apiName, "", params, retval, true)
+}
+
+func (self *SAwsClient) ceRequest(apiName string, params map[string]interface{}, retval interface{}) error {
+ return self.invoke(self.getCostExplorerRegion(), CE_SERVICE_NAME, CE_SERVICE_ID, "2017-10-25", apiName, "", params, retval, true)
+}
+
func (self *SAwsClient) GetCapabilities() []string {
caps := []string{
cloudprovider.CLOUD_CAPABILITY_COMPUTE,
diff --git a/pkg/multicloud/aws/aws_invoke.go b/pkg/multicloud/aws/aws_invoke.go
index 6a9ba2b6c..311cf88b4 100644
--- a/pkg/multicloud/aws/aws_invoke.go
+++ b/pkg/multicloud/aws/aws_invoke.go
@@ -67,6 +67,22 @@ func (self *SAwsClient) invoke(regionId, serviceName, serviceId, apiVersion stri
metadata.TargetPrefix = "DynamoDB_20120810"
metadata.JSONVersion = "1.0"
}
+ if serviceName == ORG_SERVICE_NAME {
+ metadata.TargetPrefix = "AWSOrganizationsV20161128"
+ metadata.JSONVersion = "1.1"
+ }
+ if serviceName == CLOUD_TRAIL_SERVICE_NAME {
+ metadata.TargetPrefix = "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101"
+ metadata.JSONVersion = "1.1"
+ }
+ if serviceName == CE_SERVICE_NAME {
+ metadata.TargetPrefix = "AWSInsightsIndexService"
+ metadata.JSONVersion = "1.1"
+ }
+ if serviceName == WAF_SERVICE_NAME {
+ metadata.TargetPrefix = "AWSWAF_20190729"
+ metadata.JSONVersion = "1.1"
+ }
if self.debug {
logLevel := aws.LogLevelType(uint(aws.LogDebugWithRequestErrors) + uint(aws.LogDebugWithHTTPBody))
@@ -107,6 +123,10 @@ func jsonInvoke(cli *client.Client, apiName, path string, params map[string]inte
KINESIS_SERVICE_NAME,
DYNAMODB_SERVICE_NAME,
PRICING_SERVICE_NAME,
+ ORG_SERVICE_NAME,
+ CLOUD_TRAIL_SERVICE_NAME,
+ CE_SERVICE_NAME,
+ WAF_SERVICE_NAME,
}) {
method = "POST"
}
diff --git a/pkg/multicloud/aws/awsv2.go b/pkg/multicloud/aws/awsv2.go
index d37547c72..61ba30d28 100644
--- a/pkg/multicloud/aws/awsv2.go
+++ b/pkg/multicloud/aws/awsv2.go
@@ -73,3 +73,11 @@ func (r *SRegion) GetS3Client() (*s3.Client, error) {
}
return s3.NewFromConfig(cfg), nil
}
+
+func (client *SAwsClient) GetS3Client() (*s3.Client, error) {
+ cfg, err := client.getConfig(context.Background(), client.getDefaultRegionId(), true)
+ if err != nil {
+ return nil, errors.Wrap(err, "getConfig")
+ }
+ return s3.NewFromConfig(cfg), nil
+}
diff --git a/pkg/multicloud/aws/business.go b/pkg/multicloud/aws/business.go
new file mode 100644
index 000000000..c1ed8318e
--- /dev/null
+++ b/pkg/multicloud/aws/business.go
@@ -0,0 +1,148 @@
+// Copyright 2019 Yunion
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package aws
+
+import (
+ "sort"
+ "strconv"
+ "time"
+
+ api "yunion.io/x/cloudmux/pkg/apis/compute"
+ "yunion.io/x/pkg/errors"
+)
+
+type SMonthBill struct {
+ Month string `json:"month"`
+ StartDate string `json:"start_date"`
+ EndDate string `json:"end_date"`
+ Currency string `json:"currency"`
+ Total float64 `json:"total"`
+ Metric string `json:"metric"`
+ Granularity string `json:"granularity"`
+ Services []SMonthBillServiceFee `json:"services"`
+}
+
+type SMonthBillServiceFee struct {
+ Service string `json:"service"`
+ Amount string `json:"amount"`
+ Unit string `json:"unit"`
+}
+
+type sMetricValue struct {
+ Amount string
+ Unit string
+}
+
+type sCostGroup struct {
+ Keys []string
+ Metrics map[string]sMetricValue
+}
+
+type sResultByTime struct {
+ Groups []sCostGroup
+}
+
+func getMonthDateRange(month string) (string, string, error) {
+ monthStart, err := time.Parse("2006-01", month)
+ if err != nil {
+ return "", "", errors.Wrapf(err, "invalid month %q, expected YYYY-MM", month)
+ }
+ monthEnd := monthStart.AddDate(0, 1, 0)
+ return monthStart.Format("2006-01-02"), monthEnd.Format("2006-01-02"), nil
+}
+
+func (self *SAwsClient) getCostExplorerRegion() string {
+ if self.GetAccessEnv() == api.CLOUD_ACCESS_ENV_AWS_CHINA {
+ return "cn-northwest-1"
+ }
+ return "us-east-1"
+}
+
+func (self *SAwsClient) GetMonthBill(month string) (*SMonthBill, error) {
+ startDate, endDate, err := getMonthDateRange(month)
+ if err != nil {
+ return nil, err
+ }
+
+ params := map[string]interface{}{
+ "TimePeriod": map[string]string{
+ "Start": startDate,
+ "End": endDate,
+ },
+ "Granularity": "MONTHLY",
+ "Metrics": []string{"UnblendedCost"},
+ "GroupBy": []map[string]string{
+ {
+ "Type": "DIMENSION",
+ "Key": "SERVICE",
+ },
+ },
+ }
+ resp := struct {
+ ResultsByTime []sResultByTime
+ }{}
+ err = self.ceRequest("GetCostAndUsage", params, &resp)
+ if err != nil {
+ return nil, errors.Wrap(err, "GetCostAndUsage")
+ }
+
+ ret := &SMonthBill{
+ Month: month,
+ StartDate: startDate,
+ EndDate: endDate,
+ Metric: "UnblendedCost",
+ Granularity: "MONTHLY",
+ Services: make([]SMonthBillServiceFee, 0),
+ }
+
+ var total float64
+ for _, byTime := range resp.ResultsByTime {
+ for _, group := range byTime.Groups {
+ if len(group.Keys) == 0 {
+ continue
+ }
+ metric, ok := group.Metrics["UnblendedCost"]
+ if !ok {
+ continue
+ }
+ if len(ret.Currency) == 0 {
+ ret.Currency = metric.Unit
+ }
+ amount := metric.Amount
+ if len(amount) > 0 {
+ if val, parseErr := strconv.ParseFloat(amount, 64); parseErr == nil {
+ total += val
+ }
+ }
+ ret.Services = append(ret.Services, SMonthBillServiceFee{
+ Service: group.Keys[0],
+ Amount: amount,
+ Unit: metric.Unit,
+ })
+ }
+ }
+ ret.Total = total
+
+ sort.Slice(ret.Services, func(i, j int) bool {
+ iVal, iErr := strconv.ParseFloat(ret.Services[i].Amount, 64)
+ jVal, jErr := strconv.ParseFloat(ret.Services[j].Amount, 64)
+ if iErr != nil || jErr != nil {
+ return ret.Services[i].Amount > ret.Services[j].Amount
+ }
+ return iVal > jVal
+ })
+
+ return ret, nil
+}
diff --git a/pkg/multicloud/aws/cloudtrail.go b/pkg/multicloud/aws/cloudtrail.go
index 3e20b41b2..23dd76614 100644
--- a/pkg/multicloud/aws/cloudtrail.go
+++ b/pkg/multicloud/aws/cloudtrail.go
@@ -19,9 +19,6 @@ import (
"strings"
"time"
- "github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/cloudtrail"
-
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
@@ -76,6 +73,18 @@ type SEvent struct {
Username string `type:"string"`
}
+type sCloudTrailEvent struct {
+ AccessKeyId string
+ CloudTrailEvent string
+ EventId string
+ EventName string
+ EventSource string
+ EventTime float64
+ ReadOnly string
+ Resources []SEventResource
+ Username string
+}
+
func (self *SEvent) GetName() string {
return self.EventName
}
@@ -113,45 +122,36 @@ func (self *SEvent) GetCreatedAt() time.Time {
return self.EventTime
}
-func (self *SRegion) getAwsCloudtrailSession() (*session.Session, error) {
- session, err := self.getAwsSession()
- if err != nil {
- return nil, errors.Wrap(err, "client.getDefaultSession()")
- }
- session.ClientConfig(CLOUD_TRAIL_SERVICE_NAME)
- return session, nil
+func cloudTrailUnixTime(t time.Time) float64 {
+ return float64(t.UnixNano()) / float64(time.Second)
}
func (self *SRegion) LookupEvents(start, end time.Time, withReadEvent bool) ([]SEvent, error) {
- s, err := self.getAwsCloudtrailSession()
- if err != nil {
- return nil, errors.Wrapf(err, "getAwsCloudtrailSession")
- }
- client := cloudtrail.New(s)
- input := &cloudtrail.LookupEventsInput{LookupAttributes: []*cloudtrail.LookupAttribute{}}
+ params := map[string]interface{}{}
if !start.IsZero() {
- input.SetStartTime(start)
+ params["StartTime"] = cloudTrailUnixTime(start)
}
if !end.IsZero() {
- input.SetEndTime(end)
+ params["EndTime"] = cloudTrailUnixTime(end)
}
if !withReadEvent {
- readonly := "ReadOnly"
- val := "false"
- input.LookupAttributes = append(input.LookupAttributes, &cloudtrail.LookupAttribute{
- AttributeKey: &readonly,
- AttributeValue: &val,
- })
+ params["LookupAttributes"] = []map[string]string{
+ {
+ "AttributeKey": "ReadOnly",
+ "AttributeValue": "false",
+ },
+ }
}
+
events := []SEvent{}
- nextToken := ""
for {
- if len(nextToken) > 0 {
- input.SetNextToken(nextToken)
- }
- var output *cloudtrail.LookupEventsOutput = nil
+ ret := struct {
+ Events []sCloudTrailEvent
+ NextToken string
+ }{}
+ var err error
for {
- output, err = client.LookupEvents(input)
+ err = self.cloudtrailRequest("LookupEvents", params, &ret)
if err != nil {
if strings.Contains(err.Error(), "ThrottlingException") {
log.Warningf("LookupEvents ThrottlingException, try after 3 seconds")
@@ -162,28 +162,27 @@ func (self *SRegion) LookupEvents(start, end time.Time, withReadEvent bool) ([]S
}
break
}
- for i := range output.Events {
- err := FillZero(output.Events[i])
- if err != nil {
- return nil, errors.Wrapf(err, "FillZero")
- }
- event := SEvent{}
- err = jsonutils.Update(&event, jsonutils.Marshal(output.Events[i]))
- if err != nil {
- return nil, errors.Wrapf(err, "jsonutils.Update")
+ for _, evt := range ret.Events {
+ event := SEvent{
+ AccessKeyId: evt.AccessKeyId,
+ CloudTrailEvent: evt.CloudTrailEvent,
+ EventId: evt.EventId,
+ EventName: evt.EventName,
+ EventSource: evt.EventSource,
+ EventTime: time.Unix(0, int64(evt.EventTime*float64(time.Second))),
+ ReadOnly: evt.ReadOnly,
+ Resources: evt.Resources,
+ Username: evt.Username,
}
if strings.Contains(event.CloudTrailEvent, "awsRegion") && !strings.Contains(event.CloudTrailEvent, fmt.Sprintf(`"awsRegion":"%s"`, self.RegionId)) {
continue
}
events = append(events, event)
}
- nextToken = ""
- if output.NextToken != nil {
- nextToken = *output.NextToken
- }
- if len(nextToken) == 0 {
+ if len(ret.NextToken) == 0 {
break
}
+ params["NextToken"] = ret.NextToken
}
return events, nil
}
diff --git a/pkg/multicloud/aws/organizations.go b/pkg/multicloud/aws/organizations.go
index 3f6c49acb..c0743da0e 100644
--- a/pkg/multicloud/aws/organizations.go
+++ b/pkg/multicloud/aws/organizations.go
@@ -15,14 +15,10 @@
package aws
import (
- "context"
"fmt"
"strings"
"time"
- "github.com/aws/aws-sdk-go-v2/service/organizations"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
-
"yunion.io/x/jsonutils"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
@@ -74,98 +70,117 @@ const (
AISERVICES_OPT_OUT_POLICY = "AISERVICES_OPT_OUT_POLICY"
)
+type sOrgPolicySummary struct {
+ Arn string
+ AwsManaged bool
+ Description string
+ Id string
+ Name string
+ Type string
+}
+
+type sOrgAccount struct {
+ Id string
+ Name string
+ Arn string
+ Email string
+ State string
+ Paths []string
+ JoinedMethod string
+ JoinedTimestamp float64
+}
+
+type sOrganization struct {
+ MasterAccountId string
+}
+
+type sOrganizationalUnit struct {
+ Name string
+}
+
+func (r *SRegion) orgRequest(apiName string, params map[string]interface{}, retval interface{}) error {
+ return r.client.orgRequest(apiName, params, retval)
+}
+
func (r *SRegion) ListPolicies(filter string) ([]SOrgPolicy, error) {
- cfg, err := r.getConfig()
- if err != nil {
- return nil, errors.Wrap(err, "getConfig")
+ params := map[string]interface{}{
+ "Filter": filter,
}
- orgCli := organizations.NewFromConfig(cfg)
- var nextToken *string
policies := make([]SOrgPolicy, 0)
-
for {
- input := organizations.ListPoliciesInput{}
- input.Filter = types.PolicyType(filter)
- if nextToken != nil {
- input.NextToken = nextToken
- }
- parts, err := orgCli.ListPolicies(context.Background(), &input)
+ ret := struct {
+ Policies []sOrgPolicySummary
+ NextToken string
+ }{}
+ err := r.orgRequest("ListPolicies", params, &ret)
if err != nil {
return nil, errors.Wrap(err, "ListPolicies")
}
- for _, pPtr := range parts.Policies {
- p := SOrgPolicy{
- Arn: *pPtr.Arn,
- AwsManaged: pPtr.AwsManaged,
- Description: *pPtr.Description,
- Id: *pPtr.Id,
- Name: *pPtr.Name,
- Type: string(pPtr.Type),
- }
- policies = append(policies, p)
+ for _, p := range ret.Policies {
+ policies = append(policies, SOrgPolicy{
+ Arn: p.Arn,
+ AwsManaged: p.AwsManaged,
+ Description: p.Description,
+ Id: p.Id,
+ Name: p.Name,
+ Type: p.Type,
+ })
}
- if parts.NextToken == nil || len(*parts.NextToken) == 0 {
+ if len(ret.NextToken) == 0 {
break
- } else {
- nextToken = parts.NextToken
}
+ params["NextToken"] = ret.NextToken
}
return policies, nil
}
func (r *SRegion) ListPoliciesForTarget(filter string, targetId string) ([]SOrgPolicy, error) {
- cfg, err := r.getConfig()
- if err != nil {
- return nil, errors.Wrap(err, "getConfig")
+ params := map[string]interface{}{
+ "Filter": filter,
+ "TargetId": targetId,
}
- orgCli := organizations.NewFromConfig(cfg)
- var nextToken *string
policies := make([]SOrgPolicy, 0)
-
for {
- input := organizations.ListPoliciesForTargetInput{}
- input.Filter = types.PolicyType(filter)
- input.TargetId = &targetId
- if nextToken != nil {
- input.NextToken = nextToken
- }
- parts, err := orgCli.ListPoliciesForTarget(context.Background(), &input)
+ ret := struct {
+ Policies []sOrgPolicySummary
+ NextToken string
+ }{}
+ err := r.orgRequest("ListPoliciesForTarget", params, &ret)
if err != nil {
return nil, errors.Wrap(err, "ListPoliciesForTarget")
}
- for _, pPtr := range parts.Policies {
- p := SOrgPolicy{
- Arn: *pPtr.Arn,
- AwsManaged: pPtr.AwsManaged,
- Description: *pPtr.Description,
- Id: *pPtr.Id,
- Name: *pPtr.Name,
- Type: string(pPtr.Type),
- }
- policies = append(policies, p)
+ for _, p := range ret.Policies {
+ policies = append(policies, SOrgPolicy{
+ Arn: p.Arn,
+ AwsManaged: p.AwsManaged,
+ Description: p.Description,
+ Id: p.Id,
+ Name: p.Name,
+ Type: p.Type,
+ })
}
- if parts.NextToken == nil || len(*parts.NextToken) == 0 {
+ if len(ret.NextToken) == 0 {
break
- } else {
- nextToken = parts.NextToken
}
+ params["NextToken"] = ret.NextToken
}
return policies, nil
}
func (r *SRegion) DescribeOrgPolicy(pId string) (jsonutils.JSONObject, error) {
- cfg, err := r.getConfig()
- if err != nil {
- return nil, errors.Wrap(err, "getConfig")
+ params := map[string]interface{}{
+ "PolicyId": pId,
}
- orgCli := organizations.NewFromConfig(cfg)
- input := organizations.DescribePolicyInput{}
- input.PolicyId = &pId
- output, err := orgCli.DescribePolicy(context.Background(), &input)
+ ret := struct {
+ Policy struct {
+ Content string
+ }
+ }{}
+ err := r.orgRequest("DescribePolicy", params, &ret)
if err != nil {
return nil, errors.Wrap(err, "DescribePolicy")
}
- content, err := jsonutils.ParseString(*output.Policy.Content)
+ content, err := jsonutils.ParseString(ret.Policy.Content)
if err != nil {
return nil, errors.Wrap(err, "ParseJSON")
}
@@ -173,53 +188,49 @@ func (r *SRegion) DescribeOrgPolicy(pId string) (jsonutils.JSONObject, error) {
}
func (r *SRegion) ListAccounts() ([]SAccount, error) {
- cfg, err := r.getConfig()
- if err != nil {
- return nil, errors.Wrap(err, "getConfig")
- }
- orgCli := organizations.NewFromConfig(cfg)
- input := organizations.DescribeOrganizationInput{}
- orgOutput, err := orgCli.DescribeOrganization(context.Background(), &input)
+ orgRet := struct {
+ Organization sOrganization
+ }{}
+ err := r.orgRequest("DescribeOrganization", map[string]interface{}{}, &orgRet)
if err != nil {
log.Errorf("%#v", err)
return nil, errors.Wrap(err, "DescribeOrganization")
}
- var nextToken *string
+ params := map[string]interface{}{}
accounts := make([]SAccount, 0)
for {
- input := organizations.ListAccountsInput{}
- if nextToken != nil {
- input.NextToken = nextToken
- }
- parts, err := orgCli.ListAccounts(context.Background(), &input)
+ part := struct {
+ Accounts []sOrgAccount
+ NextToken string
+ }{}
+ err := r.orgRequest("ListAccounts", params, &part)
if err != nil {
return nil, errors.Wrap(err, "ListAccounts")
}
- for _, actPtr := range parts.Accounts {
+ for _, act := range part.Accounts {
account := SAccount{
- ID: *actPtr.Id,
- Name: *actPtr.Id,
- Arn: *actPtr.Arn,
- Email: *actPtr.Email,
- State: string(actPtr.State),
- JoinedMethod: string(actPtr.JoinedMethod),
- JoinedTimestamp: *actPtr.JoinedTimestamp,
- Path: actPtr.Paths,
+ ID: act.Id,
+ Name: act.Id,
+ Arn: act.Arn,
+ Email: act.Email,
+ State: act.State,
+ JoinedMethod: act.JoinedMethod,
+ JoinedTimestamp: time.Unix(0, int64(act.JoinedTimestamp*float64(time.Second))),
+ Path: act.Paths,
}
- if actPtr.Name != nil && len(*actPtr.Name) > 0 {
- account.Name = *actPtr.Name
+ if len(act.Name) > 0 {
+ account.Name = act.Name
}
- if *orgOutput.Organization.MasterAccountId == *actPtr.Id {
+ if orgRet.Organization.MasterAccountId == act.Id {
account.IsMaster = true
}
accounts = append(accounts, account)
}
- if parts.NextToken == nil || len(*parts.NextToken) == 0 {
+ if len(part.NextToken) == 0 {
break
- } else {
- nextToken = parts.NextToken
}
+ params["NextToken"] = part.NextToken
}
return accounts, nil
}
@@ -262,21 +273,15 @@ func (awscli *SAwsClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
// For OU IDs in path (prefix "ou-"), we also best-effort resolve OU name via DescribeOrganizationalUnit.
tagsByAccount := map[string]map[string]string{}
ouNameCache := map[string]string{}
- cfg, cfgErr := defRegion.getConfig()
- if cfgErr == nil {
- orgCli := organizations.NewFromConfig(cfg)
- for _, account := range accounts {
- tags, tErr := getAccountPathTags(orgCli, account.Path, ouNameCache)
- if tErr != nil {
- log.Debugf("getAccountPathTags %s: %v", account.ID, tErr)
- continue
- }
- if len(tags) > 0 {
- tagsByAccount[account.ID] = tags
- }
+ for _, account := range accounts {
+ tags, tErr := getAccountPathTags(awscli, account.Path, ouNameCache)
+ if tErr != nil {
+ log.Debugf("getAccountPathTags %s: %v", account.ID, tErr)
+ continue
+ }
+ if len(tags) > 0 {
+ tagsByAccount[account.ID] = tags
}
- } else {
- log.Debugf("getConfig for organizations: %v", cfgErr)
}
subAccounts := []cloudprovider.SSubAccount{}
@@ -317,7 +322,7 @@ func (awscli *SAwsClient) GetSubAccounts() ([]cloudprovider.SSubAccount, error)
}
}
-func getAccountPathTags(orgCli *organizations.Client, paths []string, ouNameCache map[string]string) (map[string]string, error) {
+func getAccountPathTags(client *SAwsClient, paths []string, ouNameCache map[string]string) (map[string]string, error) {
// AWS Organizations account "Paths" can be:
// - multiple path strings (account may exist in multiple hierarchies)
// - each path string could be a concatenation like "r-xxxx/ou-yyyy/ou-zzzz"
@@ -359,7 +364,7 @@ func getAccountPathTags(orgCli *organizations.Client, paths []string, ouNameCach
}
if len(ouIds) > 0 {
- tags, err := getOuIdsTags(orgCli, ouIds, ouNameCache)
+ tags, err := getOuIdsTags(client, ouIds, ouNameCache)
if err != nil {
return nil, err
}
@@ -386,7 +391,7 @@ func getAccountPathTags(orgCli *organizations.Client, paths []string, ouNameCach
// Non-concatenated single segment.
if strings.HasPrefix(pathStr, "ou-") {
- tags, err := getOuIdsTags(orgCli, []string{pathStr}, ouNameCache)
+ tags, err := getOuIdsTags(client, []string{pathStr}, ouNameCache)
if err != nil {
return nil, err
}
@@ -404,7 +409,7 @@ func getAccountPathTags(orgCli *organizations.Client, paths []string, ouNameCach
return map[string]string{}, nil
}
-func getOuIdsTags(orgCli *organizations.Client, ouIds []string, ouNameCache map[string]string) (map[string]string, error) {
+func getOuIdsTags(client *SAwsClient, ouIds []string, ouNameCache map[string]string) (map[string]string, error) {
tags := map[string]string{}
level := 1
for _, ouId := range ouIds {
@@ -415,15 +420,17 @@ func getOuIdsTags(orgCli *organizations.Client, ouIds []string, ouNameCache map[
ouName, ok := ouNameCache[ouId]
if !ok {
- descInput := organizations.DescribeOrganizationalUnitInput{}
- descInput.OrganizationalUnitId = &ouId
- descOutput, descErr := orgCli.DescribeOrganizationalUnit(context.Background(), &descInput)
+ params := map[string]interface{}{
+ "OrganizationalUnitId": ouId,
+ }
+ ret := struct {
+ OrganizationalUnit sOrganizationalUnit
+ }{}
+ descErr := client.orgRequest("DescribeOrganizationalUnit", params, &ret)
if descErr != nil {
return nil, errors.Wrap(descErr, "DescribeOrganizationalUnit")
}
- if descOutput.OrganizationalUnit != nil && descOutput.OrganizationalUnit.Name != nil {
- ouName = *descOutput.OrganizationalUnit.Name
- }
+ ouName = ret.OrganizationalUnit.Name
ouNameCache[ouId] = ouName
}
@@ -451,33 +458,31 @@ func isAWSAccountID(s string) bool {
}
func (r *SRegion) ListParents(childId string) error {
- cfg, err := r.getConfig()
- if err != nil {
- return errors.Wrap(err, "getConfig")
+ params := map[string]interface{}{
+ "ChildId": childId,
}
- orgCli := organizations.NewFromConfig(cfg)
- input := organizations.ListParentsInput{}
- input.ChildId = &childId
- parents, err := orgCli.ListParents(context.Background(), &input)
+ ret := struct {
+ Parents []interface{}
+ }{}
+ err := r.orgRequest("ListParents", params, &ret)
if err != nil {
return errors.Wrap(err, "ListParents")
}
- log.Debugf("%#v", parents)
+ log.Debugf("%#v", ret)
return nil
}
func (r *SRegion) DescribeOrganizationalUnit(ouId string) error {
- cfg, err := r.getConfig()
- if err != nil {
- return errors.Wrap(err, "getConfig")
+ params := map[string]interface{}{
+ "OrganizationalUnitId": ouId,
}
- orgCli := organizations.NewFromConfig(cfg)
- input := organizations.DescribeOrganizationalUnitInput{}
- input.OrganizationalUnitId = &ouId
- output, err := orgCli.DescribeOrganizationalUnit(context.Background(), &input)
+ ret := struct {
+ OrganizationalUnit sOrganizationalUnit
+ }{}
+ err := r.orgRequest("DescribeOrganizationalUnit", params, &ret)
if err != nil {
return errors.Wrap(err, "DescribeOrganizationUnit")
}
- log.Debugf("%#v", output)
+ log.Debugf("%#v", ret)
return nil
}
diff --git a/pkg/multicloud/aws/region.go b/pkg/multicloud/aws/region.go
index 5ba2dc127..5b51444ff 100644
--- a/pkg/multicloud/aws/region.go
+++ b/pkg/multicloud/aws/region.go
@@ -18,15 +18,10 @@ import (
"context"
"fmt"
"strings"
- "sync"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/aws/aws-sdk-go/aws/session"
- "github.com/aws/aws-sdk-go/service/organizations"
- "github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi"
-
- "github.com/aws/aws-sdk-go/service/wafv2"
"yunion.io/x/log"
"yunion.io/x/pkg/errors"
@@ -37,10 +32,6 @@ import (
"yunion.io/x/cloudmux/pkg/multicloud"
)
-var (
- lock sync.RWMutex
-)
-
var RegionLocations = map[string]string{
"us-east-2": "美国东部(俄亥俄州)",
"us-east-1": "美国东部(弗吉尼亚北部)",
@@ -143,8 +134,8 @@ const (
CLOUDWATCH_SERVICE_NAME = "monitoring"
CLOUDWATCH_SERVICE_ID = "CloudWatch"
- CLOUD_TRAIL_SERVICE_NAME = "CloudTrail"
- CLOUD_TRAIL_SERVICE_ID = "cloudtrail"
+ CLOUD_TRAIL_SERVICE_NAME = "cloudtrail"
+ CLOUD_TRAIL_SERVICE_ID = "CloudTrail"
ROUTE53_SERVICE_NAME = "route53"
ROUTE53_SERVICE_ID = "Route 53"
@@ -175,16 +166,21 @@ const (
DYNAMODB_SERVICE_NAME = "dynamodb"
DYNAMODB_SERVICE_ID = "DynamoDB"
+
+ ORG_SERVICE_NAME = "organizations"
+ ORG_SERVICE_ID = "Organizations"
+
+ CE_SERVICE_NAME = "ce"
+ CE_SERVICE_ID = "Cost Explorer"
+
+ WAF_SERVICE_NAME = "wafv2"
+ WAF_SERVICE_ID = "WAFV2"
)
type SRegion struct {
multicloud.SRegion
- client *SAwsClient
- s3Client *s3.Client
- wafClient *wafv2.WAFV2
- organizationClient *organizations.Organizations
- resourceGroupTagClient *resourcegroupstaggingapi.ResourceGroupsTaggingAPI
+ client *SAwsClient
RegionEndpoint string `xml:"regionEndpoint"`
RegionId string `xml:"regionName"`
@@ -201,28 +197,6 @@ func (self *SRegion) getAwsSession() (*session.Session, error) {
return self.client.getAwsSession(self.RegionId, true)
}
-func (self *SRegion) getWafClient() (*wafv2.WAFV2, error) {
- if self.wafClient == nil {
- s, err := self.getAwsSession()
- if err != nil {
- return nil, errors.Wrapf(err, "getAwsSession")
- }
- self.wafClient = wafv2.New(s)
- }
- return self.wafClient, nil
-}
-
-func (self *SRegion) getResourceGroupTagClient() (*resourcegroupstaggingapi.ResourceGroupsTaggingAPI, error) {
- if self.resourceGroupTagClient == nil {
- s, err := self.getAwsSession()
- if err != nil {
- return nil, errors.Wrap(err, "getAwsSession")
- }
- self.resourceGroupTagClient = resourcegroupstaggingapi.New(s)
- }
- return self.resourceGroupTagClient, nil
-}
-
func (self *SRegion) elbRequest(apiName string, params map[string]string, retval interface{}) error {
return self.client.request(self.RegionId, ELB_SERVICE_NAME, ELB_SERVICE_ID, "2015-12-01", apiName, params, retval, true)
}
@@ -264,6 +238,14 @@ func (self *SRegion) eksRequest(apiName, path string, params map[string]interfac
return self.client.invoke(self.RegionId, EKS_SERVICE_NAME, EKS_SERVICE_ID, "2017-11-01", apiName, path, params, retval, true)
}
+func (self *SRegion) cloudtrailRequest(apiName string, params map[string]interface{}, retval interface{}) error {
+ return self.client.invoke(self.RegionId, CLOUD_TRAIL_SERVICE_NAME, CLOUD_TRAIL_SERVICE_ID, "2013-11-01", apiName, "", params, retval, true)
+}
+
+func (self *SRegion) wafRequest(apiName string, params map[string]interface{}, retval interface{}) error {
+ return self.client.invoke(self.RegionId, WAF_SERVICE_NAME, WAF_SERVICE_ID, "2019-07-29", apiName, "", params, retval, true)
+}
+
// ///////////////////////////////////////////////////////////////////////////
func (self *SRegion) GetZones(id string) ([]SZone, error) {
params := map[string]string{
diff --git a/pkg/multicloud/aws/waf.go b/pkg/multicloud/aws/waf.go
index 45a7b7781..903e2f5c9 100644
--- a/pkg/multicloud/aws/waf.go
+++ b/pkg/multicloud/aws/waf.go
@@ -18,8 +18,6 @@ import (
"strconv"
"strings"
- "github.com/aws/aws-sdk-go/service/wafv2"
-
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
@@ -58,7 +56,7 @@ type SWebAcl struct {
multicloud.SResourceBase
AwsTags
region *SRegion
- *wafv2.WebACL
+ *sWafWebACL
scope string
LockToken string
@@ -112,80 +110,71 @@ func (self *SRegion) ListWebACLs(scope string) ([]SWebAcl, error) {
if scope == SCOPE_CLOUDFRONT && self.RegionId != "us-east-1" {
return []SWebAcl{}, nil
}
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
- }
ret := []SWebAcl{}
- input := wafv2.ListWebACLsInput{}
- input.SetScope(scope)
+ params := map[string]interface{}{"Scope": scope}
for {
- resp, err := client.ListWebACLs(&input)
+ resp := struct {
+ WebACLs []SWebAcl
+ NextMarker string
+ }{}
+ err := self.wafRequest("ListWebACLs", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "ListWebACLs")
}
- part := []SWebAcl{}
- jsonutils.Update(&part, resp.WebACLs)
- ret = append(ret, part...)
- if resp.NextMarker == nil || len(*resp.NextMarker) == 0 {
+ ret = append(ret, resp.WebACLs...)
+ if len(resp.NextMarker) == 0 {
break
}
- input.SetNextMarker(*resp.NextMarker)
+ params["NextMarker"] = resp.NextMarker
}
return ret, nil
}
func (self *SRegion) GetWebAcl(id, name, scope string) (*SWebAcl, error) {
- client, err := self.getWafClient()
+ params := map[string]interface{}{
+ "Id": id,
+ "Name": name,
+ "Scope": scope,
+ }
+ resp := struct {
+ WebACL *sWafWebACL
+ LockToken string
+ }{}
+ err := self.wafRequest("GetWebACL", params, &resp)
if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
- }
- input := wafv2.GetWebACLInput{}
- input.SetId(id)
- input.SetName(name)
- input.SetScope(scope)
- resp, err := client.GetWebACL(&input)
- if err != nil {
- if _, ok := err.(*wafv2.WAFNonexistentItemException); ok {
+ if strings.Contains(err.Error(), "WAFNonexistentItemException") {
return nil, errors.Wrapf(cloudprovider.ErrNotFound, "%s", err.Error())
}
return nil, errors.Wrapf(err, "GetWebAcl")
}
- ret := &SWebAcl{region: self, scope: scope, WebACL: resp.WebACL, LockToken: *resp.LockToken}
+ ret := &SWebAcl{region: self, scope: scope, sWafWebACL: resp.WebACL, LockToken: resp.LockToken}
return ret, nil
}
func (self *SRegion) DeleteWebAcl(id, name, scope, lockToken string) error {
- client, err := self.getWafClient()
- if err != nil {
- return errors.Wrapf(err, "getWafClient")
- }
- input := wafv2.DeleteWebACLInput{}
- input.SetId(id)
- input.SetName(name)
- input.SetScope(scope)
- input.SetLockToken(lockToken)
- _, err = client.DeleteWebACL(&input)
+ params := map[string]interface{}{
+ "Id": id,
+ "Name": name,
+ "Scope": scope,
+ "LockToken": lockToken,
+ }
+ err := self.wafRequest("DeleteWebACL", params, nil)
return errors.Wrapf(err, "DeleteWebACL")
}
func (self *SRegion) ListResourcesForWebACL(resType, arn string) ([]string, error) {
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
- }
- input := wafv2.ListResourcesForWebACLInput{}
- input.SetResourceType(resType)
- input.SetWebACLArn(arn)
- resp, err := client.ListResourcesForWebACL(&input)
+ params := map[string]interface{}{
+ "ResourceType": resType,
+ "WebACLArn": arn,
+ }
+ resp := struct {
+ ResourceArns []string
+ }{}
+ err := self.wafRequest("ListResourcesForWebACL", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "ListResourcesForWebACL")
}
- ret := []string{}
- for _, id := range resp.ResourceArns {
- ret = append(ret, *id)
- }
- return ret, nil
+ return resp.ResourceArns, nil
}
func (self *SRegion) GetICloudWafInstanceById(id string) (cloudprovider.ICloudWafInstance, error) {
@@ -249,11 +238,11 @@ func (self *SWebAcl) GetStatus() string {
func (self *SWebAcl) GetDefaultAction() *cloudprovider.DefaultAction {
ret := &cloudprovider.DefaultAction{}
- if self.WebACL.DefaultAction == nil {
+ if self.sWafWebACL.DefaultAction == nil {
self.Refresh()
}
- if self.WebACL.DefaultAction != nil {
- action := self.WebACL.DefaultAction
+ if self.sWafWebACL.DefaultAction != nil {
+ action := self.sWafWebACL.DefaultAction
if action.Allow != nil {
ret.Action = cloudprovider.WafActionAllow
} else if action.Block != nil {
@@ -268,7 +257,7 @@ func (self *SWebAcl) Refresh() error {
if err != nil {
return errors.Wrapf(err, "GetWebAcl")
}
- self.WebACL = acl.WebACL
+ self.sWafWebACL = acl.sWafWebACL
return jsonutils.Update(self, acl)
}
@@ -285,285 +274,248 @@ func (self *SRegion) CreateICloudWafInstance(opts *cloudprovider.WafCreateOption
}
func (self *SRegion) CreateWebAcl(name, desc string, wafType cloudprovider.TWafType, action *cloudprovider.DefaultAction) (*SWebAcl, error) {
- input := wafv2.CreateWebACLInput{}
- input.SetName(name)
- if len(desc) > 0 {
- input.SetDescription(desc)
- }
+ var scope string
switch wafType {
case cloudprovider.WafTypeRegional, cloudprovider.WafTypeCloudFront:
- input.SetScope(strings.ToUpper(string(wafType)))
+ scope = strings.ToUpper(string(wafType))
default:
return nil, errors.Errorf("invalid waf type %s", wafType)
}
+ params := map[string]interface{}{
+ "Name": name,
+ "Scope": scope,
+ "VisibilityConfig": &sWafVisibilityConfig{
+ SampledRequestsEnabled: true,
+ CloudWatchMetricsEnabled: true,
+ MetricName: name,
+ },
+ }
+ if len(desc) > 0 {
+ params["Description"] = desc
+ }
if action != nil {
- defaultAction := wafv2.DefaultAction{}
+ defaultAction := &sWafDefaultAction{}
switch action.Action {
case cloudprovider.WafActionAllow:
- defaultAction.Allow = &wafv2.AllowAction{}
+ defaultAction.Allow = &sWafAllowAction{}
case cloudprovider.WafActionBlock:
- defaultAction.Block = &wafv2.BlockAction{}
+ defaultAction.Block = &sWafBlockAction{}
}
- input.SetDefaultAction(&defaultAction)
- }
- visib := &wafv2.VisibilityConfig{}
- visib.SetSampledRequestsEnabled(true)
- visib.SetCloudWatchMetricsEnabled(true)
- visib.SetMetricName(name)
- input.SetVisibilityConfig(visib)
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
+ params["DefaultAction"] = defaultAction
}
- output, err := client.CreateWebACL(&input)
+ resp := struct {
+ Summary struct {
+ Id string
+ }
+ }{}
+ err := self.wafRequest("CreateWebACL", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "CreateWebAcl")
}
- return self.GetWebAcl(*output.Summary.Id, name, *input.Scope)
+ return self.GetWebAcl(resp.Summary.Id, name, scope)
}
-func reverseConvertField(opts cloudprovider.SWafStatement) *wafv2.FieldToMatch {
- ret := &wafv2.FieldToMatch{}
+func reverseConvertField(opts cloudprovider.SWafStatement) *sWafFieldToMatch {
+ ret := &sWafFieldToMatch{}
switch opts.MatchField {
case cloudprovider.WafMatchFieldBody:
- body := &wafv2.Body{}
- ret.SetBody(body)
+ ret.Body = &sWafBody{}
case cloudprovider.WafMatchFieldJsonBody:
case cloudprovider.WafMatchFieldMethod:
- method := &wafv2.Method{}
- ret.SetMethod(method)
+ ret.Method = &sWafMethod{}
case cloudprovider.WafMatchFieldQuery:
switch opts.MatchFieldKey {
case "SingleArgument":
- query := &wafv2.SingleQueryArgument{}
- ret.SetSingleQueryArgument(query)
+ ret.SingleQueryArgument = &sWafSingleQueryArgument{}
case "AllArguments":
- query := &wafv2.AllQueryArguments{}
- ret.SetAllQueryArguments(query)
+ ret.AllQueryArguments = &sWafAllQueryArguments{}
default:
- query := &wafv2.QueryString{}
- ret.SetQueryString(query)
+ ret.QueryString = &sWafQueryString{}
}
case cloudprovider.WafMatchFiledHeader:
- head := &wafv2.SingleHeader{}
- head.SetName(opts.MatchFieldKey)
- ret.SetSingleHeader(head)
+ ret.SingleHeader = &sWafSingleHeader{Name: awsWafString(opts.MatchFieldKey)}
case cloudprovider.WafMatchFiledUriPath:
- uri := &wafv2.UriPath{}
- ret.SetUriPath(uri)
+ ret.UriPath = &sWafUriPath{}
}
return ret
}
-func reverseConvertStatement(statement cloudprovider.SWafStatement) *wafv2.Statement {
- ret := &wafv2.Statement{}
- trans := []*wafv2.TextTransformation{}
+func reverseConvertStatement(statement cloudprovider.SWafStatement) *sWafStatement {
+ ret := &sWafStatement{}
+ trans := []*sWafTextTransformation{}
if statement.Transformations != nil {
for i, tran := range *statement.Transformations {
- t := &wafv2.TextTransformation{}
+ t := &sWafTextTransformation{Priority: awsWafInt64(int64(i))}
switch tran {
case cloudprovider.WafTextTransformationNone:
- t.SetType(wafv2.TextTransformationTypeNone)
+ t.Type = awsWafString(wafTextTransformationTypeNone)
case cloudprovider.WafTextTransformationLowercase:
- t.SetType(wafv2.TextTransformationTypeLowercase)
+ t.Type = awsWafString(wafTextTransformationTypeLowercase)
case cloudprovider.WafTextTransformationCmdLine:
- t.SetType(wafv2.TextTransformationTypeCmdLine)
+ t.Type = awsWafString(wafTextTransformationTypeCmdLine)
case cloudprovider.WafTextTransformationUrlDecode:
- t.SetType(wafv2.TextTransformationTypeUrlDecode)
+ t.Type = awsWafString(wafTextTransformationTypeUrlDecode)
case cloudprovider.WafTextTransformationHtmlEntityDecode:
- t.SetType(wafv2.TextTransformationTypeHtmlEntityDecode)
+ t.Type = awsWafString(wafTextTransformationTypeHtmlEntityDecode)
case cloudprovider.WafTextTransformationCompressWithSpace:
- t.SetType(wafv2.TextTransformationTypeCompressWhiteSpace)
+ t.Type = awsWafString(wafTextTransformationTypeCompressWhiteSpace)
}
- t.SetPriority(int64(i))
trans = append(trans, t)
}
}
- rules := []*wafv2.ExcludedRule{}
+ rules := []*sWafExcludedRule{}
if statement.ExcludeRules != nil {
for _, r := range *statement.ExcludeRules {
name := r.Name
- rules = append(rules, &wafv2.ExcludedRule{
- Name: &name,
- })
+ rules = append(rules, &sWafExcludedRule{Name: &name})
}
}
field := reverseConvertField(statement)
switch statement.Type {
case cloudprovider.WafStatementTypeRate:
- rate := &wafv2.RateBasedStatement{}
+ rate := &sWafRateBasedStatement{AggregateKeyType: awsWafString("IP")}
limit := int(0)
if statement.MatchFieldValues != nil && len(*statement.MatchFieldValues) == 1 {
limit, _ = strconv.Atoi((*statement.MatchFieldValues)[0])
}
- rate.SetLimit(int64(limit))
- fd := &wafv2.ForwardedIPConfig{}
+ rate.Limit = awsWafInt64(int64(limit))
if len(statement.ForwardedIPHeader) > 0 {
- fd.SetHeaderName(statement.ForwardedIPHeader)
- rate.SetForwardedIPConfig(fd)
+ rate.ForwardedIPConfig = &sWafForwardedIPConfig{HeaderName: awsWafString(statement.ForwardedIPHeader)}
}
- ret.SetRateBasedStatement(rate)
+ ret.RateBasedStatement = rate
case cloudprovider.WafStatementTypeIPSet:
- ipset := &wafv2.IPSetReferenceStatement{}
- ipset.SetARN(statement.IPSetId)
- fd := &wafv2.IPSetForwardedIPConfig{}
+ ipset := &sWafIPSetReferenceStatement{ARN: awsWafString(statement.IPSetId)}
if len(statement.ForwardedIPHeader) > 0 {
- fd.SetHeaderName(statement.ForwardedIPHeader)
- ipset.SetIPSetForwardedIPConfig(fd)
+ ipset.IPSetForwardedIPConfig = &sWafIPSetForwardedIPConfig{HeaderName: awsWafString(statement.ForwardedIPHeader)}
}
- ret.SetIPSetReferenceStatement(ipset)
+ ret.IPSetReferenceStatement = ipset
case cloudprovider.WafStatementTypeXssMatch:
- xss := &wafv2.XssMatchStatement{}
- if len(trans) > 0 {
- xss.SetTextTransformations(trans)
- }
- field := &wafv2.FieldToMatch{}
- xss.SetFieldToMatch(field)
- xss.SetTextTransformations(trans)
- ret.SetXssMatchStatement(xss)
+ xss := &sWafXssMatchStatement{FieldToMatch: field, TextTransformations: trans}
+ ret.XssMatchStatement = xss
case cloudprovider.WafStatementTypeSize:
- size := &wafv2.SizeConstraintStatement{}
- size.SetFieldToMatch(field)
+ size := &sWafSizeConstraintStatement{FieldToMatch: field}
value := int(0)
if statement.MatchFieldValues != nil && len(*statement.MatchFieldValues) == 1 {
value, _ = strconv.Atoi((*statement.MatchFieldValues)[0])
}
- size.SetSize(int64(value))
- ret.SetSizeConstraintStatement(size)
+ size.Size = awsWafInt64(int64(value))
+ ret.SizeConstraintStatement = size
case cloudprovider.WafStatementTypeGeoMatch:
- geo := &wafv2.GeoMatchStatement{}
+ geo := &sWafGeoMatchStatement{}
values := []*string{}
if statement.MatchFieldValues != nil {
for i := range *statement.MatchFieldValues {
v := (*statement.MatchFieldValues)[i]
values = append(values, &v)
}
- geo.SetCountryCodes(values)
+ geo.CountryCodes = values
}
- fd := &wafv2.ForwardedIPConfig{}
if len(statement.ForwardedIPHeader) > 0 {
- fd.SetHeaderName(statement.ForwardedIPHeader)
- geo.SetForwardedIPConfig(fd)
+ geo.ForwardedIPConfig = &sWafForwardedIPConfig{HeaderName: awsWafString(statement.ForwardedIPHeader)}
}
- ret.SetGeoMatchStatement(geo)
+ ret.GeoMatchStatement = geo
case cloudprovider.WafStatementTypeRegexSet:
- regex := &wafv2.RegexPatternSetReferenceStatement{}
- regex.SetARN(statement.RegexSetId)
- if len(trans) > 0 {
- regex.SetTextTransformations(trans)
+ regex := &sWafRegexPatternSetReferenceStatement{
+ ARN: awsWafString(statement.RegexSetId),
+ FieldToMatch: field,
+ TextTransformations: trans,
}
- regex.SetFieldToMatch(field)
- ret.SetRegexPatternSetReferenceStatement(regex)
+ ret.RegexPatternSetReferenceStatement = regex
case cloudprovider.WafStatementTypeByteMatch:
- bm := &wafv2.ByteMatchStatement{}
- if len(trans) > 0 {
- bm.SetTextTransformations(trans)
+ bm := &sWafByteMatchStatement{
+ FieldToMatch: field,
+ SearchString: []byte(statement.SearchString),
+ TextTransformations: trans,
}
- bm.SetSearchString([]byte(statement.SearchString))
if len(statement.Operator) > 0 {
- bm.SetPositionalConstraint(string(statement.Operator))
+ bm.PositionalConstraint = awsWafString(string(statement.Operator))
}
- bm.SetFieldToMatch(field)
- ret.SetByteMatchStatement(bm)
+ ret.ByteMatchStatement = bm
case cloudprovider.WafStatementTypeRuleGroup:
- rg := &wafv2.RuleGroupReferenceStatement{}
- rg.SetARN(statement.RuleGroupId)
- if len(rules) > 0 {
- rg.SetExcludedRules(rules)
- }
- ret.SetRuleGroupReferenceStatement(rg)
+ rg := &sWafRuleGroupReferenceStatement{ARN: awsWafString(statement.RuleGroupId), ExcludedRules: rules}
+ ret.RuleGroupReferenceStatement = rg
case cloudprovider.WafStatementTypeSqliMatch:
- sqli := &wafv2.SqliMatchStatement{}
- if len(trans) > 0 {
- sqli.SetTextTransformations(trans)
- }
- sqli.SetFieldToMatch(field)
- ret.SetSqliMatchStatement(sqli)
+ sqli := &sWafSqliMatchStatement{FieldToMatch: field, TextTransformations: trans}
+ ret.SqliMatchStatement = sqli
case cloudprovider.WafStatementTypeLabelMatch:
case cloudprovider.WafStatementTypeManagedRuleGroup:
- rg := &wafv2.ManagedRuleGroupStatement{}
- rg.SetName(statement.ManagedRuleGroupName)
- rg.SetVendorName("aws")
- if len(rules) > 0 {
- rg.SetExcludedRules(rules)
+ rg := &sWafManagedRuleGroupStatement{
+ Name: awsWafString(statement.ManagedRuleGroupName),
+ VendorName: awsWafString("aws"),
+ ExcludedRules: rules,
}
- ret.SetManagedRuleGroupStatement(rg)
+ ret.ManagedRuleGroupStatement = rg
}
return ret
}
func (self *SWebAcl) AddRule(opts *cloudprovider.SWafRule) (cloudprovider.ICloudWafRule, error) {
- input := &wafv2.UpdateWebACLInput{}
- input.SetLockToken(self.LockToken)
- input.SetId(*self.Id)
- input.SetName(*self.Name)
- input.SetScope(self.scope)
- input.SetDescription(*self.Description)
- input.SetDefaultAction(self.DefaultAction)
- input.SetVisibilityConfig(self.WebACL.VisibilityConfig)
rules := self.Rules
- rule := &wafv2.Rule{}
- rule.SetName(opts.Name)
- rule.SetPriority(int64(opts.Priority))
- action := &wafv2.RuleAction{}
+ rule := &sWafRuleItem{
+ Name: awsWafString(opts.Name),
+ Priority: awsWafInt64(int64(opts.Priority)),
+ }
if opts.Action != nil {
+ action := &sWafRuleAction{}
switch opts.Action.Action {
case cloudprovider.WafActionAllow:
- allow := &wafv2.AllowAction{}
- action.SetAllow(allow)
+ action.Allow = &sWafAllowAction{}
case cloudprovider.WafActionBlock:
- block := &wafv2.BlockAction{}
- action.SetBlock(block)
+ action.Block = &sWafBlockAction{}
case cloudprovider.WafActionCount:
- count := &wafv2.CountAction{}
- action.SetCount(count)
+ action.Count = &sWafCountAction{}
}
+ rule.Action = action
}
- rule.SetAction(action)
- visib := &wafv2.VisibilityConfig{}
- visib.SetSampledRequestsEnabled(false)
- visib.SetCloudWatchMetricsEnabled(true)
- visib.SetMetricName(opts.Name)
- rule.SetVisibilityConfig(visib)
- statement := &wafv2.Statement{}
+ rule.VisibilityConfig = &sWafVisibilityConfig{
+ SampledRequestsEnabled: false,
+ CloudWatchMetricsEnabled: true,
+ MetricName: opts.Name,
+ }
+ statement := &sWafStatement{}
switch opts.StatementCondition {
case cloudprovider.WafStatementConditionOr:
- ss := &wafv2.OrStatement{}
+ ss := &sWafOrStatement{}
for _, s := range opts.Statements {
ss.Statements = append(ss.Statements, reverseConvertStatement(s))
}
- statement.SetOrStatement(ss)
+ statement.OrStatement = ss
case cloudprovider.WafStatementConditionAnd:
- ss := &wafv2.AndStatement{}
+ ss := &sWafAndStatement{}
for _, s := range opts.Statements {
ss.Statements = append(ss.Statements, reverseConvertStatement(s))
}
- statement.SetAndStatement(ss)
+ statement.AndStatement = ss
case cloudprovider.WafStatementConditionNot:
- ss := &wafv2.NotStatement{}
+ ss := &sWafNotStatement{}
for _, s := range opts.Statements {
- ss.SetStatement(reverseConvertStatement(s))
+ ss.Statement = reverseConvertStatement(s)
break
}
- statement.SetNotStatement(ss)
+ statement.NotStatement = ss
case cloudprovider.WafStatementConditionNone:
for _, s := range opts.Statements {
statement = reverseConvertStatement(s)
break
}
}
- rule.SetStatement(statement)
+ rule.Statement = statement
rules = append(rules, rule)
- input.SetRules(rules)
- client, err := self.region.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
- }
- _, err = client.UpdateWebACL(input)
+ params := map[string]interface{}{
+ "LockToken": self.LockToken,
+ "Id": *self.Id,
+ "Name": *self.Name,
+ "Scope": self.scope,
+ "Description": *self.Description,
+ "DefaultAction": self.DefaultAction,
+ "VisibilityConfig": self.VisibilityConfig,
+ "Rules": rules,
+ }
+ err := self.region.wafRequest("UpdateWebACL", params, nil)
if err != nil {
return nil, errors.Wrapf(err, "UpdateWebACL")
}
- ret := &sWafRule{waf: self, Rule: rule}
+ ret := &sWafRule{waf: self, sWafRuleItem: rule}
return ret, nil
}
diff --git a/pkg/multicloud/aws/waf_ipsets.go b/pkg/multicloud/aws/waf_ipsets.go
index 36aa85bb4..2f1b763f6 100644
--- a/pkg/multicloud/aws/waf_ipsets.go
+++ b/pkg/multicloud/aws/waf_ipsets.go
@@ -15,8 +15,6 @@
package aws
import (
- "github.com/aws/aws-sdk-go/service/wafv2"
-
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
@@ -75,57 +73,52 @@ func (self *SRegion) ListIPSets(scope string) ([]SWafIPSet, error) {
if scope == SCOPE_CLOUDFRONT && self.RegionId != "us-east-1" {
return []SWafIPSet{}, nil
}
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
- }
ret := []SWafIPSet{}
- input := wafv2.ListIPSetsInput{}
- input.SetScope(scope)
+ params := map[string]interface{}{"Scope": scope}
for {
- resp, err := client.ListIPSets(&input)
+ resp := struct {
+ IPSets []SWafIPSet
+ NextMarker string
+ }{}
+ err := self.wafRequest("ListIPSets", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "ListIPSets")
}
- part := []SWafIPSet{}
- jsonutils.Update(&part, resp.IPSets)
- ret = append(ret, part...)
- if resp.NextMarker == nil || len(*resp.NextMarker) == 0 {
+ ret = append(ret, resp.IPSets...)
+ if len(resp.NextMarker) == 0 {
break
}
- input.SetNextMarker(*resp.NextMarker)
+ params["NextMarker"] = resp.NextMarker
}
return ret, nil
}
func (self *SRegion) GetIPSet(id, name, scope string) (*SWafIPSet, error) {
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
+ params := map[string]interface{}{
+ "Id": id,
+ "Name": name,
+ "Scope": scope,
}
- input := wafv2.GetIPSetInput{}
- input.SetId(id)
- input.SetName(name)
- input.SetScope(scope)
- resp, err := client.GetIPSet(&input)
+ resp := struct {
+ IPSet map[string]interface{}
+ LockToken string
+ }{}
+ err := self.wafRequest("GetIPSet", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "GetIPSet")
}
- ret := &SWafIPSet{LockToken: *resp.LockToken}
+ ret := &SWafIPSet{LockToken: resp.LockToken}
return ret, jsonutils.Update(ret, resp.IPSet)
}
func (self *SRegion) DeleteIPSet(id, name, scope, lockToken string) error {
- client, err := self.getWafClient()
- if err != nil {
- return errors.Wrapf(err, "getWafClient")
+ params := map[string]interface{}{
+ "Id": id,
+ "Name": name,
+ "Scope": scope,
+ "LockToken": lockToken,
}
- input := wafv2.DeleteIPSetInput{}
- input.SetId(id)
- input.SetName(name)
- input.SetScope(scope)
- input.SetLockToken(lockToken)
- _, err = client.DeleteIPSet(&input)
+ err := self.wafRequest("DeleteIPSet", params, nil)
return errors.Wrapf(err, "DeleteIPSet")
}
diff --git a/pkg/multicloud/aws/waf_regexsets.go b/pkg/multicloud/aws/waf_regexsets.go
index 99db26ace..b08256c24 100644
--- a/pkg/multicloud/aws/waf_regexsets.go
+++ b/pkg/multicloud/aws/waf_regexsets.go
@@ -15,8 +15,6 @@
package aws
import (
- "github.com/aws/aws-sdk-go/service/wafv2"
-
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
@@ -84,57 +82,52 @@ func (self *SRegion) ListRegexSets(scope string) ([]SWafRegexSet, error) {
if scope == SCOPE_CLOUDFRONT && self.RegionId != "us-east-1" {
return []SWafRegexSet{}, nil
}
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
- }
ret := []SWafRegexSet{}
- input := wafv2.ListRegexPatternSetsInput{}
- input.SetScope(scope)
+ params := map[string]interface{}{"Scope": scope}
for {
- resp, err := client.ListRegexPatternSets(&input)
+ resp := struct {
+ RegexPatternSets []SWafRegexSet
+ NextMarker string
+ }{}
+ err := self.wafRequest("ListRegexPatternSets", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "ListRegexPatternSets")
}
- part := []SWafRegexSet{}
- jsonutils.Update(&part, resp.RegexPatternSets)
- ret = append(ret, part...)
- if resp.NextMarker == nil || len(*resp.NextMarker) == 0 {
+ ret = append(ret, resp.RegexPatternSets...)
+ if len(resp.NextMarker) == 0 {
break
}
- input.SetNextMarker(*resp.NextMarker)
+ params["NextMarker"] = resp.NextMarker
}
return ret, nil
}
func (self *SRegion) GetRegexSet(id, name, scope string) (*SWafRegexSet, error) {
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
+ params := map[string]interface{}{
+ "Id": id,
+ "Name": name,
+ "Scope": scope,
}
- input := wafv2.GetRegexPatternSetInput{}
- input.SetId(id)
- input.SetName(name)
- input.SetScope(scope)
- resp, err := client.GetRegexPatternSet(&input)
+ resp := struct {
+ RegexPatternSet map[string]interface{}
+ LockToken string
+ }{}
+ err := self.wafRequest("GetRegexPatternSet", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "GetRegexPatternSet")
}
- ret := &SWafRegexSet{LockToken: *resp.LockToken}
+ ret := &SWafRegexSet{LockToken: resp.LockToken}
return ret, jsonutils.Update(ret, resp.RegexPatternSet)
}
func (self *SRegion) DeleteRegexSet(id, name, scope, lockToken string) error {
- client, err := self.getWafClient()
- if err != nil {
- return errors.Wrapf(err, "getWafClient")
+ params := map[string]interface{}{
+ "Id": id,
+ "Name": name,
+ "Scope": scope,
+ "LockToken": lockToken,
}
- input := wafv2.DeleteRegexPatternSetInput{}
- input.SetId(id)
- input.SetName(name)
- input.SetScope(scope)
- input.SetLockToken(lockToken)
- _, err = client.DeleteRegexPatternSet(&input)
+ err := self.wafRequest("DeleteRegexPatternSet", params, nil)
return errors.Wrapf(err, "DeleteRegexPatternSet")
}
diff --git a/pkg/multicloud/aws/waf_rule_groups.go b/pkg/multicloud/aws/waf_rule_groups.go
index fa5ee0d38..d30033d84 100644
--- a/pkg/multicloud/aws/waf_rule_groups.go
+++ b/pkg/multicloud/aws/waf_rule_groups.go
@@ -15,8 +15,6 @@
package aws
import (
- "github.com/aws/aws-sdk-go/service/wafv2"
-
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
)
@@ -33,39 +31,34 @@ func (self *SRegion) ListAvailableManagedRuleGroups(scope string) ([]SWafRuleGro
if scope == SCOPE_CLOUDFRONT && self.RegionId != "us-east-1" {
return []SWafRuleGroup{}, nil
}
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
- }
ret := []SWafRuleGroup{}
- input := wafv2.ListAvailableManagedRuleGroupsInput{}
- input.SetScope(scope)
+ params := map[string]interface{}{"Scope": scope}
for {
- resp, err := client.ListAvailableManagedRuleGroups(&input)
+ resp := struct {
+ ManagedRuleGroups []SWafRuleGroup
+ NextMarker string
+ }{}
+ err := self.wafRequest("ListAvailableManagedRuleGroups", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "ListAvailableManagedRuleGroups")
}
- part := []SWafRuleGroup{}
- jsonutils.Update(&part, resp.ManagedRuleGroups)
- ret = append(ret, part...)
- if resp.NextMarker == nil || len(*resp.NextMarker) == 0 {
+ ret = append(ret, resp.ManagedRuleGroups...)
+ if len(resp.NextMarker) == 0 {
break
}
- input.SetNextMarker(*resp.NextMarker)
+ params["NextMarker"] = resp.NextMarker
}
return ret, nil
}
func (self *SRegion) DescribeManagedRuleGroup(name, scope, vendorName string) (*SWafRuleGroup, error) {
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
+ params := map[string]interface{}{
+ "Name": name,
+ "Scope": scope,
+ "VendorName": vendorName,
}
- input := wafv2.DescribeManagedRuleGroupInput{}
- input.SetName(name)
- input.SetScope(scope)
- input.SetVendorName(vendorName)
- resp, err := client.DescribeManagedRuleGroup(&input)
+ resp := map[string]interface{}{}
+ err := self.wafRequest("DescribeManagedRuleGroup", params, &resp)
if err != nil {
return nil, err
}
@@ -80,39 +73,36 @@ func (self *SRegion) ListRuleGroups(scope string) ([]SWafRuleGroup, error) {
if scope == SCOPE_CLOUDFRONT && self.RegionId != "us-east-1" {
return []SWafRuleGroup{}, nil
}
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
- }
ret := []SWafRuleGroup{}
- input := wafv2.ListRuleGroupsInput{}
- input.SetScope(scope)
+ params := map[string]interface{}{"Scope": scope}
for {
- resp, err := client.ListRuleGroups(&input)
+ resp := struct {
+ RuleGroups []SWafRuleGroup
+ NextMarker string
+ }{}
+ err := self.wafRequest("ListRuleGroups", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "ListRuleGroups")
}
- part := []SWafRuleGroup{}
- jsonutils.Update(&part, resp.RuleGroups)
- ret = append(ret, part...)
- if resp.NextMarker == nil || len(*resp.NextMarker) == 0 {
+ ret = append(ret, resp.RuleGroups...)
+ if len(resp.NextMarker) == 0 {
break
}
- input.SetNextMarker(*resp.NextMarker)
+ params["NextMarker"] = resp.NextMarker
}
return ret, nil
}
func (self *SRegion) GetRuleGroup(id, name, scope string) (*SWafRuleGroup, error) {
- client, err := self.getWafClient()
- if err != nil {
- return nil, errors.Wrapf(err, "getWafClient")
+ params := map[string]interface{}{
+ "Id": id,
+ "Name": name,
+ "Scope": scope,
}
- input := wafv2.GetRuleGroupInput{}
- input.SetId(id)
- input.SetName(name)
- input.SetScope(scope)
- resp, err := client.GetRuleGroup(&input)
+ resp := struct {
+ RuleGroup map[string]interface{}
+ }{}
+ err := self.wafRequest("GetRuleGroup", params, &resp)
if err != nil {
return nil, errors.Wrapf(err, "GetRuleGroup")
}
@@ -121,15 +111,12 @@ func (self *SRegion) GetRuleGroup(id, name, scope string) (*SWafRuleGroup, error
}
func (self *SRegion) DeleteRuleGroup(id, name, scope, lockToken string) error {
- client, err := self.getWafClient()
- if err != nil {
- return errors.Wrapf(err, "getWafClient")
+ params := map[string]interface{}{
+ "Id": id,
+ "Name": name,
+ "Scope": scope,
+ "LockToken": lockToken,
}
- input := wafv2.DeleteRuleGroupInput{}
- input.SetId(id)
- input.SetName(name)
- input.SetScope(scope)
- input.SetLockToken(lockToken)
- _, err = client.DeleteRuleGroup(&input)
+ err := self.wafRequest("DeleteRuleGroup", params, nil)
return errors.Wrapf(err, "DeleteRuleGroup")
}
diff --git a/pkg/multicloud/aws/waf_rules.go b/pkg/multicloud/aws/waf_rules.go
index 59237734e..d32343aa5 100644
--- a/pkg/multicloud/aws/waf_rules.go
+++ b/pkg/multicloud/aws/waf_rules.go
@@ -18,8 +18,6 @@ import (
"fmt"
"strings"
- "github.com/aws/aws-sdk-go/service/wafv2"
-
"yunion.io/x/jsonutils"
"yunion.io/x/pkg/errors"
"yunion.io/x/pkg/utils"
@@ -30,7 +28,7 @@ import (
type sWafRule struct {
waf *SWebAcl
- *wafv2.Rule
+ *sWafRuleItem
}
func (self *sWafRule) GetAction() *cloudprovider.DefaultAction {
@@ -56,7 +54,7 @@ func (self *sWafRule) GetType() string {
}
func (self *sWafRule) GetName() string {
- return *self.Rule.Name
+ return *self.sWafRuleItem.Name
}
func (self *sWafRule) GetGlobalId() string {
@@ -64,31 +62,28 @@ func (self *sWafRule) GetGlobalId() string {
}
func (self *sWafRule) GetPriority() int {
- return int(*self.Rule.Priority)
+ return int(*self.sWafRuleItem.Priority)
}
func (self *sWafRule) Delete() error {
- input := wafv2.UpdateWebACLInput{}
- rules := []*wafv2.Rule{}
+ rules := []*sWafRuleItem{}
for _, rule := range self.waf.Rules {
if *rule.Name == *self.Name {
continue
}
rules = append(rules, rule)
}
- input.SetRules(rules)
- input.SetLockToken(self.waf.LockToken)
- input.SetId(*self.waf.Id)
- input.SetName(*self.waf.Name)
- input.SetScope(self.waf.scope)
- input.SetDescription(*self.waf.Description)
- input.SetDefaultAction(self.waf.DefaultAction)
- input.SetVisibilityConfig(self.waf.WebACL.VisibilityConfig)
- client, err := self.waf.region.getWafClient()
- if err != nil {
- return errors.Wrapf(err, "getWafClient")
+ params := map[string]interface{}{
+ "Rules": rules,
+ "LockToken": self.waf.LockToken,
+ "Id": *self.waf.Id,
+ "Name": *self.waf.Name,
+ "Scope": self.waf.scope,
+ "Description": *self.waf.Description,
+ "DefaultAction": self.waf.DefaultAction,
+ "VisibilityConfig": self.waf.VisibilityConfig,
}
- _, err = client.UpdateWebACL(&input)
+ err := self.waf.region.wafRequest("UpdateWebACL", params, nil)
return errors.Wrapf(err, "UpdateWebACL")
}
@@ -101,14 +96,14 @@ func (self *sWafRule) GetExpression() string {
}
func (self *sWafRule) GetStatementCondition() cloudprovider.TWafStatementCondition {
- if self.Rule.Statement == nil {
+ if self.sWafRuleItem.Statement == nil {
return cloudprovider.WafStatementConditionNone
}
- if self.Rule.Statement.AndStatement != nil {
+ if self.sWafRuleItem.Statement.AndStatement != nil {
return cloudprovider.WafStatementConditionAnd
- } else if self.Rule.Statement.OrStatement != nil {
+ } else if self.sWafRuleItem.Statement.OrStatement != nil {
return cloudprovider.WafStatementConditionOr
- } else if self.Rule.Statement.NotStatement != nil {
+ } else if self.sWafRuleItem.Statement.NotStatement != nil {
return cloudprovider.WafStatementConditionNot
}
return cloudprovider.WafStatementConditionNone
@@ -130,11 +125,11 @@ func (self *sWafRule) GetConfig() (jsonutils.JSONObject, error) {
return jsonutils.NewDict(), nil
}
-type sWafStatement struct {
- *wafv2.Statement
+type sWafStatementView struct {
+ *sWafStatement
}
-func (self *sWafStatement) convert() cloudprovider.SWafStatement {
+func (self *sWafStatementView) convert() cloudprovider.SWafStatement {
statement := cloudprovider.SWafStatement{
Transformations: &cloudprovider.TextTransformations{},
}
@@ -188,7 +183,7 @@ func (self *sWafStatement) convert() cloudprovider.SWafStatement {
} else if self.SizeConstraintStatement != nil {
statement.Type = cloudprovider.WafStatementTypeSize
statement.Operator = cloudprovider.TWafOperator(*self.SizeConstraintStatement.ComparisonOperator)
- statement.MatchFieldValues = &cloudprovider.TWafMatchFieldValues{fmt.Sprintf("%d", self.SizeConstraintStatement.Size)}
+ statement.MatchFieldValues = &cloudprovider.TWafMatchFieldValues{fmt.Sprintf("%d", *self.SizeConstraintStatement.Size)}
fillStatement(&statement, self.SizeConstraintStatement.FieldToMatch)
fillTransformations(&statement, self.SizeConstraintStatement.TextTransformations)
} else if self.SqliMatchStatement != nil {
@@ -208,14 +203,17 @@ func (self *sWafStatement) convert() cloudprovider.SWafStatement {
statement.MatchFieldValues = &cloudprovider.TWafMatchFieldValues{*self.LabelMatchStatement.Key}
}
} else if self.NotStatement != nil {
- s := &sWafStatement{Statement: self.NotStatement.Statement}
+ s := &sWafStatementView{sWafStatement: self.NotStatement.Statement}
statement = s.convert()
statement.Negation = true
}
return statement
}
-func fillStatement(statement *cloudprovider.SWafStatement, field *wafv2.FieldToMatch) {
+func fillStatement(statement *cloudprovider.SWafStatement, field *sWafFieldToMatch) {
+ if field == nil {
+ return
+ }
if field.AllQueryArguments != nil {
statement.MatchField = cloudprovider.WafMatchFieldQuery
statement.MatchFieldKey = "AllArguments"
@@ -236,21 +234,24 @@ func fillStatement(statement *cloudprovider.SWafStatement, field *wafv2.FieldToM
}
}
-func fillTransformations(statement *cloudprovider.SWafStatement, trans []*wafv2.TextTransformation) {
+func fillTransformations(statement *cloudprovider.SWafStatement, trans []*sWafTextTransformation) {
values := cloudprovider.TextTransformations{}
for _, tran := range trans {
+ if tran.Type == nil {
+ continue
+ }
switch *tran.Type {
- case wafv2.TextTransformationTypeNone:
+ case wafTextTransformationTypeNone:
values = append(values, cloudprovider.WafTextTransformationNone)
- case wafv2.TextTransformationTypeLowercase:
+ case wafTextTransformationTypeLowercase:
values = append(values, cloudprovider.WafTextTransformationLowercase)
- case wafv2.TextTransformationTypeCmdLine:
+ case wafTextTransformationTypeCmdLine:
values = append(values, cloudprovider.WafTextTransformationCmdLine)
- case wafv2.TextTransformationTypeUrlDecode:
+ case wafTextTransformationTypeUrlDecode:
values = append(values, cloudprovider.WafTextTransformationUrlDecode)
- case wafv2.TextTransformationTypeHtmlEntityDecode:
+ case wafTextTransformationTypeHtmlEntityDecode:
values = append(values, cloudprovider.WafTextTransformationHtmlEntityDecode)
- case wafv2.TextTransformationTypeCompressWhiteSpace:
+ case wafTextTransformationTypeCompressWhiteSpace:
values = append(values, cloudprovider.WafTextTransformationCompressWithSpace)
default:
values = append(values, cloudprovider.TWafTextTransformation(*tran.Type))
@@ -259,34 +260,37 @@ func fillTransformations(statement *cloudprovider.SWafStatement, trans []*wafv2.
statement.Transformations = &values
}
-func fillExcludeRules(statement *cloudprovider.SWafStatement, rules []*wafv2.ExcludedRule) {
+func fillExcludeRules(statement *cloudprovider.SWafStatement, rules []*sWafExcludedRule) {
values := cloudprovider.SExcludeRules{}
for _, rule := range rules {
+ if rule.Name == nil {
+ continue
+ }
values = append(values, cloudprovider.SExcludeRule{Name: *rule.Name})
}
statement.ExcludeRules = &values
}
func (self *sWafRule) GetStatements() ([]cloudprovider.SWafStatement, error) {
- if self.Rule.Statement == nil {
+ if self.sWafRuleItem.Statement == nil {
return []cloudprovider.SWafStatement{}, nil
}
ret := []cloudprovider.SWafStatement{}
- if self.Rule.Statement.AndStatement != nil {
- for i := range self.Rule.Statement.AndStatement.Statements {
- statement := sWafStatement{self.Rule.Statement.AndStatement.Statements[i]}
+ if self.sWafRuleItem.Statement.AndStatement != nil {
+ for i := range self.sWafRuleItem.Statement.AndStatement.Statements {
+ statement := sWafStatementView{sWafStatement: self.sWafRuleItem.Statement.AndStatement.Statements[i]}
ret = append(ret, statement.convert())
}
- } else if self.Rule.Statement.OrStatement != nil {
- for i := range self.Rule.Statement.OrStatement.Statements {
- statement := sWafStatement{self.Rule.Statement.OrStatement.Statements[i]}
+ } else if self.sWafRuleItem.Statement.OrStatement != nil {
+ for i := range self.sWafRuleItem.Statement.OrStatement.Statements {
+ statement := sWafStatementView{sWafStatement: self.sWafRuleItem.Statement.OrStatement.Statements[i]}
ret = append(ret, statement.convert())
}
- } else if self.Rule.Statement.NotStatement != nil {
- statement := sWafStatement{self.Rule.Statement.NotStatement.Statement}
+ } else if self.sWafRuleItem.Statement.NotStatement != nil {
+ statement := sWafStatementView{sWafStatement: self.sWafRuleItem.Statement.NotStatement.Statement}
ret = append(ret, statement.convert())
} else {
- statement := sWafStatement{self.Rule.Statement}
+ statement := sWafStatementView{sWafStatement: self.sWafRuleItem.Statement}
ret = append(ret, statement.convert())
}
return ret, nil
@@ -302,8 +306,8 @@ func (self *SWebAcl) GetRules() ([]cloudprovider.ICloudWafRule, error) {
}
for i := range self.Rules {
ret = append(ret, &sWafRule{
- waf: self,
- Rule: self.Rules[i],
+ waf: self,
+ sWafRuleItem: self.Rules[i],
})
}
return ret, nil
diff --git a/pkg/multicloud/aws/waf_types.go b/pkg/multicloud/aws/waf_types.go
new file mode 100644
index 000000000..8229fd797
--- /dev/null
+++ b/pkg/multicloud/aws/waf_types.go
@@ -0,0 +1,205 @@
+// Copyright 2019 Yunion
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package aws
+
+const (
+ wafTextTransformationTypeNone = "NONE"
+ wafTextTransformationTypeLowercase = "LOWERCASE"
+ wafTextTransformationTypeCmdLine = "CMD_LINE"
+ wafTextTransformationTypeUrlDecode = "URL_DECODE"
+ wafTextTransformationTypeHtmlEntityDecode = "HTML_ENTITY_DECODE"
+ wafTextTransformationTypeCompressWhiteSpace = "COMPRESS_WHITE_SPACE"
+)
+
+type sWafEmpty struct{}
+
+type sWafAllowAction struct{}
+type sWafBlockAction struct{}
+type sWafCountAction struct{}
+
+type sWafDefaultAction struct {
+ Allow *sWafAllowAction
+ Block *sWafBlockAction
+}
+
+type sWafRuleAction struct {
+ Allow *sWafAllowAction
+ Block *sWafBlockAction
+ Count *sWafCountAction
+}
+
+type sWafVisibilityConfig struct {
+ CloudWatchMetricsEnabled bool
+ MetricName string
+ SampledRequestsEnabled bool
+}
+
+type sWafBody struct{}
+type sWafMethod struct{}
+type sWafQueryString struct{}
+type sWafUriPath struct{}
+type sWafAllQueryArguments struct{}
+type sWafSingleQueryArgument struct {
+ Name *string
+}
+type sWafSingleHeader struct {
+ Name *string
+}
+
+type sWafFieldToMatch struct {
+ AllQueryArguments *sWafAllQueryArguments
+ Body *sWafBody
+ Method *sWafMethod
+ QueryString *sWafQueryString
+ SingleHeader *sWafSingleHeader
+ SingleQueryArgument *sWafSingleQueryArgument
+ UriPath *sWafUriPath
+}
+
+type sWafTextTransformation struct {
+ Priority *int64
+ Type *string
+}
+
+type sWafExcludedRule struct {
+ Name *string
+}
+
+type sWafForwardedIPConfig struct {
+ HeaderName *string
+}
+
+type sWafIPSetForwardedIPConfig struct {
+ HeaderName *string
+}
+
+type sWafAndStatement struct {
+ Statements []*sWafStatement
+}
+
+type sWafOrStatement struct {
+ Statements []*sWafStatement
+}
+
+type sWafNotStatement struct {
+ Statement *sWafStatement
+}
+
+type sWafRateBasedStatement struct {
+ Limit *int64
+ ForwardedIPConfig *sWafForwardedIPConfig
+ AggregateKeyType *string
+ ScopeDownStatement *sWafStatement
+}
+
+type sWafIPSetReferenceStatement struct {
+ ARN *string
+ IPSetForwardedIPConfig *sWafIPSetForwardedIPConfig
+}
+
+type sWafXssMatchStatement struct {
+ FieldToMatch *sWafFieldToMatch
+ TextTransformations []*sWafTextTransformation
+}
+
+type sWafSizeConstraintStatement struct {
+ ComparisonOperator *string
+ FieldToMatch *sWafFieldToMatch
+ Size *int64
+ TextTransformations []*sWafTextTransformation
+}
+
+type sWafGeoMatchStatement struct {
+ CountryCodes []*string
+ ForwardedIPConfig *sWafForwardedIPConfig
+}
+
+type sWafRegexPatternSetReferenceStatement struct {
+ ARN *string
+ FieldToMatch *sWafFieldToMatch
+ TextTransformations []*sWafTextTransformation
+}
+
+type sWafByteMatchStatement struct {
+ FieldToMatch *sWafFieldToMatch
+ PositionalConstraint *string
+ SearchString []byte
+ TextTransformations []*sWafTextTransformation
+}
+
+type sWafRuleGroupReferenceStatement struct {
+ ARN *string
+ ExcludedRules []*sWafExcludedRule
+}
+
+type sWafSqliMatchStatement struct {
+ FieldToMatch *sWafFieldToMatch
+ TextTransformations []*sWafTextTransformation
+}
+
+type sWafManagedRuleGroupStatement struct {
+ Name *string
+ VendorName *string
+ ExcludedRules []*sWafExcludedRule
+}
+
+type sWafLabelMatchStatement struct {
+ Key *string
+ Scope *string
+}
+
+type sWafStatement struct {
+ AndStatement *sWafAndStatement
+ ByteMatchStatement *sWafByteMatchStatement
+ GeoMatchStatement *sWafGeoMatchStatement
+ IPSetReferenceStatement *sWafIPSetReferenceStatement
+ LabelMatchStatement *sWafLabelMatchStatement
+ ManagedRuleGroupStatement *sWafManagedRuleGroupStatement
+ NotStatement *sWafNotStatement
+ OrStatement *sWafOrStatement
+ RateBasedStatement *sWafRateBasedStatement
+ RegexPatternSetReferenceStatement *sWafRegexPatternSetReferenceStatement
+ RuleGroupReferenceStatement *sWafRuleGroupReferenceStatement
+ SizeConstraintStatement *sWafSizeConstraintStatement
+ SqliMatchStatement *sWafSqliMatchStatement
+ XssMatchStatement *sWafXssMatchStatement
+}
+
+type sWafRuleItem struct {
+ Action *sWafRuleAction
+ Name *string
+ Priority *int64
+ Statement *sWafStatement
+ VisibilityConfig *sWafVisibilityConfig
+}
+
+type sWafWebACL struct {
+ ARN *string
+ Capacity *int64
+ DefaultAction *sWafDefaultAction
+ Description *string
+ Id *string
+ Name *string
+ Rules []*sWafRuleItem
+ VisibilityConfig *sWafVisibilityConfig
+}
+
+func awsWafString(s string) *string {
+ return &s
+}
+
+func awsWafInt64(i int64) *int64 {
+ return &i
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/CHANGELOG.md
deleted file mode 100644
index 79ecffc42..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/CHANGELOG.md
+++ /dev/null
@@ -1,789 +0,0 @@
-# v1.51.0 (2026-03-31)
-
-* **Feature**: Added Path field to Account and OrganizationalUnit objects in AWS Organizations API responses.
-
-# v1.50.6 (2026-03-26)
-
-* **Bug Fix**: Fix a bug where a recorded clock skew could persist on the client even if the client and server clock ended up realigning.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.50.5 (2026-03-13)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.50.4 (2026-03-03)
-
-* **Dependency Update**: Bump minimum Go version to 1.24
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.50.3 (2026-02-23)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.50.2 (2026-02-03)
-
-* **Documentation**: Updated the CloseAccount description.
-
-# v1.50.1 (2026-01-09)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.50.0 (2025-12-11)
-
-* **Feature**: Add support for policy operations on the NETWORK SECURITY DIRECTOR POLICY policy type.
-
-# v1.49.2 (2025-12-08)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.49.1 (2025-12-02)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-* **Dependency Update**: Upgrade to smithy-go v1.24.0. Notably this version of the library reduces the allocation footprint of the middleware system. We observe a ~10% reduction in allocations per SDK call with this change.
-
-# v1.49.0 (2025-11-25)
-
-* **Feature**: Add support for policy operations on the S3_POLICY and BEDROCK_POLICY policy type.
-* **Bug Fix**: Add error check for endpoint param binding during auth scheme resolution to fix panic reported in #3234
-
-# v1.48.0 (2025-11-21)
-
-* **Feature**: Add support for policy operations on the UPGRADE_ROLLOUT_POLICY policy type.
-
-# v1.47.0 (2025-11-20)
-
-* **Feature**: Added new APIs for Billing Transfer, new policy type INSPECTOR_POLICY, and allow an account to transfer between organizations
-
-# v1.46.5 (2025-11-19.2)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.46.4 (2025-11-12)
-
-* **Bug Fix**: Further reduce allocation overhead when the metrics system isn't in-use.
-* **Bug Fix**: Reduce allocation overhead when the client doesn't have any HTTP interceptors configured.
-* **Bug Fix**: Remove blank trace spans towards the beginning of the request that added no additional information. This conveys a slight reduction in overall allocations.
-
-# v1.46.3 (2025-11-11)
-
-* **Bug Fix**: Return validation error if input region is not a valid host label.
-
-# v1.46.2 (2025-11-04)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-* **Dependency Update**: Upgrade to smithy-go v1.23.2 which should convey some passive reduction of overall allocations, especially when not using the metrics system.
-
-# v1.46.1 (2025-10-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.46.0 (2025-10-28)
-
-* **Feature**: Added Account State field to the ListDelegatedAdministrators API response.
-
-# v1.45.5 (2025-10-23)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.45.4 (2025-10-16)
-
-* **Dependency Update**: Bump minimum Go version to 1.23.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.45.3 (2025-09-26)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.45.2 (2025-09-23)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.45.1 (2025-09-10)
-
-* No change notes available for this release.
-
-# v1.45.0 (2025-09-09)
-
-* **Feature**: Documentation updates for AWS Organizations APIs.
-
-# v1.44.3 (2025-09-08)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.44.2 (2025-08-29)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.44.1 (2025-08-27)
-
-* **Dependency Update**: Update to smithy-go v1.23.0.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.44.0 (2025-08-22)
-
-* **Feature**: Remove incorrect endpoint tests
-
-# v1.43.2 (2025-08-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.43.1 (2025-08-20)
-
-* **Bug Fix**: Remove unused deserialization code.
-
-# v1.43.0 (2025-08-12)
-
-* **Feature**: This release introduces 2 new APIs in Organizations: 1. ListAccountsWithInvalidEffectivePolicy 2. ListEffectivePolicyValidationErrors
-
-# v1.42.0 (2025-08-11)
-
-* **Feature**: Add support for configuring per-service Options via callback on global config.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.41.0 (2025-08-04)
-
-* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.40.1 (2025-07-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.40.0 (2025-07-28)
-
-* **Feature**: Add support for HTTP interceptors.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.39.1 (2025-07-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.39.0 (2025-06-17)
-
-* **Feature**: Add support for policy operations on the SECURITYHUB_POLICY policy type.
-* **Dependency Update**: Update to smithy-go v1.22.4.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.38.4 (2025-06-10)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.38.3 (2025-04-10)
-
-* No change notes available for this release.
-
-# v1.38.2 (2025-04-03)
-
-* No change notes available for this release.
-
-# v1.38.1 (2025-03-04.2)
-
-* **Bug Fix**: Add assurance test for operation order.
-
-# v1.38.0 (2025-02-27)
-
-* **Feature**: Track credential providers via User-Agent Feature ids
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.9 (2025-02-18)
-
-* **Bug Fix**: Bump go version to 1.22
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.8 (2025-02-05)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.7 (2025-02-04)
-
-* No change notes available for this release.
-
-# v1.37.6 (2025-01-31)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.5 (2025-01-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.4 (2025-01-24)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-* **Dependency Update**: Upgrade to smithy-go v1.22.2.
-
-# v1.37.3 (2025-01-17)
-
-* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop.
-
-# v1.37.2 (2025-01-15)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.1 (2025-01-09)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.37.0 (2025-01-02)
-
-* **Feature**: Added ALL_FEATURES_MIGRATION_ORGANIZATION_SIZE_LIMIT_EXCEEDED to ConstraintViolationException for the EnableAllFeatures operation.
-
-# v1.36.2 (2024-12-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.36.1 (2024-12-12)
-
-* No change notes available for this release.
-
-# v1.36.0 (2024-12-02)
-
-* **Feature**: Add support for policy operations on the DECLARATIVE_POLICY_EC2 policy type.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.35.1 (2024-11-18)
-
-* **Dependency Update**: Update to smithy-go v1.22.1.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.35.0 (2024-11-13)
-
-* **Feature**: Add support for policy operations on the Resource Control Polices.
-
-# v1.34.5 (2024-11-07)
-
-* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses
-
-# v1.34.4 (2024-11-06)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.34.3 (2024-10-28)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.34.2 (2024-10-08)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.34.1 (2024-10-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.34.0 (2024-10-04)
-
-* **Feature**: Add support for HTTP client metrics.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.33.2 (2024-10-03)
-
-* No change notes available for this release.
-
-# v1.33.1 (2024-09-27)
-
-* No change notes available for this release.
-
-# v1.33.0 (2024-09-26)
-
-* **Feature**: Add support for policy operations on the CHATBOT_POLICY policy type.
-
-# v1.32.2 (2024-09-25)
-
-* No change notes available for this release.
-
-# v1.32.1 (2024-09-23)
-
-* No change notes available for this release.
-
-# v1.32.0 (2024-09-20)
-
-* **Feature**: Add tracing and metrics support to service clients.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.31.4 (2024-09-17)
-
-* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution.
-
-# v1.31.3 (2024-09-16)
-
-* **Documentation**: Doc only update for AWS Organizations that fixes several customer-reported issues
-
-# v1.31.2 (2024-09-04)
-
-* No change notes available for this release.
-
-# v1.31.1 (2024-09-03)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.31.0 (2024-08-23)
-
-* **Feature**: Releasing minor partitional endpoint updates.
-
-# v1.30.3 (2024-08-15)
-
-* **Dependency Update**: Bump minimum Go version to 1.21.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.30.2 (2024-07-10.2)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.30.1 (2024-07-10)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.30.0 (2024-07-03)
-
-* **Feature**: Added a new reason under ConstraintViolationException in RegisterDelegatedAdministrator API to prevent registering suspended accounts as delegated administrator of a service.
-
-# v1.29.1 (2024-06-28)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.29.0 (2024-06-26)
-
-* **Feature**: Support list-of-string endpoint parameter.
-
-# v1.28.1 (2024-06-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.28.0 (2024-06-18)
-
-* **Feature**: Track usage of various AWS SDK features in user-agent string.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.10 (2024-06-17)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.9 (2024-06-07)
-
-* **Bug Fix**: Add clock skew correction on all service clients
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.8 (2024-06-03)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.7 (2024-05-23)
-
-* No change notes available for this release.
-
-# v1.27.6 (2024-05-16)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.5 (2024-05-15)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.4 (2024-05-08)
-
-* **Bug Fix**: GoDoc improvement
-
-# v1.27.3 (2024-03-29)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.2 (2024-03-18)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.1 (2024-03-07)
-
-* **Bug Fix**: Remove dependency on go-cmp.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.27.0 (2024-03-05)
-
-* **Feature**: This release contains an endpoint addition
-
-# v1.26.0 (2024-03-04)
-
-* **Feature**: Documentation update for AWS Organizations
-
-# v1.25.1 (2024-02-23)
-
-* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.25.0 (2024-02-22)
-
-* **Feature**: Add middleware stack snapshot tests.
-
-# v1.24.3 (2024-02-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.24.2 (2024-02-20)
-
-* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
-
-# v1.24.1 (2024-02-15)
-
-* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field.
-
-# v1.24.0 (2024-02-13)
-
-* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.23.7 (2024-01-22)
-
-* **Documentation**: Doc only update for quota increase change
-
-# v1.23.6 (2024-01-04)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.23.5 (2023-12-08)
-
-* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
-
-# v1.23.4 (2023-12-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.23.3 (2023-12-06)
-
-* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
-
-# v1.23.2 (2023-12-01)
-
-* **Bug Fix**: Correct wrapping of errors in authentication workflow.
-* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.23.1 (2023-11-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.23.0 (2023-11-29)
-
-* **Feature**: Expose Options() accessor on service clients.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.22.5 (2023-11-28.2)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.22.4 (2023-11-28)
-
-* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
-
-# v1.22.3 (2023-11-20)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.22.2 (2023-11-15)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.22.1 (2023-11-09)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.22.0 (2023-11-01)
-
-* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.21.0 (2023-10-31)
-
-* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.8 (2023-10-12)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.7 (2023-10-06)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.6 (2023-08-28)
-
-* **Documentation**: Documentation updates for permissions and links.
-
-# v1.20.5 (2023-08-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.4 (2023-08-18)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.3 (2023-08-17)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.2 (2023-08-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.20.1 (2023-08-01)
-
-* No change notes available for this release.
-
-# v1.20.0 (2023-07-31)
-
-* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.10 (2023-07-28)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.9 (2023-07-13)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.8 (2023-06-15)
-
-* No change notes available for this release.
-
-# v1.19.7 (2023-06-13)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.6 (2023-05-04)
-
-* No change notes available for this release.
-
-# v1.19.5 (2023-04-24)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.4 (2023-04-10)
-
-* No change notes available for this release.
-
-# v1.19.3 (2023-04-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.2 (2023-03-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.1 (2023-03-10)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.19.0 (2023-03-02)
-
-* **Feature**: This release introduces a new reason code, ACCOUNT_CREATION_NOT_COMPLETE, to ConstraintViolationException in CreateOrganization API.
-
-# v1.18.4 (2023-02-22)
-
-* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
-
-# v1.18.3 (2023-02-20)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.18.2 (2023-02-15)
-
-* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
-* **Bug Fix**: Correct error type parsing for restJson services.
-
-# v1.18.1 (2023-02-03)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.18.0 (2023-01-05)
-
-* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
-
-# v1.17.2 (2022-12-15)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.17.1 (2022-12-02)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.17.0 (2022-11-28)
-
-* **Feature**: This release introduces delegated administrator for AWS Organizations, a new feature to help you delegate the management of your Organizations policies, enabling you to govern your AWS organization in a decentralized way. You can now allow member accounts to manage Organizations policies.
-
-# v1.16.15 (2022-10-24)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.14 (2022-10-21)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.13 (2022-09-20)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.12 (2022-09-14)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.11 (2022-09-02)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.10 (2022-08-31)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.9 (2022-08-29)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.8 (2022-08-11)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.7 (2022-08-09)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.6 (2022-08-08)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.5 (2022-08-01)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.4 (2022-07-05)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.3 (2022-06-29)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.2 (2022-06-07)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.1 (2022-05-17)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.16.0 (2022-05-02)
-
-* **Feature**: This release adds the INVALID_PAYMENT_INSTRUMENT as a fail reason and an error message.
-
-# v1.15.2 (2022-04-25)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.15.1 (2022-03-30)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.15.0 (2022-03-29)
-
-* **Feature**: This release provides the new CloseAccount API that enables principals in the management account to close any member account within an organization.
-
-# v1.14.2 (2022-03-24)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.14.1 (2022-03-23)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.14.0 (2022-03-08)
-
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.13.0 (2022-02-24)
-
-* **Feature**: API client updated
-* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.12.0 (2022-01-14)
-
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.11.0 (2022-01-07)
-
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.10.0 (2021-12-21)
-
-* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
-
-# v1.9.2 (2021-12-02)
-
-* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.9.1 (2021-11-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.9.0 (2021-11-12)
-
-* **Feature**: Service clients now support custom endpoints that have an initial URI path defined.
-
-# v1.8.0 (2021-11-06)
-
-* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.7.0 (2021-10-21)
-
-* **Feature**: Updated to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.6.2 (2021-10-11)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.6.1 (2021-09-17)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.6.0 (2021-08-27)
-
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.5.3 (2021-08-19)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.5.2 (2021-08-04)
-
-* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.5.1 (2021-07-15)
-
-* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.5.0 (2021-06-25)
-
-* **Feature**: Updated `github.com/aws/smithy-go` to latest version
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.4.2 (2021-06-04)
-
-* No change notes available for this release.
-
-# v1.4.1 (2021-05-20)
-
-* **Dependency Update**: Updated to the latest SDK module versions
-
-# v1.4.0 (2021-05-14)
-
-* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
-* **Dependency Update**: Updated to the latest SDK module versions
-
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/LICENSE.txt
deleted file mode 100644
index d64569567..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_client.go
deleted file mode 100644
index 1bf6d85ee..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_client.go
+++ /dev/null
@@ -1,929 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "errors"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/aws"
- "github.com/aws/aws-sdk-go-v2/aws/defaults"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/aws/retry"
- "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
- awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
- internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
- internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
- internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
- smithy "github.com/aws/smithy-go"
- smithydocument "github.com/aws/smithy-go/document"
- "github.com/aws/smithy-go/logging"
- "github.com/aws/smithy-go/metrics"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "net"
- "net/http"
- "sync/atomic"
- "time"
-)
-
-const ServiceID = "Organizations"
-const ServiceAPIVersion = "2016-11-28"
-
-type operationMetrics struct {
- Duration metrics.Float64Histogram
- SerializeDuration metrics.Float64Histogram
- ResolveIdentityDuration metrics.Float64Histogram
- ResolveEndpointDuration metrics.Float64Histogram
- SignRequestDuration metrics.Float64Histogram
- DeserializeDuration metrics.Float64Histogram
-}
-
-func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram {
- switch name {
- case "client.call.duration":
- return m.Duration
- case "client.call.serialization_duration":
- return m.SerializeDuration
- case "client.call.resolve_identity_duration":
- return m.ResolveIdentityDuration
- case "client.call.resolve_endpoint_duration":
- return m.ResolveEndpointDuration
- case "client.call.signing_duration":
- return m.SignRequestDuration
- case "client.call.deserialization_duration":
- return m.DeserializeDuration
- default:
- panic("unrecognized operation metric")
- }
-}
-
-func timeOperationMetric[T any](
- ctx context.Context, metric string, fn func() (T, error),
- opts ...metrics.RecordMetricOption,
-) (T, error) {
- mm := getOperationMetrics(ctx)
- if mm == nil { // not using the metrics system
- return fn()
- }
-
- instr := mm.histogramFor(metric)
- opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
-
- start := time.Now()
- v, err := fn()
- end := time.Now()
-
- elapsed := end.Sub(start)
- instr.Record(ctx, float64(elapsed)/1e9, opts...)
- return v, err
-}
-
-func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() {
- mm := getOperationMetrics(ctx)
- if mm == nil { // not using the metrics system
- return func() {}
- }
-
- instr := mm.histogramFor(metric)
- opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
-
- var ended bool
- start := time.Now()
- return func() {
- if ended {
- return
- }
- ended = true
-
- end := time.Now()
-
- elapsed := end.Sub(start)
- instr.Record(ctx, float64(elapsed)/1e9, opts...)
- }
-}
-
-func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption {
- return func(o *metrics.RecordMetricOptions) {
- o.Properties.Set("rpc.service", middleware.GetServiceID(ctx))
- o.Properties.Set("rpc.method", middleware.GetOperationName(ctx))
- }
-}
-
-type operationMetricsKey struct{}
-
-func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) {
- if _, ok := mp.(metrics.NopMeterProvider); ok {
- // not using the metrics system - setting up the metrics context is a memory-intensive operation
- // so we should skip it in this case
- return parent, nil
- }
-
- meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/organizations")
- om := &operationMetrics{}
-
- var err error
-
- om.Duration, err = operationMetricTimer(meter, "client.call.duration",
- "Overall call duration (including retries and time to send or receive request and response body)")
- if err != nil {
- return nil, err
- }
- om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration",
- "The time it takes to serialize a message body")
- if err != nil {
- return nil, err
- }
- om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration",
- "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider")
- if err != nil {
- return nil, err
- }
- om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration",
- "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request")
- if err != nil {
- return nil, err
- }
- om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration",
- "The time it takes to sign a request")
- if err != nil {
- return nil, err
- }
- om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration",
- "The time it takes to deserialize a message body")
- if err != nil {
- return nil, err
- }
-
- return context.WithValue(parent, operationMetricsKey{}, om), nil
-}
-
-func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) {
- return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) {
- o.UnitLabel = "s"
- o.Description = desc
- })
-}
-
-func getOperationMetrics(ctx context.Context) *operationMetrics {
- if v := ctx.Value(operationMetricsKey{}); v != nil {
- return v.(*operationMetrics)
- }
- return nil
-}
-
-func operationTracer(p tracing.TracerProvider) tracing.Tracer {
- return p.Tracer("github.com/aws/aws-sdk-go-v2/service/organizations")
-}
-
-// Client provides the API client to make operations call for AWS Organizations.
-type Client struct {
- options Options
-
- // Difference between the time reported by the server and the client
- timeOffset *atomic.Int64
-}
-
-// New returns an initialized Client based on the functional options. Provide
-// additional functional options to further configure the behavior of the client,
-// such as changing the client's endpoint or adding custom middleware behavior.
-func New(options Options, optFns ...func(*Options)) *Client {
- options = options.Copy()
-
- resolveDefaultLogger(&options)
-
- setResolvedDefaultsMode(&options)
-
- resolveRetryer(&options)
-
- resolveHTTPClient(&options)
-
- resolveHTTPSignerV4(&options)
-
- resolveEndpointResolverV2(&options)
-
- resolveTracerProvider(&options)
-
- resolveMeterProvider(&options)
-
- resolveAuthSchemeResolver(&options)
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- finalizeRetryMaxAttempts(&options)
-
- ignoreAnonymousAuth(&options)
-
- wrapWithAnonymousAuth(&options)
-
- resolveAuthSchemes(&options)
-
- client := &Client{
- options: options,
- }
-
- initializeTimeOffsetResolver(client)
-
- return client
-}
-
-// Options returns a copy of the client configuration.
-//
-// Callers SHOULD NOT perform mutations on any inner structures within client
-// config. Config overrides should instead be made on a per-operation basis through
-// functional options.
-func (c *Client) Options() Options {
- return c.options.Copy()
-}
-
-func (c *Client) invokeOperation(
- ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error,
-) (
- result interface{}, metadata middleware.Metadata, err error,
-) {
- ctx = middleware.ClearStackValues(ctx)
- ctx = middleware.WithServiceID(ctx, ServiceID)
- ctx = middleware.WithOperationName(ctx, opID)
-
- stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
- options := c.options.Copy()
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- finalizeOperationRetryMaxAttempts(&options, *c)
-
- finalizeClientEndpointResolverOptions(&options)
-
- for _, fn := range stackFns {
- if err := fn(stack, options); err != nil {
- return nil, metadata, err
- }
- }
-
- for _, fn := range options.APIOptions {
- if err := fn(stack); err != nil {
- return nil, metadata, err
- }
- }
-
- ctx, err = withOperationMetrics(ctx, options.MeterProvider)
- if err != nil {
- return nil, metadata, err
- }
-
- tracer := operationTracer(options.TracerProvider)
- spanName := fmt.Sprintf("%s.%s", ServiceID, opID)
-
- ctx = tracing.WithOperationTracer(ctx, tracer)
-
- ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) {
- o.Kind = tracing.SpanKindClient
- o.Properties.Set("rpc.system", "aws-api")
- o.Properties.Set("rpc.method", opID)
- o.Properties.Set("rpc.service", ServiceID)
- })
- endTimer := startMetricTimer(ctx, "client.call.duration")
- defer endTimer()
- defer span.End()
-
- handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) {
- o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/organizations")
- })
- decorated := middleware.DecorateHandler(handler, stack)
- result, metadata, err = decorated.Handle(ctx, params)
- if err != nil {
- span.SetProperty("exception.type", fmt.Sprintf("%T", err))
- span.SetProperty("exception.message", err.Error())
-
- var aerr smithy.APIError
- if errors.As(err, &aerr) {
- span.SetProperty("api.error_code", aerr.ErrorCode())
- span.SetProperty("api.error_message", aerr.ErrorMessage())
- span.SetProperty("api.error_fault", aerr.ErrorFault().String())
- }
-
- err = &smithy.OperationError{
- ServiceID: ServiceID,
- OperationName: opID,
- Err: err,
- }
- }
-
- span.SetProperty("error", err != nil)
- if err == nil {
- span.SetStatus(tracing.SpanStatusOK)
- } else {
- span.SetStatus(tracing.SpanStatusError)
- }
-
- return result, metadata, err
-}
-
-type operationInputKey struct{}
-
-func setOperationInput(ctx context.Context, input interface{}) context.Context {
- return middleware.WithStackValue(ctx, operationInputKey{}, input)
-}
-
-func getOperationInput(ctx context.Context) interface{} {
- return middleware.GetStackValue(ctx, operationInputKey{})
-}
-
-type setOperationInputMiddleware struct {
-}
-
-func (*setOperationInputMiddleware) ID() string {
- return "setOperationInput"
-}
-
-func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- ctx = setOperationInput(ctx, in.Parameters)
- return next.HandleSerialize(ctx, in)
-}
-
-func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
- if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
- return fmt.Errorf("add ResolveAuthScheme: %w", err)
- }
- if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
- return fmt.Errorf("add GetIdentity: %v", err)
- }
- if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
- return fmt.Errorf("add ResolveEndpointV2: %v", err)
- }
- if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil {
- return fmt.Errorf("add Signing: %w", err)
- }
- return nil
-}
-func resolveAuthSchemeResolver(options *Options) {
- if options.AuthSchemeResolver == nil {
- options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
- }
-}
-
-func resolveAuthSchemes(options *Options) {
- if options.AuthSchemes == nil {
- options.AuthSchemes = []smithyhttp.AuthScheme{
- internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
- Signer: options.HTTPSignerV4,
- Logger: options.Logger,
- LogSigning: options.ClientLogMode.IsSigning(),
- }),
- }
- }
-}
-
-type noSmithyDocumentSerde = smithydocument.NoSerde
-
-type legacyEndpointContextSetter struct {
- LegacyResolver EndpointResolver
-}
-
-func (*legacyEndpointContextSetter) ID() string {
- return "legacyEndpointContextSetter"
-}
-
-func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- if m.LegacyResolver != nil {
- ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
- }
-
- return next.HandleInitialize(ctx, in)
-
-}
-func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
- return stack.Initialize.Add(&legacyEndpointContextSetter{
- LegacyResolver: o.EndpointResolver,
- }, middleware.Before)
-}
-
-func resolveDefaultLogger(o *Options) {
- if o.Logger != nil {
- return
- }
- o.Logger = logging.Nop{}
-}
-
-func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
- return middleware.AddSetLoggerMiddleware(stack, o.Logger)
-}
-
-func setResolvedDefaultsMode(o *Options) {
- if len(o.resolvedDefaultsMode) > 0 {
- return
- }
-
- var mode aws.DefaultsMode
- mode.SetFromString(string(o.DefaultsMode))
-
- if mode == aws.DefaultsModeAuto {
- mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
- }
-
- o.resolvedDefaultsMode = mode
-}
-
-// NewFromConfig returns a new client from the provided config.
-func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
- opts := Options{
- Region: cfg.Region,
- DefaultsMode: cfg.DefaultsMode,
- RuntimeEnvironment: cfg.RuntimeEnvironment,
- HTTPClient: cfg.HTTPClient,
- Credentials: cfg.Credentials,
- APIOptions: cfg.APIOptions,
- Logger: cfg.Logger,
- ClientLogMode: cfg.ClientLogMode,
- AppID: cfg.AppID,
- AuthSchemePreference: cfg.AuthSchemePreference,
- }
- resolveAWSRetryerProvider(cfg, &opts)
- resolveAWSRetryMaxAttempts(cfg, &opts)
- resolveAWSRetryMode(cfg, &opts)
- resolveAWSEndpointResolver(cfg, &opts)
- resolveInterceptors(cfg, &opts)
- resolveUseDualStackEndpoint(cfg, &opts)
- resolveUseFIPSEndpoint(cfg, &opts)
- resolveBaseEndpoint(cfg, &opts)
- return New(opts, func(o *Options) {
- for _, opt := range cfg.ServiceOptions {
- opt(ServiceID, o)
- }
- for _, opt := range optFns {
- opt(o)
- }
- })
-}
-
-func resolveHTTPClient(o *Options) {
- var buildable *awshttp.BuildableClient
-
- if o.HTTPClient != nil {
- var ok bool
- buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
- if !ok {
- return
- }
- } else {
- buildable = awshttp.NewBuildableClient()
- }
-
- modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
- if err == nil {
- buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
- if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
- dialer.Timeout = dialerTimeout
- }
- })
-
- buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
- if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
- transport.TLSHandshakeTimeout = tlsHandshakeTimeout
- }
- })
- }
-
- o.HTTPClient = buildable
-}
-
-func resolveRetryer(o *Options) {
- if o.Retryer != nil {
- return
- }
-
- if len(o.RetryMode) == 0 {
- modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
- if err == nil {
- o.RetryMode = modeConfig.RetryMode
- }
- }
- if len(o.RetryMode) == 0 {
- o.RetryMode = aws.RetryModeStandard
- }
-
- var standardOptions []func(*retry.StandardOptions)
- if v := o.RetryMaxAttempts; v != 0 {
- standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
- so.MaxAttempts = v
- })
- }
-
- switch o.RetryMode {
- case aws.RetryModeAdaptive:
- var adaptiveOptions []func(*retry.AdaptiveModeOptions)
- if len(standardOptions) != 0 {
- adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
- ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
- })
- }
- o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
-
- default:
- o.Retryer = retry.NewStandard(standardOptions...)
- }
-}
-
-func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
- if cfg.Retryer == nil {
- return
- }
- o.Retryer = cfg.Retryer()
-}
-
-func resolveAWSRetryMode(cfg aws.Config, o *Options) {
- if len(cfg.RetryMode) == 0 {
- return
- }
- o.RetryMode = cfg.RetryMode
-}
-func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
- if cfg.RetryMaxAttempts == 0 {
- return
- }
- o.RetryMaxAttempts = cfg.RetryMaxAttempts
-}
-
-func finalizeRetryMaxAttempts(o *Options) {
- if o.RetryMaxAttempts == 0 {
- return
- }
-
- o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
-}
-
-func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
- if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
- return
- }
-
- o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
-}
-
-func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
- if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
- return
- }
- o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
-}
-
-func resolveInterceptors(cfg aws.Config, o *Options) {
- o.Interceptors = cfg.Interceptors.Copy()
-}
-
-func addClientUserAgent(stack *middleware.Stack, options Options) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "organizations", goModuleVersion)
- if len(options.AppID) > 0 {
- ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
- }
-
- return nil
-}
-
-func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
- id := (*awsmiddleware.RequestUserAgent)(nil).ID()
- mw, ok := stack.Build.Get(id)
- if !ok {
- mw = awsmiddleware.NewRequestUserAgent()
- if err := stack.Build.Add(mw, middleware.After); err != nil {
- return nil, err
- }
- }
-
- ua, ok := mw.(*awsmiddleware.RequestUserAgent)
- if !ok {
- return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
- }
-
- return ua, nil
-}
-
-type HTTPSignerV4 interface {
- SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
-}
-
-func resolveHTTPSignerV4(o *Options) {
- if o.HTTPSignerV4 != nil {
- return
- }
- o.HTTPSignerV4 = newDefaultV4Signer(*o)
-}
-
-func newDefaultV4Signer(o Options) *v4.Signer {
- return v4.NewSigner(func(so *v4.SignerOptions) {
- so.Logger = o.Logger
- so.LogSigning = o.ClientLogMode.IsSigning()
- })
-}
-
-func addClientRequestID(stack *middleware.Stack) error {
- return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
-}
-
-func addComputeContentLength(stack *middleware.Stack) error {
- return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
-}
-
-func addRawResponseToMetadata(stack *middleware.Stack) error {
- return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
-}
-
-func addRecordResponseTiming(stack *middleware.Stack) error {
- return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
-}
-
-func addSpanRetryLoop(stack *middleware.Stack, options Options) error {
- return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before)
-}
-
-type spanRetryLoop struct {
- options Options
-}
-
-func (*spanRetryLoop) ID() string {
- return "spanRetryLoop"
-}
-
-func (m *spanRetryLoop) HandleFinalize(
- ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
-) (
- middleware.FinalizeOutput, middleware.Metadata, error,
-) {
- tracer := operationTracer(m.options.TracerProvider)
- ctx, span := tracer.StartSpan(ctx, "RetryLoop")
- defer span.End()
-
- return next.HandleFinalize(ctx, in)
-}
-func addStreamingEventsPayload(stack *middleware.Stack) error {
- return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
-}
-
-func addUnsignedPayload(stack *middleware.Stack) error {
- return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
-}
-
-func addComputePayloadSHA256(stack *middleware.Stack) error {
- return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
-}
-
-func addContentSHA256Header(stack *middleware.Stack) error {
- return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
-}
-
-func addIsWaiterUserAgent(o *Options) {
- o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter)
- return nil
- })
-}
-
-func addIsPaginatorUserAgent(o *Options) {
- o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator)
- return nil
- })
-}
-
-func addRetry(stack *middleware.Stack, o Options, c *Client) error {
- attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
- m.LogAttempts = o.ClientLogMode.IsRetries()
- m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/organizations")
- m.ClientSkew = c.timeOffset
- })
- if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil {
- return err
- }
- if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
- return err
- }
- return nil
-}
-
-// resolves dual-stack endpoint configuration
-func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
- if len(cfg.ConfigSources) == 0 {
- return nil
- }
- value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
- if err != nil {
- return err
- }
- if found {
- o.EndpointOptions.UseDualStackEndpoint = value
- }
- return nil
-}
-
-// resolves FIPS endpoint configuration
-func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
- if len(cfg.ConfigSources) == 0 {
- return nil
- }
- value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
- if err != nil {
- return err
- }
- if found {
- o.EndpointOptions.UseFIPSEndpoint = value
- }
- return nil
-}
-
-func initializeTimeOffsetResolver(c *Client) {
- c.timeOffset = new(atomic.Int64)
-}
-
-func addUserAgentRetryMode(stack *middleware.Stack, options Options) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- switch options.Retryer.(type) {
- case *retry.Standard:
- ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard)
- case *retry.AdaptiveMode:
- ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive)
- }
- return nil
-}
-
-type setCredentialSourceMiddleware struct {
- ua *awsmiddleware.RequestUserAgent
- options Options
-}
-
-func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" }
-
-func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (
- out middleware.BuildOutput, metadata middleware.Metadata, err error,
-) {
- asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource)
- if !ok {
- return next.HandleBuild(ctx, in)
- }
- providerSources := asProviderSource.ProviderSources()
- for _, source := range providerSources {
- m.ua.AddCredentialsSource(source)
- }
- return next.HandleBuild(ctx, in)
-}
-
-func addCredentialSource(stack *middleware.Stack, options Options) error {
- ua, err := getOrAddRequestUserAgent(stack)
- if err != nil {
- return err
- }
-
- mw := setCredentialSourceMiddleware{ua: ua, options: options}
- return stack.Build.Insert(&mw, "UserAgent", middleware.Before)
-}
-
-func resolveTracerProvider(options *Options) {
- if options.TracerProvider == nil {
- options.TracerProvider = &tracing.NopTracerProvider{}
- }
-}
-
-func resolveMeterProvider(options *Options) {
- if options.MeterProvider == nil {
- options.MeterProvider = metrics.NopMeterProvider{}
- }
-}
-
-func addRecursionDetection(stack *middleware.Stack) error {
- return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
-}
-
-func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
- return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
-
-}
-
-func addResponseErrorMiddleware(stack *middleware.Stack) error {
- return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
-
-}
-
-func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
- return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
- LogRequest: o.ClientLogMode.IsRequest(),
- LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
- LogResponse: o.ClientLogMode.IsResponse(),
- LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
- }, middleware.After)
-}
-
-type disableHTTPSMiddleware struct {
- DisableHTTPS bool
-}
-
-func (*disableHTTPSMiddleware) ID() string {
- return "disableHTTPS"
-}
-
-func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- req, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
- }
-
- if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
- req.URL.Scheme = "http"
- }
-
- return next.HandleFinalize(ctx, in)
-}
-
-func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
- return stack.Finalize.Insert(&disableHTTPSMiddleware{
- DisableHTTPS: o.EndpointOptions.DisableHTTPS,
- }, "ResolveEndpointV2", middleware.After)
-}
-
-func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error {
- return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{
- Interceptors: opts.Interceptors.BeforeRetryLoop,
- }, "Retry", middleware.Before)
-}
-
-func addInterceptAttempt(stack *middleware.Stack, opts Options) error {
- return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{
- BeforeAttempt: opts.Interceptors.BeforeAttempt,
- AfterAttempt: opts.Interceptors.AfterAttempt,
- }, "Retry", middleware.After)
-}
-
-func addInterceptors(stack *middleware.Stack, opts Options) error {
- // middlewares are expensive, don't add all of these interceptor ones unless the caller
- // actually has at least one interceptor configured
- //
- // at the moment it's all-or-nothing because some of the middlewares here are responsible for
- // setting fields in the interceptor context for future ones
- if len(opts.Interceptors.BeforeExecution) == 0 &&
- len(opts.Interceptors.BeforeSerialization) == 0 && len(opts.Interceptors.AfterSerialization) == 0 &&
- len(opts.Interceptors.BeforeRetryLoop) == 0 &&
- len(opts.Interceptors.BeforeAttempt) == 0 &&
- len(opts.Interceptors.BeforeSigning) == 0 && len(opts.Interceptors.AfterSigning) == 0 &&
- len(opts.Interceptors.BeforeTransmit) == 0 && len(opts.Interceptors.AfterTransmit) == 0 &&
- len(opts.Interceptors.BeforeDeserialization) == 0 && len(opts.Interceptors.AfterDeserialization) == 0 &&
- len(opts.Interceptors.AfterAttempt) == 0 && len(opts.Interceptors.AfterExecution) == 0 {
- return nil
- }
-
- return errors.Join(
- stack.Initialize.Add(&smithyhttp.InterceptExecution{
- BeforeExecution: opts.Interceptors.BeforeExecution,
- AfterExecution: opts.Interceptors.AfterExecution,
- }, middleware.Before),
- stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{
- Interceptors: opts.Interceptors.BeforeSerialization,
- }, "OperationSerializer", middleware.Before),
- stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{
- Interceptors: opts.Interceptors.AfterSerialization,
- }, "OperationSerializer", middleware.After),
- stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{
- Interceptors: opts.Interceptors.BeforeSigning,
- }, "Signing", middleware.Before),
- stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{
- Interceptors: opts.Interceptors.AfterSigning,
- }, "Signing", middleware.After),
- stack.Deserialize.Add(&smithyhttp.InterceptTransmit{
- BeforeTransmit: opts.Interceptors.BeforeTransmit,
- AfterTransmit: opts.Interceptors.AfterTransmit,
- }, middleware.After),
- stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{
- Interceptors: opts.Interceptors.BeforeDeserialization,
- }, "OperationDeserializer", middleware.After), // (deserialize stack is called in reverse)
- stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{
- Interceptors: opts.Interceptors.AfterDeserialization,
- }, "OperationDeserializer", middleware.Before),
- )
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AcceptHandshake.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AcceptHandshake.go
deleted file mode 100644
index a6dbe4671..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AcceptHandshake.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Accepts a handshake by sending an ACCEPTED response to the sender. You can view
-// accepted handshakes in API responses for 30 days before they are deleted.
-//
-// Only the management account can accept the following handshakes:
-//
-// - Enable all features final confirmation ( APPROVE_ALL_FEATURES )
-//
-// - Billing transfer ( TRANSFER_RESPONSIBILITY )
-//
-// For more information, see [Enabling all features] and [Responding to a billing transfer invitation] in the Organizations User Guide.
-//
-// Only a member account can accept the following handshakes:
-//
-// - Invitation to join ( INVITE )
-//
-// - Approve all features request ( ENABLE_ALL_FEATURES )
-//
-// For more information, see [Responding to invitations] and [Enabling all features] in the Organizations User Guide.
-//
-// [Enabling all features]: https://docs.aws.amazon.com/organizations/latest/userguide/manage-begin-all-features-standard-migration.html#manage-approve-all-features-invite
-// [Responding to invitations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_accept-decline-invite.html
-// [Responding to a billing transfer invitation]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_transfer_billing-respond-invitation.html
-func (c *Client) AcceptHandshake(ctx context.Context, params *AcceptHandshakeInput, optFns ...func(*Options)) (*AcceptHandshakeOutput, error) {
- if params == nil {
- params = &AcceptHandshakeInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "AcceptHandshake", params, optFns, c.addOperationAcceptHandshakeMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*AcceptHandshakeOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type AcceptHandshakeInput struct {
-
- // ID for the handshake that you want to accept.
- //
- // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- HandshakeId *string
-
- noSmithyDocumentSerde
-}
-
-type AcceptHandshakeOutput struct {
-
- // A Handshake object. Contains details for the handshake.
- Handshake *types.Handshake
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationAcceptHandshakeMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpAcceptHandshake{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAcceptHandshake{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptHandshake"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpAcceptHandshakeValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptHandshake(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opAcceptHandshake(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "AcceptHandshake",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AttachPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AttachPolicy.go
deleted file mode 100644
index 3cae16f6a..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_AttachPolicy.go
+++ /dev/null
@@ -1,220 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Attaches a policy to a root, an organizational unit (OU), or an individual
-// account. How the policy affects accounts depends on the type of policy. Refer to
-// the Organizations User Guide for information about each policy type:
-//
-// [SERVICE_CONTROL_POLICY]
-//
-// [RESOURCE_CONTROL_POLICY]
-//
-// [DECLARATIVE_POLICY_EC2]
-//
-// [BACKUP_POLICY]
-//
-// [TAG_POLICY]
-//
-// [CHATBOT_POLICY]
-//
-// [AISERVICES_OPT_OUT_POLICY]
-//
-// [SECURITYHUB_POLICY]
-//
-// [UPGRADE_ROLLOUT_POLICY]
-//
-// [INSPECTOR_POLICY]
-//
-// [BEDROCK_POLICY]
-//
-// [S3_POLICY]
-//
-// [NETWORK_SECURITY_DIRECTOR_POLICY]
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
-// [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
-// [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
-// [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
-// [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
-// [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
-// [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
-// [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
-// [RESOURCE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html
-// [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
-// [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
-// [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html
-// [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
-func (c *Client) AttachPolicy(ctx context.Context, params *AttachPolicyInput, optFns ...func(*Options)) (*AttachPolicyOutput, error) {
- if params == nil {
- params = &AttachPolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "AttachPolicy", params, optFns, c.addOperationAttachPolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*AttachPolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type AttachPolicyInput struct {
-
- // ID for the policy that you want to attach to the target. You can get the ID for
- // the policy by calling the ListPoliciesoperation.
- //
- // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase
- // or uppercase letters, digits, or the underscore character (_).
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- PolicyId *string
-
- // ID for the root, OU, or account that you want to attach the policy to. You can
- // get the ID by calling the ListRoots, ListOrganizationalUnitsForParent, or ListAccounts operations.
- //
- // The [regex pattern] for a target ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Account - A string that consists of exactly 12 digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- TargetId *string
-
- noSmithyDocumentSerde
-}
-
-type AttachPolicyOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationAttachPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpAttachPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAttachPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "AttachPolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpAttachPolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachPolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opAttachPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "AttachPolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CancelHandshake.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CancelHandshake.go
deleted file mode 100644
index 980a1c033..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CancelHandshake.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Cancels a Handshake.
-//
-// Only the account that sent a handshake can call this operation. The recipient
-// of the handshake can't cancel it, but can use DeclineHandshaketo decline. After a handshake is
-// canceled, the recipient can no longer respond to the handshake.
-//
-// You can view canceled handshakes in API responses for 30 days before they are
-// deleted.
-func (c *Client) CancelHandshake(ctx context.Context, params *CancelHandshakeInput, optFns ...func(*Options)) (*CancelHandshakeOutput, error) {
- if params == nil {
- params = &CancelHandshakeInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CancelHandshake", params, optFns, c.addOperationCancelHandshakeMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CancelHandshakeOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CancelHandshakeInput struct {
-
- // ID for the handshake that you want to cancel. You can get the ID from the ListHandshakesForOrganization
- // operation.
- //
- // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- HandshakeId *string
-
- noSmithyDocumentSerde
-}
-
-type CancelHandshakeOutput struct {
-
- // A Handshake object. Contains for the handshake that you canceled.
- Handshake *types.Handshake
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCancelHandshakeMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelHandshake{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelHandshake{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CancelHandshake"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpCancelHandshakeValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelHandshake(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opCancelHandshake(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CancelHandshake",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CloseAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CloseAccount.go
deleted file mode 100644
index d77dade8d..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CloseAccount.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Closes an Amazon Web Services member account within an organization. You can
-// close an account when [all features are enabled]. You can't close the management account with this API.
-// This is an asynchronous request that Amazon Web Services performs in the
-// background. Because CloseAccount operates asynchronously, it can return a
-// successful completion message even though account closure might still be in
-// progress. You need to wait a few minutes before the account is fully closed. To
-// check the status of the request, do one of the following:
-//
-// - Use the AccountId that you sent in the CloseAccount request to provide as a
-// parameter to the DescribeAccountoperation.
-//
-// While the close account request is in progress, Account status will indicate
-//
-// PENDING_CLOSURE. When the close account request completes, the status will
-// change to SUSPENDED.
-//
-// - Check the CloudTrail log for the CloseAccountResult event that gets
-// published after the account closes successfully. For information on using
-// CloudTrail with Organizations, see [Logging and monitoring in Organizations]in the Organizations User Guide.
-//
-// - Resources remaining within the account after closing will be automatically
-// deleted after 90 days. During this 90-day period, the resources won't be
-// available unless you contact Amazon Web Services Support to reopen the account.
-// After 90 days, you can't reopen an account. You might still receive a [bill after account closure].
-//
-// - You can close only 10% of member accounts, between 10 and 1000, within a
-// rolling 30 day period. This quota is not bound by a calendar month, but starts
-// when you close an account. After you reach this limit, you can't close
-// additional accounts. For more information, see [Closing a member account in your organization]and [Quotas for Organizations]in the Organizations User
-// Guide.
-//
-// - To reinstate a closed account, contact Amazon Web Services Support within
-// the 90-day grace period while the account is in SUSPENDED status.
-//
-// - If the Amazon Web Services account you attempt to close is linked to an
-// Amazon Web Services GovCloud (US) account, the CloseAccount request will close
-// both accounts. To learn important pre-closure details, see [Closing an Amazon Web Services GovCloud (US) account]in the Amazon Web
-// Services GovCloud User Guide.
-//
-// [all features are enabled]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
-//
-// [Quotas for Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html
-// [Logging and monitoring in Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration
-// [bill after account closure]: https://repost.aws/knowledge-center/closed-account-bill
-// [Closing an Amazon Web Services GovCloud (US) account]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/Closing-govcloud-account.html
-// [Closing a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html
-func (c *Client) CloseAccount(ctx context.Context, params *CloseAccountInput, optFns ...func(*Options)) (*CloseAccountOutput, error) {
- if params == nil {
- params = &CloseAccountInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CloseAccount", params, optFns, c.addOperationCloseAccountMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CloseAccountOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CloseAccountInput struct {
-
- // Retrieves the Amazon Web Services account Id for the current CloseAccount API
- // request.
- //
- // This member is required.
- AccountId *string
-
- noSmithyDocumentSerde
-}
-
-type CloseAccountOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCloseAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpCloseAccount{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCloseAccount{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CloseAccount"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpCloseAccountValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCloseAccount(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opCloseAccount(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CloseAccount",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateAccount.go
deleted file mode 100644
index fa232edbc..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateAccount.go
+++ /dev/null
@@ -1,312 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an Amazon Web Services account that is automatically a member of the
-// organization whose credentials made the request. This is an asynchronous request
-// that Amazon Web Services performs in the background. Because CreateAccount
-// operates asynchronously, it can return a successful completion message even
-// though account initialization might still be in progress. You might need to wait
-// a few minutes before you can successfully access the account. To check the
-// status of the request, do one of the following:
-//
-// - Use the Id value of the CreateAccountStatus response element from this
-// operation to provide as a parameter to the DescribeCreateAccountStatusoperation.
-//
-// - Check the CloudTrail log for the CreateAccountResult event. For information
-// on using CloudTrail with Organizations, see [Logging and monitoring in Organizations]in the Organizations User Guide.
-//
-// The user who calls the API to create an account must have the
-// organizations:CreateAccount permission. If you enabled all features in the
-// organization, Organizations creates the required service-linked role named
-// AWSServiceRoleForOrganizations . For more information, see [Organizations and service-linked roles] in the
-// Organizations User Guide.
-//
-// If the request includes tags, then the requester must have the
-// organizations:TagResource permission.
-//
-// Organizations preconfigures the new member account with a role (named
-// OrganizationAccountAccessRole by default) that grants users in the management
-// account administrator permissions in the new member account. Principals in the
-// management account can assume the role. Organizations clones the company name
-// and address information for the new account from the organization's management
-// account.
-//
-// You can only call this operation from the management account.
-//
-// For more information about creating accounts, see [Creating a member account in your organization] in the Organizations User
-// Guide.
-//
-// - When you create an account in an organization using the Organizations
-// console, API, or CLI commands, the information required for the account to
-// operate as a standalone account, such as a payment method is not automatically
-// collected. If you must remove an account from your organization later, you can
-// do so only after you provide the missing information. For more information, see [Considerations before removing an account from an organization]
-// in the Organizations User Guide.
-//
-// - If you get an exception that indicates that you exceeded your account
-// limits for the organization, contact [Amazon Web Services Support].
-//
-// - If you get an exception that indicates that the operation failed because
-// your organization is still initializing, wait one hour and then try again. If
-// the error persists, contact [Amazon Web Services Support].
-//
-// - It isn't recommended to use CreateAccount to create multiple temporary
-// accounts, and using the CreateAccount API to close accounts is subject to a
-// 30-day usage quota. For information on the requirements and process for closing
-// an account, see [Closing a member account in your organization]in the Organizations User Guide.
-//
-// When you create a member account with this operation, you can choose whether to
-// create the account with the IAM User and Role Access to Billing Information
-// switch enabled. If you enable it, IAM users and roles that have appropriate
-// permissions can view billing information for the account. If you disable it,
-// only the account root user can access billing information. For information about
-// how to disable this switch for an account, see [Granting access to your billing information and tools].
-//
-// [Granting access to your billing information and tools]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/control-access-billing.html#grantaccess
-// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/
-// [Logging and monitoring in Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration
-// [Organizations and service-linked roles]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs
-// [Creating a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html
-// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html
-// [Closing a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html
-func (c *Client) CreateAccount(ctx context.Context, params *CreateAccountInput, optFns ...func(*Options)) (*CreateAccountOutput, error) {
- if params == nil {
- params = &CreateAccountInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateAccount", params, optFns, c.addOperationCreateAccountMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateAccountOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateAccountInput struct {
-
- // The friendly name of the member account.
- //
- // This member is required.
- AccountName *string
-
- // The email address of the owner to assign to the new member account. This email
- // address must not already be associated with another Amazon Web Services account.
- // You must use a valid email address to complete account creation.
- //
- // The rules for a valid email address:
- //
- // - The address must be a minimum of 6 and a maximum of 64 characters long.
- //
- // - All characters must be 7-bit ASCII characters.
- //
- // - There must be one and only one @ symbol, which separates the local name
- // from the domain name.
- //
- // - The local name can't contain any of the following characters:
- //
- // whitespace, " ' ( ) < > [ ] : ; , \ | % &
- //
- // - The local name can't begin with a dot (.)
- //
- // - The domain name can consist of only the characters [a-z],[A-Z],[0-9],
- // hyphen (-), or dot (.)
- //
- // - The domain name can't begin or end with a hyphen (-) or dot (.)
- //
- // - The domain name must contain at least one dot
- //
- // You can't access the root user of the account or remove an account that was
- // created with an invalid email address.
- //
- // This member is required.
- Email *string
-
- // If set to ALLOW , the new account enables IAM users to access account billing
- // information if they have the required permissions. If set to DENY , only the
- // root user of the new account can access account billing information. For more
- // information, see [About IAM access to the Billing and Cost Management console]in the Amazon Web Services Billing and Cost Management User
- // Guide.
- //
- // If you don't specify this parameter, the value defaults to ALLOW , and IAM users
- // and roles with the required permissions can access billing information for the
- // new account.
- //
- // [About IAM access to the Billing and Cost Management console]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate
- IamUserAccessToBilling types.IAMUserAccessToBilling
-
- // The name of an IAM role that Organizations automatically preconfigures in the
- // new member account. This role trusts the management account, allowing users in
- // the management account to assume the role, as permitted by the management
- // account administrator. The role has administrator permissions in the new member
- // account.
- //
- // If you don't specify this parameter, the role name defaults to
- // OrganizationAccountAccessRole .
- //
- // For more information about how to use this role to access the member account,
- // see the following links:
- //
- // [Creating the OrganizationAccountAccessRole in an invited member account]
- // - in the Organizations User Guide
- //
- // - Steps 2 and 3 in [IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles]in the IAM User Guide
- //
- // The [regex pattern] that is used to validate this parameter. The pattern can include uppercase
- // letters, lowercase letters, digits with no spaces, and any of the following
- // characters: =,.@-
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- // [Creating the OrganizationAccountAccessRole in an invited member account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role
- // [IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html
- RoleName *string
-
- // A list of tags that you want to attach to the newly created account. For each
- // tag in the list, you must specify both a tag key and a value. You can set the
- // value to an empty string, but you can't set it to null . For more information
- // about tagging, see [Tagging Organizations resources]in the Organizations User Guide.
- //
- // If any one of the tags is not valid or if you exceed the maximum allowed number
- // of tags for an account, then the entire request fails and the account is not
- // created.
- //
- // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html
- Tags []types.Tag
-
- noSmithyDocumentSerde
-}
-
-type CreateAccountOutput struct {
-
- // A structure that contains details about the request to create an account. This
- // response structure might not be fully populated when you first receive it
- // because account creation is an asynchronous process. You can pass the returned
- // CreateAccountStatus ID as a parameter to DescribeCreateAccountStatus to get status about the progress of
- // the request at later times. You can also check the CloudTrail log for the
- // CreateAccountResult event. For more information, see [Logging and monitoring in Organizations] in the Organizations User
- // Guide.
- //
- // [Logging and monitoring in Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html
- CreateAccountStatus *types.CreateAccountStatus
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAccount{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAccount{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAccount"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpCreateAccountValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccount(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opCreateAccount(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateAccount",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateGovCloudAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateGovCloudAccount.go
deleted file mode 100644
index 25ba5324c..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateGovCloudAccount.go
+++ /dev/null
@@ -1,364 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// This action is available if all of the following are true:
-//
-// - You're authorized to create accounts in the Amazon Web Services GovCloud
-// (US) Region. For more information on the Amazon Web Services GovCloud (US)
-// Region, see the [Amazon Web Services GovCloud User Guide.]
-//
-// - You already have an account in the Amazon Web Services GovCloud (US) Region
-// that is paired with a management account of an organization in the commercial
-// Region.
-//
-// - You call this action from the management account of your organization in
-// the commercial Region.
-//
-// - You have the organizations:CreateGovCloudAccount permission.
-//
-// Organizations automatically creates the required service-linked role named
-// AWSServiceRoleForOrganizations . For more information, see [Organizations and service-linked roles] in the
-// Organizations User Guide.
-//
-// Amazon Web Services automatically enables CloudTrail for Amazon Web Services
-// GovCloud (US) accounts, but you should also do the following:
-//
-// - Verify that CloudTrail is enabled to store logs.
-//
-// - Create an Amazon S3 bucket for CloudTrail log storage.
-//
-// For more information, see [Verifying CloudTrail Is Enabled]in the Amazon Web Services GovCloud User Guide.
-//
-// If the request includes tags, then the requester must have the
-// organizations:TagResource permission. The tags are attached to the commercial
-// account associated with the GovCloud account, rather than the GovCloud account
-// itself. To add tags to the GovCloud account, call the TagResourceoperation in the GovCloud
-// Region after the new GovCloud account exists.
-//
-// You call this action from the management account of your organization in the
-// commercial Region to create a standalone Amazon Web Services account in the
-// Amazon Web Services GovCloud (US) Region. After the account is created, the
-// management account of an organization in the Amazon Web Services GovCloud (US)
-// Region can invite it to that organization. For more information on inviting
-// standalone accounts in the Amazon Web Services GovCloud (US) to join an
-// organization, see [Organizations]in the Amazon Web Services GovCloud User Guide.
-//
-// Calling CreateGovCloudAccount is an asynchronous request that Amazon Web
-// Services performs in the background. Because CreateGovCloudAccount operates
-// asynchronously, it can return a successful completion message even though
-// account initialization might still be in progress. You might need to wait a few
-// minutes before you can successfully access the account. To check the status of
-// the request, do one of the following:
-//
-// - Use the OperationId response element from this operation to provide as a
-// parameter to the DescribeCreateAccountStatusoperation.
-//
-// - Check the CloudTrail log for the CreateAccountResult event. For information
-// on using CloudTrail with Organizations, see [Logging and monitoring in Organizations]in the Organizations User Guide.
-//
-// When you call the CreateGovCloudAccount action, you create two accounts: a
-// standalone account in the Amazon Web Services GovCloud (US) Region and an
-// associated account in the commercial Region for billing and support purposes.
-// The account in the commercial Region is automatically a member of the
-// organization whose credentials made the request. Both accounts are associated
-// with the same email address.
-//
-// A role is created in the new account in the commercial Region that allows the
-// management account in the organization in the commercial Region to assume it. An
-// Amazon Web Services GovCloud (US) account is then created and associated with
-// the commercial account that you just created. A role is also created in the new
-// Amazon Web Services GovCloud (US) account that can be assumed by the Amazon Web
-// Services GovCloud (US) account that is associated with the management account of
-// the commercial organization. For more information and to view a diagram that
-// explains how account access works, see [Organizations]in the Amazon Web Services GovCloud User
-// Guide.
-//
-// For more information about creating accounts, see [Creating a member account in your organization] in the Organizations User
-// Guide.
-//
-// - When you create an account in an organization using the Organizations
-// console, API, or CLI commands, the information required for the account to
-// operate as a standalone account is not automatically collected. This includes a
-// payment method and signing the end user license agreement (EULA). If you must
-// remove an account from your organization later, you can do so only after you
-// provide the missing information. For more information, see [Considerations before removing an account from an organization]in the
-// Organizations User Guide.
-//
-// - If you get an exception that indicates that you exceeded your account
-// limits for the organization, contact [Amazon Web Services Support].
-//
-// - If you get an exception that indicates that the operation failed because
-// your organization is still initializing, wait one hour and then try again. If
-// the error persists, contact [Amazon Web Services Support].
-//
-// - Using CreateGovCloudAccount to create multiple temporary accounts isn't
-// recommended. You can only close an account from the Amazon Web Services Billing
-// and Cost Management console, and you must be signed in as the root user. For
-// information on the requirements and process for closing an account, see [Closing a member account in your organization]in
-// the Organizations User Guide.
-//
-// When you create a member account with this operation, you can choose whether to
-// create the account with the IAM User and Role Access to Billing Information
-// switch enabled. If you enable it, IAM users and roles that have appropriate
-// permissions can view billing information for the account. If you disable it,
-// only the account root user can access billing information. For information about
-// how to disable this switch for an account, see [Granting access to your billing information and tools].
-//
-// [Granting access to your billing information and tools]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html
-// [Verifying CloudTrail Is Enabled]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/verifying-cloudtrail.html
-// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/
-// [Logging and monitoring in Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html
-// [Organizations]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html
-// [Organizations and service-linked roles]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs
-// [Creating a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html
-// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html
-// [Amazon Web Services GovCloud User Guide.]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/welcome.html
-// [Closing a member account in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html
-func (c *Client) CreateGovCloudAccount(ctx context.Context, params *CreateGovCloudAccountInput, optFns ...func(*Options)) (*CreateGovCloudAccountOutput, error) {
- if params == nil {
- params = &CreateGovCloudAccountInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateGovCloudAccount", params, optFns, c.addOperationCreateGovCloudAccountMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateGovCloudAccountOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateGovCloudAccountInput struct {
-
- // The friendly name of the member account.
- //
- // The account name can consist of only the characters [a-z],[A-Z],[0-9], hyphen
- // (-), or dot (.) You can't separate characters with a dash (–).
- //
- // This member is required.
- AccountName *string
-
- // Specifies the email address of the owner to assign to the new member account in
- // the commercial Region. This email address must not already be associated with
- // another Amazon Web Services account. You must use a valid email address to
- // complete account creation.
- //
- // The rules for a valid email address:
- //
- // - The address must be a minimum of 6 and a maximum of 64 characters long.
- //
- // - All characters must be 7-bit ASCII characters.
- //
- // - There must be one and only one @ symbol, which separates the local name
- // from the domain name.
- //
- // - The local name can't contain any of the following characters:
- //
- // whitespace, " ' ( ) < > [ ] : ; , \ | % &
- //
- // - The local name can't begin with a dot (.)
- //
- // - The domain name can consist of only the characters [a-z],[A-Z],[0-9],
- // hyphen (-), or dot (.)
- //
- // - The domain name can't begin or end with a hyphen (-) or dot (.)
- //
- // - The domain name must contain at least one dot
- //
- // You can't access the root user of the account or remove an account that was
- // created with an invalid email address. Like all request parameters for
- // CreateGovCloudAccount , the request for the email address for the Amazon Web
- // Services GovCloud (US) account originates from the commercial Region, not from
- // the Amazon Web Services GovCloud (US) Region.
- //
- // This member is required.
- Email *string
-
- // If set to ALLOW , the new linked account in the commercial Region enables IAM
- // users to access account billing information if they have the required
- // permissions. If set to DENY , only the root user of the new account can access
- // account billing information. For more information, see [About IAM access to the Billing and Cost Management console]in the Amazon Web
- // Services Billing and Cost Management User Guide.
- //
- // If you don't specify this parameter, the value defaults to ALLOW , and IAM users
- // and roles with the required permissions can access billing information for the
- // new account.
- //
- // [About IAM access to the Billing and Cost Management console]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate
- IamUserAccessToBilling types.IAMUserAccessToBilling
-
- // (Optional)
- //
- // The name of an IAM role that Organizations automatically preconfigures in the
- // new member accounts in both the Amazon Web Services GovCloud (US) Region and in
- // the commercial Region. This role trusts the management account, allowing users
- // in the management account to assume the role, as permitted by the management
- // account administrator. The role has administrator permissions in the new member
- // account.
- //
- // If you don't specify this parameter, the role name defaults to
- // OrganizationAccountAccessRole .
- //
- // For more information about how to use this role to access the member account,
- // see the following links:
- //
- // [Creating the OrganizationAccountAccessRole in an invited member account]
- // - in the Organizations User Guide
- //
- // - Steps 2 and 3 in [IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles]in the IAM User Guide
- //
- // The [regex pattern] that is used to validate this parameter. The pattern can include uppercase
- // letters, lowercase letters, digits with no spaces, and any of the following
- // characters: =,.@-
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- // [Creating the OrganizationAccountAccessRole in an invited member account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role
- // [IAM Tutorial: Delegate access across Amazon Web Services accounts using IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html
- RoleName *string
-
- // A list of tags that you want to attach to the newly created account. These tags
- // are attached to the commercial account associated with the GovCloud account, and
- // not to the GovCloud account itself. To add tags to the actual GovCloud account,
- // call the TagResourceoperation in the GovCloud region after the new GovCloud account exists.
- //
- // For each tag in the list, you must specify both a tag key and a value. You can
- // set the value to an empty string, but you can't set it to null . For more
- // information about tagging, see [Tagging Organizations resources]in the Organizations User Guide.
- //
- // If any one of the tags is not valid or if you exceed the maximum allowed number
- // of tags for an account, then the entire request fails and the account is not
- // created.
- //
- // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html
- Tags []types.Tag
-
- noSmithyDocumentSerde
-}
-
-type CreateGovCloudAccountOutput struct {
-
- // Contains the status about a CreateAccount or CreateGovCloudAccount request to create an Amazon Web Services
- // account or an Amazon Web Services GovCloud (US) account in an organization.
- CreateAccountStatus *types.CreateAccountStatus
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateGovCloudAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateGovCloudAccount{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateGovCloudAccount{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateGovCloudAccount"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpCreateGovCloudAccountValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGovCloudAccount(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opCreateGovCloudAccount(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateGovCloudAccount",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganization.go
deleted file mode 100644
index 905607767..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganization.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an Amazon Web Services organization. The account whose user is calling
-// the CreateOrganization operation automatically becomes the [management account] of the new
-// organization.
-//
-// This operation must be called using credentials from the account that is to
-// become the new organization's management account. The principal must also have
-// the relevant IAM permissions.
-//
-// By default (or if you set the FeatureSet parameter to ALL ), the new
-// organization is created with all features enabled and service control policies
-// automatically enabled in the root. If you instead choose to create the
-// organization supporting only the consolidated billing features by setting the
-// FeatureSet parameter to CONSOLIDATED_BILLING , no policy types are enabled by
-// default and you can't use organization policies.
-//
-// [management account]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account
-func (c *Client) CreateOrganization(ctx context.Context, params *CreateOrganizationInput, optFns ...func(*Options)) (*CreateOrganizationOutput, error) {
- if params == nil {
- params = &CreateOrganizationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateOrganization", params, optFns, c.addOperationCreateOrganizationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateOrganizationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateOrganizationInput struct {
-
- // Specifies the feature set supported by the new organization. Each feature set
- // supports different levels of functionality.
- //
- // - CONSOLIDATED_BILLING : All member accounts have their bills consolidated to
- // and paid by the management account. For more information, see [Consolidated billing]in the
- // Organizations User Guide.
- //
- // The consolidated billing feature subset isn't available for organizations in
- // the Amazon Web Services GovCloud (US) Region.
- //
- // - ALL : In addition to all the features supported by the consolidated billing
- // feature set, the management account can also apply any policy type to any member
- // account in the organization. For more information, see [All features]in the Organizations
- // User Guide.
- //
- // [All features]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all
- // [Consolidated billing]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only
- FeatureSet types.OrganizationFeatureSet
-
- noSmithyDocumentSerde
-}
-
-type CreateOrganizationOutput struct {
-
- // A structure that contains details about the newly created organization.
- Organization *types.Organization
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOrganization"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOrganization(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opCreateOrganization(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateOrganization",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganizationalUnit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganizationalUnit.go
deleted file mode 100644
index e6ef3e80a..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreateOrganizationalUnit.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates an organizational unit (OU) within a root or parent OU. An OU is a
-// container for accounts that enables you to organize your accounts to apply
-// policies according to your business requirements. The number of levels deep that
-// you can nest OUs is dependent upon the policy types enabled for that root. For
-// service control policies, the limit is five.
-//
-// For more information about OUs, see [Managing organizational units (OUs)] in the Organizations User Guide.
-//
-// If the request includes tags, then the requester must have the
-// organizations:TagResource permission.
-//
-// You can only call this operation from the management account.
-//
-// [Managing organizational units (OUs)]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html
-func (c *Client) CreateOrganizationalUnit(ctx context.Context, params *CreateOrganizationalUnitInput, optFns ...func(*Options)) (*CreateOrganizationalUnitOutput, error) {
- if params == nil {
- params = &CreateOrganizationalUnitInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreateOrganizationalUnit", params, optFns, c.addOperationCreateOrganizationalUnitMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreateOrganizationalUnitOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreateOrganizationalUnitInput struct {
-
- // The friendly name to assign to the new OU.
- //
- // This member is required.
- Name *string
-
- // ID for the parent root or OU that you want to create the new OU in.
- //
- // The [regex pattern] for a parent ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- ParentId *string
-
- // A list of tags that you want to attach to the newly created OU. For each tag in
- // the list, you must specify both a tag key and a value. You can set the value to
- // an empty string, but you can't set it to null . For more information about
- // tagging, see [Tagging Organizations resources]in the Organizations User Guide.
- //
- // If any one of the tags is not valid or if you exceed the allowed number of tags
- // for an OU, then the entire request fails and the OU is not created.
- //
- // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html
- Tags []types.Tag
-
- noSmithyDocumentSerde
-}
-
-type CreateOrganizationalUnitOutput struct {
-
- // A structure that contains details about the newly created OU.
- OrganizationalUnit *types.OrganizationalUnit
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreateOrganizationalUnitMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOrganizationalUnit{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOrganizationalUnit{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreateOrganizationalUnit"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpCreateOrganizationalUnitValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOrganizationalUnit(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opCreateOrganizationalUnit(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreateOrganizationalUnit",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreatePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreatePolicy.go
deleted file mode 100644
index 35613c809..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_CreatePolicy.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates a policy of a specified type that you can attach to a root, an
-// organizational unit (OU), or an individual Amazon Web Services account.
-//
-// For more information about policies and their use, see [Managing Organizations policies].
-//
-// If the request includes tags, then the requester must have the
-// organizations:TagResource permission.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// [Managing Organizations policies]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html
-func (c *Client) CreatePolicy(ctx context.Context, params *CreatePolicyInput, optFns ...func(*Options)) (*CreatePolicyOutput, error) {
- if params == nil {
- params = &CreatePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "CreatePolicy", params, optFns, c.addOperationCreatePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*CreatePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type CreatePolicyInput struct {
-
- // The policy text content to add to the new policy. The text that you supply must
- // adhere to the rules of the policy type you specify in the Type parameter.
- //
- // The maximum size of a policy document depends on the policy's type. For more
- // information, see [Maximum and minimum values]in the Organizations User Guide.
- //
- // [Maximum and minimum values]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#min-max-values
- //
- // This member is required.
- Content *string
-
- // An optional description to assign to the policy.
- //
- // This member is required.
- Description *string
-
- // The friendly name to assign to the policy.
- //
- // The [regex pattern] that is used to validate this parameter is a string of any of the
- // characters in the ASCII character range.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- Name *string
-
- // The type of policy to create. You can specify one of the following values:
- //
- // [SERVICE_CONTROL_POLICY]
- //
- // [RESOURCE_CONTROL_POLICY]
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- // [RESOURCE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- //
- // This member is required.
- Type types.PolicyType
-
- // A list of tags that you want to attach to the newly created policy. For each
- // tag in the list, you must specify both a tag key and a value. You can set the
- // value to an empty string, but you can't set it to null . For more information
- // about tagging, see [Tagging Organizations resources]in the Organizations User Guide.
- //
- // If any one of the tags is not valid or if you exceed the allowed number of tags
- // for a policy, then the entire request fails and the policy is not created.
- //
- // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html
- Tags []types.Tag
-
- noSmithyDocumentSerde
-}
-
-type CreatePolicyOutput struct {
-
- // A structure that contains details about the newly created policy.
- Policy *types.Policy
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationCreatePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreatePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreatePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpCreatePolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opCreatePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "CreatePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeclineHandshake.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeclineHandshake.go
deleted file mode 100644
index 0aa5264fa..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeclineHandshake.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Declines a Handshake.
-//
-// Only the account that receives a handshake can call this operation. The sender
-// of the handshake can use CancelHandshaketo cancel if the handshake hasn't yet been responded
-// to.
-//
-// You can view canceled handshakes in API responses for 30 days before they are
-// deleted.
-func (c *Client) DeclineHandshake(ctx context.Context, params *DeclineHandshakeInput, optFns ...func(*Options)) (*DeclineHandshakeOutput, error) {
- if params == nil {
- params = &DeclineHandshakeInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeclineHandshake", params, optFns, c.addOperationDeclineHandshakeMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeclineHandshakeOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeclineHandshakeInput struct {
-
- // ID for the handshake that you want to decline. You can get the ID from the ListHandshakesForAccount
- // operation.
- //
- // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- HandshakeId *string
-
- noSmithyDocumentSerde
-}
-
-type DeclineHandshakeOutput struct {
-
- // A Handshake object. Contains details for the declined handshake.
- Handshake *types.Handshake
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeclineHandshakeMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeclineHandshake{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeclineHandshake{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeclineHandshake"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeclineHandshakeValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeclineHandshake(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeclineHandshake(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeclineHandshake",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganization.go
deleted file mode 100644
index 64492ca48..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganization.go
+++ /dev/null
@@ -1,142 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes the organization. You can delete an organization only by using
-// credentials from the management account. The organization must be empty of
-// member accounts.
-func (c *Client) DeleteOrganization(ctx context.Context, params *DeleteOrganizationInput, optFns ...func(*Options)) (*DeleteOrganizationOutput, error) {
- if params == nil {
- params = &DeleteOrganizationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteOrganization", params, optFns, c.addOperationDeleteOrganizationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteOrganizationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteOrganizationInput struct {
- noSmithyDocumentSerde
-}
-
-type DeleteOrganizationOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOrganization"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOrganization(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteOrganization(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteOrganization",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganizationalUnit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganizationalUnit.go
deleted file mode 100644
index 681818bd3..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteOrganizationalUnit.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes an organizational unit (OU) from a root or another OU. You must first
-// remove all accounts and child OUs from the OU that you want to delete.
-//
-// You can only call this operation from the management account.
-func (c *Client) DeleteOrganizationalUnit(ctx context.Context, params *DeleteOrganizationalUnitInput, optFns ...func(*Options)) (*DeleteOrganizationalUnitOutput, error) {
- if params == nil {
- params = &DeleteOrganizationalUnitInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteOrganizationalUnit", params, optFns, c.addOperationDeleteOrganizationalUnitMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteOrganizationalUnitOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteOrganizationalUnitInput struct {
-
- // ID for the organizational unit that you want to delete. You can get the ID from
- // the ListOrganizationalUnitsForParentoperation.
- //
- // The [regex pattern] for an organizational unit ID string requires "ou-" followed by from 4 to
- // 32 lowercase letters or digits (the ID of the root that contains the OU). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- OrganizationalUnitId *string
-
- noSmithyDocumentSerde
-}
-
-type DeleteOrganizationalUnitOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteOrganizationalUnitMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOrganizationalUnit{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOrganizationalUnit{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteOrganizationalUnit"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeleteOrganizationalUnitValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOrganizationalUnit(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteOrganizationalUnit(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteOrganizationalUnit",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeletePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeletePolicy.go
deleted file mode 100644
index 74c0ce5c0..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeletePolicy.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes the specified policy from your organization. Before you perform this
-// operation, you must first detach the policy from all organizational units (OUs),
-// roots, and accounts.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) DeletePolicy(ctx context.Context, params *DeletePolicyInput, optFns ...func(*Options)) (*DeletePolicyOutput, error) {
- if params == nil {
- params = &DeletePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeletePolicy", params, optFns, c.addOperationDeletePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeletePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeletePolicyInput struct {
-
- // ID for the policy that you want to delete. You can get the ID from the ListPolicies or ListPoliciesForTarget
- // operations.
- //
- // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase
- // or uppercase letters, digits, or the underscore character (_).
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- PolicyId *string
-
- noSmithyDocumentSerde
-}
-
-type DeletePolicyOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeletePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeletePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeletePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeletePolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeletePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeletePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteResourcePolicy.go
deleted file mode 100644
index 7cc4553e6..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeleteResourcePolicy.go
+++ /dev/null
@@ -1,142 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Deletes the resource policy from your organization.
-//
-// You can only call this operation from the management account.
-func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) {
- if params == nil {
- params = &DeleteResourcePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeleteResourcePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeleteResourcePolicyInput struct {
- noSmithyDocumentSerde
-}
-
-type DeleteResourcePolicyOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourcePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourcePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeleteResourcePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeregisterDelegatedAdministrator.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeregisterDelegatedAdministrator.go
deleted file mode 100644
index af2464e99..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DeregisterDelegatedAdministrator.go
+++ /dev/null
@@ -1,175 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Removes the specified member Amazon Web Services account as a delegated
-// administrator for the specified Amazon Web Services service.
-//
-// Deregistering a delegated administrator can have unintended impacts on the
-// functionality of the enabled Amazon Web Services service. See the documentation
-// for the enabled service before you deregister a delegated administrator so that
-// you understand any potential impacts.
-//
-// You can run this action only for Amazon Web Services services that support this
-// feature. For a current list of services that support it, see the column Supports
-// Delegated Administrator in the table at [Amazon Web Services Services that you can use with Organizations]in the Organizations User Guide.
-//
-// You can only call this operation from the management account.
-//
-// [Amazon Web Services Services that you can use with Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html
-func (c *Client) DeregisterDelegatedAdministrator(ctx context.Context, params *DeregisterDelegatedAdministratorInput, optFns ...func(*Options)) (*DeregisterDelegatedAdministratorOutput, error) {
- if params == nil {
- params = &DeregisterDelegatedAdministratorInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DeregisterDelegatedAdministrator", params, optFns, c.addOperationDeregisterDelegatedAdministratorMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DeregisterDelegatedAdministratorOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DeregisterDelegatedAdministratorInput struct {
-
- // The account ID number of the member account in the organization that you want
- // to deregister as a delegated administrator.
- //
- // This member is required.
- AccountId *string
-
- // The service principal name of an Amazon Web Services service for which the
- // account is a delegated administrator.
- //
- // Delegated administrator privileges are revoked for only the specified Amazon
- // Web Services service from the member account. If the specified service is the
- // only service for which the member account is a delegated administrator, the
- // operation also revokes Organizations read action permissions.
- //
- // This member is required.
- ServicePrincipal *string
-
- noSmithyDocumentSerde
-}
-
-type DeregisterDelegatedAdministratorOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDeregisterDelegatedAdministratorMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeregisterDelegatedAdministrator{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeregisterDelegatedAdministrator{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterDelegatedAdministrator"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDeregisterDelegatedAdministratorValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterDelegatedAdministrator(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDeregisterDelegatedAdministrator(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DeregisterDelegatedAdministrator",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeAccount.go
deleted file mode 100644
index 0410411fe..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeAccount.go
+++ /dev/null
@@ -1,168 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Retrieves Organizations-related information about the specified account.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) DescribeAccount(ctx context.Context, params *DescribeAccountInput, optFns ...func(*Options)) (*DescribeAccountOutput, error) {
- if params == nil {
- params = &DescribeAccountInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeAccount", params, optFns, c.addOperationDescribeAccountMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeAccountOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeAccountInput struct {
-
- // The unique identifier (ID) of the Amazon Web Services account that you want
- // information about. You can get the ID from the ListAccountsor ListAccountsForParent operations.
- //
- // The [regex pattern] for an account ID string requires exactly 12 digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- AccountId *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeAccountOutput struct {
-
- // A structure that contains information about the requested account.
- //
- // The Status parameter in the API response will be retired on September 9, 2026.
- // Although both the account State and account Status parameters are currently
- // available in the Organizations APIs ( DescribeAccount , ListAccounts ,
- // ListAccountsForParent ), we recommend that you update your scripts or other code
- // to use the State parameter instead of Status before September 9, 2026.
- Account *types.Account
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeAccount{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeAccount{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAccount"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeAccountValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccount(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeAccount(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeAccount",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeCreateAccountStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeCreateAccountStatus.go
deleted file mode 100644
index 585ea5806..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeCreateAccountStatus.go
+++ /dev/null
@@ -1,164 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Retrieves the current status of an asynchronous request to create an account.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) DescribeCreateAccountStatus(ctx context.Context, params *DescribeCreateAccountStatusInput, optFns ...func(*Options)) (*DescribeCreateAccountStatusOutput, error) {
- if params == nil {
- params = &DescribeCreateAccountStatusInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeCreateAccountStatus", params, optFns, c.addOperationDescribeCreateAccountStatusMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeCreateAccountStatusOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeCreateAccountStatusInput struct {
-
- // Specifies the Id value that uniquely identifies the CreateAccount request. You
- // can get the value from the CreateAccountStatus.Id response in an earlier CreateAccount
- // request, or from the ListCreateAccountStatusoperation.
- //
- // The [regex pattern] for a create account request ID string requires "car-" followed by from 8
- // to 32 lowercase letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- CreateAccountRequestId *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeCreateAccountStatusOutput struct {
-
- // A structure that contains the current status of an account creation request.
- CreateAccountStatus *types.CreateAccountStatus
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeCreateAccountStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeCreateAccountStatus{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeCreateAccountStatus{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCreateAccountStatus"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeCreateAccountStatusValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCreateAccountStatus(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeCreateAccountStatus(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeCreateAccountStatus",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeEffectivePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeEffectivePolicy.go
deleted file mode 100644
index 465b55fbb..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeEffectivePolicy.go
+++ /dev/null
@@ -1,208 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns the contents of the effective policy for specified policy type and
-// account. The effective policy is the aggregation of any policies of the
-// specified type that the account inherits, plus any policy of that type that is
-// directly attached to the account.
-//
-// This operation applies only to management policies. It does not apply to
-// authorization policies: service control policies (SCPs) and resource control
-// policies (RCPs).
-//
-// For more information about policy inheritance, see [Understanding management policy inheritance] in the Organizations User
-// Guide.
-//
-// You can call this operation from any account in a organization.
-//
-// [Understanding management policy inheritance]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inheritance_mgmt.html
-func (c *Client) DescribeEffectivePolicy(ctx context.Context, params *DescribeEffectivePolicyInput, optFns ...func(*Options)) (*DescribeEffectivePolicyOutput, error) {
- if params == nil {
- params = &DescribeEffectivePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeEffectivePolicy", params, optFns, c.addOperationDescribeEffectivePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeEffectivePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeEffectivePolicyInput struct {
-
- // The type of policy that you want information about. You can specify one of the
- // following values:
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- //
- // This member is required.
- PolicyType types.EffectivePolicyType
-
- // When you're signed in as the management account, specify the ID of the account
- // that you want details about. Specifying an organization root or organizational
- // unit (OU) as the target is not supported.
- TargetId *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeEffectivePolicyOutput struct {
-
- // The contents of the effective policy.
- EffectivePolicy *types.EffectivePolicy
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeEffectivePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeEffectivePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeEffectivePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeEffectivePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeEffectivePolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEffectivePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeEffectivePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeEffectivePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeHandshake.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeHandshake.go
deleted file mode 100644
index a91267e70..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeHandshake.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns details for a handshake. A handshake is the secure exchange of
-// information between two Amazon Web Services accounts: a sender and a recipient.
-//
-// You can view ACCEPTED , DECLINED , or CANCELED handshakes in API Responses for
-// 30 days before they are deleted.
-//
-// You can call this operation from any account in a organization.
-func (c *Client) DescribeHandshake(ctx context.Context, params *DescribeHandshakeInput, optFns ...func(*Options)) (*DescribeHandshakeOutput, error) {
- if params == nil {
- params = &DescribeHandshakeInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeHandshake", params, optFns, c.addOperationDescribeHandshakeMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeHandshakeOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeHandshakeInput struct {
-
- // ID for the handshake that you want information about.
- //
- // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- HandshakeId *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeHandshakeOutput struct {
-
- // A Handshake object. Contains details for the handshake.
- Handshake *types.Handshake
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeHandshakeMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeHandshake{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeHandshake{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeHandshake"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeHandshakeValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHandshake(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeHandshake(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeHandshake",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganization.go
deleted file mode 100644
index 4b03f7869..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganization.go
+++ /dev/null
@@ -1,157 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Retrieves information about the organization that the user's account belongs to.
-//
-// You can call this operation from any account in a organization.
-//
-// Even if a policy type is shown as available in the organization, you can
-// disable it separately at the root level with DisablePolicyType. Use ListRoots to see the status of policy
-// types for a specified root.
-func (c *Client) DescribeOrganization(ctx context.Context, params *DescribeOrganizationInput, optFns ...func(*Options)) (*DescribeOrganizationOutput, error) {
- if params == nil {
- params = &DescribeOrganizationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeOrganization", params, optFns, c.addOperationDescribeOrganizationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeOrganizationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeOrganizationInput struct {
- noSmithyDocumentSerde
-}
-
-type DescribeOrganizationOutput struct {
-
- // A structure that contains information about the organization.
- //
- // The AvailablePolicyTypes part of the response is deprecated, and you shouldn't
- // use it in your apps. It doesn't include any policy type supported by
- // Organizations other than SCPs. In the China (Ningxia) Region, no policy type is
- // included. To determine which policy types are enabled in your organization, use
- // the ListRootsoperation.
- Organization *types.Organization
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeOrganization"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganization(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeOrganization(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeOrganization",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganizationalUnit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganizationalUnit.go
deleted file mode 100644
index 282803e6f..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeOrganizationalUnit.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Retrieves information about an organizational unit (OU).
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) DescribeOrganizationalUnit(ctx context.Context, params *DescribeOrganizationalUnitInput, optFns ...func(*Options)) (*DescribeOrganizationalUnitOutput, error) {
- if params == nil {
- params = &DescribeOrganizationalUnitInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeOrganizationalUnit", params, optFns, c.addOperationDescribeOrganizationalUnitMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeOrganizationalUnitOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeOrganizationalUnitInput struct {
-
- // ID for the organizational unit that you want details about. You can get the ID
- // from the ListOrganizationalUnitsForParentoperation.
- //
- // The [regex pattern] for an organizational unit ID string requires "ou-" followed by from 4 to
- // 32 lowercase letters or digits (the ID of the root that contains the OU). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- OrganizationalUnitId *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeOrganizationalUnitOutput struct {
-
- // A structure that contains details about the specified OU.
- OrganizationalUnit *types.OrganizationalUnit
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeOrganizationalUnitMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeOrganizationalUnit{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeOrganizationalUnit{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeOrganizationalUnit"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeOrganizationalUnitValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeOrganizationalUnit(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeOrganizationalUnit(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeOrganizationalUnit",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribePolicy.go
deleted file mode 100644
index f54d96878..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribePolicy.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Retrieves information about a policy.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) DescribePolicy(ctx context.Context, params *DescribePolicyInput, optFns ...func(*Options)) (*DescribePolicyOutput, error) {
- if params == nil {
- params = &DescribePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribePolicy", params, optFns, c.addOperationDescribePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribePolicyInput struct {
-
- // ID for the policy that you want details about. You can get the ID from the ListPolicies or ListPoliciesForTarget
- // operations.
- //
- // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase
- // or uppercase letters, digits, or the underscore character (_).
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- PolicyId *string
-
- noSmithyDocumentSerde
-}
-
-type DescribePolicyOutput struct {
-
- // A structure that contains details about the specified policy.
- Policy *types.Policy
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribePolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResourcePolicy.go
deleted file mode 100644
index 6f40ce3be..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResourcePolicy.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Retrieves information about a resource policy.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) DescribeResourcePolicy(ctx context.Context, params *DescribeResourcePolicyInput, optFns ...func(*Options)) (*DescribeResourcePolicyOutput, error) {
- if params == nil {
- params = &DescribeResourcePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeResourcePolicy", params, optFns, c.addOperationDescribeResourcePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeResourcePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeResourcePolicyInput struct {
- noSmithyDocumentSerde
-}
-
-type DescribeResourcePolicyOutput struct {
-
- // A structure that contains details about the resource policy.
- ResourcePolicy *types.ResourcePolicy
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeResourcePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeResourcePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeResourcePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResourcePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeResourcePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResponsibilityTransfer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResponsibilityTransfer.go
deleted file mode 100644
index 0bdc9dd32..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DescribeResponsibilityTransfer.go
+++ /dev/null
@@ -1,156 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns details for a transfer. A transfer is an arrangement between two
-// management accounts where one account designates the other with specified
-// responsibilities for their organization.
-func (c *Client) DescribeResponsibilityTransfer(ctx context.Context, params *DescribeResponsibilityTransferInput, optFns ...func(*Options)) (*DescribeResponsibilityTransferOutput, error) {
- if params == nil {
- params = &DescribeResponsibilityTransferInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DescribeResponsibilityTransfer", params, optFns, c.addOperationDescribeResponsibilityTransferMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DescribeResponsibilityTransferOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DescribeResponsibilityTransferInput struct {
-
- // ID for the transfer.
- //
- // This member is required.
- Id *string
-
- noSmithyDocumentSerde
-}
-
-type DescribeResponsibilityTransferOutput struct {
-
- // A ResponsibilityTransfer object. Contains details for a transfer.
- ResponsibilityTransfer *types.ResponsibilityTransfer
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDescribeResponsibilityTransferMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeResponsibilityTransfer{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeResponsibilityTransfer{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeResponsibilityTransfer"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDescribeResponsibilityTransferValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResponsibilityTransfer(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDescribeResponsibilityTransfer(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DescribeResponsibilityTransfer",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DetachPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DetachPolicy.go
deleted file mode 100644
index e8685228c..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DetachPolicy.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Detaches a policy from a target root, organizational unit (OU), or account.
-//
-// If the policy being detached is a service control policy (SCP), the changes to
-// permissions for Identity and Access Management (IAM) users and roles in affected
-// accounts are immediate.
-//
-// Every root, OU, and account must have at least one SCP attached. If you want to
-// replace the default FullAWSAccess policy with an SCP that limits the
-// permissions that can be delegated, you must attach the replacement SCP before
-// you can remove the default SCP. This is the authorization strategy of an "[allow list] ". If
-// you instead attach a second SCP and leave the FullAWSAccess SCP still attached,
-// and specify "Effect": "Deny" in the second SCP to override the "Effect": "Allow"
-// in the FullAWSAccess policy (or any other attached SCP), you're using the
-// authorization strategy of a "[deny list] ".
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// [deny list]: https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_denylist
-// [allow list]: https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_allowlist
-func (c *Client) DetachPolicy(ctx context.Context, params *DetachPolicyInput, optFns ...func(*Options)) (*DetachPolicyOutput, error) {
- if params == nil {
- params = &DetachPolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DetachPolicy", params, optFns, c.addOperationDetachPolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DetachPolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DetachPolicyInput struct {
-
- // ID for the policy you want to detach. You can get the ID from the ListPolicies or ListPoliciesForTarget
- // operations.
- //
- // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase
- // or uppercase letters, digits, or the underscore character (_).
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- PolicyId *string
-
- // ID for the root, OU, or account that you want to detach the policy from. You
- // can get the ID from the ListRoots, ListOrganizationalUnitsForParent, or ListAccounts operations.
- //
- // The [regex pattern] for a target ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Account - A string that consists of exactly 12 digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- TargetId *string
-
- noSmithyDocumentSerde
-}
-
-type DetachPolicyOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDetachPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDetachPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDetachPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DetachPolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDetachPolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachPolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDetachPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DetachPolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisableAWSServiceAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisableAWSServiceAccess.go
deleted file mode 100644
index 111fa18a5..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisableAWSServiceAccess.go
+++ /dev/null
@@ -1,207 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Disables the integration of an Amazon Web Services service (the service that is
-// specified by ServicePrincipal ) with Organizations. When you disable
-// integration, the specified service no longer can create a [service-linked role]in new accounts in
-// your organization. This means the service can't perform operations on your
-// behalf on any new accounts in your organization. The service can still perform
-// operations in older accounts until the service completes its clean-up from
-// Organizations.
-//
-// We strongly recommend that you don't use this command to disable integration
-// between Organizations and the specified Amazon Web Services service. Instead,
-// use the console or commands that are provided by the specified service. This
-// lets the trusted service perform any required initialization when enabling
-// trusted access, such as creating any required resources and any required clean
-// up of resources when disabling trusted access.
-//
-// For information about how to disable trusted service access to your
-// organization using the trusted service, see the Learn more link under the
-// Supports Trusted Access column at [Amazon Web Services services that you can use with Organizations]. on this page.
-//
-// If you disable access by using this command, it causes the following actions to
-// occur:
-//
-// - The service can no longer create a service-linked role in the accounts in
-// your organization. This means that the service can't perform operations on your
-// behalf on any new accounts in your organization. The service can still perform
-// operations in older accounts until the service completes its clean-up from
-// Organizations.
-//
-// - The service can no longer perform tasks in the member accounts in the
-// organization, unless those operations are explicitly permitted by the IAM
-// policies that are attached to your roles. This includes any data aggregation
-// from the member accounts to the management account, or to a delegated
-// administrator account, where relevant.
-//
-// - Some services detect this and clean up any remaining data or resources
-// related to the integration, while other services stop accessing the organization
-// but leave any historical data and configuration in place to support a possible
-// re-enabling of the integration.
-//
-// Using the other service's console or commands to disable the integration
-// ensures that the other service is aware that it can clean up any resources that
-// are required only for the integration. How the service cleans up its resources
-// in the organization's accounts depends on that service. For more information,
-// see the documentation for the other Amazon Web Services service.
-//
-// After you perform the DisableAWSServiceAccess operation, the specified service
-// can no longer perform operations in your organization's accounts
-//
-// For more information about integrating other services with Organizations,
-// including the list of services that work with Organizations, see [Using Organizations with other Amazon Web Services services]in the
-// Organizations User Guide.
-//
-// You can only call this operation from the management account.
-//
-// [Amazon Web Services services that you can use with Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html
-// [Using Organizations with other Amazon Web Services services]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html
-// [service-linked role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html
-func (c *Client) DisableAWSServiceAccess(ctx context.Context, params *DisableAWSServiceAccessInput, optFns ...func(*Options)) (*DisableAWSServiceAccessOutput, error) {
- if params == nil {
- params = &DisableAWSServiceAccessInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DisableAWSServiceAccess", params, optFns, c.addOperationDisableAWSServiceAccessMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DisableAWSServiceAccessOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DisableAWSServiceAccessInput struct {
-
- // The service principal name of the Amazon Web Services service for which you
- // want to disable integration with your organization. This is typically in the
- // form of a URL, such as service-abbreviation.amazonaws.com .
- //
- // This member is required.
- ServicePrincipal *string
-
- noSmithyDocumentSerde
-}
-
-type DisableAWSServiceAccessOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDisableAWSServiceAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisableAWSServiceAccess{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisableAWSServiceAccess{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DisableAWSServiceAccess"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDisableAWSServiceAccessValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableAWSServiceAccess(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDisableAWSServiceAccess(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DisableAWSServiceAccess",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisablePolicyType.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisablePolicyType.go
deleted file mode 100644
index 14dd0397f..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_DisablePolicyType.go
+++ /dev/null
@@ -1,223 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Disables an organizational policy type in a root. A policy of a certain type
-// can be attached to entities in a root only if that type is enabled in the root.
-// After you perform this operation, you no longer can attach policies of the
-// specified type to that root or to any organizational unit (OU) or account in
-// that root. You can undo this by using the EnablePolicyTypeoperation.
-//
-// This is an asynchronous request that Amazon Web Services performs in the
-// background. If you disable a policy type for a root, it still appears enabled
-// for the organization if [all features]are enabled for the organization. Amazon Web Services
-// recommends that you first use ListRootsto see the status of policy types for a specified
-// root, and then use this operation.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// To view the status of available policy types in the organization, use ListRoots.
-//
-// [all features]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
-func (c *Client) DisablePolicyType(ctx context.Context, params *DisablePolicyTypeInput, optFns ...func(*Options)) (*DisablePolicyTypeOutput, error) {
- if params == nil {
- params = &DisablePolicyTypeInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "DisablePolicyType", params, optFns, c.addOperationDisablePolicyTypeMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*DisablePolicyTypeOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type DisablePolicyTypeInput struct {
-
- // The policy type that you want to disable in this root. You can specify one of
- // the following values:
- //
- // [SERVICE_CONTROL_POLICY]
- //
- // [RESOURCE_CONTROL_POLICY]
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- // [RESOURCE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- //
- // This member is required.
- PolicyType types.PolicyType
-
- // ID for the root in which you want to disable a policy type. You can get the ID
- // from the ListRootsoperation.
- //
- // The [regex pattern] for a root ID string requires "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- RootId *string
-
- noSmithyDocumentSerde
-}
-
-type DisablePolicyTypeOutput struct {
-
- // A structure that shows the root with the updated list of enabled policy types.
- Root *types.Root
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationDisablePolicyTypeMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisablePolicyType{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisablePolicyType{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "DisablePolicyType"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpDisablePolicyTypeValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisablePolicyType(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opDisablePolicyType(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "DisablePolicyType",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAWSServiceAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAWSServiceAccess.go
deleted file mode 100644
index 64d693170..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAWSServiceAccess.go
+++ /dev/null
@@ -1,172 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Provides an Amazon Web Services service (the service that is specified by
-// ServicePrincipal ) with permissions to view the structure of an organization,
-// create a [service-linked role]in all the accounts in the organization, and allow the service to
-// perform operations on behalf of the organization and its accounts. Establishing
-// these permissions can be a first step in enabling the integration of an Amazon
-// Web Services service with Organizations.
-//
-// We recommend that you enable integration between Organizations and the
-// specified Amazon Web Services service by using the console or commands that are
-// provided by the specified service. Doing so ensures that the service is aware
-// that it can create the resources that are required for the integration. How the
-// service creates those resources in the organization's accounts depends on that
-// service. For more information, see the documentation for the other Amazon Web
-// Services service.
-//
-// For more information about enabling services to integrate with Organizations,
-// see [Using Organizations with other Amazon Web Services services]in the Organizations User Guide.
-//
-// You can only call this operation from the management account.
-//
-// [Using Organizations with other Amazon Web Services services]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html
-// [service-linked role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html
-func (c *Client) EnableAWSServiceAccess(ctx context.Context, params *EnableAWSServiceAccessInput, optFns ...func(*Options)) (*EnableAWSServiceAccessOutput, error) {
- if params == nil {
- params = &EnableAWSServiceAccessInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "EnableAWSServiceAccess", params, optFns, c.addOperationEnableAWSServiceAccessMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*EnableAWSServiceAccessOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type EnableAWSServiceAccessInput struct {
-
- // The service principal name of the Amazon Web Services service for which you
- // want to enable integration with your organization. This is typically in the form
- // of a URL, such as service-abbreviation.amazonaws.com .
- //
- // This member is required.
- ServicePrincipal *string
-
- noSmithyDocumentSerde
-}
-
-type EnableAWSServiceAccessOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationEnableAWSServiceAccessMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpEnableAWSServiceAccess{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpEnableAWSServiceAccess{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "EnableAWSServiceAccess"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpEnableAWSServiceAccessValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAWSServiceAccess(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opEnableAWSServiceAccess(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "EnableAWSServiceAccess",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAllFeatures.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAllFeatures.go
deleted file mode 100644
index ab3b564ab..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnableAllFeatures.go
+++ /dev/null
@@ -1,176 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Enables all features in an organization. This enables the use of organization
-// policies that can restrict the services and actions that can be called in each
-// account. Until you enable all features, you have access only to consolidated
-// billing, and you can't use any of the advanced account administration features
-// that Organizations supports. For more information, see [Enabling all features in your organization]in the Organizations
-// User Guide.
-//
-// This operation is required only for organizations that were created explicitly
-// with only the consolidated billing features enabled. Calling this operation
-// sends a handshake to every invited account in the organization. The feature set
-// change can be finalized and the additional features enabled only after all
-// administrators in the invited accounts approve the change by accepting the
-// handshake.
-//
-// After you enable all features, you can separately enable or disable individual
-// policy types in a root using EnablePolicyTypeand DisablePolicyType. To see the status of policy types in a root,
-// use ListRoots.
-//
-// After all invited member accounts accept the handshake, you finalize the
-// feature set change by accepting the handshake that contains "Action":
-// "ENABLE_ALL_FEATURES" . This completes the change.
-//
-// After you enable all features in your organization, the management account in
-// the organization can apply policies on all member accounts. These policies can
-// restrict what users and even administrators in those accounts can do. The
-// management account can apply policies that prevent accounts from leaving the
-// organization. Ensure that your account administrators are aware of this.
-//
-// You can only call this operation from the management account.
-//
-// [Enabling all features in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
-func (c *Client) EnableAllFeatures(ctx context.Context, params *EnableAllFeaturesInput, optFns ...func(*Options)) (*EnableAllFeaturesOutput, error) {
- if params == nil {
- params = &EnableAllFeaturesInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "EnableAllFeatures", params, optFns, c.addOperationEnableAllFeaturesMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*EnableAllFeaturesOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type EnableAllFeaturesInput struct {
- noSmithyDocumentSerde
-}
-
-type EnableAllFeaturesOutput struct {
-
- // A structure that contains details about the handshake created to support this
- // request to enable all features in the organization.
- Handshake *types.Handshake
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationEnableAllFeaturesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpEnableAllFeatures{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpEnableAllFeatures{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "EnableAllFeatures"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAllFeatures(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opEnableAllFeatures(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "EnableAllFeatures",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnablePolicyType.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnablePolicyType.go
deleted file mode 100644
index 35316bfeb..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_EnablePolicyType.go
+++ /dev/null
@@ -1,219 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Enables a policy type in a root. After you enable a policy type in a root, you
-// can attach policies of that type to the root, any organizational unit (OU), or
-// account in that root. You can undo this by using the DisablePolicyTypeoperation.
-//
-// This is an asynchronous request that Amazon Web Services performs in the
-// background. Amazon Web Services recommends that you first use ListRootsto see the status
-// of policy types for a specified root, and then use this operation.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// You can enable a policy type in a root only if that policy type is available in
-// the organization. To view the status of available policy types in the
-// organization, use ListRoots.
-func (c *Client) EnablePolicyType(ctx context.Context, params *EnablePolicyTypeInput, optFns ...func(*Options)) (*EnablePolicyTypeOutput, error) {
- if params == nil {
- params = &EnablePolicyTypeInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "EnablePolicyType", params, optFns, c.addOperationEnablePolicyTypeMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*EnablePolicyTypeOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type EnablePolicyTypeInput struct {
-
- // The policy type that you want to enable. You can specify one of the following
- // values:
- //
- // [SERVICE_CONTROL_POLICY]
- //
- // [RESOURCE_CONTROL_POLICY]
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- // [RESOURCE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- //
- // This member is required.
- PolicyType types.PolicyType
-
- // ID for the root in which you want to enable a policy type. You can get the ID
- // from the ListRootsoperation.
- //
- // The [regex pattern] for a root ID string requires "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- RootId *string
-
- noSmithyDocumentSerde
-}
-
-type EnablePolicyTypeOutput struct {
-
- // A structure that shows the root with the updated list of enabled policy types.
- Root *types.Root
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationEnablePolicyTypeMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpEnablePolicyType{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpEnablePolicyType{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "EnablePolicyType"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpEnablePolicyTypeValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnablePolicyType(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opEnablePolicyType(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "EnablePolicyType",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteAccountToOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteAccountToOrganization.go
deleted file mode 100644
index b4cd9136f..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteAccountToOrganization.go
+++ /dev/null
@@ -1,208 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Sends an invitation to another account to join your organization as a member
-// account. Organizations sends email on your behalf to the email address that is
-// associated with the other account's owner. The invitation is implemented as a Handshake
-// whose details are in the response.
-//
-// If you receive an exception that indicates that you exceeded your account
-// limits for the organization or that the operation failed because your
-// organization is still initializing, wait one hour and then try again. If the
-// error persists after an hour, contact [Amazon Web Services Support].
-//
-// If the request includes tags, then the requester must have the
-// organizations:TagResource permission.
-//
-// You can only call this operation from the management account.
-//
-// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/
-func (c *Client) InviteAccountToOrganization(ctx context.Context, params *InviteAccountToOrganizationInput, optFns ...func(*Options)) (*InviteAccountToOrganizationOutput, error) {
- if params == nil {
- params = &InviteAccountToOrganizationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "InviteAccountToOrganization", params, optFns, c.addOperationInviteAccountToOrganizationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*InviteAccountToOrganizationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type InviteAccountToOrganizationInput struct {
-
- // The identifier (ID) of the Amazon Web Services account that you want to invite
- // to join your organization. This is a JSON object that contains the following
- // elements:
- //
- // { "Type": "ACCOUNT", "Id": "< account id number >" }
- //
- // If you use the CLI, you can submit this as a single string, similar to the
- // following example:
- //
- // --target Id=123456789012,Type=ACCOUNT
- //
- // If you specify "Type": "ACCOUNT" , you must provide the Amazon Web Services
- // account ID number as the Id . If you specify "Type": "EMAIL" , you must specify
- // the email address that is associated with the account.
- //
- // --target Id=diego@example.com,Type=EMAIL
- //
- // This member is required.
- Target *types.HandshakeParty
-
- // Additional information that you want to include in the generated email to the
- // recipient account owner.
- Notes *string
-
- // A list of tags that you want to attach to the account when it becomes a member
- // of the organization. For each tag in the list, you must specify both a tag key
- // and a value. You can set the value to an empty string, but you can't set it to
- // null . For more information about tagging, see [Tagging Organizations resources] in the Organizations User Guide.
- //
- // Any tags in the request are checked for compliance with any applicable tag
- // policies when the request is made. The request is rejected if the tags in the
- // request don't match the requirements of the policy at that time. Tag policy
- // compliance is not checked again when the invitation is accepted and the tags are
- // actually attached to the account. That means that if the tag policy changes
- // between the invitation and the acceptance, then that tags could potentially be
- // non-compliant.
- //
- // If any one of the tags is not valid or if you exceed the allowed number of tags
- // for an account, then the entire request fails and invitations are not sent.
- //
- // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html
- Tags []types.Tag
-
- noSmithyDocumentSerde
-}
-
-type InviteAccountToOrganizationOutput struct {
-
- // A structure that contains details about the handshake that is created to
- // support this invitation request.
- Handshake *types.Handshake
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationInviteAccountToOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpInviteAccountToOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpInviteAccountToOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "InviteAccountToOrganization"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpInviteAccountToOrganizationValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInviteAccountToOrganization(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opInviteAccountToOrganization(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "InviteAccountToOrganization",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteOrganizationToTransferResponsibility.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteOrganizationToTransferResponsibility.go
deleted file mode 100644
index 6a665cc61..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_InviteOrganizationToTransferResponsibility.go
+++ /dev/null
@@ -1,202 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "time"
-)
-
-// Sends an invitation to another organization's management account to designate
-// your account with the specified responsibilities for their organization. The
-// invitation is implemented as a Handshakewhose details are in the response.
-//
-// You can only call this operation from the management account.
-func (c *Client) InviteOrganizationToTransferResponsibility(ctx context.Context, params *InviteOrganizationToTransferResponsibilityInput, optFns ...func(*Options)) (*InviteOrganizationToTransferResponsibilityOutput, error) {
- if params == nil {
- params = &InviteOrganizationToTransferResponsibilityInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "InviteOrganizationToTransferResponsibility", params, optFns, c.addOperationInviteOrganizationToTransferResponsibilityMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*InviteOrganizationToTransferResponsibilityOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type InviteOrganizationToTransferResponsibilityInput struct {
-
- // Name you want to assign to the transfer.
- //
- // This member is required.
- SourceName *string
-
- // Timestamp when the recipient will begin managing the specified responsibilities.
- //
- // This member is required.
- StartTimestamp *time.Time
-
- // A HandshakeParty object. Contains details for the account you want to invite.
- // Currently, only ACCOUNT and EMAIL are supported.
- //
- // This member is required.
- Target *types.HandshakeParty
-
- // The type of responsibility you want to designate to your organization.
- // Currently, only BILLING is supported.
- //
- // This member is required.
- Type types.ResponsibilityTransferType
-
- // Additional information that you want to include in the invitation.
- Notes *string
-
- // A list of tags that you want to attach to the transfer. For each tag in the
- // list, you must specify both a tag key and a value. You can set the value to an
- // empty string, but you can't set it to null . For more information about tagging,
- // see [Tagging Organizations resources]in the Organizations User Guide.
- //
- // Any tags in the request are checked for compliance with any applicable tag
- // policies when the request is made. The request is rejected if the tags in the
- // request don't match the requirements of the policy at that time. Tag policy
- // compliance is not checked again when the invitation is accepted and the tags are
- // actually attached to the transfer. That means that if the tag policy changes
- // between the invitation and the acceptance, then that tags could potentially be
- // non-compliant.
- //
- // If any one of the tags is not valid or if you exceed the allowed number of tags
- // for a transfer, then the entire request fails and invitations are not sent.
- //
- // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html
- Tags []types.Tag
-
- noSmithyDocumentSerde
-}
-
-type InviteOrganizationToTransferResponsibilityOutput struct {
-
- // Contains details for a handshake. A handshake is the secure exchange of
- // information between two Amazon Web Services accounts: a sender and a recipient.
- //
- // Note: Handshakes that are CANCELED , ACCEPTED , DECLINED , or EXPIRED show up
- // in lists for only 30 days after entering that state After that they are deleted.
- Handshake *types.Handshake
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationInviteOrganizationToTransferResponsibilityMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpInviteOrganizationToTransferResponsibility{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpInviteOrganizationToTransferResponsibility{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "InviteOrganizationToTransferResponsibility"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpInviteOrganizationToTransferResponsibilityValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInviteOrganizationToTransferResponsibility(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opInviteOrganizationToTransferResponsibility(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "InviteOrganizationToTransferResponsibility",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_LeaveOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_LeaveOrganization.go
deleted file mode 100644
index 7bb389a39..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_LeaveOrganization.go
+++ /dev/null
@@ -1,188 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Removes a member account from its parent organization. This version of the
-// operation is performed by the account that wants to leave. To remove a member
-// account as a user in the management account, use RemoveAccountFromOrganizationinstead.
-//
-// You can only call from operation from a member account.
-//
-// - The management account in an organization with all features enabled can set
-// service control policies (SCPs) that can restrict what administrators of member
-// accounts can do. This includes preventing them from successfully calling
-// LeaveOrganization and leaving the organization.
-//
-// - You can leave an organization as a member account only if the account is
-// configured with the information required to operate as a standalone account.
-// When you create an account in an organization using the Organizations console,
-// API, or CLI commands, the information required of standalone accounts is not
-// automatically collected. For each account that you want to make standalone, you
-// must perform the following steps. If any of the steps are already completed for
-// this account, that step doesn't appear.
-//
-// - Choose a support plan
-//
-// - Provide and verify the required contact information
-//
-// - Provide a current payment method
-//
-// Amazon Web Services uses the payment method to charge for any billable (not
-//
-// free tier) Amazon Web Services activity that occurs while the account isn't
-// attached to an organization. For more information, see [Considerations before removing an account from an organization]in the Organizations
-// User Guide.
-//
-// - The account that you want to leave must not be a delegated administrator
-// account for any Amazon Web Services service enabled for your organization. If
-// the account is a delegated administrator, you must first change the delegated
-// administrator account to another account that is remaining in the organization.
-//
-// - After the account leaves the organization, all tags that were attached to
-// the account object in the organization are deleted. Amazon Web Services accounts
-// outside of an organization do not support tags.
-//
-// - A newly created account has a waiting period before it can be removed from
-// its organization. You must wait until at least four days after the account was
-// created. Invited accounts aren't subject to this waiting period.
-//
-// - If you are using an organization principal to call LeaveOrganization across
-// multiple accounts, you can only do this up to 5 accounts per second in a single
-// organization.
-//
-// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html
-func (c *Client) LeaveOrganization(ctx context.Context, params *LeaveOrganizationInput, optFns ...func(*Options)) (*LeaveOrganizationOutput, error) {
- if params == nil {
- params = &LeaveOrganizationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "LeaveOrganization", params, optFns, c.addOperationLeaveOrganizationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*LeaveOrganizationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type LeaveOrganizationInput struct {
- noSmithyDocumentSerde
-}
-
-type LeaveOrganizationOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationLeaveOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpLeaveOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpLeaveOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "LeaveOrganization"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLeaveOrganization(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opLeaveOrganization(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "LeaveOrganization",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAWSServiceAccessForOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAWSServiceAccessForOrganization.go
deleted file mode 100644
index ac33275e3..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAWSServiceAccessForOrganization.go
+++ /dev/null
@@ -1,275 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Returns a list of the Amazon Web Services services that you enabled to
-// integrate with your organization. After a service on this list creates the
-// resources that it requires for the integration, it can perform operations on
-// your organization and its accounts.
-//
-// For more information about integrating other services with Organizations,
-// including the list of services that currently work with Organizations, see [Using Organizations with other Amazon Web Services services]in
-// the Organizations User Guide.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// [Using Organizations with other Amazon Web Services services]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html
-func (c *Client) ListAWSServiceAccessForOrganization(ctx context.Context, params *ListAWSServiceAccessForOrganizationInput, optFns ...func(*Options)) (*ListAWSServiceAccessForOrganizationOutput, error) {
- if params == nil {
- params = &ListAWSServiceAccessForOrganizationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListAWSServiceAccessForOrganization", params, optFns, c.addOperationListAWSServiceAccessForOrganizationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListAWSServiceAccessForOrganizationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListAWSServiceAccessForOrganizationInput struct {
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListAWSServiceAccessForOrganizationOutput struct {
-
- // A list of the service principals for the services that are enabled to integrate
- // with your organization. Each principal is a structure that includes the name and
- // the date that it was enabled for integration with Organizations.
- EnabledServicePrincipals []types.EnabledServicePrincipal
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListAWSServiceAccessForOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAWSServiceAccessForOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAWSServiceAccessForOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListAWSServiceAccessForOrganization"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAWSServiceAccessForOrganization(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListAWSServiceAccessForOrganizationPaginatorOptions is the paginator options
-// for ListAWSServiceAccessForOrganization
-type ListAWSServiceAccessForOrganizationPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListAWSServiceAccessForOrganizationPaginator is a paginator for
-// ListAWSServiceAccessForOrganization
-type ListAWSServiceAccessForOrganizationPaginator struct {
- options ListAWSServiceAccessForOrganizationPaginatorOptions
- client ListAWSServiceAccessForOrganizationAPIClient
- params *ListAWSServiceAccessForOrganizationInput
- nextToken *string
- firstPage bool
-}
-
-// NewListAWSServiceAccessForOrganizationPaginator returns a new
-// ListAWSServiceAccessForOrganizationPaginator
-func NewListAWSServiceAccessForOrganizationPaginator(client ListAWSServiceAccessForOrganizationAPIClient, params *ListAWSServiceAccessForOrganizationInput, optFns ...func(*ListAWSServiceAccessForOrganizationPaginatorOptions)) *ListAWSServiceAccessForOrganizationPaginator {
- if params == nil {
- params = &ListAWSServiceAccessForOrganizationInput{}
- }
-
- options := ListAWSServiceAccessForOrganizationPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListAWSServiceAccessForOrganizationPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListAWSServiceAccessForOrganizationPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListAWSServiceAccessForOrganization page.
-func (p *ListAWSServiceAccessForOrganizationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAWSServiceAccessForOrganizationOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListAWSServiceAccessForOrganization(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListAWSServiceAccessForOrganizationAPIClient is a client that implements the
-// ListAWSServiceAccessForOrganization operation.
-type ListAWSServiceAccessForOrganizationAPIClient interface {
- ListAWSServiceAccessForOrganization(context.Context, *ListAWSServiceAccessForOrganizationInput, ...func(*Options)) (*ListAWSServiceAccessForOrganizationOutput, error)
-}
-
-var _ ListAWSServiceAccessForOrganizationAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListAWSServiceAccessForOrganization(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListAWSServiceAccessForOrganization",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccounts.go
deleted file mode 100644
index bda180a5a..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccounts.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists all the accounts in the organization. To request only the accounts in a
-// specified root or organizational unit (OU), use the ListAccountsForParentoperation instead.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, optFns ...func(*Options)) (*ListAccountsOutput, error) {
- if params == nil {
- params = &ListAccountsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListAccounts", params, optFns, c.addOperationListAccountsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListAccountsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListAccountsInput struct {
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListAccountsOutput struct {
-
- // A list of objects in the organization.
- //
- // The Status parameter in the API response will be retired on September 9, 2026.
- // Although both the account State and account Status parameters are currently
- // available in the Organizations APIs ( DescribeAccount , ListAccounts ,
- // ListAccountsForParent ), we recommend that you update your scripts or other code
- // to use the State parameter instead of Status before September 9, 2026.
- Accounts []types.Account
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAccounts{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAccounts{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccounts"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListAccountsPaginatorOptions is the paginator options for ListAccounts
-type ListAccountsPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListAccountsPaginator is a paginator for ListAccounts
-type ListAccountsPaginator struct {
- options ListAccountsPaginatorOptions
- client ListAccountsAPIClient
- params *ListAccountsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListAccountsPaginator returns a new ListAccountsPaginator
-func NewListAccountsPaginator(client ListAccountsAPIClient, params *ListAccountsInput, optFns ...func(*ListAccountsPaginatorOptions)) *ListAccountsPaginator {
- if params == nil {
- params = &ListAccountsInput{}
- }
-
- options := ListAccountsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListAccountsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListAccountsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListAccounts page.
-func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListAccounts(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListAccountsAPIClient is a client that implements the ListAccounts operation.
-type ListAccountsAPIClient interface {
- ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error)
-}
-
-var _ ListAccountsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListAccounts",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsForParent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsForParent.go
deleted file mode 100644
index ec43362bf..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsForParent.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the accounts in an organization that are contained by the specified
-// target root or organizational unit (OU). If you specify the root, you get a list
-// of all the accounts that aren't in any OU. If you specify an OU, you get a list
-// of all the accounts in only that OU and not in any child OUs. To get a list of
-// all accounts in the organization, use the ListAccountsoperation.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListAccountsForParent(ctx context.Context, params *ListAccountsForParentInput, optFns ...func(*Options)) (*ListAccountsForParentOutput, error) {
- if params == nil {
- params = &ListAccountsForParentInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListAccountsForParent", params, optFns, c.addOperationListAccountsForParentMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListAccountsForParentOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListAccountsForParentInput struct {
-
- // The unique identifier (ID) for the parent root or organization unit (OU) whose
- // accounts you want to list.
- //
- // This member is required.
- ParentId *string
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListAccountsForParentOutput struct {
-
- // A list of the accounts in the specified root or OU.
- //
- // The Status parameter in the API response will be retired on September 9, 2026.
- // Although both the account State and account Status parameters are currently
- // available in the Organizations APIs ( DescribeAccount , ListAccounts ,
- // ListAccountsForParent ), we recommend that you update your scripts or other code
- // to use the State parameter instead of Status before September 9, 2026.
- Accounts []types.Account
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListAccountsForParentMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAccountsForParent{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAccountsForParent{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccountsForParent"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListAccountsForParentValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountsForParent(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListAccountsForParentPaginatorOptions is the paginator options for
-// ListAccountsForParent
-type ListAccountsForParentPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListAccountsForParentPaginator is a paginator for ListAccountsForParent
-type ListAccountsForParentPaginator struct {
- options ListAccountsForParentPaginatorOptions
- client ListAccountsForParentAPIClient
- params *ListAccountsForParentInput
- nextToken *string
- firstPage bool
-}
-
-// NewListAccountsForParentPaginator returns a new ListAccountsForParentPaginator
-func NewListAccountsForParentPaginator(client ListAccountsForParentAPIClient, params *ListAccountsForParentInput, optFns ...func(*ListAccountsForParentPaginatorOptions)) *ListAccountsForParentPaginator {
- if params == nil {
- params = &ListAccountsForParentInput{}
- }
-
- options := ListAccountsForParentPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListAccountsForParentPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListAccountsForParentPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListAccountsForParent page.
-func (p *ListAccountsForParentPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountsForParentOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListAccountsForParent(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListAccountsForParentAPIClient is a client that implements the
-// ListAccountsForParent operation.
-type ListAccountsForParentAPIClient interface {
- ListAccountsForParent(context.Context, *ListAccountsForParentInput, ...func(*Options)) (*ListAccountsForParentOutput, error)
-}
-
-var _ ListAccountsForParentAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListAccountsForParent(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListAccountsForParent",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsWithInvalidEffectivePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsWithInvalidEffectivePolicy.go
deleted file mode 100644
index 04060a0e5..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListAccountsWithInvalidEffectivePolicy.go
+++ /dev/null
@@ -1,350 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists all the accounts in an organization that have invalid effective policies.
-// An invalid effective policy is an [effective policy]that fails validation checks, resulting in
-// the effective policy not being fully enforced on all the intended accounts
-// within an organization.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// [effective policy]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_effective.html
-func (c *Client) ListAccountsWithInvalidEffectivePolicy(ctx context.Context, params *ListAccountsWithInvalidEffectivePolicyInput, optFns ...func(*Options)) (*ListAccountsWithInvalidEffectivePolicyOutput, error) {
- if params == nil {
- params = &ListAccountsWithInvalidEffectivePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListAccountsWithInvalidEffectivePolicy", params, optFns, c.addOperationListAccountsWithInvalidEffectivePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListAccountsWithInvalidEffectivePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListAccountsWithInvalidEffectivePolicyInput struct {
-
- // The type of policy that you want information about. You can specify one of the
- // following values:
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- //
- // This member is required.
- PolicyType types.EffectivePolicyType
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListAccountsWithInvalidEffectivePolicyOutput struct {
-
- // The accounts in the organization which have an invalid effective policy for the
- // specified policy type.
- Accounts []types.Account
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // The specified policy type. One of the following values:
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- PolicyType types.EffectivePolicyType
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListAccountsWithInvalidEffectivePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAccountsWithInvalidEffectivePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAccountsWithInvalidEffectivePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccountsWithInvalidEffectivePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListAccountsWithInvalidEffectivePolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountsWithInvalidEffectivePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListAccountsWithInvalidEffectivePolicyPaginatorOptions is the paginator options
-// for ListAccountsWithInvalidEffectivePolicy
-type ListAccountsWithInvalidEffectivePolicyPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListAccountsWithInvalidEffectivePolicyPaginator is a paginator for
-// ListAccountsWithInvalidEffectivePolicy
-type ListAccountsWithInvalidEffectivePolicyPaginator struct {
- options ListAccountsWithInvalidEffectivePolicyPaginatorOptions
- client ListAccountsWithInvalidEffectivePolicyAPIClient
- params *ListAccountsWithInvalidEffectivePolicyInput
- nextToken *string
- firstPage bool
-}
-
-// NewListAccountsWithInvalidEffectivePolicyPaginator returns a new
-// ListAccountsWithInvalidEffectivePolicyPaginator
-func NewListAccountsWithInvalidEffectivePolicyPaginator(client ListAccountsWithInvalidEffectivePolicyAPIClient, params *ListAccountsWithInvalidEffectivePolicyInput, optFns ...func(*ListAccountsWithInvalidEffectivePolicyPaginatorOptions)) *ListAccountsWithInvalidEffectivePolicyPaginator {
- if params == nil {
- params = &ListAccountsWithInvalidEffectivePolicyInput{}
- }
-
- options := ListAccountsWithInvalidEffectivePolicyPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListAccountsWithInvalidEffectivePolicyPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListAccountsWithInvalidEffectivePolicyPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListAccountsWithInvalidEffectivePolicy page.
-func (p *ListAccountsWithInvalidEffectivePolicyPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountsWithInvalidEffectivePolicyOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListAccountsWithInvalidEffectivePolicy(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListAccountsWithInvalidEffectivePolicyAPIClient is a client that implements the
-// ListAccountsWithInvalidEffectivePolicy operation.
-type ListAccountsWithInvalidEffectivePolicyAPIClient interface {
- ListAccountsWithInvalidEffectivePolicy(context.Context, *ListAccountsWithInvalidEffectivePolicyInput, ...func(*Options)) (*ListAccountsWithInvalidEffectivePolicyOutput, error)
-}
-
-var _ ListAccountsWithInvalidEffectivePolicyAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListAccountsWithInvalidEffectivePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListAccountsWithInvalidEffectivePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListChildren.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListChildren.go
deleted file mode 100644
index 0418ff2ff..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListChildren.go
+++ /dev/null
@@ -1,294 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists all of the organizational units (OUs) or accounts that are contained in
-// the specified parent OU or root. This operation, along with ListParentsenables you to
-// traverse the tree structure that makes up this root.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListChildren(ctx context.Context, params *ListChildrenInput, optFns ...func(*Options)) (*ListChildrenOutput, error) {
- if params == nil {
- params = &ListChildrenInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListChildren", params, optFns, c.addOperationListChildrenMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListChildrenOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListChildrenInput struct {
-
- // Filters the output to include only the specified child type.
- //
- // This member is required.
- ChildType types.ChildType
-
- // The unique identifier (ID) for the parent root or OU whose children you want to
- // list.
- //
- // The [regex pattern] for a parent ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- ParentId *string
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListChildrenOutput struct {
-
- // The list of children of the specified parent container.
- Children []types.Child
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListChildrenMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListChildren{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListChildren{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListChildren"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListChildrenValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChildren(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListChildrenPaginatorOptions is the paginator options for ListChildren
-type ListChildrenPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListChildrenPaginator is a paginator for ListChildren
-type ListChildrenPaginator struct {
- options ListChildrenPaginatorOptions
- client ListChildrenAPIClient
- params *ListChildrenInput
- nextToken *string
- firstPage bool
-}
-
-// NewListChildrenPaginator returns a new ListChildrenPaginator
-func NewListChildrenPaginator(client ListChildrenAPIClient, params *ListChildrenInput, optFns ...func(*ListChildrenPaginatorOptions)) *ListChildrenPaginator {
- if params == nil {
- params = &ListChildrenInput{}
- }
-
- options := ListChildrenPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListChildrenPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListChildrenPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListChildren page.
-func (p *ListChildrenPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChildrenOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListChildren(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListChildrenAPIClient is a client that implements the ListChildren operation.
-type ListChildrenAPIClient interface {
- ListChildren(context.Context, *ListChildrenInput, ...func(*Options)) (*ListChildrenOutput, error)
-}
-
-var _ ListChildrenAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListChildren(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListChildren",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListCreateAccountStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListCreateAccountStatus.go
deleted file mode 100644
index 101494093..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListCreateAccountStatus.go
+++ /dev/null
@@ -1,276 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the account creation requests that match the specified status that is
-// currently being tracked for the organization.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListCreateAccountStatus(ctx context.Context, params *ListCreateAccountStatusInput, optFns ...func(*Options)) (*ListCreateAccountStatusOutput, error) {
- if params == nil {
- params = &ListCreateAccountStatusInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListCreateAccountStatus", params, optFns, c.addOperationListCreateAccountStatusMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListCreateAccountStatusOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListCreateAccountStatusInput struct {
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- // A list of one or more states that you want included in the response. If this
- // parameter isn't present, all requests are included in the response.
- States []types.CreateAccountState
-
- noSmithyDocumentSerde
-}
-
-type ListCreateAccountStatusOutput struct {
-
- // A list of objects with details about the requests. Certain elements, such as
- // the accountId number, are present in the output only after the account has been
- // successfully created.
- CreateAccountStatuses []types.CreateAccountStatus
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListCreateAccountStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCreateAccountStatus{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCreateAccountStatus{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListCreateAccountStatus"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCreateAccountStatus(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListCreateAccountStatusPaginatorOptions is the paginator options for
-// ListCreateAccountStatus
-type ListCreateAccountStatusPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListCreateAccountStatusPaginator is a paginator for ListCreateAccountStatus
-type ListCreateAccountStatusPaginator struct {
- options ListCreateAccountStatusPaginatorOptions
- client ListCreateAccountStatusAPIClient
- params *ListCreateAccountStatusInput
- nextToken *string
- firstPage bool
-}
-
-// NewListCreateAccountStatusPaginator returns a new
-// ListCreateAccountStatusPaginator
-func NewListCreateAccountStatusPaginator(client ListCreateAccountStatusAPIClient, params *ListCreateAccountStatusInput, optFns ...func(*ListCreateAccountStatusPaginatorOptions)) *ListCreateAccountStatusPaginator {
- if params == nil {
- params = &ListCreateAccountStatusInput{}
- }
-
- options := ListCreateAccountStatusPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListCreateAccountStatusPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListCreateAccountStatusPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListCreateAccountStatus page.
-func (p *ListCreateAccountStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCreateAccountStatusOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListCreateAccountStatus(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListCreateAccountStatusAPIClient is a client that implements the
-// ListCreateAccountStatus operation.
-type ListCreateAccountStatusAPIClient interface {
- ListCreateAccountStatus(context.Context, *ListCreateAccountStatusInput, ...func(*Options)) (*ListCreateAccountStatusOutput, error)
-}
-
-var _ ListCreateAccountStatusAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListCreateAccountStatus(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListCreateAccountStatus",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedAdministrators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedAdministrators.go
deleted file mode 100644
index e48f90969..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedAdministrators.go
+++ /dev/null
@@ -1,272 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the Amazon Web Services accounts that are designated as delegated
-// administrators in this organization.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListDelegatedAdministrators(ctx context.Context, params *ListDelegatedAdministratorsInput, optFns ...func(*Options)) (*ListDelegatedAdministratorsOutput, error) {
- if params == nil {
- params = &ListDelegatedAdministratorsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListDelegatedAdministrators", params, optFns, c.addOperationListDelegatedAdministratorsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListDelegatedAdministratorsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListDelegatedAdministratorsInput struct {
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- // Specifies a service principal name. If specified, then the operation lists the
- // delegated administrators only for the specified service.
- //
- // If you don't specify a service principal, the operation lists all delegated
- // administrators for all services in your organization.
- ServicePrincipal *string
-
- noSmithyDocumentSerde
-}
-
-type ListDelegatedAdministratorsOutput struct {
-
- // The list of delegated administrators in your organization.
- DelegatedAdministrators []types.DelegatedAdministrator
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListDelegatedAdministratorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDelegatedAdministrators{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDelegatedAdministrators{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListDelegatedAdministrators"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDelegatedAdministrators(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListDelegatedAdministratorsPaginatorOptions is the paginator options for
-// ListDelegatedAdministrators
-type ListDelegatedAdministratorsPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListDelegatedAdministratorsPaginator is a paginator for
-// ListDelegatedAdministrators
-type ListDelegatedAdministratorsPaginator struct {
- options ListDelegatedAdministratorsPaginatorOptions
- client ListDelegatedAdministratorsAPIClient
- params *ListDelegatedAdministratorsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListDelegatedAdministratorsPaginator returns a new
-// ListDelegatedAdministratorsPaginator
-func NewListDelegatedAdministratorsPaginator(client ListDelegatedAdministratorsAPIClient, params *ListDelegatedAdministratorsInput, optFns ...func(*ListDelegatedAdministratorsPaginatorOptions)) *ListDelegatedAdministratorsPaginator {
- if params == nil {
- params = &ListDelegatedAdministratorsInput{}
- }
-
- options := ListDelegatedAdministratorsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListDelegatedAdministratorsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListDelegatedAdministratorsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListDelegatedAdministrators page.
-func (p *ListDelegatedAdministratorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDelegatedAdministratorsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListDelegatedAdministrators(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListDelegatedAdministratorsAPIClient is a client that implements the
-// ListDelegatedAdministrators operation.
-type ListDelegatedAdministratorsAPIClient interface {
- ListDelegatedAdministrators(context.Context, *ListDelegatedAdministratorsInput, ...func(*Options)) (*ListDelegatedAdministratorsOutput, error)
-}
-
-var _ ListDelegatedAdministratorsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListDelegatedAdministrators(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListDelegatedAdministrators",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedServicesForAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedServicesForAccount.go
deleted file mode 100644
index 052bb92aa..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListDelegatedServicesForAccount.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// List the Amazon Web Services services for which the specified account is a
-// delegated administrator.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListDelegatedServicesForAccount(ctx context.Context, params *ListDelegatedServicesForAccountInput, optFns ...func(*Options)) (*ListDelegatedServicesForAccountOutput, error) {
- if params == nil {
- params = &ListDelegatedServicesForAccountInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListDelegatedServicesForAccount", params, optFns, c.addOperationListDelegatedServicesForAccountMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListDelegatedServicesForAccountOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListDelegatedServicesForAccountInput struct {
-
- // The account ID number of a delegated administrator account in the organization.
- //
- // This member is required.
- AccountId *string
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListDelegatedServicesForAccountOutput struct {
-
- // The services for which the account is a delegated administrator.
- DelegatedServices []types.DelegatedService
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListDelegatedServicesForAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListDelegatedServicesForAccount{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListDelegatedServicesForAccount{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListDelegatedServicesForAccount"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListDelegatedServicesForAccountValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDelegatedServicesForAccount(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListDelegatedServicesForAccountPaginatorOptions is the paginator options for
-// ListDelegatedServicesForAccount
-type ListDelegatedServicesForAccountPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListDelegatedServicesForAccountPaginator is a paginator for
-// ListDelegatedServicesForAccount
-type ListDelegatedServicesForAccountPaginator struct {
- options ListDelegatedServicesForAccountPaginatorOptions
- client ListDelegatedServicesForAccountAPIClient
- params *ListDelegatedServicesForAccountInput
- nextToken *string
- firstPage bool
-}
-
-// NewListDelegatedServicesForAccountPaginator returns a new
-// ListDelegatedServicesForAccountPaginator
-func NewListDelegatedServicesForAccountPaginator(client ListDelegatedServicesForAccountAPIClient, params *ListDelegatedServicesForAccountInput, optFns ...func(*ListDelegatedServicesForAccountPaginatorOptions)) *ListDelegatedServicesForAccountPaginator {
- if params == nil {
- params = &ListDelegatedServicesForAccountInput{}
- }
-
- options := ListDelegatedServicesForAccountPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListDelegatedServicesForAccountPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListDelegatedServicesForAccountPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListDelegatedServicesForAccount page.
-func (p *ListDelegatedServicesForAccountPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListDelegatedServicesForAccountOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListDelegatedServicesForAccount(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListDelegatedServicesForAccountAPIClient is a client that implements the
-// ListDelegatedServicesForAccount operation.
-type ListDelegatedServicesForAccountAPIClient interface {
- ListDelegatedServicesForAccount(context.Context, *ListDelegatedServicesForAccountInput, ...func(*Options)) (*ListDelegatedServicesForAccountOutput, error)
-}
-
-var _ ListDelegatedServicesForAccountAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListDelegatedServicesForAccount(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListDelegatedServicesForAccount",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListEffectivePolicyValidationErrors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListEffectivePolicyValidationErrors.go
deleted file mode 100644
index 57b06d98d..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListEffectivePolicyValidationErrors.go
+++ /dev/null
@@ -1,365 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "time"
-)
-
-// Lists all the validation errors on an [effective policy] for a specified account and policy type.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// [effective policy]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_effective.html
-func (c *Client) ListEffectivePolicyValidationErrors(ctx context.Context, params *ListEffectivePolicyValidationErrorsInput, optFns ...func(*Options)) (*ListEffectivePolicyValidationErrorsOutput, error) {
- if params == nil {
- params = &ListEffectivePolicyValidationErrorsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListEffectivePolicyValidationErrors", params, optFns, c.addOperationListEffectivePolicyValidationErrorsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListEffectivePolicyValidationErrorsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListEffectivePolicyValidationErrorsInput struct {
-
- // The ID of the account that you want details about. Specifying an organization
- // root or organizational unit (OU) as the target is not supported.
- //
- // This member is required.
- AccountId *string
-
- // The type of policy that you want information about. You can specify one of the
- // following values:
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- //
- // This member is required.
- PolicyType types.EffectivePolicyType
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListEffectivePolicyValidationErrorsOutput struct {
-
- // The ID of the specified account.
- AccountId *string
-
- // The EffectivePolicyValidationError object contains details about the validation
- // errors that occurred when generating or enforcing an effective policy, such as
- // which policies contributed to the error and location of the error.
- EffectivePolicyValidationErrors []types.EffectivePolicyValidationError
-
- // The time when the latest effective policy was generated for the specified
- // account.
- EvaluationTimestamp *time.Time
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // The path in the organization where the specified account exists.
- Path *string
-
- // The specified policy type. One of the following values:
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- PolicyType types.EffectivePolicyType
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListEffectivePolicyValidationErrorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListEffectivePolicyValidationErrors{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListEffectivePolicyValidationErrors{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListEffectivePolicyValidationErrors"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListEffectivePolicyValidationErrorsValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEffectivePolicyValidationErrors(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListEffectivePolicyValidationErrorsPaginatorOptions is the paginator options
-// for ListEffectivePolicyValidationErrors
-type ListEffectivePolicyValidationErrorsPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListEffectivePolicyValidationErrorsPaginator is a paginator for
-// ListEffectivePolicyValidationErrors
-type ListEffectivePolicyValidationErrorsPaginator struct {
- options ListEffectivePolicyValidationErrorsPaginatorOptions
- client ListEffectivePolicyValidationErrorsAPIClient
- params *ListEffectivePolicyValidationErrorsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListEffectivePolicyValidationErrorsPaginator returns a new
-// ListEffectivePolicyValidationErrorsPaginator
-func NewListEffectivePolicyValidationErrorsPaginator(client ListEffectivePolicyValidationErrorsAPIClient, params *ListEffectivePolicyValidationErrorsInput, optFns ...func(*ListEffectivePolicyValidationErrorsPaginatorOptions)) *ListEffectivePolicyValidationErrorsPaginator {
- if params == nil {
- params = &ListEffectivePolicyValidationErrorsInput{}
- }
-
- options := ListEffectivePolicyValidationErrorsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListEffectivePolicyValidationErrorsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListEffectivePolicyValidationErrorsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListEffectivePolicyValidationErrors page.
-func (p *ListEffectivePolicyValidationErrorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEffectivePolicyValidationErrorsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListEffectivePolicyValidationErrors(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListEffectivePolicyValidationErrorsAPIClient is a client that implements the
-// ListEffectivePolicyValidationErrors operation.
-type ListEffectivePolicyValidationErrorsAPIClient interface {
- ListEffectivePolicyValidationErrors(context.Context, *ListEffectivePolicyValidationErrorsInput, ...func(*Options)) (*ListEffectivePolicyValidationErrorsOutput, error)
-}
-
-var _ ListEffectivePolicyValidationErrorsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListEffectivePolicyValidationErrors(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListEffectivePolicyValidationErrors",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForAccount.go
deleted file mode 100644
index 01a6317b8..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForAccount.go
+++ /dev/null
@@ -1,275 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the recent handshakes that you have received.
-//
-// You can view CANCELED , ACCEPTED , DECLINED , or EXPIRED handshakes in API
-// responses for 30 days before they are deleted.
-//
-// You can call this operation from any account in a organization.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-func (c *Client) ListHandshakesForAccount(ctx context.Context, params *ListHandshakesForAccountInput, optFns ...func(*Options)) (*ListHandshakesForAccountOutput, error) {
- if params == nil {
- params = &ListHandshakesForAccountInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListHandshakesForAccount", params, optFns, c.addOperationListHandshakesForAccountMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListHandshakesForAccountOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListHandshakesForAccountInput struct {
-
- // A HandshakeFilter object. Contains the filer used to select the handshakes for
- // an operation.
- Filter *types.HandshakeFilter
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListHandshakesForAccountOutput struct {
-
- // An array of Handshake objects. Contains details for a handshake.
- Handshakes []types.Handshake
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListHandshakesForAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListHandshakesForAccount{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListHandshakesForAccount{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListHandshakesForAccount"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHandshakesForAccount(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListHandshakesForAccountPaginatorOptions is the paginator options for
-// ListHandshakesForAccount
-type ListHandshakesForAccountPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListHandshakesForAccountPaginator is a paginator for ListHandshakesForAccount
-type ListHandshakesForAccountPaginator struct {
- options ListHandshakesForAccountPaginatorOptions
- client ListHandshakesForAccountAPIClient
- params *ListHandshakesForAccountInput
- nextToken *string
- firstPage bool
-}
-
-// NewListHandshakesForAccountPaginator returns a new
-// ListHandshakesForAccountPaginator
-func NewListHandshakesForAccountPaginator(client ListHandshakesForAccountAPIClient, params *ListHandshakesForAccountInput, optFns ...func(*ListHandshakesForAccountPaginatorOptions)) *ListHandshakesForAccountPaginator {
- if params == nil {
- params = &ListHandshakesForAccountInput{}
- }
-
- options := ListHandshakesForAccountPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListHandshakesForAccountPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListHandshakesForAccountPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListHandshakesForAccount page.
-func (p *ListHandshakesForAccountPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHandshakesForAccountOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListHandshakesForAccount(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListHandshakesForAccountAPIClient is a client that implements the
-// ListHandshakesForAccount operation.
-type ListHandshakesForAccountAPIClient interface {
- ListHandshakesForAccount(context.Context, *ListHandshakesForAccountInput, ...func(*Options)) (*ListHandshakesForAccountOutput, error)
-}
-
-var _ ListHandshakesForAccountAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListHandshakesForAccount(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListHandshakesForAccount",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForOrganization.go
deleted file mode 100644
index 5bfcceff2..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListHandshakesForOrganization.go
+++ /dev/null
@@ -1,277 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the recent handshakes that you have sent.
-//
-// You can view CANCELED , ACCEPTED , DECLINED , or EXPIRED handshakes in API
-// responses for 30 days before they are deleted.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-func (c *Client) ListHandshakesForOrganization(ctx context.Context, params *ListHandshakesForOrganizationInput, optFns ...func(*Options)) (*ListHandshakesForOrganizationOutput, error) {
- if params == nil {
- params = &ListHandshakesForOrganizationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListHandshakesForOrganization", params, optFns, c.addOperationListHandshakesForOrganizationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListHandshakesForOrganizationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListHandshakesForOrganizationInput struct {
-
- // A HandshakeFilter object. Contains the filer used to select the handshakes for
- // an operation.
- Filter *types.HandshakeFilter
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListHandshakesForOrganizationOutput struct {
-
- // An array of Handshake objects. Contains details for a handshake.
- Handshakes []types.Handshake
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListHandshakesForOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListHandshakesForOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListHandshakesForOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListHandshakesForOrganization"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHandshakesForOrganization(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListHandshakesForOrganizationPaginatorOptions is the paginator options for
-// ListHandshakesForOrganization
-type ListHandshakesForOrganizationPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListHandshakesForOrganizationPaginator is a paginator for
-// ListHandshakesForOrganization
-type ListHandshakesForOrganizationPaginator struct {
- options ListHandshakesForOrganizationPaginatorOptions
- client ListHandshakesForOrganizationAPIClient
- params *ListHandshakesForOrganizationInput
- nextToken *string
- firstPage bool
-}
-
-// NewListHandshakesForOrganizationPaginator returns a new
-// ListHandshakesForOrganizationPaginator
-func NewListHandshakesForOrganizationPaginator(client ListHandshakesForOrganizationAPIClient, params *ListHandshakesForOrganizationInput, optFns ...func(*ListHandshakesForOrganizationPaginatorOptions)) *ListHandshakesForOrganizationPaginator {
- if params == nil {
- params = &ListHandshakesForOrganizationInput{}
- }
-
- options := ListHandshakesForOrganizationPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListHandshakesForOrganizationPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListHandshakesForOrganizationPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListHandshakesForOrganization page.
-func (p *ListHandshakesForOrganizationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHandshakesForOrganizationOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListHandshakesForOrganization(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListHandshakesForOrganizationAPIClient is a client that implements the
-// ListHandshakesForOrganization operation.
-type ListHandshakesForOrganizationAPIClient interface {
- ListHandshakesForOrganization(context.Context, *ListHandshakesForOrganizationInput, ...func(*Options)) (*ListHandshakesForOrganizationOutput, error)
-}
-
-var _ ListHandshakesForOrganizationAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListHandshakesForOrganization(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListHandshakesForOrganization",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListInboundResponsibilityTransfers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListInboundResponsibilityTransfers.go
deleted file mode 100644
index e1d8dd3fb..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListInboundResponsibilityTransfers.go
+++ /dev/null
@@ -1,182 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists transfers that allow you to manage the specified responsibilities for
-// another organization. This operation returns both transfer invitations and
-// transfers.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-func (c *Client) ListInboundResponsibilityTransfers(ctx context.Context, params *ListInboundResponsibilityTransfersInput, optFns ...func(*Options)) (*ListInboundResponsibilityTransfersOutput, error) {
- if params == nil {
- params = &ListInboundResponsibilityTransfersInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListInboundResponsibilityTransfers", params, optFns, c.addOperationListInboundResponsibilityTransfersMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListInboundResponsibilityTransfersOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListInboundResponsibilityTransfersInput struct {
-
- // The type of responsibility. Currently, only BILLING is supported.
- //
- // This member is required.
- Type types.ResponsibilityTransferType
-
- // ID for the transfer.
- Id *string
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListInboundResponsibilityTransfersOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // A ResponsibilityTransfers object. Contains details for a transfer.
- ResponsibilityTransfers []types.ResponsibilityTransfer
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListInboundResponsibilityTransfersMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListInboundResponsibilityTransfers{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListInboundResponsibilityTransfers{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListInboundResponsibilityTransfers"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListInboundResponsibilityTransfersValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListInboundResponsibilityTransfers(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opListInboundResponsibilityTransfers(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListInboundResponsibilityTransfers",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOrganizationalUnitsForParent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOrganizationalUnitsForParent.go
deleted file mode 100644
index 806890fd0..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOrganizationalUnitsForParent.go
+++ /dev/null
@@ -1,290 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the organizational units (OUs) in a parent organizational unit or root.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListOrganizationalUnitsForParent(ctx context.Context, params *ListOrganizationalUnitsForParentInput, optFns ...func(*Options)) (*ListOrganizationalUnitsForParentOutput, error) {
- if params == nil {
- params = &ListOrganizationalUnitsForParentInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListOrganizationalUnitsForParent", params, optFns, c.addOperationListOrganizationalUnitsForParentMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListOrganizationalUnitsForParentOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListOrganizationalUnitsForParentInput struct {
-
- // ID for the root or OU whose child OUs you want to list.
- //
- // The [regex pattern] for a parent ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- ParentId *string
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListOrganizationalUnitsForParentOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // A list of the OUs in the specified root or parent OU.
- OrganizationalUnits []types.OrganizationalUnit
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListOrganizationalUnitsForParentMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOrganizationalUnitsForParent{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOrganizationalUnitsForParent{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListOrganizationalUnitsForParent"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListOrganizationalUnitsForParentValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOrganizationalUnitsForParent(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListOrganizationalUnitsForParentPaginatorOptions is the paginator options for
-// ListOrganizationalUnitsForParent
-type ListOrganizationalUnitsForParentPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListOrganizationalUnitsForParentPaginator is a paginator for
-// ListOrganizationalUnitsForParent
-type ListOrganizationalUnitsForParentPaginator struct {
- options ListOrganizationalUnitsForParentPaginatorOptions
- client ListOrganizationalUnitsForParentAPIClient
- params *ListOrganizationalUnitsForParentInput
- nextToken *string
- firstPage bool
-}
-
-// NewListOrganizationalUnitsForParentPaginator returns a new
-// ListOrganizationalUnitsForParentPaginator
-func NewListOrganizationalUnitsForParentPaginator(client ListOrganizationalUnitsForParentAPIClient, params *ListOrganizationalUnitsForParentInput, optFns ...func(*ListOrganizationalUnitsForParentPaginatorOptions)) *ListOrganizationalUnitsForParentPaginator {
- if params == nil {
- params = &ListOrganizationalUnitsForParentInput{}
- }
-
- options := ListOrganizationalUnitsForParentPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListOrganizationalUnitsForParentPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListOrganizationalUnitsForParentPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListOrganizationalUnitsForParent page.
-func (p *ListOrganizationalUnitsForParentPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOrganizationalUnitsForParentOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListOrganizationalUnitsForParent(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListOrganizationalUnitsForParentAPIClient is a client that implements the
-// ListOrganizationalUnitsForParent operation.
-type ListOrganizationalUnitsForParentAPIClient interface {
- ListOrganizationalUnitsForParent(context.Context, *ListOrganizationalUnitsForParentInput, ...func(*Options)) (*ListOrganizationalUnitsForParentOutput, error)
-}
-
-var _ ListOrganizationalUnitsForParentAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListOrganizationalUnitsForParent(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListOrganizationalUnitsForParent",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOutboundResponsibilityTransfers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOutboundResponsibilityTransfers.go
deleted file mode 100644
index 46b07c98b..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListOutboundResponsibilityTransfers.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists transfers that allow an account outside your organization to manage the
-// specified responsibilities for your organization. This operation returns both
-// transfer invitations and transfers.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-func (c *Client) ListOutboundResponsibilityTransfers(ctx context.Context, params *ListOutboundResponsibilityTransfersInput, optFns ...func(*Options)) (*ListOutboundResponsibilityTransfersOutput, error) {
- if params == nil {
- params = &ListOutboundResponsibilityTransfersInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListOutboundResponsibilityTransfers", params, optFns, c.addOperationListOutboundResponsibilityTransfersMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListOutboundResponsibilityTransfersOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListOutboundResponsibilityTransfersInput struct {
-
- // The type of responsibility. Currently, only BILLING is supported.
- //
- // This member is required.
- Type types.ResponsibilityTransferType
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListOutboundResponsibilityTransfersOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // An array of ResponsibilityTransfer objects. Contains details for a transfer.
- ResponsibilityTransfers []types.ResponsibilityTransfer
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListOutboundResponsibilityTransfersMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOutboundResponsibilityTransfers{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOutboundResponsibilityTransfers{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListOutboundResponsibilityTransfers"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListOutboundResponsibilityTransfersValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListOutboundResponsibilityTransfers(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opListOutboundResponsibilityTransfers(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListOutboundResponsibilityTransfers",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListParents.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListParents.go
deleted file mode 100644
index e34ad1d67..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListParents.go
+++ /dev/null
@@ -1,290 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the root or organizational units (OUs) that serve as the immediate parent
-// of the specified child OU or account. This operation, along with ListChildrenenables you to
-// traverse the tree structure that makes up this root.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// In the current release, a child can have only a single parent.
-func (c *Client) ListParents(ctx context.Context, params *ListParentsInput, optFns ...func(*Options)) (*ListParentsOutput, error) {
- if params == nil {
- params = &ListParentsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListParents", params, optFns, c.addOperationListParentsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListParentsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListParentsInput struct {
-
- // ID for the OU or account whose parent containers you want to list. Don't
- // specify a root.
- //
- // The [regex pattern] for a child ID string requires one of the following:
- //
- // - Account - A string that consists of exactly 12 digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that contains the OU).
- // This string is followed by a second "-" dash and from 8 to 32 additional
- // lowercase letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- ChildId *string
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListParentsOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // A list of parents for the specified child account or OU.
- Parents []types.Parent
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListParentsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListParents{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListParents{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListParents"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListParentsValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListParents(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListParentsPaginatorOptions is the paginator options for ListParents
-type ListParentsPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListParentsPaginator is a paginator for ListParents
-type ListParentsPaginator struct {
- options ListParentsPaginatorOptions
- client ListParentsAPIClient
- params *ListParentsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListParentsPaginator returns a new ListParentsPaginator
-func NewListParentsPaginator(client ListParentsAPIClient, params *ListParentsInput, optFns ...func(*ListParentsPaginatorOptions)) *ListParentsPaginator {
- if params == nil {
- params = &ListParentsInput{}
- }
-
- options := ListParentsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListParentsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListParentsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListParents page.
-func (p *ListParentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListParentsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListParents(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListParentsAPIClient is a client that implements the ListParents operation.
-type ListParentsAPIClient interface {
- ListParents(context.Context, *ListParentsInput, ...func(*Options)) (*ListParentsOutput, error)
-}
-
-var _ ListParentsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListParents(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListParents",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPolicies.go
deleted file mode 100644
index 426fb2fad..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPolicies.go
+++ /dev/null
@@ -1,316 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Retrieves the list of all policies in an organization of a specified type.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListPolicies(ctx context.Context, params *ListPoliciesInput, optFns ...func(*Options)) (*ListPoliciesOutput, error) {
- if params == nil {
- params = &ListPoliciesInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListPolicies", params, optFns, c.addOperationListPoliciesMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListPoliciesOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListPoliciesInput struct {
-
- // Specifies the type of policy that you want to include in the response. You must
- // specify one of the following values:
- //
- // [SERVICE_CONTROL_POLICY]
- //
- // [RESOURCE_CONTROL_POLICY]
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- // [RESOURCE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- //
- // This member is required.
- Filter types.PolicyType
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListPoliciesOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // A list of policies that match the filter criteria in the request. The output
- // list doesn't include the policy contents. To see the content for a policy, see DescribePolicy.
- Policies []types.PolicySummary
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListPolicies{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListPolicies{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListPolicies"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListPoliciesValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPolicies(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListPoliciesPaginatorOptions is the paginator options for ListPolicies
-type ListPoliciesPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListPoliciesPaginator is a paginator for ListPolicies
-type ListPoliciesPaginator struct {
- options ListPoliciesPaginatorOptions
- client ListPoliciesAPIClient
- params *ListPoliciesInput
- nextToken *string
- firstPage bool
-}
-
-// NewListPoliciesPaginator returns a new ListPoliciesPaginator
-func NewListPoliciesPaginator(client ListPoliciesAPIClient, params *ListPoliciesInput, optFns ...func(*ListPoliciesPaginatorOptions)) *ListPoliciesPaginator {
- if params == nil {
- params = &ListPoliciesInput{}
- }
-
- options := ListPoliciesPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListPoliciesPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListPoliciesPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListPolicies page.
-func (p *ListPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPoliciesOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListPolicies(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListPoliciesAPIClient is a client that implements the ListPolicies operation.
-type ListPoliciesAPIClient interface {
- ListPolicies(context.Context, *ListPoliciesInput, ...func(*Options)) (*ListPoliciesOutput, error)
-}
-
-var _ ListPoliciesAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListPolicies(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListPolicies",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPoliciesForTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPoliciesForTarget.go
deleted file mode 100644
index ad9e4c52a..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListPoliciesForTarget.go
+++ /dev/null
@@ -1,339 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the policies that are directly attached to the specified target root,
-// organizational unit (OU), or account. You must specify the policy type that you
-// want included in the returned list.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListPoliciesForTarget(ctx context.Context, params *ListPoliciesForTargetInput, optFns ...func(*Options)) (*ListPoliciesForTargetOutput, error) {
- if params == nil {
- params = &ListPoliciesForTargetInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListPoliciesForTarget", params, optFns, c.addOperationListPoliciesForTargetMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListPoliciesForTargetOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListPoliciesForTargetInput struct {
-
- // The type of policy that you want to include in the returned list. You must
- // specify one of the following values:
- //
- // [SERVICE_CONTROL_POLICY]
- //
- // [RESOURCE_CONTROL_POLICY]
- //
- // [DECLARATIVE_POLICY_EC2]
- //
- // [BACKUP_POLICY]
- //
- // [TAG_POLICY]
- //
- // [CHATBOT_POLICY]
- //
- // [AISERVICES_OPT_OUT_POLICY]
- //
- // [SECURITYHUB_POLICY]
- //
- // [UPGRADE_ROLLOUT_POLICY]
- //
- // [INSPECTOR_POLICY]
- //
- // [BEDROCK_POLICY]
- //
- // [S3_POLICY]
- //
- // [NETWORK_SECURITY_DIRECTOR_POLICY]
- //
- // [BEDROCK_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_bedrock.html
- // [NETWORK_SECURITY_DIRECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_network_security_director.html
- // [UPGRADE_ROLLOUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_upgrade_rollout.html
- // [BACKUP_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html
- // [CHATBOT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_chatbot.html
- // [TAG_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html
- // [INSPECTOR_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inspector.html
- // [S3_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_s3.html
- // [RESOURCE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_rcps.html
- // [AISERVICES_OPT_OUT_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html
- // [SECURITYHUB_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_security_hub.html
- // [SERVICE_CONTROL_POLICY]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html
- // [DECLARATIVE_POLICY_EC2]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_declarative.html
- //
- // This member is required.
- Filter types.PolicyType
-
- // ID for the root, organizational unit, or account whose policies you want to
- // list.
- //
- // The [regex pattern] for a target ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Account - A string that consists of exactly 12 digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- TargetId *string
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListPoliciesForTargetOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // The list of policies that match the criteria in the request.
- Policies []types.PolicySummary
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListPoliciesForTargetMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListPoliciesForTarget{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListPoliciesForTarget{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListPoliciesForTarget"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListPoliciesForTargetValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListPoliciesForTarget(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListPoliciesForTargetPaginatorOptions is the paginator options for
-// ListPoliciesForTarget
-type ListPoliciesForTargetPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListPoliciesForTargetPaginator is a paginator for ListPoliciesForTarget
-type ListPoliciesForTargetPaginator struct {
- options ListPoliciesForTargetPaginatorOptions
- client ListPoliciesForTargetAPIClient
- params *ListPoliciesForTargetInput
- nextToken *string
- firstPage bool
-}
-
-// NewListPoliciesForTargetPaginator returns a new ListPoliciesForTargetPaginator
-func NewListPoliciesForTargetPaginator(client ListPoliciesForTargetAPIClient, params *ListPoliciesForTargetInput, optFns ...func(*ListPoliciesForTargetPaginatorOptions)) *ListPoliciesForTargetPaginator {
- if params == nil {
- params = &ListPoliciesForTargetInput{}
- }
-
- options := ListPoliciesForTargetPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListPoliciesForTargetPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListPoliciesForTargetPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListPoliciesForTarget page.
-func (p *ListPoliciesForTargetPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPoliciesForTargetOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListPoliciesForTarget(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListPoliciesForTargetAPIClient is a client that implements the
-// ListPoliciesForTarget operation.
-type ListPoliciesForTargetAPIClient interface {
- ListPoliciesForTarget(context.Context, *ListPoliciesForTargetInput, ...func(*Options)) (*ListPoliciesForTargetOutput, error)
-}
-
-var _ ListPoliciesForTargetAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListPoliciesForTarget(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListPoliciesForTarget",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListRoots.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListRoots.go
deleted file mode 100644
index c88fb085d..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListRoots.go
+++ /dev/null
@@ -1,272 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists the roots that are defined in the current organization.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-//
-// Policy types can be enabled and disabled in roots. This is distinct from
-// whether they're available in the organization. When you enable all features, you
-// make policy types available for use in that organization. Individual policy
-// types can then be enabled and disabled in a root. To see the availability of a
-// policy type in an organization, use DescribeOrganization.
-func (c *Client) ListRoots(ctx context.Context, params *ListRootsInput, optFns ...func(*Options)) (*ListRootsOutput, error) {
- if params == nil {
- params = &ListRootsInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListRoots", params, optFns, c.addOperationListRootsMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListRootsOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListRootsInput struct {
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListRootsOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // A list of roots that are defined in an organization.
- Roots []types.Root
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListRootsMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRoots{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRoots{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListRoots"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoots(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListRootsPaginatorOptions is the paginator options for ListRoots
-type ListRootsPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListRootsPaginator is a paginator for ListRoots
-type ListRootsPaginator struct {
- options ListRootsPaginatorOptions
- client ListRootsAPIClient
- params *ListRootsInput
- nextToken *string
- firstPage bool
-}
-
-// NewListRootsPaginator returns a new ListRootsPaginator
-func NewListRootsPaginator(client ListRootsAPIClient, params *ListRootsInput, optFns ...func(*ListRootsPaginatorOptions)) *ListRootsPaginator {
- if params == nil {
- params = &ListRootsInput{}
- }
-
- options := ListRootsPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListRootsPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListRootsPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListRoots page.
-func (p *ListRootsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRootsOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListRoots(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListRootsAPIClient is a client that implements the ListRoots operation.
-type ListRootsAPIClient interface {
- ListRoots(context.Context, *ListRootsInput, ...func(*Options)) (*ListRootsOutput, error)
-}
-
-var _ ListRootsAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListRoots(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListRoots",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTagsForResource.go
deleted file mode 100644
index 5ba1db0ba..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTagsForResource.go
+++ /dev/null
@@ -1,273 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists tags that are attached to the specified resource.
-//
-// You can attach tags to the following resources in Organizations.
-//
-// - Amazon Web Services account
-//
-// - Organization root
-//
-// - Organizational unit (OU)
-//
-// - Policy (any type)
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) {
- if params == nil {
- params = &ListTagsForResourceInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListTagsForResourceOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListTagsForResourceInput struct {
-
- // The ID of the resource with the tags to list.
- //
- // You can specify any of the following taggable resources.
- //
- // - Amazon Web Services account – specify the account ID number.
- //
- // - Organizational unit – specify the OU ID that begins with ou- and looks
- // similar to: ou-1a2b-34uvwxyz
- //
- // - Root – specify the root ID that begins with r- and looks similar to: r-1a2b
- //
- // - Policy – specify the policy ID that begins with p- andlooks similar to:
- // p-12abcdefg3
- //
- // This member is required.
- ResourceId *string
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListTagsForResourceOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // The tags that are assigned to the resource.
- Tags []types.Tag
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForResource{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListTagsForResourcePaginatorOptions is the paginator options for
-// ListTagsForResource
-type ListTagsForResourcePaginatorOptions struct {
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListTagsForResourcePaginator is a paginator for ListTagsForResource
-type ListTagsForResourcePaginator struct {
- options ListTagsForResourcePaginatorOptions
- client ListTagsForResourceAPIClient
- params *ListTagsForResourceInput
- nextToken *string
- firstPage bool
-}
-
-// NewListTagsForResourcePaginator returns a new ListTagsForResourcePaginator
-func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params *ListTagsForResourceInput, optFns ...func(*ListTagsForResourcePaginatorOptions)) *ListTagsForResourcePaginator {
- if params == nil {
- params = &ListTagsForResourceInput{}
- }
-
- options := ListTagsForResourcePaginatorOptions{}
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListTagsForResourcePaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListTagsForResourcePaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListTagsForResource page.
-func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListTagsForResource(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListTagsForResourceAPIClient is a client that implements the
-// ListTagsForResource operation.
-type ListTagsForResourceAPIClient interface {
- ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error)
-}
-
-var _ ListTagsForResourceAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListTagsForResource",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTargetsForPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTargetsForPolicy.go
deleted file mode 100644
index c84e7b8f2..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_ListTargetsForPolicy.go
+++ /dev/null
@@ -1,283 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Lists all the roots, organizational units (OUs), and accounts that the
-// specified policy is attached to.
-//
-// When calling List* operations, always check the NextToken response parameter
-// value, even if you receive an empty result set. These operations can
-// occasionally return an empty set of results even when more results are
-// available. Continue making requests until NextToken returns null. A null
-// NextToken value indicates that you have retrieved all available results.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) ListTargetsForPolicy(ctx context.Context, params *ListTargetsForPolicyInput, optFns ...func(*Options)) (*ListTargetsForPolicyOutput, error) {
- if params == nil {
- params = &ListTargetsForPolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "ListTargetsForPolicy", params, optFns, c.addOperationListTargetsForPolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*ListTargetsForPolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type ListTargetsForPolicyInput struct {
-
- // ID for the policy whose attachments you want to know.
- //
- // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase
- // or uppercase letters, digits, or the underscore character (_).
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- PolicyId *string
-
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- MaxResults *int32
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more output
- // is available. Set this parameter to the value of the previous call's NextToken
- // response to indicate where the output should continue from.
- NextToken *string
-
- noSmithyDocumentSerde
-}
-
-type ListTargetsForPolicyOutput struct {
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You should
- // repeat this until the NextToken response element comes back as null .
- NextToken *string
-
- // A list of structures, each of which contains details about one of the entities
- // to which the specified policy is attached.
- Targets []types.PolicyTargetSummary
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTargetsForPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTargetsForPolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "ListTargetsForPolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpListTargetsForPolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTargetsForPolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-// ListTargetsForPolicyPaginatorOptions is the paginator options for
-// ListTargetsForPolicy
-type ListTargetsForPolicyPaginatorOptions struct {
- // The maximum number of items to return in the response. If more results exist
- // than the specified MaxResults value, a token is included in the response so
- // that you can retrieve the remaining results.
- Limit int32
-
- // Set to true if pagination should stop if the service returns a pagination token
- // that matches the most recent token provided to the service.
- StopOnDuplicateToken bool
-}
-
-// ListTargetsForPolicyPaginator is a paginator for ListTargetsForPolicy
-type ListTargetsForPolicyPaginator struct {
- options ListTargetsForPolicyPaginatorOptions
- client ListTargetsForPolicyAPIClient
- params *ListTargetsForPolicyInput
- nextToken *string
- firstPage bool
-}
-
-// NewListTargetsForPolicyPaginator returns a new ListTargetsForPolicyPaginator
-func NewListTargetsForPolicyPaginator(client ListTargetsForPolicyAPIClient, params *ListTargetsForPolicyInput, optFns ...func(*ListTargetsForPolicyPaginatorOptions)) *ListTargetsForPolicyPaginator {
- if params == nil {
- params = &ListTargetsForPolicyInput{}
- }
-
- options := ListTargetsForPolicyPaginatorOptions{}
- if params.MaxResults != nil {
- options.Limit = *params.MaxResults
- }
-
- for _, fn := range optFns {
- fn(&options)
- }
-
- return &ListTargetsForPolicyPaginator{
- options: options,
- client: client,
- params: params,
- firstPage: true,
- nextToken: params.NextToken,
- }
-}
-
-// HasMorePages returns a boolean indicating whether more pages are available
-func (p *ListTargetsForPolicyPaginator) HasMorePages() bool {
- return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
-}
-
-// NextPage retrieves the next ListTargetsForPolicy page.
-func (p *ListTargetsForPolicyPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTargetsForPolicyOutput, error) {
- if !p.HasMorePages() {
- return nil, fmt.Errorf("no more pages available")
- }
-
- params := *p.params
- params.NextToken = p.nextToken
-
- var limit *int32
- if p.options.Limit > 0 {
- limit = &p.options.Limit
- }
- params.MaxResults = limit
-
- optFns = append([]func(*Options){
- addIsPaginatorUserAgent,
- }, optFns...)
- result, err := p.client.ListTargetsForPolicy(ctx, ¶ms, optFns...)
- if err != nil {
- return nil, err
- }
- p.firstPage = false
-
- prevToken := p.nextToken
- p.nextToken = result.NextToken
-
- if p.options.StopOnDuplicateToken &&
- prevToken != nil &&
- p.nextToken != nil &&
- *prevToken == *p.nextToken {
- p.nextToken = nil
- }
-
- return result, nil
-}
-
-// ListTargetsForPolicyAPIClient is a client that implements the
-// ListTargetsForPolicy operation.
-type ListTargetsForPolicyAPIClient interface {
- ListTargetsForPolicy(context.Context, *ListTargetsForPolicyInput, ...func(*Options)) (*ListTargetsForPolicyOutput, error)
-}
-
-var _ ListTargetsForPolicyAPIClient = (*Client)(nil)
-
-func newServiceMetadataMiddleware_opListTargetsForPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "ListTargetsForPolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_MoveAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_MoveAccount.go
deleted file mode 100644
index 94f282938..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_MoveAccount.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Moves an account from its current source parent root or organizational unit
-// (OU) to the specified destination parent root or OU.
-//
-// You can only call this operation from the management account.
-func (c *Client) MoveAccount(ctx context.Context, params *MoveAccountInput, optFns ...func(*Options)) (*MoveAccountOutput, error) {
- if params == nil {
- params = &MoveAccountInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "MoveAccount", params, optFns, c.addOperationMoveAccountMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*MoveAccountOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type MoveAccountInput struct {
-
- // ID for the account that you want to move.
- //
- // The [regex pattern] for an account ID string requires exactly 12 digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- AccountId *string
-
- // ID for the root or organizational unit that you want to move the account to.
- //
- // The [regex pattern] for a parent ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- DestinationParentId *string
-
- // ID for the root or organizational unit that you want to move the account from.
- //
- // The [regex pattern] for a parent ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- SourceParentId *string
-
- noSmithyDocumentSerde
-}
-
-type MoveAccountOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationMoveAccountMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpMoveAccount{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpMoveAccount{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "MoveAccount"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpMoveAccountValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMoveAccount(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opMoveAccount(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "MoveAccount",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_PutResourcePolicy.go
deleted file mode 100644
index 47df84d61..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_PutResourcePolicy.go
+++ /dev/null
@@ -1,173 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Creates or updates a resource policy.
-//
-// You can only call this operation from the management account..
-func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) {
- if params == nil {
- params = &PutResourcePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*PutResourcePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type PutResourcePolicyInput struct {
-
- // If provided, the new content for the resource policy. The text must be
- // correctly formatted JSON that complies with the syntax for the resource policy's
- // type. For more information, see [SCP syntax]in the Organizations User Guide.
- //
- // [SCP syntax]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html
- //
- // This member is required.
- Content *string
-
- // A list of tags that you want to attach to the newly created resource policy.
- // For each tag in the list, you must specify both a tag key and a value. You can
- // set the value to an empty string, but you can't set it to null . For more
- // information about tagging, see [Tagging Organizations resources]in the Organizations User Guide.
- //
- // Calls with tags apply to the initial creation of the resource policy, otherwise
- // an exception is thrown. If any one of the tags is not valid or if you exceed the
- // allowed number of tags for the resource policy, then the entire request fails
- // and the resource policy is not created.
- //
- // [Tagging Organizations resources]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html
- Tags []types.Tag
-
- noSmithyDocumentSerde
-}
-
-type PutResourcePolicyOutput struct {
-
- // A structure that contains details about the resource policy.
- ResourcePolicy *types.ResourcePolicy
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutResourcePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutResourcePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "PutResourcePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "PutResourcePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RegisterDelegatedAdministrator.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RegisterDelegatedAdministrator.go
deleted file mode 100644
index f1892cb0d..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RegisterDelegatedAdministrator.go
+++ /dev/null
@@ -1,167 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Enables the specified member account to administer the Organizations features
-// of the specified Amazon Web Services service. It grants read-only access to
-// Organizations service data. The account still requires IAM permissions to access
-// and administer the Amazon Web Services service.
-//
-// You can run this action only for Amazon Web Services services that support this
-// feature. For a current list of services that support it, see the column Supports
-// Delegated Administrator in the table at [Amazon Web Services Services that you can use with Organizations]in the Organizations User Guide.
-//
-// You can only call this operation from the management account.
-//
-// [Amazon Web Services Services that you can use with Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html
-func (c *Client) RegisterDelegatedAdministrator(ctx context.Context, params *RegisterDelegatedAdministratorInput, optFns ...func(*Options)) (*RegisterDelegatedAdministratorOutput, error) {
- if params == nil {
- params = &RegisterDelegatedAdministratorInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "RegisterDelegatedAdministrator", params, optFns, c.addOperationRegisterDelegatedAdministratorMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*RegisterDelegatedAdministratorOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type RegisterDelegatedAdministratorInput struct {
-
- // The account ID number of the member account in the organization to register as
- // a delegated administrator.
- //
- // This member is required.
- AccountId *string
-
- // The service principal of the Amazon Web Services service for which you want to
- // make the member account a delegated administrator.
- //
- // This member is required.
- ServicePrincipal *string
-
- noSmithyDocumentSerde
-}
-
-type RegisterDelegatedAdministratorOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationRegisterDelegatedAdministratorMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpRegisterDelegatedAdministrator{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRegisterDelegatedAdministrator{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterDelegatedAdministrator"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpRegisterDelegatedAdministratorValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterDelegatedAdministrator(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opRegisterDelegatedAdministrator(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "RegisterDelegatedAdministrator",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RemoveAccountFromOrganization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RemoveAccountFromOrganization.go
deleted file mode 100644
index ce12780f0..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_RemoveAccountFromOrganization.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Removes the specified account from the organization.
-//
-// The removed account becomes a standalone account that isn't a member of any
-// organization. It's no longer subject to any policies and is responsible for its
-// own bill payments. The organization's management account is no longer charged
-// for any expenses accrued by the member account after it's removed from the
-// organization.
-//
-// You can only call this operation from the management account. Member accounts
-// can remove themselves with LeaveOrganizationinstead.
-//
-// - You can remove an account from your organization only if the account is
-// configured with the information required to operate as a standalone account.
-// When you create an account in an organization using the Organizations console,
-// API, or CLI commands, the information required of standalone accounts is not
-// automatically collected. For more information, see [Considerations before removing an account from an organization]in the Organizations User
-// Guide.
-//
-// - The account that you want to leave must not be a delegated administrator
-// account for any Amazon Web Services service enabled for your organization. If
-// the account is a delegated administrator, you must first change the delegated
-// administrator account to another account that is remaining in the organization.
-//
-// - After the account leaves the organization, all tags that were attached to
-// the account object in the organization are deleted. Amazon Web Services accounts
-// outside of an organization do not support tags.
-//
-// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html
-func (c *Client) RemoveAccountFromOrganization(ctx context.Context, params *RemoveAccountFromOrganizationInput, optFns ...func(*Options)) (*RemoveAccountFromOrganizationOutput, error) {
- if params == nil {
- params = &RemoveAccountFromOrganizationInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "RemoveAccountFromOrganization", params, optFns, c.addOperationRemoveAccountFromOrganizationMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*RemoveAccountFromOrganizationOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type RemoveAccountFromOrganizationInput struct {
-
- // ID for the member account that you want to remove from the organization.
- //
- // The [regex pattern] for an account ID string requires exactly 12 digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- AccountId *string
-
- noSmithyDocumentSerde
-}
-
-type RemoveAccountFromOrganizationOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationRemoveAccountFromOrganizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpRemoveAccountFromOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRemoveAccountFromOrganization{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveAccountFromOrganization"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpRemoveAccountFromOrganizationValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveAccountFromOrganization(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opRemoveAccountFromOrganization(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "RemoveAccountFromOrganization",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TagResource.go
deleted file mode 100644
index 7ad6325ad..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TagResource.go
+++ /dev/null
@@ -1,186 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Adds one or more tags to the specified resource.
-//
-// Currently, you can attach tags to the following resources in Organizations.
-//
-// - Amazon Web Services account
-//
-// - Organization root
-//
-// - Organizational unit (OU)
-//
-// - Policy (any type)
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) {
- if params == nil {
- params = &TagResourceInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*TagResourceOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type TagResourceInput struct {
-
- // The ID of the resource to add a tag to.
- //
- // You can specify any of the following taggable resources.
- //
- // - Amazon Web Services account – specify the account ID number.
- //
- // - Organizational unit – specify the OU ID that begins with ou- and looks
- // similar to: ou-1a2b-34uvwxyz
- //
- // - Root – specify the root ID that begins with r- and looks similar to: r-1a2b
- //
- // - Policy – specify the policy ID that begins with p- andlooks similar to:
- // p-12abcdefg3
- //
- // This member is required.
- ResourceId *string
-
- // A list of tags to add to the specified resource.
- //
- // For each tag in the list, you must specify both a tag key and a value. The
- // value can be an empty string, but you can't set it to null .
- //
- // If any one of the tags is not valid or if you exceed the maximum allowed number
- // of tags for a resource, then the entire request fails.
- //
- // This member is required.
- Tags []types.Tag
-
- noSmithyDocumentSerde
-}
-
-type TagResourceOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpTagResourceValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "TagResource",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TerminateResponsibilityTransfer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TerminateResponsibilityTransfer.go
deleted file mode 100644
index b0cb2c42b..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_TerminateResponsibilityTransfer.go
+++ /dev/null
@@ -1,160 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "time"
-)
-
-// Ends a transfer. A transfer is an arrangement between two management accounts
-// where one account designates the other with specified responsibilities for their
-// organization.
-func (c *Client) TerminateResponsibilityTransfer(ctx context.Context, params *TerminateResponsibilityTransferInput, optFns ...func(*Options)) (*TerminateResponsibilityTransferOutput, error) {
- if params == nil {
- params = &TerminateResponsibilityTransferInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "TerminateResponsibilityTransfer", params, optFns, c.addOperationTerminateResponsibilityTransferMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*TerminateResponsibilityTransferOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type TerminateResponsibilityTransferInput struct {
-
- // ID for the transfer.
- //
- // This member is required.
- Id *string
-
- // Timestamp when the responsibility transfer is to end.
- EndTimestamp *time.Time
-
- noSmithyDocumentSerde
-}
-
-type TerminateResponsibilityTransferOutput struct {
-
- // A ResponsibilityTransfer object. Contains details for a transfer.
- ResponsibilityTransfer *types.ResponsibilityTransfer
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationTerminateResponsibilityTransferMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpTerminateResponsibilityTransfer{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTerminateResponsibilityTransfer{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "TerminateResponsibilityTransfer"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpTerminateResponsibilityTransferValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateResponsibilityTransfer(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opTerminateResponsibilityTransfer(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "TerminateResponsibilityTransfer",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UntagResource.go
deleted file mode 100644
index c3b71ca73..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UntagResource.go
+++ /dev/null
@@ -1,179 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Removes any tags with the specified keys from the specified resource.
-//
-// You can attach tags to the following resources in Organizations.
-//
-// - Amazon Web Services account
-//
-// - Organization root
-//
-// - Organizational unit (OU)
-//
-// - Policy (any type)
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) {
- if params == nil {
- params = &UntagResourceInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UntagResourceOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UntagResourceInput struct {
-
- // The ID of the resource to remove a tag from.
- //
- // You can specify any of the following taggable resources.
- //
- // - Amazon Web Services account – specify the account ID number.
- //
- // - Organizational unit – specify the OU ID that begins with ou- and looks
- // similar to: ou-1a2b-34uvwxyz
- //
- // - Root – specify the root ID that begins with r- and looks similar to: r-1a2b
- //
- // - Policy – specify the policy ID that begins with p- andlooks similar to:
- // p-12abcdefg3
- //
- // This member is required.
- ResourceId *string
-
- // The list of keys for tags to remove from the specified resource.
- //
- // This member is required.
- TagKeys []string
-
- noSmithyDocumentSerde
-}
-
-type UntagResourceOutput struct {
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpUntagResourceValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UntagResource",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateOrganizationalUnit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateOrganizationalUnit.go
deleted file mode 100644
index 2ffea2535..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateOrganizationalUnit.go
+++ /dev/null
@@ -1,174 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Renames the specified organizational unit (OU). The ID and ARN don't change.
-// The child OUs and accounts remain in place, and any attached policies of the OU
-// remain attached.
-//
-// You can only call this operation from the management account.
-func (c *Client) UpdateOrganizationalUnit(ctx context.Context, params *UpdateOrganizationalUnitInput, optFns ...func(*Options)) (*UpdateOrganizationalUnitOutput, error) {
- if params == nil {
- params = &UpdateOrganizationalUnitInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateOrganizationalUnit", params, optFns, c.addOperationUpdateOrganizationalUnitMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateOrganizationalUnitOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateOrganizationalUnitInput struct {
-
- // ID for the OU that you want to rename. You can get the ID from the ListOrganizationalUnitsForParent operation.
- //
- // The [regex pattern] for an organizational unit ID string requires "ou-" followed by from 4 to
- // 32 lowercase letters or digits (the ID of the root that contains the OU). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- OrganizationalUnitId *string
-
- // The new name that you want to assign to the OU.
- //
- // The [regex pattern] that is used to validate this parameter is a string of any of the
- // characters in the ASCII character range.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Name *string
-
- noSmithyDocumentSerde
-}
-
-type UpdateOrganizationalUnitOutput struct {
-
- // A structure that contains the details about the specified OU, including its new
- // name.
- OrganizationalUnit *types.OrganizationalUnit
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateOrganizationalUnitMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateOrganizationalUnit{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateOrganizationalUnit{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateOrganizationalUnit"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateOrganizationalUnitValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOrganizationalUnit(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opUpdateOrganizationalUnit(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateOrganizationalUnit",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdatePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdatePolicy.go
deleted file mode 100644
index 377c45a20..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdatePolicy.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates an existing policy with a new name, description, or content. If you
-// don't supply any parameter, that value remains unchanged. You can't change a
-// policy's type.
-//
-// You can only call this operation from the management account or a member
-// account that is a delegated administrator.
-func (c *Client) UpdatePolicy(ctx context.Context, params *UpdatePolicyInput, optFns ...func(*Options)) (*UpdatePolicyOutput, error) {
- if params == nil {
- params = &UpdatePolicyInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdatePolicy", params, optFns, c.addOperationUpdatePolicyMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdatePolicyOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdatePolicyInput struct {
-
- // ID for the policy that you want to update.
- //
- // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase
- // or uppercase letters, digits, or the underscore character (_).
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- PolicyId *string
-
- // If provided, the new content for the policy. The text must be correctly
- // formatted JSON that complies with the syntax for the policy's type. For more
- // information, see [SCP syntax]in the Organizations User Guide.
- //
- // The maximum size of a policy document depends on the policy's type. For more
- // information, see [Maximum and minimum values]in the Organizations User Guide.
- //
- // [Maximum and minimum values]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html#min-max-values
- // [SCP syntax]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html
- Content *string
-
- // If provided, the new description for the policy.
- Description *string
-
- // If provided, the new name for the policy.
- //
- // The [regex pattern] that is used to validate this parameter is a string of any of the
- // characters in the ASCII character range.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Name *string
-
- noSmithyDocumentSerde
-}
-
-type UpdatePolicyOutput struct {
-
- // A structure that contains details about the updated policy, showing the
- // requested changes.
- Policy *types.Policy
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdatePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdatePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdatePolicy{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdatePolicy"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpUpdatePolicyValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePolicy(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opUpdatePolicy(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdatePolicy",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateResponsibilityTransfer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateResponsibilityTransfer.go
deleted file mode 100644
index 012d01b04..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/api_op_UpdateResponsibilityTransfer.go
+++ /dev/null
@@ -1,165 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- "github.com/aws/smithy-go/middleware"
- smithyhttp "github.com/aws/smithy-go/transport/http"
-)
-
-// Updates a transfer. A transfer is the arrangement between two management
-// accounts where one account designates the other with specified responsibilities
-// for their organization.
-//
-// You can update the name assigned to a transfer.
-func (c *Client) UpdateResponsibilityTransfer(ctx context.Context, params *UpdateResponsibilityTransferInput, optFns ...func(*Options)) (*UpdateResponsibilityTransferOutput, error) {
- if params == nil {
- params = &UpdateResponsibilityTransferInput{}
- }
-
- result, metadata, err := c.invokeOperation(ctx, "UpdateResponsibilityTransfer", params, optFns, c.addOperationUpdateResponsibilityTransferMiddlewares)
- if err != nil {
- return nil, err
- }
-
- out := result.(*UpdateResponsibilityTransferOutput)
- out.ResultMetadata = metadata
- return out, nil
-}
-
-type UpdateResponsibilityTransferInput struct {
-
- // ID for the transfer.
- //
- // This member is required.
- Id *string
-
- // New name you want to assign to the transfer.
- //
- // This member is required.
- Name *string
-
- noSmithyDocumentSerde
-}
-
-type UpdateResponsibilityTransferOutput struct {
-
- // Contains details for a transfer. A transfer is the arrangement between two
- // management accounts where one account designates the other with specified
- // responsibilities for their organization.
- ResponsibilityTransfer *types.ResponsibilityTransfer
-
- // Metadata pertaining to the operation's result.
- ResultMetadata middleware.Metadata
-
- noSmithyDocumentSerde
-}
-
-func (c *Client) addOperationUpdateResponsibilityTransferMiddlewares(stack *middleware.Stack, options Options) (err error) {
- if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
- return err
- }
- err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateResponsibilityTransfer{}, middleware.After)
- if err != nil {
- return err
- }
- err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateResponsibilityTransfer{}, middleware.After)
- if err != nil {
- return err
- }
- if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateResponsibilityTransfer"); err != nil {
- return fmt.Errorf("add protocol finalizers: %v", err)
- }
-
- if err = addlegacyEndpointContextSetter(stack, options); err != nil {
- return err
- }
- if err = addSetLoggerMiddleware(stack, options); err != nil {
- return err
- }
- if err = addClientRequestID(stack); err != nil {
- return err
- }
- if err = addComputeContentLength(stack); err != nil {
- return err
- }
- if err = addResolveEndpointMiddleware(stack, options); err != nil {
- return err
- }
- if err = addComputePayloadSHA256(stack); err != nil {
- return err
- }
- if err = addRetry(stack, options, c); err != nil {
- return err
- }
- if err = addRawResponseToMetadata(stack); err != nil {
- return err
- }
- if err = addRecordResponseTiming(stack); err != nil {
- return err
- }
- if err = addSpanRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addClientUserAgent(stack, options); err != nil {
- return err
- }
- if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
- return err
- }
- if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
- return err
- }
- if err = addUserAgentRetryMode(stack, options); err != nil {
- return err
- }
- if err = addCredentialSource(stack, options); err != nil {
- return err
- }
- if err = addOpUpdateResponsibilityTransferValidationMiddleware(stack); err != nil {
- return err
- }
- if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateResponsibilityTransfer(options.Region), middleware.Before); err != nil {
- return err
- }
- if err = addRecursionDetection(stack); err != nil {
- return err
- }
- if err = addRequestIDRetrieverMiddleware(stack); err != nil {
- return err
- }
- if err = addResponseErrorMiddleware(stack); err != nil {
- return err
- }
- if err = addRequestResponseLogging(stack, options); err != nil {
- return err
- }
- if err = addDisableHTTPSMiddleware(stack, options); err != nil {
- return err
- }
- if err = addInterceptBeforeRetryLoop(stack, options); err != nil {
- return err
- }
- if err = addInterceptAttempt(stack, options); err != nil {
- return err
- }
- if err = addInterceptors(stack, options); err != nil {
- return err
- }
- return nil
-}
-
-func newServiceMetadataMiddleware_opUpdateResponsibilityTransfer(region string) *awsmiddleware.RegisterServiceMetadata {
- return &awsmiddleware.RegisterServiceMetadata{
- Region: region,
- ServiceID: ServiceID,
- OperationName: "UpdateResponsibilityTransfer",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/auth.go
deleted file mode 100644
index 7f502d148..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/auth.go
+++ /dev/null
@@ -1,345 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- smithy "github.com/aws/smithy-go"
- smithyauth "github.com/aws/smithy-go/auth"
- "github.com/aws/smithy-go/metrics"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "slices"
- "strings"
-)
-
-func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) error {
- params.Region = options.Region
- return nil
-}
-
-type setLegacyContextSigningOptionsMiddleware struct {
-}
-
-func (*setLegacyContextSigningOptionsMiddleware) ID() string {
- return "setLegacyContextSigningOptions"
-}
-
-func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- rscheme := getResolvedAuthScheme(ctx)
- schemeID := rscheme.Scheme.SchemeID()
-
- if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
- if schemeID == "aws.auth#sigv4" {
- smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
- } else if schemeID == "aws.auth#sigv4a" {
- smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
- }
- }
-
- if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
- if schemeID == "aws.auth#sigv4" {
- smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
- } else if schemeID == "aws.auth#sigv4a" {
- smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
- }
- }
-
- return next.HandleFinalize(ctx, in)
-}
-
-func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
- return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
-}
-
-type withAnonymous struct {
- resolver AuthSchemeResolver
-}
-
-var _ AuthSchemeResolver = (*withAnonymous)(nil)
-
-func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
- opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
- if err != nil {
- return nil, err
- }
-
- opts = append(opts, &smithyauth.Option{
- SchemeID: smithyauth.SchemeIDAnonymous,
- })
- return opts, nil
-}
-
-func wrapWithAnonymousAuth(options *Options) {
- if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
- return
- }
-
- options.AuthSchemeResolver = &withAnonymous{
- resolver: options.AuthSchemeResolver,
- }
-}
-
-// AuthResolverParameters contains the set of inputs necessary for auth scheme
-// resolution.
-type AuthResolverParameters struct {
- // The name of the operation being invoked.
- Operation string
-
- // The region in which the operation is being invoked.
- Region string
-}
-
-func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) (*AuthResolverParameters, error) {
- params := &AuthResolverParameters{
- Operation: operation,
- }
-
- if err := bindAuthParamsRegion(ctx, params, input, options); err != nil {
- return nil, err
- }
-
- return params, nil
-}
-
-// AuthSchemeResolver returns a set of possible authentication options for an
-// operation.
-type AuthSchemeResolver interface {
- ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
-}
-
-type defaultAuthSchemeResolver struct{}
-
-var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
-
-func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
- if overrides, ok := operationAuthOptions[params.Operation]; ok {
- return overrides(params), nil
- }
- return serviceAuthOptions(params), nil
-}
-
-var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{}
-
-func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
- return []*smithyauth.Option{
- {
- SchemeID: smithyauth.SchemeIDSigV4,
- SignerProperties: func() smithy.Properties {
- var props smithy.Properties
- smithyhttp.SetSigV4SigningName(&props, "organizations")
- smithyhttp.SetSigV4SigningRegion(&props, params.Region)
- return props
- }(),
- },
- }
-}
-
-type resolveAuthSchemeMiddleware struct {
- operation string
- options Options
-}
-
-func (*resolveAuthSchemeMiddleware) ID() string {
- return "ResolveAuthScheme"
-}
-
-func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "ResolveAuthScheme")
- defer span.End()
-
- params, err := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options)
- if err != nil {
- return out, metadata, fmt.Errorf("bind auth scheme params: %w", err)
- }
- options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
- if err != nil {
- return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
- }
-
- scheme, ok := m.selectScheme(options)
- if !ok {
- return out, metadata, fmt.Errorf("could not select an auth scheme")
- }
-
- ctx = setResolvedAuthScheme(ctx, scheme)
-
- span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID())
- span.End()
- return next.HandleFinalize(ctx, in)
-}
-
-func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
- sorted := sortAuthOptions(options, m.options.AuthSchemePreference)
- for _, option := range sorted {
- if option.SchemeID == smithyauth.SchemeIDAnonymous {
- return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
- }
-
- for _, scheme := range m.options.AuthSchemes {
- if scheme.SchemeID() != option.SchemeID {
- continue
- }
-
- if scheme.IdentityResolver(m.options) != nil {
- return newResolvedAuthScheme(scheme, option), true
- }
- }
- }
-
- return nil, false
-}
-
-func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option {
- byPriority := make([]*smithyauth.Option, 0, len(options))
- for _, prefName := range preferred {
- for _, option := range options {
- optName := option.SchemeID
- if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 {
- optName = parts[1]
- }
- if prefName == optName {
- byPriority = append(byPriority, option)
- }
- }
- }
- for _, option := range options {
- if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool {
- return o.SchemeID == option.SchemeID
- }) {
- byPriority = append(byPriority, option)
- }
- }
- return byPriority
-}
-
-type resolvedAuthSchemeKey struct{}
-
-type resolvedAuthScheme struct {
- Scheme smithyhttp.AuthScheme
- IdentityProperties smithy.Properties
- SignerProperties smithy.Properties
-}
-
-func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
- return &resolvedAuthScheme{
- Scheme: scheme,
- IdentityProperties: option.IdentityProperties,
- SignerProperties: option.SignerProperties,
- }
-}
-
-func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
- return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
-}
-
-func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
- v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
- return v
-}
-
-type getIdentityMiddleware struct {
- options Options
-}
-
-func (*getIdentityMiddleware) ID() string {
- return "GetIdentity"
-}
-
-func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- innerCtx, span := tracing.StartSpan(ctx, "GetIdentity")
- defer span.End()
-
- rscheme := getResolvedAuthScheme(innerCtx)
- if rscheme == nil {
- return out, metadata, fmt.Errorf("no resolved auth scheme")
- }
-
- resolver := rscheme.Scheme.IdentityResolver(m.options)
- if resolver == nil {
- return out, metadata, fmt.Errorf("no identity resolver")
- }
-
- identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration",
- func() (smithyauth.Identity, error) {
- return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties)
- },
- func(o *metrics.RecordMetricOptions) {
- o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID())
- })
- if err != nil {
- return out, metadata, fmt.Errorf("get identity: %w", err)
- }
-
- ctx = setIdentity(ctx, identity)
-
- span.End()
- return next.HandleFinalize(ctx, in)
-}
-
-type identityKey struct{}
-
-func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
- return middleware.WithStackValue(ctx, identityKey{}, identity)
-}
-
-func getIdentity(ctx context.Context) smithyauth.Identity {
- v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
- return v
-}
-
-type signRequestMiddleware struct {
- options Options
-}
-
-func (*signRequestMiddleware) ID() string {
- return "Signing"
-}
-
-func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "SignRequest")
- defer span.End()
-
- req, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
- }
-
- rscheme := getResolvedAuthScheme(ctx)
- if rscheme == nil {
- return out, metadata, fmt.Errorf("no resolved auth scheme")
- }
-
- identity := getIdentity(ctx)
- if identity == nil {
- return out, metadata, fmt.Errorf("no identity")
- }
-
- signer := rscheme.Scheme.Signer()
- if signer == nil {
- return out, metadata, fmt.Errorf("no signer")
- }
-
- _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) {
- return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties)
- }, func(o *metrics.RecordMetricOptions) {
- o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID())
- })
- if err != nil {
- return out, metadata, fmt.Errorf("sign request: %w", err)
- }
-
- span.End()
- return next.HandleFinalize(ctx, in)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/deserializers.go
deleted file mode 100644
index a29ae3273..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/deserializers.go
+++ /dev/null
@@ -1,16153 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "bytes"
- "context"
- "encoding/json"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- smithy "github.com/aws/smithy-go"
- smithyio "github.com/aws/smithy-go/io"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/ptr"
- smithytime "github.com/aws/smithy-go/time"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "io"
- "io/ioutil"
- "strings"
-)
-
-type awsAwsjson11_deserializeOpAcceptHandshake struct {
-}
-
-func (*awsAwsjson11_deserializeOpAcceptHandshake) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpAcceptHandshake) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorAcceptHandshake(response, &metadata)
- }
- output := &AcceptHandshakeOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentAcceptHandshakeOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorAcceptHandshake(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedForDependencyException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedForDependencyException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("HandshakeAlreadyInStateException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeAlreadyInStateException(response, errorBody)
-
- case strings.EqualFold("HandshakeConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("HandshakeNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidHandshakeTransitionException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidHandshakeTransitionException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("MasterCannotLeaveOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorMasterCannotLeaveOrganizationException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpAttachPolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpAttachPolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpAttachPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorAttachPolicy(response, &metadata)
- }
- output := &AttachPolicyOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorAttachPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("DuplicatePolicyAttachmentException", errorCode):
- return awsAwsjson11_deserializeErrorDuplicatePolicyAttachmentException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("PolicyChangesInProgressException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyChangesInProgressException(response, errorBody)
-
- case strings.EqualFold("PolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("PolicyTypeNotEnabledException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyTypeNotEnabledException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TargetNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorTargetNotFoundException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpCancelHandshake struct {
-}
-
-func (*awsAwsjson11_deserializeOpCancelHandshake) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpCancelHandshake) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorCancelHandshake(response, &metadata)
- }
- output := &CancelHandshakeOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentCancelHandshakeOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorCancelHandshake(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("HandshakeAlreadyInStateException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeAlreadyInStateException(response, errorBody)
-
- case strings.EqualFold("HandshakeNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidHandshakeTransitionException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidHandshakeTransitionException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpCloseAccount struct {
-}
-
-func (*awsAwsjson11_deserializeOpCloseAccount) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpCloseAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorCloseAccount(response, &metadata)
- }
- output := &CloseAccountOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorCloseAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountAlreadyClosedException", errorCode):
- return awsAwsjson11_deserializeErrorAccountAlreadyClosedException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConflictException", errorCode):
- return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpCreateAccount struct {
-}
-
-func (*awsAwsjson11_deserializeOpCreateAccount) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpCreateAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorCreateAccount(response, &metadata)
- }
- output := &CreateAccountOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentCreateAccountOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorCreateAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("FinalizingOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorFinalizingOrganizationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpCreateGovCloudAccount struct {
-}
-
-func (*awsAwsjson11_deserializeOpCreateGovCloudAccount) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpCreateGovCloudAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorCreateGovCloudAccount(response, &metadata)
- }
- output := &CreateGovCloudAccountOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentCreateGovCloudAccountOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorCreateGovCloudAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("FinalizingOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorFinalizingOrganizationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpCreateOrganization struct {
-}
-
-func (*awsAwsjson11_deserializeOpCreateOrganization) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpCreateOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorCreateOrganization(response, &metadata)
- }
- output := &CreateOrganizationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentCreateOrganizationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorCreateOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedForDependencyException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedForDependencyException(response, errorBody)
-
- case strings.EqualFold("AlreadyInOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorAlreadyInOrganizationException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpCreateOrganizationalUnit struct {
-}
-
-func (*awsAwsjson11_deserializeOpCreateOrganizationalUnit) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpCreateOrganizationalUnit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorCreateOrganizationalUnit(response, &metadata)
- }
- output := &CreateOrganizationalUnitOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentCreateOrganizationalUnitOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorCreateOrganizationalUnit(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("DuplicateOrganizationalUnitException", errorCode):
- return awsAwsjson11_deserializeErrorDuplicateOrganizationalUnitException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ParentNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorParentNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpCreatePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpCreatePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpCreatePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorCreatePolicy(response, &metadata)
- }
- output := &CreatePolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentCreatePolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorCreatePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("DuplicatePolicyException", errorCode):
- return awsAwsjson11_deserializeErrorDuplicatePolicyException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("MalformedPolicyDocumentException", errorCode):
- return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
-
- case strings.EqualFold("PolicyTypeNotAvailableForOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyTypeNotAvailableForOrganizationException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDeclineHandshake struct {
-}
-
-func (*awsAwsjson11_deserializeOpDeclineHandshake) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDeclineHandshake) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDeclineHandshake(response, &metadata)
- }
- output := &DeclineHandshakeOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDeclineHandshakeOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDeclineHandshake(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("HandshakeAlreadyInStateException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeAlreadyInStateException(response, errorBody)
-
- case strings.EqualFold("HandshakeNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidHandshakeTransitionException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidHandshakeTransitionException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDeleteOrganization struct {
-}
-
-func (*awsAwsjson11_deserializeOpDeleteOrganization) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDeleteOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDeleteOrganization(response, &metadata)
- }
- output := &DeleteOrganizationOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDeleteOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("OrganizationNotEmptyException", errorCode):
- return awsAwsjson11_deserializeErrorOrganizationNotEmptyException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDeleteOrganizationalUnit struct {
-}
-
-func (*awsAwsjson11_deserializeOpDeleteOrganizationalUnit) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDeleteOrganizationalUnit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDeleteOrganizationalUnit(response, &metadata)
- }
- output := &DeleteOrganizationalUnitOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDeleteOrganizationalUnit(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("OrganizationalUnitNotEmptyException", errorCode):
- return awsAwsjson11_deserializeErrorOrganizationalUnitNotEmptyException(response, errorBody)
-
- case strings.EqualFold("OrganizationalUnitNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorOrganizationalUnitNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDeletePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpDeletePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDeletePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDeletePolicy(response, &metadata)
- }
- output := &DeletePolicyOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDeletePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("PolicyInUseException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyInUseException(response, errorBody)
-
- case strings.EqualFold("PolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDeleteResourcePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpDeleteResourcePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response, &metadata)
- }
- output := &DeleteResourcePolicyOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("ResourcePolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorResourcePolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDeregisterDelegatedAdministrator struct {
-}
-
-func (*awsAwsjson11_deserializeOpDeregisterDelegatedAdministrator) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDeregisterDelegatedAdministrator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDeregisterDelegatedAdministrator(response, &metadata)
- }
- output := &DeregisterDelegatedAdministratorOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDeregisterDelegatedAdministrator(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("AccountNotRegisteredException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotRegisteredException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribeAccount struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribeAccount) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribeAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribeAccount(response, &metadata)
- }
- output := &DescribeAccountOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribeAccountOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribeAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribeCreateAccountStatus struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribeCreateAccountStatus) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribeCreateAccountStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCreateAccountStatus(response, &metadata)
- }
- output := &DescribeCreateAccountStatusOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribeCreateAccountStatusOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribeCreateAccountStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("CreateAccountStatusNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorCreateAccountStatusNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribeEffectivePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribeEffectivePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribeEffectivePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribeEffectivePolicy(response, &metadata)
- }
- output := &DescribeEffectivePolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribeEffectivePolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribeEffectivePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("EffectivePolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorEffectivePolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TargetNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorTargetNotFoundException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribeHandshake struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribeHandshake) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribeHandshake) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribeHandshake(response, &metadata)
- }
- output := &DescribeHandshakeOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribeHandshakeOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribeHandshake(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("HandshakeNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribeOrganization struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribeOrganization) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribeOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribeOrganization(response, &metadata)
- }
- output := &DescribeOrganizationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribeOrganizationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribeOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribeOrganizationalUnit struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribeOrganizationalUnit) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribeOrganizationalUnit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribeOrganizationalUnit(response, &metadata)
- }
- output := &DescribeOrganizationalUnitOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribeOrganizationalUnitOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribeOrganizationalUnit(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("OrganizationalUnitNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorOrganizationalUnitNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribePolicy(response, &metadata)
- }
- output := &DescribePolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribePolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("PolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribeResourcePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribeResourcePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribeResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResourcePolicy(response, &metadata)
- }
- output := &DescribeResourcePolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribeResourcePolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribeResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("ResourcePolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorResourcePolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDescribeResponsibilityTransfer struct {
-}
-
-func (*awsAwsjson11_deserializeOpDescribeResponsibilityTransfer) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDescribeResponsibilityTransfer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDescribeResponsibilityTransfer(response, &metadata)
- }
- output := &DescribeResponsibilityTransferOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDescribeResponsibilityTransferOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDescribeResponsibilityTransfer(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ResponsibilityTransferNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorResponsibilityTransferNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDetachPolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpDetachPolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDetachPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDetachPolicy(response, &metadata)
- }
- output := &DetachPolicyOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDetachPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("PolicyChangesInProgressException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyChangesInProgressException(response, errorBody)
-
- case strings.EqualFold("PolicyNotAttachedException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyNotAttachedException(response, errorBody)
-
- case strings.EqualFold("PolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TargetNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorTargetNotFoundException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDisableAWSServiceAccess struct {
-}
-
-func (*awsAwsjson11_deserializeOpDisableAWSServiceAccess) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDisableAWSServiceAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDisableAWSServiceAccess(response, &metadata)
- }
- output := &DisableAWSServiceAccessOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDisableAWSServiceAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpDisablePolicyType struct {
-}
-
-func (*awsAwsjson11_deserializeOpDisablePolicyType) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpDisablePolicyType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorDisablePolicyType(response, &metadata)
- }
- output := &DisablePolicyTypeOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentDisablePolicyTypeOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorDisablePolicyType(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("PolicyChangesInProgressException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyChangesInProgressException(response, errorBody)
-
- case strings.EqualFold("PolicyTypeNotEnabledException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyTypeNotEnabledException(response, errorBody)
-
- case strings.EqualFold("RootNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorRootNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpEnableAllFeatures struct {
-}
-
-func (*awsAwsjson11_deserializeOpEnableAllFeatures) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpEnableAllFeatures) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorEnableAllFeatures(response, &metadata)
- }
- output := &EnableAllFeaturesOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentEnableAllFeaturesOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorEnableAllFeatures(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("HandshakeConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpEnableAWSServiceAccess struct {
-}
-
-func (*awsAwsjson11_deserializeOpEnableAWSServiceAccess) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpEnableAWSServiceAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorEnableAWSServiceAccess(response, &metadata)
- }
- output := &EnableAWSServiceAccessOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorEnableAWSServiceAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpEnablePolicyType struct {
-}
-
-func (*awsAwsjson11_deserializeOpEnablePolicyType) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpEnablePolicyType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorEnablePolicyType(response, &metadata)
- }
- output := &EnablePolicyTypeOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentEnablePolicyTypeOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorEnablePolicyType(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("PolicyChangesInProgressException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyChangesInProgressException(response, errorBody)
-
- case strings.EqualFold("PolicyTypeAlreadyEnabledException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyTypeAlreadyEnabledException(response, errorBody)
-
- case strings.EqualFold("PolicyTypeNotAvailableForOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyTypeNotAvailableForOrganizationException(response, errorBody)
-
- case strings.EqualFold("RootNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorRootNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpInviteAccountToOrganization struct {
-}
-
-func (*awsAwsjson11_deserializeOpInviteAccountToOrganization) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpInviteAccountToOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorInviteAccountToOrganization(response, &metadata)
- }
- output := &InviteAccountToOrganizationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentInviteAccountToOrganizationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorInviteAccountToOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountOwnerNotVerifiedException", errorCode):
- return awsAwsjson11_deserializeErrorAccountOwnerNotVerifiedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("DuplicateHandshakeException", errorCode):
- return awsAwsjson11_deserializeErrorDuplicateHandshakeException(response, errorBody)
-
- case strings.EqualFold("FinalizingOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorFinalizingOrganizationException(response, errorBody)
-
- case strings.EqualFold("HandshakeConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpInviteOrganizationToTransferResponsibility struct {
-}
-
-func (*awsAwsjson11_deserializeOpInviteOrganizationToTransferResponsibility) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpInviteOrganizationToTransferResponsibility) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorInviteOrganizationToTransferResponsibility(response, &metadata)
- }
- output := &InviteOrganizationToTransferResponsibilityOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentInviteOrganizationToTransferResponsibilityOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorInviteOrganizationToTransferResponsibility(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("DuplicateHandshakeException", errorCode):
- return awsAwsjson11_deserializeErrorDuplicateHandshakeException(response, errorBody)
-
- case strings.EqualFold("HandshakeConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorHandshakeConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpLeaveOrganization struct {
-}
-
-func (*awsAwsjson11_deserializeOpLeaveOrganization) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpLeaveOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorLeaveOrganization(response, &metadata)
- }
- output := &LeaveOrganizationOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorLeaveOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("MasterCannotLeaveOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorMasterCannotLeaveOrganizationException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListAccounts struct {
-}
-
-func (*awsAwsjson11_deserializeOpListAccounts) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListAccounts(response, &metadata)
- }
- output := &ListAccountsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListAccountsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListAccountsForParent struct {
-}
-
-func (*awsAwsjson11_deserializeOpListAccountsForParent) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListAccountsForParent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListAccountsForParent(response, &metadata)
- }
- output := &ListAccountsForParentOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListAccountsForParentOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListAccountsForParent(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ParentNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorParentNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListAccountsWithInvalidEffectivePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpListAccountsWithInvalidEffectivePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListAccountsWithInvalidEffectivePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListAccountsWithInvalidEffectivePolicy(response, &metadata)
- }
- output := &ListAccountsWithInvalidEffectivePolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListAccountsWithInvalidEffectivePolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListAccountsWithInvalidEffectivePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("EffectivePolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorEffectivePolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListAWSServiceAccessForOrganization struct {
-}
-
-func (*awsAwsjson11_deserializeOpListAWSServiceAccessForOrganization) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListAWSServiceAccessForOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListAWSServiceAccessForOrganization(response, &metadata)
- }
- output := &ListAWSServiceAccessForOrganizationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListAWSServiceAccessForOrganizationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListAWSServiceAccessForOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListChildren struct {
-}
-
-func (*awsAwsjson11_deserializeOpListChildren) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListChildren) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListChildren(response, &metadata)
- }
- output := &ListChildrenOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListChildrenOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListChildren(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ParentNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorParentNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListCreateAccountStatus struct {
-}
-
-func (*awsAwsjson11_deserializeOpListCreateAccountStatus) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListCreateAccountStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListCreateAccountStatus(response, &metadata)
- }
- output := &ListCreateAccountStatusOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListCreateAccountStatusOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListCreateAccountStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListDelegatedAdministrators struct {
-}
-
-func (*awsAwsjson11_deserializeOpListDelegatedAdministrators) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListDelegatedAdministrators) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListDelegatedAdministrators(response, &metadata)
- }
- output := &ListDelegatedAdministratorsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListDelegatedAdministratorsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListDelegatedAdministrators(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListDelegatedServicesForAccount struct {
-}
-
-func (*awsAwsjson11_deserializeOpListDelegatedServicesForAccount) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListDelegatedServicesForAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListDelegatedServicesForAccount(response, &metadata)
- }
- output := &ListDelegatedServicesForAccountOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListDelegatedServicesForAccountOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListDelegatedServicesForAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("AccountNotRegisteredException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotRegisteredException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListEffectivePolicyValidationErrors struct {
-}
-
-func (*awsAwsjson11_deserializeOpListEffectivePolicyValidationErrors) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListEffectivePolicyValidationErrors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListEffectivePolicyValidationErrors(response, &metadata)
- }
- output := &ListEffectivePolicyValidationErrorsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListEffectivePolicyValidationErrorsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListEffectivePolicyValidationErrors(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("EffectivePolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorEffectivePolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListHandshakesForAccount struct {
-}
-
-func (*awsAwsjson11_deserializeOpListHandshakesForAccount) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListHandshakesForAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListHandshakesForAccount(response, &metadata)
- }
- output := &ListHandshakesForAccountOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListHandshakesForAccountOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListHandshakesForAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListHandshakesForOrganization struct {
-}
-
-func (*awsAwsjson11_deserializeOpListHandshakesForOrganization) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListHandshakesForOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListHandshakesForOrganization(response, &metadata)
- }
- output := &ListHandshakesForOrganizationOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListHandshakesForOrganizationOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListHandshakesForOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListInboundResponsibilityTransfers struct {
-}
-
-func (*awsAwsjson11_deserializeOpListInboundResponsibilityTransfers) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListInboundResponsibilityTransfers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListInboundResponsibilityTransfers(response, &metadata)
- }
- output := &ListInboundResponsibilityTransfersOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListInboundResponsibilityTransfersOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListInboundResponsibilityTransfers(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ResponsibilityTransferNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorResponsibilityTransferNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListOrganizationalUnitsForParent struct {
-}
-
-func (*awsAwsjson11_deserializeOpListOrganizationalUnitsForParent) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListOrganizationalUnitsForParent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListOrganizationalUnitsForParent(response, &metadata)
- }
- output := &ListOrganizationalUnitsForParentOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListOrganizationalUnitsForParentOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListOrganizationalUnitsForParent(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ParentNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorParentNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListOutboundResponsibilityTransfers struct {
-}
-
-func (*awsAwsjson11_deserializeOpListOutboundResponsibilityTransfers) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListOutboundResponsibilityTransfers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListOutboundResponsibilityTransfers(response, &metadata)
- }
- output := &ListOutboundResponsibilityTransfersOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListOutboundResponsibilityTransfersOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListOutboundResponsibilityTransfers(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListParents struct {
-}
-
-func (*awsAwsjson11_deserializeOpListParents) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListParents) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListParents(response, &metadata)
- }
- output := &ListParentsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListParentsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListParents(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ChildNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorChildNotFoundException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListPolicies struct {
-}
-
-func (*awsAwsjson11_deserializeOpListPolicies) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListPolicies(response, &metadata)
- }
- output := &ListPoliciesOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListPoliciesOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListPoliciesForTarget struct {
-}
-
-func (*awsAwsjson11_deserializeOpListPoliciesForTarget) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListPoliciesForTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListPoliciesForTarget(response, &metadata)
- }
- output := &ListPoliciesForTargetOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListPoliciesForTargetOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListPoliciesForTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TargetNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorTargetNotFoundException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListRoots struct {
-}
-
-func (*awsAwsjson11_deserializeOpListRoots) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListRoots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListRoots(response, &metadata)
- }
- output := &ListRootsOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListRootsOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListRoots(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListTagsForResource struct {
-}
-
-func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata)
- }
- output := &ListTagsForResourceOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TargetNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorTargetNotFoundException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpListTargetsForPolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpListTargetsForPolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpListTargetsForPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorListTargetsForPolicy(response, &metadata)
- }
- output := &ListTargetsForPolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentListTargetsForPolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorListTargetsForPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("PolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpMoveAccount struct {
-}
-
-func (*awsAwsjson11_deserializeOpMoveAccount) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpMoveAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorMoveAccount(response, &metadata)
- }
- output := &MoveAccountOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorMoveAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("DestinationParentNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorDestinationParentNotFoundException(response, errorBody)
-
- case strings.EqualFold("DuplicateAccountException", errorCode):
- return awsAwsjson11_deserializeErrorDuplicateAccountException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("SourceParentNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorSourceParentNotFoundException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpPutResourcePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata)
- }
- output := &PutResourcePolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpRegisterDelegatedAdministrator struct {
-}
-
-func (*awsAwsjson11_deserializeOpRegisterDelegatedAdministrator) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpRegisterDelegatedAdministrator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorRegisterDelegatedAdministrator(response, &metadata)
- }
- output := &RegisterDelegatedAdministratorOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorRegisterDelegatedAdministrator(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountAlreadyRegisteredException", errorCode):
- return awsAwsjson11_deserializeErrorAccountAlreadyRegisteredException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpRemoveAccountFromOrganization struct {
-}
-
-func (*awsAwsjson11_deserializeOpRemoveAccountFromOrganization) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpRemoveAccountFromOrganization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorRemoveAccountFromOrganization(response, &metadata)
- }
- output := &RemoveAccountFromOrganizationOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorRemoveAccountFromOrganization(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("AccountNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorAccountNotFoundException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("MasterCannotLeaveOrganizationException", errorCode):
- return awsAwsjson11_deserializeErrorMasterCannotLeaveOrganizationException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpTagResource struct {
-}
-
-func (*awsAwsjson11_deserializeOpTagResource) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata)
- }
- output := &TagResourceOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TargetNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorTargetNotFoundException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpTerminateResponsibilityTransfer struct {
-}
-
-func (*awsAwsjson11_deserializeOpTerminateResponsibilityTransfer) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpTerminateResponsibilityTransfer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorTerminateResponsibilityTransfer(response, &metadata)
- }
- output := &TerminateResponsibilityTransferOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentTerminateResponsibilityTransferOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorTerminateResponsibilityTransfer(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("InvalidResponsibilityTransferTransitionException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidResponsibilityTransferTransitionException(response, errorBody)
-
- case strings.EqualFold("ResponsibilityTransferAlreadyInStatusException", errorCode):
- return awsAwsjson11_deserializeErrorResponsibilityTransferAlreadyInStatusException(response, errorBody)
-
- case strings.EqualFold("ResponsibilityTransferNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorResponsibilityTransferNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpUntagResource struct {
-}
-
-func (*awsAwsjson11_deserializeOpUntagResource) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata)
- }
- output := &UntagResourceOutput{}
- out.Result = output
-
- if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
- return out, metadata, &smithy.DeserializationError{
- Err: fmt.Errorf("failed to discard response body, %w", err),
- }
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TargetNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorTargetNotFoundException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpUpdateOrganizationalUnit struct {
-}
-
-func (*awsAwsjson11_deserializeOpUpdateOrganizationalUnit) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpUpdateOrganizationalUnit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorUpdateOrganizationalUnit(response, &metadata)
- }
- output := &UpdateOrganizationalUnitOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentUpdateOrganizationalUnitOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorUpdateOrganizationalUnit(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("DuplicateOrganizationalUnitException", errorCode):
- return awsAwsjson11_deserializeErrorDuplicateOrganizationalUnitException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("OrganizationalUnitNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorOrganizationalUnitNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpUpdatePolicy struct {
-}
-
-func (*awsAwsjson11_deserializeOpUpdatePolicy) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpUpdatePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePolicy(response, &metadata)
- }
- output := &UpdatePolicyOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentUpdatePolicyOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorUpdatePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConcurrentModificationException", errorCode):
- return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("DuplicatePolicyException", errorCode):
- return awsAwsjson11_deserializeErrorDuplicatePolicyException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("MalformedPolicyDocumentException", errorCode):
- return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
-
- case strings.EqualFold("PolicyChangesInProgressException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyChangesInProgressException(response, errorBody)
-
- case strings.EqualFold("PolicyNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorPolicyNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-type awsAwsjson11_deserializeOpUpdateResponsibilityTransfer struct {
-}
-
-func (*awsAwsjson11_deserializeOpUpdateResponsibilityTransfer) ID() string {
- return "OperationDeserializer"
-}
-
-func (m *awsAwsjson11_deserializeOpUpdateResponsibilityTransfer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
- out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
-) {
- out, metadata, err = next.HandleDeserialize(ctx, in)
- if err != nil {
- return out, metadata, err
- }
-
- _, span := tracing.StartSpan(ctx, "OperationDeserializer")
- endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
- defer endTimer()
- defer span.End()
- response, ok := out.RawResponse.(*smithyhttp.Response)
- if !ok {
- return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
- }
-
- if response.StatusCode < 200 || response.StatusCode >= 300 {
- return out, metadata, awsAwsjson11_deserializeOpErrorUpdateResponsibilityTransfer(response, &metadata)
- }
- output := &UpdateResponsibilityTransferOutput{}
- out.Result = output
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(response.Body, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- err = awsAwsjson11_deserializeOpDocumentUpdateResponsibilityTransferOutput(&output, shape)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return out, metadata, err
- }
-
- return out, metadata, err
-}
-
-func awsAwsjson11_deserializeOpErrorUpdateResponsibilityTransfer(response *smithyhttp.Response, metadata *middleware.Metadata) error {
- var errorBuffer bytes.Buffer
- if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
- return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
- }
- errorBody := bytes.NewReader(errorBuffer.Bytes())
-
- errorCode := "UnknownError"
- errorMessage := errorCode
-
- headerCode := response.Header.Get("X-Amzn-ErrorType")
-
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- bodyInfo, err := getProtocolErrorInfo(decoder)
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
- errorCode = restjson.SanitizeErrorCode(typ)
- }
- if len(bodyInfo.Message) != 0 {
- errorMessage = bodyInfo.Message
- }
- switch {
- case strings.EqualFold("AWSOrganizationsNotInUseException", errorCode):
- return awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response, errorBody)
-
- case strings.EqualFold("AccessDeniedException", errorCode):
- return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody)
-
- case strings.EqualFold("ConstraintViolationException", errorCode):
- return awsAwsjson11_deserializeErrorConstraintViolationException(response, errorBody)
-
- case strings.EqualFold("InvalidInputException", errorCode):
- return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody)
-
- case strings.EqualFold("ResponsibilityTransferNotFoundException", errorCode):
- return awsAwsjson11_deserializeErrorResponsibilityTransferNotFoundException(response, errorBody)
-
- case strings.EqualFold("ServiceException", errorCode):
- return awsAwsjson11_deserializeErrorServiceException(response, errorBody)
-
- case strings.EqualFold("TooManyRequestsException", errorCode):
- return awsAwsjson11_deserializeErrorTooManyRequestsException(response, errorBody)
-
- case strings.EqualFold("UnsupportedAPIEndpointException", errorCode):
- return awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response, errorBody)
-
- default:
- genericError := &smithy.GenericAPIError{
- Code: errorCode,
- Message: errorMessage,
- }
- return genericError
-
- }
-}
-
-func awsAwsjson11_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AccessDeniedException{}
- err := awsAwsjson11_deserializeDocumentAccessDeniedException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorAccessDeniedForDependencyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AccessDeniedForDependencyException{}
- err := awsAwsjson11_deserializeDocumentAccessDeniedForDependencyException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorAccountAlreadyClosedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AccountAlreadyClosedException{}
- err := awsAwsjson11_deserializeDocumentAccountAlreadyClosedException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorAccountAlreadyRegisteredException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AccountAlreadyRegisteredException{}
- err := awsAwsjson11_deserializeDocumentAccountAlreadyRegisteredException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorAccountNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AccountNotFoundException{}
- err := awsAwsjson11_deserializeDocumentAccountNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorAccountNotRegisteredException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AccountNotRegisteredException{}
- err := awsAwsjson11_deserializeDocumentAccountNotRegisteredException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorAccountOwnerNotVerifiedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AccountOwnerNotVerifiedException{}
- err := awsAwsjson11_deserializeDocumentAccountOwnerNotVerifiedException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorAlreadyInOrganizationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AlreadyInOrganizationException{}
- err := awsAwsjson11_deserializeDocumentAlreadyInOrganizationException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorAWSOrganizationsNotInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.AWSOrganizationsNotInUseException{}
- err := awsAwsjson11_deserializeDocumentAWSOrganizationsNotInUseException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorChildNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ChildNotFoundException{}
- err := awsAwsjson11_deserializeDocumentChildNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ConcurrentModificationException{}
- err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ConflictException{}
- err := awsAwsjson11_deserializeDocumentConflictException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorConstraintViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ConstraintViolationException{}
- err := awsAwsjson11_deserializeDocumentConstraintViolationException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorCreateAccountStatusNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.CreateAccountStatusNotFoundException{}
- err := awsAwsjson11_deserializeDocumentCreateAccountStatusNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorDestinationParentNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.DestinationParentNotFoundException{}
- err := awsAwsjson11_deserializeDocumentDestinationParentNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorDuplicateAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.DuplicateAccountException{}
- err := awsAwsjson11_deserializeDocumentDuplicateAccountException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorDuplicateHandshakeException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.DuplicateHandshakeException{}
- err := awsAwsjson11_deserializeDocumentDuplicateHandshakeException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorDuplicateOrganizationalUnitException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.DuplicateOrganizationalUnitException{}
- err := awsAwsjson11_deserializeDocumentDuplicateOrganizationalUnitException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorDuplicatePolicyAttachmentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.DuplicatePolicyAttachmentException{}
- err := awsAwsjson11_deserializeDocumentDuplicatePolicyAttachmentException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorDuplicatePolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.DuplicatePolicyException{}
- err := awsAwsjson11_deserializeDocumentDuplicatePolicyException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorEffectivePolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.EffectivePolicyNotFoundException{}
- err := awsAwsjson11_deserializeDocumentEffectivePolicyNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorFinalizingOrganizationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.FinalizingOrganizationException{}
- err := awsAwsjson11_deserializeDocumentFinalizingOrganizationException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorHandshakeAlreadyInStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.HandshakeAlreadyInStateException{}
- err := awsAwsjson11_deserializeDocumentHandshakeAlreadyInStateException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorHandshakeConstraintViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.HandshakeConstraintViolationException{}
- err := awsAwsjson11_deserializeDocumentHandshakeConstraintViolationException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorHandshakeNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.HandshakeNotFoundException{}
- err := awsAwsjson11_deserializeDocumentHandshakeNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorInvalidHandshakeTransitionException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.InvalidHandshakeTransitionException{}
- err := awsAwsjson11_deserializeDocumentInvalidHandshakeTransitionException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorInvalidInputException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.InvalidInputException{}
- err := awsAwsjson11_deserializeDocumentInvalidInputException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorInvalidResponsibilityTransferTransitionException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.InvalidResponsibilityTransferTransitionException{}
- err := awsAwsjson11_deserializeDocumentInvalidResponsibilityTransferTransitionException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.MalformedPolicyDocumentException{}
- err := awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorMasterCannotLeaveOrganizationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.MasterCannotLeaveOrganizationException{}
- err := awsAwsjson11_deserializeDocumentMasterCannotLeaveOrganizationException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorOrganizationalUnitNotEmptyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.OrganizationalUnitNotEmptyException{}
- err := awsAwsjson11_deserializeDocumentOrganizationalUnitNotEmptyException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorOrganizationalUnitNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.OrganizationalUnitNotFoundException{}
- err := awsAwsjson11_deserializeDocumentOrganizationalUnitNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorOrganizationNotEmptyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.OrganizationNotEmptyException{}
- err := awsAwsjson11_deserializeDocumentOrganizationNotEmptyException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorParentNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ParentNotFoundException{}
- err := awsAwsjson11_deserializeDocumentParentNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorPolicyChangesInProgressException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.PolicyChangesInProgressException{}
- err := awsAwsjson11_deserializeDocumentPolicyChangesInProgressException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorPolicyInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.PolicyInUseException{}
- err := awsAwsjson11_deserializeDocumentPolicyInUseException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorPolicyNotAttachedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.PolicyNotAttachedException{}
- err := awsAwsjson11_deserializeDocumentPolicyNotAttachedException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorPolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.PolicyNotFoundException{}
- err := awsAwsjson11_deserializeDocumentPolicyNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorPolicyTypeAlreadyEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.PolicyTypeAlreadyEnabledException{}
- err := awsAwsjson11_deserializeDocumentPolicyTypeAlreadyEnabledException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorPolicyTypeNotAvailableForOrganizationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.PolicyTypeNotAvailableForOrganizationException{}
- err := awsAwsjson11_deserializeDocumentPolicyTypeNotAvailableForOrganizationException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorPolicyTypeNotEnabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.PolicyTypeNotEnabledException{}
- err := awsAwsjson11_deserializeDocumentPolicyTypeNotEnabledException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorResourcePolicyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ResourcePolicyNotFoundException{}
- err := awsAwsjson11_deserializeDocumentResourcePolicyNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorResponsibilityTransferAlreadyInStatusException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ResponsibilityTransferAlreadyInStatusException{}
- err := awsAwsjson11_deserializeDocumentResponsibilityTransferAlreadyInStatusException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorResponsibilityTransferNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ResponsibilityTransferNotFoundException{}
- err := awsAwsjson11_deserializeDocumentResponsibilityTransferNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorRootNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.RootNotFoundException{}
- err := awsAwsjson11_deserializeDocumentRootNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorServiceException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.ServiceException{}
- err := awsAwsjson11_deserializeDocumentServiceException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorSourceParentNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.SourceParentNotFoundException{}
- err := awsAwsjson11_deserializeDocumentSourceParentNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorTargetNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.TargetNotFoundException{}
- err := awsAwsjson11_deserializeDocumentTargetNotFoundException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.TooManyRequestsException{}
- err := awsAwsjson11_deserializeDocumentTooManyRequestsException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeErrorUnsupportedAPIEndpointException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
- var buff [1024]byte
- ringBuffer := smithyio.NewRingBuffer(buff[:])
-
- body := io.TeeReader(errorBody, ringBuffer)
- decoder := json.NewDecoder(body)
- decoder.UseNumber()
- var shape interface{}
- if err := decoder.Decode(&shape); err != nil && err != io.EOF {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- output := &types.UnsupportedAPIEndpointException{}
- err := awsAwsjson11_deserializeDocumentUnsupportedAPIEndpointException(&output, shape)
-
- if err != nil {
- var snapshot bytes.Buffer
- io.Copy(&snapshot, ringBuffer)
- err = &smithy.DeserializationError{
- Err: fmt.Errorf("failed to decode response body, %w", err),
- Snapshot: snapshot.Bytes(),
- }
- return err
- }
-
- errorBody.Seek(0, io.SeekStart)
- return output
-}
-
-func awsAwsjson11_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccessDeniedException
- if *v == nil {
- sv = &types.AccessDeniedException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAccessDeniedForDependencyException(v **types.AccessDeniedForDependencyException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccessDeniedForDependencyException
- if *v == nil {
- sv = &types.AccessDeniedForDependencyException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "Reason":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccessDeniedForDependencyExceptionReason to be of type string, got %T instead", value)
- }
- sv.Reason = types.AccessDeniedForDependencyExceptionReason(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAccount(v **types.Account, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Account
- if *v == nil {
- sv = &types.Account{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "Email":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Email to be of type string, got %T instead", value)
- }
- sv.Email = ptr.String(jtv)
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "JoinedMethod":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountJoinedMethod to be of type string, got %T instead", value)
- }
- sv.JoinedMethod = types.AccountJoinedMethod(jtv)
- }
-
- case "JoinedTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.JoinedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "Name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountName to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "Paths":
- if err := awsAwsjson11_deserializeDocumentPaths(&sv.Paths, value); err != nil {
- return err
- }
-
- case "State":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountState to be of type string, got %T instead", value)
- }
- sv.State = types.AccountState(jtv)
- }
-
- case "Status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.AccountStatus(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAccountAlreadyClosedException(v **types.AccountAlreadyClosedException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccountAlreadyClosedException
- if *v == nil {
- sv = &types.AccountAlreadyClosedException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAccountAlreadyRegisteredException(v **types.AccountAlreadyRegisteredException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccountAlreadyRegisteredException
- if *v == nil {
- sv = &types.AccountAlreadyRegisteredException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAccountNotFoundException(v **types.AccountNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccountNotFoundException
- if *v == nil {
- sv = &types.AccountNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAccountNotRegisteredException(v **types.AccountNotRegisteredException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccountNotRegisteredException
- if *v == nil {
- sv = &types.AccountNotRegisteredException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAccountOwnerNotVerifiedException(v **types.AccountOwnerNotVerifiedException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AccountOwnerNotVerifiedException
- if *v == nil {
- sv = &types.AccountOwnerNotVerifiedException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAccounts(v *[]types.Account, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Account
- if *v == nil {
- cv = []types.Account{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Account
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentAccount(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAlreadyInOrganizationException(v **types.AlreadyInOrganizationException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AlreadyInOrganizationException
- if *v == nil {
- sv = &types.AlreadyInOrganizationException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentAWSOrganizationsNotInUseException(v **types.AWSOrganizationsNotInUseException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.AWSOrganizationsNotInUseException
- if *v == nil {
- sv = &types.AWSOrganizationsNotInUseException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentChild(v **types.Child, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Child
- if *v == nil {
- sv = &types.Child{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ChildId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ChildType to be of type string, got %T instead", value)
- }
- sv.Type = types.ChildType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentChildNotFoundException(v **types.ChildNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ChildNotFoundException
- if *v == nil {
- sv = &types.ChildNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentChildren(v *[]types.Child, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Child
- if *v == nil {
- cv = []types.Child{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Child
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentChild(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.ConcurrentModificationException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ConcurrentModificationException
- if *v == nil {
- sv = &types.ConcurrentModificationException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ConflictException
- if *v == nil {
- sv = &types.ConflictException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentConstraintViolationException(v **types.ConstraintViolationException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ConstraintViolationException
- if *v == nil {
- sv = &types.ConstraintViolationException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "Reason":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ConstraintViolationExceptionReason to be of type string, got %T instead", value)
- }
- sv.Reason = types.ConstraintViolationExceptionReason(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentCreateAccountStatus(v **types.CreateAccountStatus, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.CreateAccountStatus
- if *v == nil {
- sv = &types.CreateAccountStatus{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "AccountId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountId to be of type string, got %T instead", value)
- }
- sv.AccountId = ptr.String(jtv)
- }
-
- case "AccountName":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CreateAccountName to be of type string, got %T instead", value)
- }
- sv.AccountName = ptr.String(jtv)
- }
-
- case "CompletedTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.CompletedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "FailureReason":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CreateAccountFailureReason to be of type string, got %T instead", value)
- }
- sv.FailureReason = types.CreateAccountFailureReason(jtv)
- }
-
- case "GovCloudAccountId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountId to be of type string, got %T instead", value)
- }
- sv.GovCloudAccountId = ptr.String(jtv)
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CreateAccountRequestId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "RequestedTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.RequestedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "State":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected CreateAccountState to be of type string, got %T instead", value)
- }
- sv.State = types.CreateAccountState(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentCreateAccountStatuses(v *[]types.CreateAccountStatus, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.CreateAccountStatus
- if *v == nil {
- cv = []types.CreateAccountStatus{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.CreateAccountStatus
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentCreateAccountStatus(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentCreateAccountStatusNotFoundException(v **types.CreateAccountStatusNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.CreateAccountStatusNotFoundException
- if *v == nil {
- sv = &types.CreateAccountStatusNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDelegatedAdministrator(v **types.DelegatedAdministrator, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DelegatedAdministrator
- if *v == nil {
- sv = &types.DelegatedAdministrator{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "DelegationEnabledDate":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.DelegationEnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "Email":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Email to be of type string, got %T instead", value)
- }
- sv.Email = ptr.String(jtv)
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "JoinedMethod":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountJoinedMethod to be of type string, got %T instead", value)
- }
- sv.JoinedMethod = types.AccountJoinedMethod(jtv)
- }
-
- case "JoinedTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.JoinedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "Name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountName to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "State":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountState to be of type string, got %T instead", value)
- }
- sv.State = types.AccountState(jtv)
- }
-
- case "Status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.AccountStatus(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDelegatedAdministrators(v *[]types.DelegatedAdministrator, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.DelegatedAdministrator
- if *v == nil {
- cv = []types.DelegatedAdministrator{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.DelegatedAdministrator
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentDelegatedAdministrator(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDelegatedService(v **types.DelegatedService, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DelegatedService
- if *v == nil {
- sv = &types.DelegatedService{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "DelegationEnabledDate":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.DelegationEnabledDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "ServicePrincipal":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ServicePrincipal to be of type string, got %T instead", value)
- }
- sv.ServicePrincipal = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDelegatedServices(v *[]types.DelegatedService, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.DelegatedService
- if *v == nil {
- cv = []types.DelegatedService{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.DelegatedService
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentDelegatedService(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDestinationParentNotFoundException(v **types.DestinationParentNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DestinationParentNotFoundException
- if *v == nil {
- sv = &types.DestinationParentNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDuplicateAccountException(v **types.DuplicateAccountException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DuplicateAccountException
- if *v == nil {
- sv = &types.DuplicateAccountException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDuplicateHandshakeException(v **types.DuplicateHandshakeException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DuplicateHandshakeException
- if *v == nil {
- sv = &types.DuplicateHandshakeException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDuplicateOrganizationalUnitException(v **types.DuplicateOrganizationalUnitException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DuplicateOrganizationalUnitException
- if *v == nil {
- sv = &types.DuplicateOrganizationalUnitException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDuplicatePolicyAttachmentException(v **types.DuplicatePolicyAttachmentException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DuplicatePolicyAttachmentException
- if *v == nil {
- sv = &types.DuplicatePolicyAttachmentException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentDuplicatePolicyException(v **types.DuplicatePolicyException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.DuplicatePolicyException
- if *v == nil {
- sv = &types.DuplicatePolicyException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentEffectivePolicy(v **types.EffectivePolicy, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.EffectivePolicy
- if *v == nil {
- sv = &types.EffectivePolicy{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "LastUpdatedTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "PolicyContent":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyContent to be of type string, got %T instead", value)
- }
- sv.PolicyContent = ptr.String(jtv)
- }
-
- case "PolicyType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected EffectivePolicyType to be of type string, got %T instead", value)
- }
- sv.PolicyType = types.EffectivePolicyType(jtv)
- }
-
- case "TargetId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyTargetId to be of type string, got %T instead", value)
- }
- sv.TargetId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentEffectivePolicyNotFoundException(v **types.EffectivePolicyNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.EffectivePolicyNotFoundException
- if *v == nil {
- sv = &types.EffectivePolicyNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentEffectivePolicyValidationError(v **types.EffectivePolicyValidationError, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.EffectivePolicyValidationError
- if *v == nil {
- sv = &types.EffectivePolicyValidationError{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ContributingPolicies":
- if err := awsAwsjson11_deserializeDocumentPolicyIds(&sv.ContributingPolicies, value); err != nil {
- return err
- }
-
- case "ErrorCode":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value)
- }
- sv.ErrorCode = ptr.String(jtv)
- }
-
- case "ErrorMessage":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value)
- }
- sv.ErrorMessage = ptr.String(jtv)
- }
-
- case "PathToError":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PathToError to be of type string, got %T instead", value)
- }
- sv.PathToError = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentEffectivePolicyValidationErrors(v *[]types.EffectivePolicyValidationError, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.EffectivePolicyValidationError
- if *v == nil {
- cv = []types.EffectivePolicyValidationError{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.EffectivePolicyValidationError
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentEffectivePolicyValidationError(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentEnabledServicePrincipal(v **types.EnabledServicePrincipal, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.EnabledServicePrincipal
- if *v == nil {
- sv = &types.EnabledServicePrincipal{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "DateEnabled":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.DateEnabled = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "ServicePrincipal":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ServicePrincipal to be of type string, got %T instead", value)
- }
- sv.ServicePrincipal = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentEnabledServicePrincipals(v *[]types.EnabledServicePrincipal, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.EnabledServicePrincipal
- if *v == nil {
- cv = []types.EnabledServicePrincipal{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.EnabledServicePrincipal
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentEnabledServicePrincipal(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentFinalizingOrganizationException(v **types.FinalizingOrganizationException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.FinalizingOrganizationException
- if *v == nil {
- sv = &types.FinalizingOrganizationException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshake(v **types.Handshake, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Handshake
- if *v == nil {
- sv = &types.Handshake{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Action":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ActionType to be of type string, got %T instead", value)
- }
- sv.Action = types.ActionType(jtv)
- }
-
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakeArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "ExpirationTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.ExpirationTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakeId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "Parties":
- if err := awsAwsjson11_deserializeDocumentHandshakeParties(&sv.Parties, value); err != nil {
- return err
- }
-
- case "RequestedTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.RequestedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "Resources":
- if err := awsAwsjson11_deserializeDocumentHandshakeResources(&sv.Resources, value); err != nil {
- return err
- }
-
- case "State":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakeState to be of type string, got %T instead", value)
- }
- sv.State = types.HandshakeState(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshakeAlreadyInStateException(v **types.HandshakeAlreadyInStateException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.HandshakeAlreadyInStateException
- if *v == nil {
- sv = &types.HandshakeAlreadyInStateException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshakeConstraintViolationException(v **types.HandshakeConstraintViolationException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.HandshakeConstraintViolationException
- if *v == nil {
- sv = &types.HandshakeConstraintViolationException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "Reason":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakeConstraintViolationExceptionReason to be of type string, got %T instead", value)
- }
- sv.Reason = types.HandshakeConstraintViolationExceptionReason(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshakeNotFoundException(v **types.HandshakeNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.HandshakeNotFoundException
- if *v == nil {
- sv = &types.HandshakeNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshakeParties(v *[]types.HandshakeParty, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.HandshakeParty
- if *v == nil {
- cv = []types.HandshakeParty{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.HandshakeParty
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentHandshakeParty(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshakeParty(v **types.HandshakeParty, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.HandshakeParty
- if *v == nil {
- sv = &types.HandshakeParty{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakePartyId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakePartyType to be of type string, got %T instead", value)
- }
- sv.Type = types.HandshakePartyType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshakeResource(v **types.HandshakeResource, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.HandshakeResource
- if *v == nil {
- sv = &types.HandshakeResource{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Resources":
- if err := awsAwsjson11_deserializeDocumentHandshakeResources(&sv.Resources, value); err != nil {
- return err
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakeResourceType to be of type string, got %T instead", value)
- }
- sv.Type = types.HandshakeResourceType(jtv)
- }
-
- case "Value":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakeResourceValue to be of type string, got %T instead", value)
- }
- sv.Value = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshakeResources(v *[]types.HandshakeResource, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.HandshakeResource
- if *v == nil {
- cv = []types.HandshakeResource{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.HandshakeResource
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentHandshakeResource(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentHandshakes(v *[]types.Handshake, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Handshake
- if *v == nil {
- cv = []types.Handshake{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Handshake
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentHandshake(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentInvalidHandshakeTransitionException(v **types.InvalidHandshakeTransitionException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InvalidHandshakeTransitionException
- if *v == nil {
- sv = &types.InvalidHandshakeTransitionException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentInvalidInputException(v **types.InvalidInputException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InvalidInputException
- if *v == nil {
- sv = &types.InvalidInputException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "Reason":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected InvalidInputExceptionReason to be of type string, got %T instead", value)
- }
- sv.Reason = types.InvalidInputExceptionReason(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentInvalidResponsibilityTransferTransitionException(v **types.InvalidResponsibilityTransferTransitionException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.InvalidResponsibilityTransferTransitionException
- if *v == nil {
- sv = &types.InvalidResponsibilityTransferTransitionException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.MalformedPolicyDocumentException
- if *v == nil {
- sv = &types.MalformedPolicyDocumentException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentMasterCannotLeaveOrganizationException(v **types.MasterCannotLeaveOrganizationException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.MasterCannotLeaveOrganizationException
- if *v == nil {
- sv = &types.MasterCannotLeaveOrganizationException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentOrganization(v **types.Organization, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Organization
- if *v == nil {
- sv = &types.Organization{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected OrganizationArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "AvailablePolicyTypes":
- if err := awsAwsjson11_deserializeDocumentPolicyTypes(&sv.AvailablePolicyTypes, value); err != nil {
- return err
- }
-
- case "FeatureSet":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected OrganizationFeatureSet to be of type string, got %T instead", value)
- }
- sv.FeatureSet = types.OrganizationFeatureSet(jtv)
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected OrganizationId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "MasterAccountArn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountArn to be of type string, got %T instead", value)
- }
- sv.MasterAccountArn = ptr.String(jtv)
- }
-
- case "MasterAccountEmail":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Email to be of type string, got %T instead", value)
- }
- sv.MasterAccountEmail = ptr.String(jtv)
- }
-
- case "MasterAccountId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountId to be of type string, got %T instead", value)
- }
- sv.MasterAccountId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentOrganizationalUnit(v **types.OrganizationalUnit, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.OrganizationalUnit
- if *v == nil {
- sv = &types.OrganizationalUnit{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected OrganizationalUnitArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected OrganizationalUnitId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "Name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected OrganizationalUnitName to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "Path":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Path to be of type string, got %T instead", value)
- }
- sv.Path = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentOrganizationalUnitNotEmptyException(v **types.OrganizationalUnitNotEmptyException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.OrganizationalUnitNotEmptyException
- if *v == nil {
- sv = &types.OrganizationalUnitNotEmptyException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentOrganizationalUnitNotFoundException(v **types.OrganizationalUnitNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.OrganizationalUnitNotFoundException
- if *v == nil {
- sv = &types.OrganizationalUnitNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentOrganizationalUnits(v *[]types.OrganizationalUnit, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.OrganizationalUnit
- if *v == nil {
- cv = []types.OrganizationalUnit{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.OrganizationalUnit
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentOrganizationalUnit(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentOrganizationNotEmptyException(v **types.OrganizationNotEmptyException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.OrganizationNotEmptyException
- if *v == nil {
- sv = &types.OrganizationNotEmptyException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentParent(v **types.Parent, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Parent
- if *v == nil {
- sv = &types.Parent{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ParentId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ParentType to be of type string, got %T instead", value)
- }
- sv.Type = types.ParentType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentParentNotFoundException(v **types.ParentNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ParentNotFoundException
- if *v == nil {
- sv = &types.ParentNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentParents(v *[]types.Parent, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Parent
- if *v == nil {
- cv = []types.Parent{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Parent
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentParent(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPaths(v *[]string, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []string
- if *v == nil {
- cv = []string{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col string
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Path to be of type string, got %T instead", value)
- }
- col = jtv
- }
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicies(v *[]types.PolicySummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.PolicySummary
- if *v == nil {
- cv = []types.PolicySummary{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.PolicySummary
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentPolicySummary(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicy(v **types.Policy, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Policy
- if *v == nil {
- sv = &types.Policy{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Content":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyContent to be of type string, got %T instead", value)
- }
- sv.Content = ptr.String(jtv)
- }
-
- case "PolicySummary":
- if err := awsAwsjson11_deserializeDocumentPolicySummary(&sv.PolicySummary, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyChangesInProgressException(v **types.PolicyChangesInProgressException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyChangesInProgressException
- if *v == nil {
- sv = &types.PolicyChangesInProgressException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyIds(v *[]string, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []string
- if *v == nil {
- cv = []string{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col string
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value)
- }
- col = jtv
- }
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyInUseException(v **types.PolicyInUseException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyInUseException
- if *v == nil {
- sv = &types.PolicyInUseException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyNotAttachedException(v **types.PolicyNotAttachedException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyNotAttachedException
- if *v == nil {
- sv = &types.PolicyNotAttachedException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyNotFoundException(v **types.PolicyNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyNotFoundException
- if *v == nil {
- sv = &types.PolicyNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicySummary(v **types.PolicySummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicySummary
- if *v == nil {
- sv = &types.PolicySummary{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "AwsManaged":
- if value != nil {
- jtv, ok := value.(bool)
- if !ok {
- return fmt.Errorf("expected AwsManagedPolicy to be of type *bool, got %T instead", value)
- }
- sv.AwsManaged = jtv
- }
-
- case "Description":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyDescription to be of type string, got %T instead", value)
- }
- sv.Description = ptr.String(jtv)
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "Name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyType to be of type string, got %T instead", value)
- }
- sv.Type = types.PolicyType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyTargets(v *[]types.PolicyTargetSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.PolicyTargetSummary
- if *v == nil {
- cv = []types.PolicyTargetSummary{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.PolicyTargetSummary
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentPolicyTargetSummary(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyTargetSummary(v **types.PolicyTargetSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyTargetSummary
- if *v == nil {
- sv = &types.PolicyTargetSummary{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected GenericArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "Name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected TargetName to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "TargetId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyTargetId to be of type string, got %T instead", value)
- }
- sv.TargetId = ptr.String(jtv)
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected TargetType to be of type string, got %T instead", value)
- }
- sv.Type = types.TargetType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyTypeAlreadyEnabledException(v **types.PolicyTypeAlreadyEnabledException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyTypeAlreadyEnabledException
- if *v == nil {
- sv = &types.PolicyTypeAlreadyEnabledException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyTypeNotAvailableForOrganizationException(v **types.PolicyTypeNotAvailableForOrganizationException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyTypeNotAvailableForOrganizationException
- if *v == nil {
- sv = &types.PolicyTypeNotAvailableForOrganizationException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyTypeNotEnabledException(v **types.PolicyTypeNotEnabledException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyTypeNotEnabledException
- if *v == nil {
- sv = &types.PolicyTypeNotEnabledException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyTypes(v *[]types.PolicyTypeSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.PolicyTypeSummary
- if *v == nil {
- cv = []types.PolicyTypeSummary{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.PolicyTypeSummary
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentPolicyTypeSummary(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentPolicyTypeSummary(v **types.PolicyTypeSummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.PolicyTypeSummary
- if *v == nil {
- sv = &types.PolicyTypeSummary{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyTypeStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.PolicyTypeStatus(jtv)
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected PolicyType to be of type string, got %T instead", value)
- }
- sv.Type = types.PolicyType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentResourcePolicy(v **types.ResourcePolicy, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResourcePolicy
- if *v == nil {
- sv = &types.ResourcePolicy{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Content":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ResourcePolicyContent to be of type string, got %T instead", value)
- }
- sv.Content = ptr.String(jtv)
- }
-
- case "ResourcePolicySummary":
- if err := awsAwsjson11_deserializeDocumentResourcePolicySummary(&sv.ResourcePolicySummary, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentResourcePolicyNotFoundException(v **types.ResourcePolicyNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResourcePolicyNotFoundException
- if *v == nil {
- sv = &types.ResourcePolicyNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentResourcePolicySummary(v **types.ResourcePolicySummary, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResourcePolicySummary
- if *v == nil {
- sv = &types.ResourcePolicySummary{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ResourcePolicyArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ResourcePolicyId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentResponsibilityTransfer(v **types.ResponsibilityTransfer, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResponsibilityTransfer
- if *v == nil {
- sv = &types.ResponsibilityTransfer{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ActiveHandshakeId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected HandshakeId to be of type string, got %T instead", value)
- }
- sv.ActiveHandshakeId = ptr.String(jtv)
- }
-
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ResponsibilityTransferArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "EndTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.EndTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ResponsibilityTransferId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "Name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ResponsibilityTransferName to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "Source":
- if err := awsAwsjson11_deserializeDocumentTransferParticipant(&sv.Source, value); err != nil {
- return err
- }
-
- case "StartTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.StartTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "Status":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ResponsibilityTransferStatus to be of type string, got %T instead", value)
- }
- sv.Status = types.ResponsibilityTransferStatus(jtv)
- }
-
- case "Target":
- if err := awsAwsjson11_deserializeDocumentTransferParticipant(&sv.Target, value); err != nil {
- return err
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ResponsibilityTransferType to be of type string, got %T instead", value)
- }
- sv.Type = types.ResponsibilityTransferType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentResponsibilityTransferAlreadyInStatusException(v **types.ResponsibilityTransferAlreadyInStatusException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResponsibilityTransferAlreadyInStatusException
- if *v == nil {
- sv = &types.ResponsibilityTransferAlreadyInStatusException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentResponsibilityTransferNotFoundException(v **types.ResponsibilityTransferNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ResponsibilityTransferNotFoundException
- if *v == nil {
- sv = &types.ResponsibilityTransferNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentResponsibilityTransfers(v *[]types.ResponsibilityTransfer, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.ResponsibilityTransfer
- if *v == nil {
- cv = []types.ResponsibilityTransfer{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.ResponsibilityTransfer
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentResponsibilityTransfer(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentRoot(v **types.Root, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Root
- if *v == nil {
- sv = &types.Root{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Arn":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected RootArn to be of type string, got %T instead", value)
- }
- sv.Arn = ptr.String(jtv)
- }
-
- case "Id":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected RootId to be of type string, got %T instead", value)
- }
- sv.Id = ptr.String(jtv)
- }
-
- case "Name":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected RootName to be of type string, got %T instead", value)
- }
- sv.Name = ptr.String(jtv)
- }
-
- case "PolicyTypes":
- if err := awsAwsjson11_deserializeDocumentPolicyTypes(&sv.PolicyTypes, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentRootNotFoundException(v **types.RootNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.RootNotFoundException
- if *v == nil {
- sv = &types.RootNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentRoots(v *[]types.Root, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Root
- if *v == nil {
- cv = []types.Root{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Root
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentRoot(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentServiceException(v **types.ServiceException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.ServiceException
- if *v == nil {
- sv = &types.ServiceException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentSourceParentNotFoundException(v **types.SourceParentNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.SourceParentNotFoundException
- if *v == nil {
- sv = &types.SourceParentNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.Tag
- if *v == nil {
- sv = &types.Tag{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Key":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected TagKey to be of type string, got %T instead", value)
- }
- sv.Key = ptr.String(jtv)
- }
-
- case "Value":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected TagValue to be of type string, got %T instead", value)
- }
- sv.Value = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentTags(v *[]types.Tag, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.([]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var cv []types.Tag
- if *v == nil {
- cv = []types.Tag{}
- } else {
- cv = *v
- }
-
- for _, value := range shape {
- var col types.Tag
- destAddr := &col
- if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil {
- return err
- }
- col = *destAddr
- cv = append(cv, col)
-
- }
- *v = cv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentTargetNotFoundException(v **types.TargetNotFoundException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.TargetNotFoundException
- if *v == nil {
- sv = &types.TargetNotFoundException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.TooManyRequestsException
- if *v == nil {
- sv = &types.TooManyRequestsException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- case "Type":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionType to be of type string, got %T instead", value)
- }
- sv.Type = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentTransferParticipant(v **types.TransferParticipant, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.TransferParticipant
- if *v == nil {
- sv = &types.TransferParticipant{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ManagementAccountEmail":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Email to be of type string, got %T instead", value)
- }
- sv.ManagementAccountEmail = ptr.String(jtv)
- }
-
- case "ManagementAccountId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountId to be of type string, got %T instead", value)
- }
- sv.ManagementAccountId = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeDocumentUnsupportedAPIEndpointException(v **types.UnsupportedAPIEndpointException, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *types.UnsupportedAPIEndpointException
- if *v == nil {
- sv = &types.UnsupportedAPIEndpointException{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "message", "Message":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected ExceptionMessage to be of type string, got %T instead", value)
- }
- sv.Message = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentAcceptHandshakeOutput(v **AcceptHandshakeOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *AcceptHandshakeOutput
- if *v == nil {
- sv = &AcceptHandshakeOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshake":
- if err := awsAwsjson11_deserializeDocumentHandshake(&sv.Handshake, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentCancelHandshakeOutput(v **CancelHandshakeOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CancelHandshakeOutput
- if *v == nil {
- sv = &CancelHandshakeOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshake":
- if err := awsAwsjson11_deserializeDocumentHandshake(&sv.Handshake, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentCreateAccountOutput(v **CreateAccountOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateAccountOutput
- if *v == nil {
- sv = &CreateAccountOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "CreateAccountStatus":
- if err := awsAwsjson11_deserializeDocumentCreateAccountStatus(&sv.CreateAccountStatus, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentCreateGovCloudAccountOutput(v **CreateGovCloudAccountOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateGovCloudAccountOutput
- if *v == nil {
- sv = &CreateGovCloudAccountOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "CreateAccountStatus":
- if err := awsAwsjson11_deserializeDocumentCreateAccountStatus(&sv.CreateAccountStatus, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentCreateOrganizationalUnitOutput(v **CreateOrganizationalUnitOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateOrganizationalUnitOutput
- if *v == nil {
- sv = &CreateOrganizationalUnitOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "OrganizationalUnit":
- if err := awsAwsjson11_deserializeDocumentOrganizationalUnit(&sv.OrganizationalUnit, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentCreateOrganizationOutput(v **CreateOrganizationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreateOrganizationOutput
- if *v == nil {
- sv = &CreateOrganizationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Organization":
- if err := awsAwsjson11_deserializeDocumentOrganization(&sv.Organization, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentCreatePolicyOutput(v **CreatePolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *CreatePolicyOutput
- if *v == nil {
- sv = &CreatePolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Policy":
- if err := awsAwsjson11_deserializeDocumentPolicy(&sv.Policy, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDeclineHandshakeOutput(v **DeclineHandshakeOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DeclineHandshakeOutput
- if *v == nil {
- sv = &DeclineHandshakeOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshake":
- if err := awsAwsjson11_deserializeDocumentHandshake(&sv.Handshake, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribeAccountOutput(v **DescribeAccountOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeAccountOutput
- if *v == nil {
- sv = &DescribeAccountOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Account":
- if err := awsAwsjson11_deserializeDocumentAccount(&sv.Account, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribeCreateAccountStatusOutput(v **DescribeCreateAccountStatusOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeCreateAccountStatusOutput
- if *v == nil {
- sv = &DescribeCreateAccountStatusOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "CreateAccountStatus":
- if err := awsAwsjson11_deserializeDocumentCreateAccountStatus(&sv.CreateAccountStatus, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribeEffectivePolicyOutput(v **DescribeEffectivePolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeEffectivePolicyOutput
- if *v == nil {
- sv = &DescribeEffectivePolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "EffectivePolicy":
- if err := awsAwsjson11_deserializeDocumentEffectivePolicy(&sv.EffectivePolicy, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribeHandshakeOutput(v **DescribeHandshakeOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeHandshakeOutput
- if *v == nil {
- sv = &DescribeHandshakeOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshake":
- if err := awsAwsjson11_deserializeDocumentHandshake(&sv.Handshake, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribeOrganizationalUnitOutput(v **DescribeOrganizationalUnitOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeOrganizationalUnitOutput
- if *v == nil {
- sv = &DescribeOrganizationalUnitOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "OrganizationalUnit":
- if err := awsAwsjson11_deserializeDocumentOrganizationalUnit(&sv.OrganizationalUnit, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribeOrganizationOutput(v **DescribeOrganizationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeOrganizationOutput
- if *v == nil {
- sv = &DescribeOrganizationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Organization":
- if err := awsAwsjson11_deserializeDocumentOrganization(&sv.Organization, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribePolicyOutput(v **DescribePolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribePolicyOutput
- if *v == nil {
- sv = &DescribePolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Policy":
- if err := awsAwsjson11_deserializeDocumentPolicy(&sv.Policy, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribeResourcePolicyOutput(v **DescribeResourcePolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeResourcePolicyOutput
- if *v == nil {
- sv = &DescribeResourcePolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ResourcePolicy":
- if err := awsAwsjson11_deserializeDocumentResourcePolicy(&sv.ResourcePolicy, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDescribeResponsibilityTransferOutput(v **DescribeResponsibilityTransferOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DescribeResponsibilityTransferOutput
- if *v == nil {
- sv = &DescribeResponsibilityTransferOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ResponsibilityTransfer":
- if err := awsAwsjson11_deserializeDocumentResponsibilityTransfer(&sv.ResponsibilityTransfer, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentDisablePolicyTypeOutput(v **DisablePolicyTypeOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *DisablePolicyTypeOutput
- if *v == nil {
- sv = &DisablePolicyTypeOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Root":
- if err := awsAwsjson11_deserializeDocumentRoot(&sv.Root, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentEnableAllFeaturesOutput(v **EnableAllFeaturesOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *EnableAllFeaturesOutput
- if *v == nil {
- sv = &EnableAllFeaturesOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshake":
- if err := awsAwsjson11_deserializeDocumentHandshake(&sv.Handshake, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentEnablePolicyTypeOutput(v **EnablePolicyTypeOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *EnablePolicyTypeOutput
- if *v == nil {
- sv = &EnablePolicyTypeOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Root":
- if err := awsAwsjson11_deserializeDocumentRoot(&sv.Root, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentInviteAccountToOrganizationOutput(v **InviteAccountToOrganizationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *InviteAccountToOrganizationOutput
- if *v == nil {
- sv = &InviteAccountToOrganizationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshake":
- if err := awsAwsjson11_deserializeDocumentHandshake(&sv.Handshake, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentInviteOrganizationToTransferResponsibilityOutput(v **InviteOrganizationToTransferResponsibilityOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *InviteOrganizationToTransferResponsibilityOutput
- if *v == nil {
- sv = &InviteOrganizationToTransferResponsibilityOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshake":
- if err := awsAwsjson11_deserializeDocumentHandshake(&sv.Handshake, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListAccountsForParentOutput(v **ListAccountsForParentOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListAccountsForParentOutput
- if *v == nil {
- sv = &ListAccountsForParentOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Accounts":
- if err := awsAwsjson11_deserializeDocumentAccounts(&sv.Accounts, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListAccountsOutput(v **ListAccountsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListAccountsOutput
- if *v == nil {
- sv = &ListAccountsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Accounts":
- if err := awsAwsjson11_deserializeDocumentAccounts(&sv.Accounts, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListAccountsWithInvalidEffectivePolicyOutput(v **ListAccountsWithInvalidEffectivePolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListAccountsWithInvalidEffectivePolicyOutput
- if *v == nil {
- sv = &ListAccountsWithInvalidEffectivePolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Accounts":
- if err := awsAwsjson11_deserializeDocumentAccounts(&sv.Accounts, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "PolicyType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected EffectivePolicyType to be of type string, got %T instead", value)
- }
- sv.PolicyType = types.EffectivePolicyType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListAWSServiceAccessForOrganizationOutput(v **ListAWSServiceAccessForOrganizationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListAWSServiceAccessForOrganizationOutput
- if *v == nil {
- sv = &ListAWSServiceAccessForOrganizationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "EnabledServicePrincipals":
- if err := awsAwsjson11_deserializeDocumentEnabledServicePrincipals(&sv.EnabledServicePrincipals, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListChildrenOutput(v **ListChildrenOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListChildrenOutput
- if *v == nil {
- sv = &ListChildrenOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Children":
- if err := awsAwsjson11_deserializeDocumentChildren(&sv.Children, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListCreateAccountStatusOutput(v **ListCreateAccountStatusOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListCreateAccountStatusOutput
- if *v == nil {
- sv = &ListCreateAccountStatusOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "CreateAccountStatuses":
- if err := awsAwsjson11_deserializeDocumentCreateAccountStatuses(&sv.CreateAccountStatuses, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListDelegatedAdministratorsOutput(v **ListDelegatedAdministratorsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListDelegatedAdministratorsOutput
- if *v == nil {
- sv = &ListDelegatedAdministratorsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "DelegatedAdministrators":
- if err := awsAwsjson11_deserializeDocumentDelegatedAdministrators(&sv.DelegatedAdministrators, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListDelegatedServicesForAccountOutput(v **ListDelegatedServicesForAccountOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListDelegatedServicesForAccountOutput
- if *v == nil {
- sv = &ListDelegatedServicesForAccountOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "DelegatedServices":
- if err := awsAwsjson11_deserializeDocumentDelegatedServices(&sv.DelegatedServices, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListEffectivePolicyValidationErrorsOutput(v **ListEffectivePolicyValidationErrorsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListEffectivePolicyValidationErrorsOutput
- if *v == nil {
- sv = &ListEffectivePolicyValidationErrorsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "AccountId":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected AccountId to be of type string, got %T instead", value)
- }
- sv.AccountId = ptr.String(jtv)
- }
-
- case "EffectivePolicyValidationErrors":
- if err := awsAwsjson11_deserializeDocumentEffectivePolicyValidationErrors(&sv.EffectivePolicyValidationErrors, value); err != nil {
- return err
- }
-
- case "EvaluationTimestamp":
- if value != nil {
- switch jtv := value.(type) {
- case json.Number:
- f64, err := jtv.Float64()
- if err != nil {
- return err
- }
- sv.EvaluationTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64))
-
- default:
- return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value)
-
- }
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "Path":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected Path to be of type string, got %T instead", value)
- }
- sv.Path = ptr.String(jtv)
- }
-
- case "PolicyType":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected EffectivePolicyType to be of type string, got %T instead", value)
- }
- sv.PolicyType = types.EffectivePolicyType(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListHandshakesForAccountOutput(v **ListHandshakesForAccountOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListHandshakesForAccountOutput
- if *v == nil {
- sv = &ListHandshakesForAccountOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshakes":
- if err := awsAwsjson11_deserializeDocumentHandshakes(&sv.Handshakes, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListHandshakesForOrganizationOutput(v **ListHandshakesForOrganizationOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListHandshakesForOrganizationOutput
- if *v == nil {
- sv = &ListHandshakesForOrganizationOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Handshakes":
- if err := awsAwsjson11_deserializeDocumentHandshakes(&sv.Handshakes, value); err != nil {
- return err
- }
-
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListInboundResponsibilityTransfersOutput(v **ListInboundResponsibilityTransfersOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListInboundResponsibilityTransfersOutput
- if *v == nil {
- sv = &ListInboundResponsibilityTransfersOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "ResponsibilityTransfers":
- if err := awsAwsjson11_deserializeDocumentResponsibilityTransfers(&sv.ResponsibilityTransfers, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListOrganizationalUnitsForParentOutput(v **ListOrganizationalUnitsForParentOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListOrganizationalUnitsForParentOutput
- if *v == nil {
- sv = &ListOrganizationalUnitsForParentOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "OrganizationalUnits":
- if err := awsAwsjson11_deserializeDocumentOrganizationalUnits(&sv.OrganizationalUnits, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListOutboundResponsibilityTransfersOutput(v **ListOutboundResponsibilityTransfersOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListOutboundResponsibilityTransfersOutput
- if *v == nil {
- sv = &ListOutboundResponsibilityTransfersOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "ResponsibilityTransfers":
- if err := awsAwsjson11_deserializeDocumentResponsibilityTransfers(&sv.ResponsibilityTransfers, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListParentsOutput(v **ListParentsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListParentsOutput
- if *v == nil {
- sv = &ListParentsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "Parents":
- if err := awsAwsjson11_deserializeDocumentParents(&sv.Parents, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListPoliciesForTargetOutput(v **ListPoliciesForTargetOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListPoliciesForTargetOutput
- if *v == nil {
- sv = &ListPoliciesForTargetOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "Policies":
- if err := awsAwsjson11_deserializeDocumentPolicies(&sv.Policies, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListPoliciesOutput(v **ListPoliciesOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListPoliciesOutput
- if *v == nil {
- sv = &ListPoliciesOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "Policies":
- if err := awsAwsjson11_deserializeDocumentPolicies(&sv.Policies, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListRootsOutput(v **ListRootsOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListRootsOutput
- if *v == nil {
- sv = &ListRootsOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "Roots":
- if err := awsAwsjson11_deserializeDocumentRoots(&sv.Roots, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListTagsForResourceOutput
- if *v == nil {
- sv = &ListTagsForResourceOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "Tags":
- if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentListTargetsForPolicyOutput(v **ListTargetsForPolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *ListTargetsForPolicyOutput
- if *v == nil {
- sv = &ListTargetsForPolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "NextToken":
- if value != nil {
- jtv, ok := value.(string)
- if !ok {
- return fmt.Errorf("expected NextToken to be of type string, got %T instead", value)
- }
- sv.NextToken = ptr.String(jtv)
- }
-
- case "Targets":
- if err := awsAwsjson11_deserializeDocumentPolicyTargets(&sv.Targets, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *PutResourcePolicyOutput
- if *v == nil {
- sv = &PutResourcePolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ResourcePolicy":
- if err := awsAwsjson11_deserializeDocumentResourcePolicy(&sv.ResourcePolicy, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentTerminateResponsibilityTransferOutput(v **TerminateResponsibilityTransferOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *TerminateResponsibilityTransferOutput
- if *v == nil {
- sv = &TerminateResponsibilityTransferOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ResponsibilityTransfer":
- if err := awsAwsjson11_deserializeDocumentResponsibilityTransfer(&sv.ResponsibilityTransfer, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentUpdateOrganizationalUnitOutput(v **UpdateOrganizationalUnitOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateOrganizationalUnitOutput
- if *v == nil {
- sv = &UpdateOrganizationalUnitOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "OrganizationalUnit":
- if err := awsAwsjson11_deserializeDocumentOrganizationalUnit(&sv.OrganizationalUnit, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentUpdatePolicyOutput(v **UpdatePolicyOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdatePolicyOutput
- if *v == nil {
- sv = &UpdatePolicyOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "Policy":
- if err := awsAwsjson11_deserializeDocumentPolicy(&sv.Policy, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-func awsAwsjson11_deserializeOpDocumentUpdateResponsibilityTransferOutput(v **UpdateResponsibilityTransferOutput, value interface{}) error {
- if v == nil {
- return fmt.Errorf("unexpected nil of type %T", v)
- }
- if value == nil {
- return nil
- }
-
- shape, ok := value.(map[string]interface{})
- if !ok {
- return fmt.Errorf("unexpected JSON type %v", value)
- }
-
- var sv *UpdateResponsibilityTransferOutput
- if *v == nil {
- sv = &UpdateResponsibilityTransferOutput{}
- } else {
- sv = *v
- }
-
- for key, value := range shape {
- switch key {
- case "ResponsibilityTransfer":
- if err := awsAwsjson11_deserializeDocumentResponsibilityTransfer(&sv.ResponsibilityTransfer, value); err != nil {
- return err
- }
-
- default:
- _, _ = key, value
-
- }
- }
- *v = sv
- return nil
-}
-
-type protocolErrorInfo struct {
- Type string `json:"__type"`
- Message string
- Code any // nonstandard for awsjson but some services do present the type here
-}
-
-func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) {
- var errInfo protocolErrorInfo
- if err := decoder.Decode(&errInfo); err != nil {
- if err == io.EOF {
- return errInfo, nil
- }
- return errInfo, err
- }
-
- return errInfo, nil
-}
-
-func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) {
- if len(headerType) != 0 {
- return headerType, true
- } else if len(bodyInfo.Type) != 0 {
- return bodyInfo.Type, true
- } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 {
- return code, true
- }
- return "", false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/doc.go
deleted file mode 100644
index 8c1066f89..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/doc.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-// Package organizations provides the API client, operations, and parameter types
-// for AWS Organizations.
-//
-// Organizations is a web service that enables you to consolidate your multiple
-// Amazon Web Services accounts into an organization and centrally manage your
-// accounts and their resources.
-//
-// This guide provides descriptions of the Organizations operations. For more
-// information about using this service, see the [Organizations User Guide].
-//
-// # Support and feedback for Organizations
-//
-// We welcome your feedback. You can post your feedback and questions in the [Organizations support forum]. For
-// more information about the Amazon Web Services Support forums, see [Forums Help].
-//
-// # Endpoint to call When using the CLI or the Amazon Web Services SDK
-//
-// For the current release of Organizations, specify the us-east-1 region for all
-// Amazon Web Services API and CLI calls made from the commercial Amazon Web
-// Services Regions outside of China. If calling from one of the Amazon Web
-// Services Regions in China, then specify cn-northwest-1 . You can do this in the
-// CLI by using these parameters and commands:
-//
-// - Use the following parameter with each command to specify both the endpoint
-// and its region:
-//
-// --endpoint-url https://organizations.us-east-1.amazonaws.com (from commercial
-//
-// Amazon Web Services Regions outside of China)
-//
-// or
-//
-// --endpoint-url https://organizations.cn-northwest-1.amazonaws.com.cn (from
-//
-// Amazon Web Services Regions in China)
-//
-// - Use the default endpoint, but configure your default region with this
-// command:
-//
-// aws configure set default.region us-east-1 (from commercial Amazon Web Services
-//
-// Regions outside of China)
-//
-// or
-//
-// aws configure set default.region cn-northwest-1 (from Amazon Web Services
-//
-// Regions in China)
-//
-// - Use the following parameter with each command to specify the endpoint:
-//
-// --region us-east-1 (from commercial Amazon Web Services Regions outside of
-//
-// China)
-//
-// or
-//
-// --region cn-northwest-1 (from Amazon Web Services Regions in China)
-//
-// # Recording API Requests
-//
-// Organizations supports CloudTrail, a service that records Amazon Web Services
-// API calls for your Amazon Web Services account and delivers log files to an
-// Amazon S3 bucket. By using information collected by CloudTrail, you can
-// determine which requests the Organizations service received, who made the
-// request and when, and so on. For more about Organizations and its support for
-// CloudTrail, see [Logging Organizations API calls with CloudTrail]in the Organizations User Guide. To learn more about
-// CloudTrail, including how to turn it on and find your log files, see the [CloudTrail User Guide].
-//
-// [Forums Help]: https://forums.aws.amazon.com/help.jspa
-// [Organizations support forum]: https://forums.aws.amazon.com/forum.jspa?forumID=219
-// [CloudTrail User Guide]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html
-// [Organizations User Guide]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html
-// [Logging Organizations API calls with CloudTrail]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_incident-response.html#orgs_cloudtrail-integration
-package organizations
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/endpoints.go
deleted file mode 100644
index 1a25a57cd..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/endpoints.go
+++ /dev/null
@@ -1,825 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "errors"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/aws"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
- "github.com/aws/aws-sdk-go-v2/internal/endpoints"
- "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
- internalendpoints "github.com/aws/aws-sdk-go-v2/service/organizations/internal/endpoints"
- smithy "github.com/aws/smithy-go"
- smithyauth "github.com/aws/smithy-go/auth"
- smithyendpoints "github.com/aws/smithy-go/endpoints"
- "github.com/aws/smithy-go/endpoints/private/rulesfn"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/ptr"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "net/http"
- "net/url"
- "os"
- "strings"
-)
-
-// EndpointResolverOptions is the service endpoint resolver options
-type EndpointResolverOptions = internalendpoints.Options
-
-// EndpointResolver interface for resolving service endpoints.
-type EndpointResolver interface {
- ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
-}
-
-var _ EndpointResolver = &internalendpoints.Resolver{}
-
-// NewDefaultEndpointResolver constructs a new service endpoint resolver
-func NewDefaultEndpointResolver() *internalendpoints.Resolver {
- return internalendpoints.New()
-}
-
-// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
-// the EndpointResolver interface. This is useful when you want to add additional
-// endpoint resolving logic, or stub out specific endpoints with custom values.
-type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
-
-func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
- return fn(region, options)
-}
-
-// EndpointResolverFromURL returns an EndpointResolver configured using the
-// provided endpoint url. By default, the resolved endpoint resolver uses the
-// client region as signing region, and the endpoint source is set to
-// EndpointSourceCustom.You can provide functional options to configure endpoint
-// values for the resolved endpoint.
-func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
- e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
- for _, fn := range optFns {
- fn(&e)
- }
-
- return EndpointResolverFunc(
- func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
- if len(e.SigningRegion) == 0 {
- e.SigningRegion = region
- }
- return e, nil
- },
- )
-}
-
-type ResolveEndpoint struct {
- Resolver EndpointResolver
- Options EndpointResolverOptions
-}
-
-func (*ResolveEndpoint) ID() string {
- return "ResolveEndpoint"
-}
-
-func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
- return next.HandleSerialize(ctx, in)
- }
-
- req, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
- }
-
- if m.Resolver == nil {
- return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
- }
-
- eo := m.Options
- eo.Logger = middleware.GetLogger(ctx)
-
- var endpoint aws.Endpoint
- endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
- if err != nil {
- nf := (&aws.EndpointNotFoundError{})
- if errors.As(err, &nf) {
- ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
- return next.HandleSerialize(ctx, in)
- }
- return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
- }
-
- req.URL, err = url.Parse(endpoint.URL)
- if err != nil {
- return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
- }
-
- if len(awsmiddleware.GetSigningName(ctx)) == 0 {
- signingName := endpoint.SigningName
- if len(signingName) == 0 {
- signingName = "organizations"
- }
- ctx = awsmiddleware.SetSigningName(ctx, signingName)
- }
- ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
- ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
- ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
- ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
- return next.HandleSerialize(ctx, in)
-}
-func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
- return stack.Serialize.Insert(&ResolveEndpoint{
- Resolver: o.EndpointResolver,
- Options: o.EndpointOptions,
- }, "OperationSerializer", middleware.Before)
-}
-
-func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
- _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
- return err
-}
-
-type wrappedEndpointResolver struct {
- awsResolver aws.EndpointResolverWithOptions
-}
-
-func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
- return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
-}
-
-type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
-
-func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
- return a(service, region)
-}
-
-var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
-
-// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
-// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
-// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
-// via its middleware.
-//
-// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
-func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
- var resolver aws.EndpointResolverWithOptions
-
- if awsResolverWithOptions != nil {
- resolver = awsResolverWithOptions
- } else if awsResolver != nil {
- resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
- }
-
- return &wrappedEndpointResolver{
- awsResolver: resolver,
- }
-}
-
-func finalizeClientEndpointResolverOptions(options *Options) {
- options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
-
- if len(options.EndpointOptions.ResolvedRegion) == 0 {
- const fipsInfix = "-fips-"
- const fipsPrefix = "fips-"
- const fipsSuffix = "-fips"
-
- if strings.Contains(options.Region, fipsInfix) ||
- strings.Contains(options.Region, fipsPrefix) ||
- strings.Contains(options.Region, fipsSuffix) {
- options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
- options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
- options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
- }
- }
-
-}
-
-func resolveEndpointResolverV2(options *Options) {
- if options.EndpointResolverV2 == nil {
- options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
- }
-}
-
-func resolveBaseEndpoint(cfg aws.Config, o *Options) {
- if cfg.BaseEndpoint != nil {
- o.BaseEndpoint = cfg.BaseEndpoint
- }
-
- _, g := os.LookupEnv("AWS_ENDPOINT_URL")
- _, s := os.LookupEnv("AWS_ENDPOINT_URL_ORGANIZATIONS")
-
- if g && !s {
- return
- }
-
- value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Organizations", cfg.ConfigSources)
- if found && err == nil {
- o.BaseEndpoint = &value
- }
-}
-
-func bindRegion(region string) (*string, error) {
- if region == "" {
- return nil, nil
- }
- if !rulesfn.IsValidHostLabel(region, true) {
- return nil, fmt.Errorf("invalid input region %s", region)
- }
-
- return aws.String(endpoints.MapFIPSRegion(region)), nil
-}
-
-// EndpointParameters provides the parameters that influence how endpoints are
-// resolved.
-type EndpointParameters struct {
- // The AWS region used to dispatch the request.
- //
- // Parameter is
- // required.
- //
- // AWS::Region
- Region *string
-
- // When true, use the dual-stack endpoint. If the configured endpoint does not
- // support dual-stack, dispatching the request MAY return an error.
- //
- // Defaults to
- // false if no value is provided.
- //
- // AWS::UseDualStack
- UseDualStack *bool
-
- // When true, send this request to the FIPS-compliant regional endpoint. If the
- // configured endpoint does not have a FIPS compliant endpoint, dispatching the
- // request will return an error.
- //
- // Defaults to false if no value is
- // provided.
- //
- // AWS::UseFIPS
- UseFIPS *bool
-
- // Override the endpoint used to send this request
- //
- // Parameter is
- // required.
- //
- // SDK::Endpoint
- Endpoint *string
-}
-
-// ValidateRequired validates required parameters are set.
-func (p EndpointParameters) ValidateRequired() error {
- if p.UseDualStack == nil {
- return fmt.Errorf("parameter UseDualStack is required")
- }
-
- if p.UseFIPS == nil {
- return fmt.Errorf("parameter UseFIPS is required")
- }
-
- return nil
-}
-
-// WithDefaults returns a shallow copy of EndpointParameterswith default values
-// applied to members where applicable.
-func (p EndpointParameters) WithDefaults() EndpointParameters {
- if p.UseDualStack == nil {
- p.UseDualStack = ptr.Bool(false)
- }
-
- if p.UseFIPS == nil {
- p.UseFIPS = ptr.Bool(false)
- }
- return p
-}
-
-type stringSlice []string
-
-func (s stringSlice) Get(i int) *string {
- if i < 0 || i >= len(s) {
- return nil
- }
-
- v := s[i]
- return &v
-}
-
-// EndpointResolverV2 provides the interface for resolving service endpoints.
-type EndpointResolverV2 interface {
- // ResolveEndpoint attempts to resolve the endpoint with the provided options,
- // returning the endpoint if found. Otherwise an error is returned.
- ResolveEndpoint(ctx context.Context, params EndpointParameters) (
- smithyendpoints.Endpoint, error,
- )
-}
-
-// resolver provides the implementation for resolving endpoints.
-type resolver struct{}
-
-func NewDefaultEndpointResolverV2() EndpointResolverV2 {
- return &resolver{}
-}
-
-// ResolveEndpoint attempts to resolve the endpoint with the provided options,
-// returning the endpoint if found. Otherwise an error is returned.
-func (r *resolver) ResolveEndpoint(
- ctx context.Context, params EndpointParameters,
-) (
- endpoint smithyendpoints.Endpoint, err error,
-) {
- params = params.WithDefaults()
- if err = params.ValidateRequired(); err != nil {
- return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
- }
- _UseDualStack := *params.UseDualStack
- _ = _UseDualStack
- _UseFIPS := *params.UseFIPS
- _ = _UseFIPS
-
- if exprVal := params.Endpoint; exprVal != nil {
- _Endpoint := *exprVal
- _ = _Endpoint
- if _UseFIPS == true {
- return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
- }
- if _UseDualStack == true {
- return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
- }
- uriString := _Endpoint
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- if exprVal := params.Region; exprVal != nil {
- _Region := *exprVal
- _ = _Region
- if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
- _PartitionResult := *exprVal
- _ = _PartitionResult
- if _PartitionResult.Name == "aws" {
- if _UseFIPS == false {
- if _UseDualStack == false {
- uriString := "https://organizations.us-east-1.amazonaws.com"
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- Properties: func() smithy.Properties {
- var out smithy.Properties
- smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
- {
- SchemeID: "aws.auth#sigv4",
- SignerProperties: func() smithy.Properties {
- var sp smithy.Properties
- smithyhttp.SetSigV4SigningName(&sp, "organizations")
- smithyhttp.SetSigV4ASigningName(&sp, "organizations")
-
- smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
- return sp
- }(),
- },
- })
- return out
- }(),
- }, nil
- }
- }
- }
- if _PartitionResult.Name == "aws" {
- if _UseFIPS == true {
- if _UseDualStack == false {
- uriString := "https://organizations-fips.us-east-1.amazonaws.com"
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- Properties: func() smithy.Properties {
- var out smithy.Properties
- smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
- {
- SchemeID: "aws.auth#sigv4",
- SignerProperties: func() smithy.Properties {
- var sp smithy.Properties
- smithyhttp.SetSigV4SigningName(&sp, "organizations")
- smithyhttp.SetSigV4ASigningName(&sp, "organizations")
-
- smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1")
- return sp
- }(),
- },
- })
- return out
- }(),
- }, nil
- }
- }
- }
- if _PartitionResult.Name == "aws-cn" {
- if _UseFIPS == false {
- if _UseDualStack == false {
- uriString := "https://organizations.cn-northwest-1.amazonaws.com.cn"
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- Properties: func() smithy.Properties {
- var out smithy.Properties
- smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
- {
- SchemeID: "aws.auth#sigv4",
- SignerProperties: func() smithy.Properties {
- var sp smithy.Properties
- smithyhttp.SetSigV4SigningName(&sp, "organizations")
- smithyhttp.SetSigV4ASigningName(&sp, "organizations")
-
- smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1")
- return sp
- }(),
- },
- })
- return out
- }(),
- }, nil
- }
- }
- }
- if _PartitionResult.Name == "aws-us-gov" {
- if _UseFIPS == false {
- if _UseDualStack == false {
- uriString := "https://organizations.us-gov-west-1.amazonaws.com"
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- Properties: func() smithy.Properties {
- var out smithy.Properties
- smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
- {
- SchemeID: "aws.auth#sigv4",
- SignerProperties: func() smithy.Properties {
- var sp smithy.Properties
- smithyhttp.SetSigV4SigningName(&sp, "organizations")
- smithyhttp.SetSigV4ASigningName(&sp, "organizations")
-
- smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1")
- return sp
- }(),
- },
- })
- return out
- }(),
- }, nil
- }
- }
- }
- if _PartitionResult.Name == "aws-us-gov" {
- if _UseFIPS == true {
- if _UseDualStack == false {
- uriString := "https://organizations.us-gov-west-1.amazonaws.com"
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- Properties: func() smithy.Properties {
- var out smithy.Properties
- smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
- {
- SchemeID: "aws.auth#sigv4",
- SignerProperties: func() smithy.Properties {
- var sp smithy.Properties
- smithyhttp.SetSigV4SigningName(&sp, "organizations")
- smithyhttp.SetSigV4ASigningName(&sp, "organizations")
-
- smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1")
- return sp
- }(),
- },
- })
- return out
- }(),
- }, nil
- }
- }
- }
- if _PartitionResult.Name == "aws-iso" {
- if _UseFIPS == false {
- if _UseDualStack == false {
- uriString := "https://organizations.us-iso-east-1.c2s.ic.gov"
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- Properties: func() smithy.Properties {
- var out smithy.Properties
- smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
- {
- SchemeID: "aws.auth#sigv4",
- SignerProperties: func() smithy.Properties {
- var sp smithy.Properties
- smithyhttp.SetSigV4SigningName(&sp, "organizations")
- smithyhttp.SetSigV4ASigningName(&sp, "organizations")
-
- smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1")
- return sp
- }(),
- },
- })
- return out
- }(),
- }, nil
- }
- }
- }
- if _PartitionResult.Name == "aws-iso-b" {
- if _UseFIPS == false {
- if _UseDualStack == false {
- uriString := "https://organizations.us-isob-east-1.sc2s.sgov.gov"
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- Properties: func() smithy.Properties {
- var out smithy.Properties
- smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
- {
- SchemeID: "aws.auth#sigv4",
- SignerProperties: func() smithy.Properties {
- var sp smithy.Properties
- smithyhttp.SetSigV4SigningName(&sp, "organizations")
- smithyhttp.SetSigV4ASigningName(&sp, "organizations")
-
- smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1")
- return sp
- }(),
- },
- })
- return out
- }(),
- }, nil
- }
- }
- }
- if _PartitionResult.Name == "aws-iso-f" {
- if _UseFIPS == false {
- if _UseDualStack == false {
- uriString := "https://organizations.us-isof-south-1.csp.hci.ic.gov"
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- Properties: func() smithy.Properties {
- var out smithy.Properties
- smithyauth.SetAuthOptions(&out, []*smithyauth.Option{
- {
- SchemeID: "aws.auth#sigv4",
- SignerProperties: func() smithy.Properties {
- var sp smithy.Properties
- smithyhttp.SetSigV4SigningName(&sp, "organizations")
- smithyhttp.SetSigV4ASigningName(&sp, "organizations")
-
- smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1")
- return sp
- }(),
- },
- })
- return out
- }(),
- }, nil
- }
- }
- }
- if _UseFIPS == true {
- if _UseDualStack == true {
- if true == _PartitionResult.SupportsFIPS {
- if true == _PartitionResult.SupportsDualStack {
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://organizations-fips.")
- out.WriteString(_Region)
- out.WriteString(".")
- out.WriteString(_PartitionResult.DualStackDnsSuffix)
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- }
- return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
- }
- }
- if _UseFIPS == true {
- if _PartitionResult.SupportsFIPS == true {
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://organizations-fips.")
- out.WriteString(_Region)
- out.WriteString(".")
- out.WriteString(_PartitionResult.DnsSuffix)
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
- }
- if _UseDualStack == true {
- if true == _PartitionResult.SupportsDualStack {
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://organizations.")
- out.WriteString(_Region)
- out.WriteString(".")
- out.WriteString(_PartitionResult.DualStackDnsSuffix)
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
- }
- uriString := func() string {
- var out strings.Builder
- out.WriteString("https://organizations.")
- out.WriteString(_Region)
- out.WriteString(".")
- out.WriteString(_PartitionResult.DnsSuffix)
- return out.String()
- }()
-
- uri, err := url.Parse(uriString)
- if err != nil {
- return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
- }
-
- return smithyendpoints.Endpoint{
- URI: *uri,
- Headers: http.Header{},
- }, nil
- }
- return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
- }
- return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
-}
-
-type endpointParamsBinder interface {
- bindEndpointParams(*EndpointParameters)
-}
-
-func bindEndpointParams(ctx context.Context, input interface{}, options Options) (*EndpointParameters, error) {
- params := &EndpointParameters{}
-
- region, err := bindRegion(options.Region)
- if err != nil {
- return nil, err
- }
- params.Region = region
-
- params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
- params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
- params.Endpoint = options.BaseEndpoint
-
- if b, ok := input.(endpointParamsBinder); ok {
- b.bindEndpointParams(params)
- }
-
- return params, nil
-}
-
-type resolveEndpointV2Middleware struct {
- options Options
-}
-
-func (*resolveEndpointV2Middleware) ID() string {
- return "ResolveEndpointV2"
-}
-
-func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
- out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "ResolveEndpoint")
- defer span.End()
-
- if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
- return next.HandleFinalize(ctx, in)
- }
-
- req, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
- }
-
- if m.options.EndpointResolverV2 == nil {
- return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
- }
-
- params, err := bindEndpointParams(ctx, getOperationInput(ctx), m.options)
- if err != nil {
- return out, metadata, fmt.Errorf("failed to bind endpoint params, %w", err)
- }
- endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration",
- func() (smithyendpoints.Endpoint, error) {
- return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
- })
- if err != nil {
- return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
- }
-
- span.SetProperty("client.call.resolved_endpoint", endpt.URI.String())
-
- if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
- endpt.URI.RawPath = endpt.URI.Path
- }
- req.URL.Scheme = endpt.URI.Scheme
- req.URL.Host = endpt.URI.Host
- req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
- req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
- for k := range endpt.Headers {
- req.Header.Set(k, endpt.Headers.Get(k))
- }
-
- rscheme := getResolvedAuthScheme(ctx)
- if rscheme == nil {
- return out, metadata, fmt.Errorf("no resolved auth scheme")
- }
-
- opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
- for _, o := range opts {
- rscheme.SignerProperties.SetAll(&o.SignerProperties)
- }
-
- span.End()
- return next.HandleFinalize(ctx, in)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/generated.json
deleted file mode 100644
index 7dfbcce85..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/generated.json
+++ /dev/null
@@ -1,95 +0,0 @@
-{
- "dependencies": {
- "github.com/aws/aws-sdk-go-v2": "v1.4.0",
- "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
- "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
- "github.com/aws/smithy-go": "v1.4.0"
- },
- "files": [
- "api_client.go",
- "api_client_test.go",
- "api_op_AcceptHandshake.go",
- "api_op_AttachPolicy.go",
- "api_op_CancelHandshake.go",
- "api_op_CloseAccount.go",
- "api_op_CreateAccount.go",
- "api_op_CreateGovCloudAccount.go",
- "api_op_CreateOrganization.go",
- "api_op_CreateOrganizationalUnit.go",
- "api_op_CreatePolicy.go",
- "api_op_DeclineHandshake.go",
- "api_op_DeleteOrganization.go",
- "api_op_DeleteOrganizationalUnit.go",
- "api_op_DeletePolicy.go",
- "api_op_DeleteResourcePolicy.go",
- "api_op_DeregisterDelegatedAdministrator.go",
- "api_op_DescribeAccount.go",
- "api_op_DescribeCreateAccountStatus.go",
- "api_op_DescribeEffectivePolicy.go",
- "api_op_DescribeHandshake.go",
- "api_op_DescribeOrganization.go",
- "api_op_DescribeOrganizationalUnit.go",
- "api_op_DescribePolicy.go",
- "api_op_DescribeResourcePolicy.go",
- "api_op_DescribeResponsibilityTransfer.go",
- "api_op_DetachPolicy.go",
- "api_op_DisableAWSServiceAccess.go",
- "api_op_DisablePolicyType.go",
- "api_op_EnableAWSServiceAccess.go",
- "api_op_EnableAllFeatures.go",
- "api_op_EnablePolicyType.go",
- "api_op_InviteAccountToOrganization.go",
- "api_op_InviteOrganizationToTransferResponsibility.go",
- "api_op_LeaveOrganization.go",
- "api_op_ListAWSServiceAccessForOrganization.go",
- "api_op_ListAccounts.go",
- "api_op_ListAccountsForParent.go",
- "api_op_ListAccountsWithInvalidEffectivePolicy.go",
- "api_op_ListChildren.go",
- "api_op_ListCreateAccountStatus.go",
- "api_op_ListDelegatedAdministrators.go",
- "api_op_ListDelegatedServicesForAccount.go",
- "api_op_ListEffectivePolicyValidationErrors.go",
- "api_op_ListHandshakesForAccount.go",
- "api_op_ListHandshakesForOrganization.go",
- "api_op_ListInboundResponsibilityTransfers.go",
- "api_op_ListOrganizationalUnitsForParent.go",
- "api_op_ListOutboundResponsibilityTransfers.go",
- "api_op_ListParents.go",
- "api_op_ListPolicies.go",
- "api_op_ListPoliciesForTarget.go",
- "api_op_ListRoots.go",
- "api_op_ListTagsForResource.go",
- "api_op_ListTargetsForPolicy.go",
- "api_op_MoveAccount.go",
- "api_op_PutResourcePolicy.go",
- "api_op_RegisterDelegatedAdministrator.go",
- "api_op_RemoveAccountFromOrganization.go",
- "api_op_TagResource.go",
- "api_op_TerminateResponsibilityTransfer.go",
- "api_op_UntagResource.go",
- "api_op_UpdateOrganizationalUnit.go",
- "api_op_UpdatePolicy.go",
- "api_op_UpdateResponsibilityTransfer.go",
- "auth.go",
- "deserializers.go",
- "doc.go",
- "endpoints.go",
- "endpoints_config_test.go",
- "endpoints_test.go",
- "generated.json",
- "internal/endpoints/endpoints.go",
- "internal/endpoints/endpoints_test.go",
- "options.go",
- "serializers.go",
- "snapshot_test.go",
- "sra_operation_order_test.go",
- "types/enums.go",
- "types/errors.go",
- "types/types.go",
- "validators.go"
- ],
- "go": "1.24",
- "module": "github.com/aws/aws-sdk-go-v2/service/organizations",
- "unstable": false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/go_module_metadata.go
deleted file mode 100644
index 20fdeb770..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/go_module_metadata.go
+++ /dev/null
@@ -1,6 +0,0 @@
-// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
-
-package organizations
-
-// goModuleVersion is the tagged release for this module
-const goModuleVersion = "1.51.0"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/internal/endpoints/endpoints.go
deleted file mode 100644
index 3fb729b60..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/internal/endpoints/endpoints.go
+++ /dev/null
@@ -1,446 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package endpoints
-
-import (
- "github.com/aws/aws-sdk-go-v2/aws"
- endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
- "github.com/aws/smithy-go/logging"
- "regexp"
-)
-
-// Options is the endpoint resolver configuration options
-type Options struct {
- // Logger is a logging implementation that log events should be sent to.
- Logger logging.Logger
-
- // LogDeprecated indicates that deprecated endpoints should be logged to the
- // provided logger.
- LogDeprecated bool
-
- // ResolvedRegion is used to override the region to be resolved, rather then the
- // using the value passed to the ResolveEndpoint method. This value is used by the
- // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
- // name. You must not set this value directly in your application.
- ResolvedRegion string
-
- // DisableHTTPS informs the resolver to return an endpoint that does not use the
- // HTTPS scheme.
- DisableHTTPS bool
-
- // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
- UseDualStackEndpoint aws.DualStackEndpointState
-
- // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
- UseFIPSEndpoint aws.FIPSEndpointState
-}
-
-func (o Options) GetResolvedRegion() string {
- return o.ResolvedRegion
-}
-
-func (o Options) GetDisableHTTPS() bool {
- return o.DisableHTTPS
-}
-
-func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
- return o.UseDualStackEndpoint
-}
-
-func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
- return o.UseFIPSEndpoint
-}
-
-func transformToSharedOptions(options Options) endpoints.Options {
- return endpoints.Options{
- Logger: options.Logger,
- LogDeprecated: options.LogDeprecated,
- ResolvedRegion: options.ResolvedRegion,
- DisableHTTPS: options.DisableHTTPS,
- UseDualStackEndpoint: options.UseDualStackEndpoint,
- UseFIPSEndpoint: options.UseFIPSEndpoint,
- }
-}
-
-// Resolver Organizations endpoint resolver
-type Resolver struct {
- partitions endpoints.Partitions
-}
-
-// ResolveEndpoint resolves the service endpoint for the given region and options
-func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
- if len(region) == 0 {
- return endpoint, &aws.MissingRegionError{}
- }
-
- opt := transformToSharedOptions(options)
- return r.partitions.ResolveEndpoint(region, opt)
-}
-
-// New returns a new Resolver
-func New() *Resolver {
- return &Resolver{
- partitions: defaultPartitions,
- }
-}
-
-var partitionRegexp = struct {
- Aws *regexp.Regexp
- AwsCn *regexp.Regexp
- AwsEusc *regexp.Regexp
- AwsIso *regexp.Regexp
- AwsIsoB *regexp.Regexp
- AwsIsoE *regexp.Regexp
- AwsIsoF *regexp.Regexp
- AwsUsGov *regexp.Regexp
-}{
-
- Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
- AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
- AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"),
- AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
- AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
- AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
- AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
- AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
-}
-
-var defaultPartitions = endpoints.Partitions{
- {
- ID: "aws",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.DualStackVariant,
- }: {
- Hostname: "organizations.{region}.api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.{region}.amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
- }: {
- Hostname: "organizations-fips.{region}.api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "organizations.{region}.amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.Aws,
- IsRegionalized: false,
- PartitionEndpoint: "aws-global",
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "aws-global",
- }: endpoints.Endpoint{
- Hostname: "organizations.us-east-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-east-1",
- },
- },
- endpoints.EndpointKey{
- Region: "aws-global",
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.us-east-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-east-1",
- },
- },
- endpoints.EndpointKey{
- Region: "fips-aws-global",
- }: endpoints.Endpoint{
- Hostname: "organizations-fips.us-east-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-east-1",
- },
- Deprecated: aws.TrueTernary,
- },
- },
- },
- {
- ID: "aws-cn",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.DualStackVariant,
- }: {
- Hostname: "organizations.{region}.api.amazonwebservices.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.{region}.amazonaws.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
- }: {
- Hostname: "organizations-fips.{region}.api.amazonwebservices.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "organizations.{region}.amazonaws.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsCn,
- IsRegionalized: false,
- PartitionEndpoint: "aws-cn-global",
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "aws-cn-global",
- }: endpoints.Endpoint{
- Hostname: "organizations.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: endpoints.CredentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- {
- ID: "aws-eusc",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.DualStackVariant,
- }: {
- Hostname: "organizations.{region}.api.amazonwebservices.eu",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.{region}.amazonaws.eu",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
- }: {
- Hostname: "organizations-fips.{region}.api.amazonwebservices.eu",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "organizations.{region}.amazonaws.eu",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsEusc,
- IsRegionalized: true,
- },
- {
- ID: "aws-iso",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.{region}.c2s.ic.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "organizations.{region}.c2s.ic.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsIso,
- IsRegionalized: false,
- PartitionEndpoint: "aws-iso-global",
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "aws-iso-global",
- }: endpoints.Endpoint{
- Hostname: "organizations.us-iso-east-1.c2s.ic.gov",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-iso-east-1",
- },
- },
- },
- },
- {
- ID: "aws-iso-b",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.{region}.sc2s.sgov.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "organizations.{region}.sc2s.sgov.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsIsoB,
- IsRegionalized: false,
- PartitionEndpoint: "aws-iso-b-global",
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "aws-iso-b-global",
- }: endpoints.Endpoint{
- Hostname: "organizations.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- {
- ID: "aws-iso-e",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.{region}.cloud.adc-e.uk",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "organizations.{region}.cloud.adc-e.uk",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsIsoE,
- IsRegionalized: false,
- PartitionEndpoint: "aws-iso-e-global",
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "aws-iso-e-global",
- }: endpoints.Endpoint{
- Hostname: "organizations.eu-isoe-west-1.cloud.adc-e.uk",
- CredentialScope: endpoints.CredentialScope{
- Region: "eu-isoe-west-1",
- },
- },
- },
- },
- {
- ID: "aws-iso-f",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.{region}.csp.hci.ic.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "organizations.{region}.csp.hci.ic.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsIsoF,
- IsRegionalized: false,
- PartitionEndpoint: "aws-iso-f-global",
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "aws-iso-f-global",
- }: endpoints.Endpoint{
- Hostname: "organizations.us-isof-south-1.csp.hci.ic.gov",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-isof-south-1",
- },
- },
- },
- },
- {
- ID: "aws-us-gov",
- Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
- {
- Variant: endpoints.DualStackVariant,
- }: {
- Hostname: "organizations.{region}.api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations-fips.{region}.amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
- }: {
- Hostname: "organizations-fips.{region}.api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- {
- Variant: 0,
- }: {
- Hostname: "organizations.{region}.amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- RegionRegex: partitionRegexp.AwsUsGov,
- IsRegionalized: false,
- PartitionEndpoint: "aws-us-gov-global",
- Endpoints: endpoints.Endpoints{
- endpoints.EndpointKey{
- Region: "aws-us-gov-global",
- }: endpoints.Endpoint{
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpoints.EndpointKey{
- Region: "aws-us-gov-global",
- Variant: endpoints.FIPSVariant,
- }: {
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpoints.EndpointKey{
- Region: "fips-aws-us-gov-global",
- }: endpoints.Endpoint{
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: endpoints.CredentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: aws.TrueTernary,
- },
- },
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/options.go
deleted file mode 100644
index f7075e1bb..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/options.go
+++ /dev/null
@@ -1,238 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "github.com/aws/aws-sdk-go-v2/aws"
- awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
- internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
- smithyauth "github.com/aws/smithy-go/auth"
- "github.com/aws/smithy-go/logging"
- "github.com/aws/smithy-go/metrics"
- "github.com/aws/smithy-go/middleware"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "net/http"
-)
-
-type HTTPClient interface {
- Do(*http.Request) (*http.Response, error)
-}
-
-type Options struct {
- // Set of options to modify how an operation is invoked. These apply to all
- // operations invoked for this client. Use functional options on operation call to
- // modify this list for per operation behavior.
- APIOptions []func(*middleware.Stack) error
-
- // The optional application specific identifier appended to the User-Agent header.
- AppID string
-
- // This endpoint will be given as input to an EndpointResolverV2. It is used for
- // providing a custom base endpoint that is subject to modifications by the
- // processing EndpointResolverV2.
- BaseEndpoint *string
-
- // Configures the events that will be sent to the configured logger.
- ClientLogMode aws.ClientLogMode
-
- // The credentials object to use when signing requests.
- Credentials aws.CredentialsProvider
-
- // The configuration DefaultsMode that the SDK should use when constructing the
- // clients initial default settings.
- DefaultsMode aws.DefaultsMode
-
- // The endpoint options to be used when attempting to resolve an endpoint.
- EndpointOptions EndpointResolverOptions
-
- // The service endpoint resolver.
- //
- // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
- // value for this field will likely prevent you from using any endpoint-related
- // service features released after the introduction of EndpointResolverV2 and
- // BaseEndpoint.
- //
- // To migrate an EndpointResolver implementation that uses a custom endpoint, set
- // the client option BaseEndpoint instead.
- EndpointResolver EndpointResolver
-
- // Resolves the endpoint used for a particular service operation.
- EndpointResolverV2 EndpointResolverV2
-
- // Signature Version 4 (SigV4) Signer
- HTTPSignerV4 HTTPSignerV4
-
- // The logger writer interface to write logging messages to.
- Logger logging.Logger
-
- // The client meter provider.
- MeterProvider metrics.MeterProvider
-
- // The region to send requests to. (Required)
- Region string
-
- // RetryMaxAttempts specifies the maximum number attempts an API client will call
- // an operation that fails with a retryable error. A value of 0 is ignored, and
- // will not be used to configure the API client created default retryer, or modify
- // per operation call's retry max attempts.
- //
- // If specified in an operation call's functional options with a value that is
- // different than the constructed client's Options, the Client's Retryer will be
- // wrapped to use the operation's specific RetryMaxAttempts value.
- RetryMaxAttempts int
-
- // RetryMode specifies the retry mode the API client will be created with, if
- // Retryer option is not also specified.
- //
- // When creating a new API Clients this member will only be used if the Retryer
- // Options member is nil. This value will be ignored if Retryer is not nil.
- //
- // Currently does not support per operation call overrides, may in the future.
- RetryMode aws.RetryMode
-
- // Retryer guides how HTTP requests should be retried in case of recoverable
- // failures. When nil the API client will use a default retryer. The kind of
- // default retry created by the API client can be changed with the RetryMode
- // option.
- Retryer aws.Retryer
-
- // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
- // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
- // should not populate this structure programmatically, or rely on the values here
- // within your applications.
- RuntimeEnvironment aws.RuntimeEnvironment
-
- // The client tracer provider.
- TracerProvider tracing.TracerProvider
-
- // The initial DefaultsMode used when the client options were constructed. If the
- // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
- // value was at that point in time.
- //
- // Currently does not support per operation call overrides, may in the future.
- resolvedDefaultsMode aws.DefaultsMode
-
- // The HTTP client to invoke API calls with. Defaults to client's default HTTP
- // implementation if nil.
- HTTPClient HTTPClient
-
- // Client registry of operation interceptors.
- Interceptors smithyhttp.InterceptorRegistry
-
- // The auth scheme resolver which determines how to authenticate for each
- // operation.
- AuthSchemeResolver AuthSchemeResolver
-
- // The list of auth schemes supported by the client.
- AuthSchemes []smithyhttp.AuthScheme
-
- // Priority list of preferred auth scheme names (e.g. sigv4a).
- AuthSchemePreference []string
-}
-
-// Copy creates a clone where the APIOptions list is deep copied.
-func (o Options) Copy() Options {
- to := o
- to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
- copy(to.APIOptions, o.APIOptions)
- to.Interceptors = o.Interceptors.Copy()
-
- return to
-}
-
-func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
- if schemeID == "aws.auth#sigv4" {
- return getSigV4IdentityResolver(o)
- }
- if schemeID == "smithy.api#noAuth" {
- return &smithyauth.AnonymousIdentityResolver{}
- }
- return nil
-}
-
-// WithAPIOptions returns a functional option for setting the Client's APIOptions
-// option.
-func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, optFns...)
- }
-}
-
-// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
-// this field will likely prevent you from using any endpoint-related service
-// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
-//
-// To migrate an EndpointResolver implementation that uses a custom endpoint, set
-// the client option BaseEndpoint instead.
-func WithEndpointResolver(v EndpointResolver) func(*Options) {
- return func(o *Options) {
- o.EndpointResolver = v
- }
-}
-
-// WithEndpointResolverV2 returns a functional option for setting the Client's
-// EndpointResolverV2 option.
-func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
- return func(o *Options) {
- o.EndpointResolverV2 = v
- }
-}
-
-func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
- if o.Credentials != nil {
- return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
- }
- return nil
-}
-
-// WithSigV4SigningName applies an override to the authentication workflow to
-// use the given signing name for SigV4-authenticated operations.
-//
-// This is an advanced setting. The value here is FINAL, taking precedence over
-// the resolved signing name from both auth scheme resolution and endpoint
-// resolution.
-func WithSigV4SigningName(name string) func(*Options) {
- fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
- ) {
- return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
- }
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
- return s.Initialize.Add(
- middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
- middleware.Before,
- )
- })
- }
-}
-
-// WithSigV4SigningRegion applies an override to the authentication workflow to
-// use the given signing region for SigV4-authenticated operations.
-//
-// This is an advanced setting. The value here is FINAL, taking precedence over
-// the resolved signing region from both auth scheme resolution and endpoint
-// resolution.
-func WithSigV4SigningRegion(region string) func(*Options) {
- fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
- ) {
- return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
- }
- return func(o *Options) {
- o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
- return s.Initialize.Add(
- middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
- middleware.Before,
- )
- })
- }
-}
-
-func ignoreAnonymousAuth(options *Options) {
- if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
- options.Credentials = nil
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/serializers.go
deleted file mode 100644
index e284a4962..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/serializers.go
+++ /dev/null
@@ -1,5036 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "bytes"
- "context"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- smithy "github.com/aws/smithy-go"
- "github.com/aws/smithy-go/encoding/httpbinding"
- smithyjson "github.com/aws/smithy-go/encoding/json"
- "github.com/aws/smithy-go/middleware"
- smithytime "github.com/aws/smithy-go/time"
- "github.com/aws/smithy-go/tracing"
- smithyhttp "github.com/aws/smithy-go/transport/http"
- "path"
- "strings"
-)
-
-type awsAwsjson11_serializeOpAcceptHandshake struct {
-}
-
-func (*awsAwsjson11_serializeOpAcceptHandshake) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpAcceptHandshake) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*AcceptHandshakeInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.AcceptHandshake")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentAcceptHandshakeInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpAttachPolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpAttachPolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpAttachPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*AttachPolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.AttachPolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentAttachPolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpCancelHandshake struct {
-}
-
-func (*awsAwsjson11_serializeOpCancelHandshake) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpCancelHandshake) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CancelHandshakeInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.CancelHandshake")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentCancelHandshakeInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpCloseAccount struct {
-}
-
-func (*awsAwsjson11_serializeOpCloseAccount) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpCloseAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CloseAccountInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.CloseAccount")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentCloseAccountInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpCreateAccount struct {
-}
-
-func (*awsAwsjson11_serializeOpCreateAccount) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpCreateAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateAccountInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.CreateAccount")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentCreateAccountInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpCreateGovCloudAccount struct {
-}
-
-func (*awsAwsjson11_serializeOpCreateGovCloudAccount) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpCreateGovCloudAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateGovCloudAccountInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.CreateGovCloudAccount")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentCreateGovCloudAccountInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpCreateOrganization struct {
-}
-
-func (*awsAwsjson11_serializeOpCreateOrganization) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpCreateOrganization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateOrganizationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.CreateOrganization")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentCreateOrganizationInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpCreateOrganizationalUnit struct {
-}
-
-func (*awsAwsjson11_serializeOpCreateOrganizationalUnit) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpCreateOrganizationalUnit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreateOrganizationalUnitInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.CreateOrganizationalUnit")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentCreateOrganizationalUnitInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpCreatePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpCreatePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpCreatePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*CreatePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.CreatePolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentCreatePolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDeclineHandshake struct {
-}
-
-func (*awsAwsjson11_serializeOpDeclineHandshake) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDeclineHandshake) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeclineHandshakeInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DeclineHandshake")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDeclineHandshakeInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDeleteOrganization struct {
-}
-
-func (*awsAwsjson11_serializeOpDeleteOrganization) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDeleteOrganization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteOrganizationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DeleteOrganization")
-
- if request, err = request.SetStream(strings.NewReader(`{}`)); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDeleteOrganizationalUnit struct {
-}
-
-func (*awsAwsjson11_serializeOpDeleteOrganizationalUnit) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDeleteOrganizationalUnit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteOrganizationalUnitInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DeleteOrganizationalUnit")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDeleteOrganizationalUnitInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDeletePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpDeletePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDeletePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeletePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DeletePolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDeletePolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDeleteResourcePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpDeleteResourcePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeleteResourcePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DeleteResourcePolicy")
-
- if request, err = request.SetStream(strings.NewReader(`{}`)); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDeregisterDelegatedAdministrator struct {
-}
-
-func (*awsAwsjson11_serializeOpDeregisterDelegatedAdministrator) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDeregisterDelegatedAdministrator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DeregisterDelegatedAdministratorInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DeregisterDelegatedAdministrator")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDeregisterDelegatedAdministratorInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribeAccount struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribeAccount) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribeAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeAccountInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribeAccount")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDescribeAccountInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribeCreateAccountStatus struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribeCreateAccountStatus) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribeCreateAccountStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeCreateAccountStatusInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribeCreateAccountStatus")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDescribeCreateAccountStatusInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribeEffectivePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribeEffectivePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribeEffectivePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeEffectivePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribeEffectivePolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDescribeEffectivePolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribeHandshake struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribeHandshake) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribeHandshake) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeHandshakeInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribeHandshake")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDescribeHandshakeInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribeOrganization struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribeOrganization) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribeOrganization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeOrganizationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribeOrganization")
-
- if request, err = request.SetStream(strings.NewReader(`{}`)); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribeOrganizationalUnit struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribeOrganizationalUnit) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribeOrganizationalUnit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeOrganizationalUnitInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribeOrganizationalUnit")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDescribeOrganizationalUnitInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribePolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDescribePolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribeResourcePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribeResourcePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribeResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeResourcePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribeResourcePolicy")
-
- if request, err = request.SetStream(strings.NewReader(`{}`)); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDescribeResponsibilityTransfer struct {
-}
-
-func (*awsAwsjson11_serializeOpDescribeResponsibilityTransfer) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDescribeResponsibilityTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DescribeResponsibilityTransferInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DescribeResponsibilityTransfer")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDescribeResponsibilityTransferInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDetachPolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpDetachPolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDetachPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DetachPolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DetachPolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDetachPolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDisableAWSServiceAccess struct {
-}
-
-func (*awsAwsjson11_serializeOpDisableAWSServiceAccess) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDisableAWSServiceAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DisableAWSServiceAccessInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DisableAWSServiceAccess")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDisableAWSServiceAccessInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpDisablePolicyType struct {
-}
-
-func (*awsAwsjson11_serializeOpDisablePolicyType) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpDisablePolicyType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*DisablePolicyTypeInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.DisablePolicyType")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentDisablePolicyTypeInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpEnableAllFeatures struct {
-}
-
-func (*awsAwsjson11_serializeOpEnableAllFeatures) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpEnableAllFeatures) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*EnableAllFeaturesInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.EnableAllFeatures")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentEnableAllFeaturesInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpEnableAWSServiceAccess struct {
-}
-
-func (*awsAwsjson11_serializeOpEnableAWSServiceAccess) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpEnableAWSServiceAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*EnableAWSServiceAccessInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.EnableAWSServiceAccess")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentEnableAWSServiceAccessInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpEnablePolicyType struct {
-}
-
-func (*awsAwsjson11_serializeOpEnablePolicyType) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpEnablePolicyType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*EnablePolicyTypeInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.EnablePolicyType")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentEnablePolicyTypeInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpInviteAccountToOrganization struct {
-}
-
-func (*awsAwsjson11_serializeOpInviteAccountToOrganization) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpInviteAccountToOrganization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*InviteAccountToOrganizationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.InviteAccountToOrganization")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentInviteAccountToOrganizationInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpInviteOrganizationToTransferResponsibility struct {
-}
-
-func (*awsAwsjson11_serializeOpInviteOrganizationToTransferResponsibility) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpInviteOrganizationToTransferResponsibility) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*InviteOrganizationToTransferResponsibilityInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.InviteOrganizationToTransferResponsibility")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentInviteOrganizationToTransferResponsibilityInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpLeaveOrganization struct {
-}
-
-func (*awsAwsjson11_serializeOpLeaveOrganization) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpLeaveOrganization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*LeaveOrganizationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.LeaveOrganization")
-
- if request, err = request.SetStream(strings.NewReader(`{}`)); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListAccounts struct {
-}
-
-func (*awsAwsjson11_serializeOpListAccounts) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListAccountsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListAccounts")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListAccountsInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListAccountsForParent struct {
-}
-
-func (*awsAwsjson11_serializeOpListAccountsForParent) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListAccountsForParent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListAccountsForParentInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListAccountsForParent")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListAccountsForParentInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListAccountsWithInvalidEffectivePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpListAccountsWithInvalidEffectivePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListAccountsWithInvalidEffectivePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListAccountsWithInvalidEffectivePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListAccountsWithInvalidEffectivePolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListAccountsWithInvalidEffectivePolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListAWSServiceAccessForOrganization struct {
-}
-
-func (*awsAwsjson11_serializeOpListAWSServiceAccessForOrganization) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListAWSServiceAccessForOrganization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListAWSServiceAccessForOrganizationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListAWSServiceAccessForOrganization")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListAWSServiceAccessForOrganizationInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListChildren struct {
-}
-
-func (*awsAwsjson11_serializeOpListChildren) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListChildren) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListChildrenInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListChildren")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListChildrenInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListCreateAccountStatus struct {
-}
-
-func (*awsAwsjson11_serializeOpListCreateAccountStatus) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListCreateAccountStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListCreateAccountStatusInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListCreateAccountStatus")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListCreateAccountStatusInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListDelegatedAdministrators struct {
-}
-
-func (*awsAwsjson11_serializeOpListDelegatedAdministrators) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListDelegatedAdministrators) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListDelegatedAdministratorsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListDelegatedAdministrators")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListDelegatedAdministratorsInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListDelegatedServicesForAccount struct {
-}
-
-func (*awsAwsjson11_serializeOpListDelegatedServicesForAccount) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListDelegatedServicesForAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListDelegatedServicesForAccountInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListDelegatedServicesForAccount")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListDelegatedServicesForAccountInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListEffectivePolicyValidationErrors struct {
-}
-
-func (*awsAwsjson11_serializeOpListEffectivePolicyValidationErrors) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListEffectivePolicyValidationErrors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListEffectivePolicyValidationErrorsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListEffectivePolicyValidationErrors")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListEffectivePolicyValidationErrorsInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListHandshakesForAccount struct {
-}
-
-func (*awsAwsjson11_serializeOpListHandshakesForAccount) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListHandshakesForAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListHandshakesForAccountInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListHandshakesForAccount")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListHandshakesForAccountInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListHandshakesForOrganization struct {
-}
-
-func (*awsAwsjson11_serializeOpListHandshakesForOrganization) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListHandshakesForOrganization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListHandshakesForOrganizationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListHandshakesForOrganization")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListHandshakesForOrganizationInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListInboundResponsibilityTransfers struct {
-}
-
-func (*awsAwsjson11_serializeOpListInboundResponsibilityTransfers) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListInboundResponsibilityTransfers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListInboundResponsibilityTransfersInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListInboundResponsibilityTransfers")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListInboundResponsibilityTransfersInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListOrganizationalUnitsForParent struct {
-}
-
-func (*awsAwsjson11_serializeOpListOrganizationalUnitsForParent) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListOrganizationalUnitsForParent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListOrganizationalUnitsForParentInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListOrganizationalUnitsForParent")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListOrganizationalUnitsForParentInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListOutboundResponsibilityTransfers struct {
-}
-
-func (*awsAwsjson11_serializeOpListOutboundResponsibilityTransfers) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListOutboundResponsibilityTransfers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListOutboundResponsibilityTransfersInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListOutboundResponsibilityTransfers")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListOutboundResponsibilityTransfersInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListParents struct {
-}
-
-func (*awsAwsjson11_serializeOpListParents) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListParents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListParentsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListParents")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListParentsInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListPolicies struct {
-}
-
-func (*awsAwsjson11_serializeOpListPolicies) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListPoliciesInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListPolicies")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListPoliciesInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListPoliciesForTarget struct {
-}
-
-func (*awsAwsjson11_serializeOpListPoliciesForTarget) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListPoliciesForTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListPoliciesForTargetInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListPoliciesForTarget")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListPoliciesForTargetInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListRoots struct {
-}
-
-func (*awsAwsjson11_serializeOpListRoots) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListRoots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListRootsInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListRoots")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListRootsInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListTagsForResource struct {
-}
-
-func (*awsAwsjson11_serializeOpListTagsForResource) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListTagsForResourceInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListTagsForResource")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpListTargetsForPolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpListTargetsForPolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpListTargetsForPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*ListTargetsForPolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.ListTargetsForPolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentListTargetsForPolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpMoveAccount struct {
-}
-
-func (*awsAwsjson11_serializeOpMoveAccount) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpMoveAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*MoveAccountInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.MoveAccount")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentMoveAccountInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpPutResourcePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpPutResourcePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*PutResourcePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.PutResourcePolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpRegisterDelegatedAdministrator struct {
-}
-
-func (*awsAwsjson11_serializeOpRegisterDelegatedAdministrator) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpRegisterDelegatedAdministrator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*RegisterDelegatedAdministratorInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.RegisterDelegatedAdministrator")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentRegisterDelegatedAdministratorInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpRemoveAccountFromOrganization struct {
-}
-
-func (*awsAwsjson11_serializeOpRemoveAccountFromOrganization) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpRemoveAccountFromOrganization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*RemoveAccountFromOrganizationInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.RemoveAccountFromOrganization")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentRemoveAccountFromOrganizationInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpTagResource struct {
-}
-
-func (*awsAwsjson11_serializeOpTagResource) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*TagResourceInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.TagResource")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpTerminateResponsibilityTransfer struct {
-}
-
-func (*awsAwsjson11_serializeOpTerminateResponsibilityTransfer) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpTerminateResponsibilityTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*TerminateResponsibilityTransferInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.TerminateResponsibilityTransfer")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentTerminateResponsibilityTransferInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpUntagResource struct {
-}
-
-func (*awsAwsjson11_serializeOpUntagResource) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UntagResourceInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.UntagResource")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpUpdateOrganizationalUnit struct {
-}
-
-func (*awsAwsjson11_serializeOpUpdateOrganizationalUnit) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpUpdateOrganizationalUnit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateOrganizationalUnitInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.UpdateOrganizationalUnit")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentUpdateOrganizationalUnitInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpUpdatePolicy struct {
-}
-
-func (*awsAwsjson11_serializeOpUpdatePolicy) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpUpdatePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdatePolicyInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.UpdatePolicy")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentUpdatePolicyInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-
-type awsAwsjson11_serializeOpUpdateResponsibilityTransfer struct {
-}
-
-func (*awsAwsjson11_serializeOpUpdateResponsibilityTransfer) ID() string {
- return "OperationSerializer"
-}
-
-func (m *awsAwsjson11_serializeOpUpdateResponsibilityTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
- out middleware.SerializeOutput, metadata middleware.Metadata, err error,
-) {
- _, span := tracing.StartSpan(ctx, "OperationSerializer")
- endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
- defer endTimer()
- defer span.End()
- request, ok := in.Request.(*smithyhttp.Request)
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
- }
-
- input, ok := in.Parameters.(*UpdateResponsibilityTransferInput)
- _ = input
- if !ok {
- return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
- }
-
- operationPath := "/"
- if len(request.Request.URL.Path) == 0 {
- request.Request.URL.Path = operationPath
- } else {
- request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
- if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
- request.Request.URL.Path += "/"
- }
- }
- request.Request.Method = "POST"
- httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
- if err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
- httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSOrganizationsV20161128.UpdateResponsibilityTransfer")
-
- jsonEncoder := smithyjson.NewEncoder()
- if err := awsAwsjson11_serializeOpDocumentUpdateResponsibilityTransferInput(input, jsonEncoder.Value); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
-
- if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
- return out, metadata, &smithy.SerializationError{Err: err}
- }
- in.Request = request
-
- endTimer()
- span.End()
- return next.HandleSerialize(ctx, in)
-}
-func awsAwsjson11_serializeDocumentCreateAccountStates(v []types.CreateAccountState, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- av.String(string(v[i]))
- }
- return nil
-}
-
-func awsAwsjson11_serializeDocumentHandshakeFilter(v *types.HandshakeFilter, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.ActionType) > 0 {
- ok := object.Key("ActionType")
- ok.String(string(v.ActionType))
- }
-
- if v.ParentHandshakeId != nil {
- ok := object.Key("ParentHandshakeId")
- ok.String(*v.ParentHandshakeId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeDocumentHandshakeParty(v *types.HandshakeParty, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Id != nil {
- ok := object.Key("Id")
- ok.String(*v.Id)
- }
-
- if len(v.Type) > 0 {
- ok := object.Key("Type")
- ok.String(string(v.Type))
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Key != nil {
- ok := object.Key("Key")
- ok.String(*v.Key)
- }
-
- if v.Value != nil {
- ok := object.Key("Value")
- ok.String(*v.Value)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeDocumentTagKeys(v []string, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- av.String(v[i])
- }
- return nil
-}
-
-func awsAwsjson11_serializeDocumentTags(v []types.Tag, value smithyjson.Value) error {
- array := value.Array()
- defer array.Close()
-
- for i := range v {
- av := array.Value()
- if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil {
- return err
- }
- }
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentAcceptHandshakeInput(v *AcceptHandshakeInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.HandshakeId != nil {
- ok := object.Key("HandshakeId")
- ok.String(*v.HandshakeId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentAttachPolicyInput(v *AttachPolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.PolicyId != nil {
- ok := object.Key("PolicyId")
- ok.String(*v.PolicyId)
- }
-
- if v.TargetId != nil {
- ok := object.Key("TargetId")
- ok.String(*v.TargetId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentCancelHandshakeInput(v *CancelHandshakeInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.HandshakeId != nil {
- ok := object.Key("HandshakeId")
- ok.String(*v.HandshakeId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentCloseAccountInput(v *CloseAccountInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountId != nil {
- ok := object.Key("AccountId")
- ok.String(*v.AccountId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentCreateAccountInput(v *CreateAccountInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountName != nil {
- ok := object.Key("AccountName")
- ok.String(*v.AccountName)
- }
-
- if v.Email != nil {
- ok := object.Key("Email")
- ok.String(*v.Email)
- }
-
- if len(v.IamUserAccessToBilling) > 0 {
- ok := object.Key("IamUserAccessToBilling")
- ok.String(string(v.IamUserAccessToBilling))
- }
-
- if v.RoleName != nil {
- ok := object.Key("RoleName")
- ok.String(*v.RoleName)
- }
-
- if v.Tags != nil {
- ok := object.Key("Tags")
- if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentCreateGovCloudAccountInput(v *CreateGovCloudAccountInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountName != nil {
- ok := object.Key("AccountName")
- ok.String(*v.AccountName)
- }
-
- if v.Email != nil {
- ok := object.Key("Email")
- ok.String(*v.Email)
- }
-
- if len(v.IamUserAccessToBilling) > 0 {
- ok := object.Key("IamUserAccessToBilling")
- ok.String(string(v.IamUserAccessToBilling))
- }
-
- if v.RoleName != nil {
- ok := object.Key("RoleName")
- ok.String(*v.RoleName)
- }
-
- if v.Tags != nil {
- ok := object.Key("Tags")
- if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentCreateOrganizationalUnitInput(v *CreateOrganizationalUnitInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Name != nil {
- ok := object.Key("Name")
- ok.String(*v.Name)
- }
-
- if v.ParentId != nil {
- ok := object.Key("ParentId")
- ok.String(*v.ParentId)
- }
-
- if v.Tags != nil {
- ok := object.Key("Tags")
- if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentCreateOrganizationInput(v *CreateOrganizationInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.FeatureSet) > 0 {
- ok := object.Key("FeatureSet")
- ok.String(string(v.FeatureSet))
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentCreatePolicyInput(v *CreatePolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Content != nil {
- ok := object.Key("Content")
- ok.String(*v.Content)
- }
-
- if v.Description != nil {
- ok := object.Key("Description")
- ok.String(*v.Description)
- }
-
- if v.Name != nil {
- ok := object.Key("Name")
- ok.String(*v.Name)
- }
-
- if v.Tags != nil {
- ok := object.Key("Tags")
- if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if len(v.Type) > 0 {
- ok := object.Key("Type")
- ok.String(string(v.Type))
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDeclineHandshakeInput(v *DeclineHandshakeInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.HandshakeId != nil {
- ok := object.Key("HandshakeId")
- ok.String(*v.HandshakeId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDeleteOrganizationalUnitInput(v *DeleteOrganizationalUnitInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.OrganizationalUnitId != nil {
- ok := object.Key("OrganizationalUnitId")
- ok.String(*v.OrganizationalUnitId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDeletePolicyInput(v *DeletePolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.PolicyId != nil {
- ok := object.Key("PolicyId")
- ok.String(*v.PolicyId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDeregisterDelegatedAdministratorInput(v *DeregisterDelegatedAdministratorInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountId != nil {
- ok := object.Key("AccountId")
- ok.String(*v.AccountId)
- }
-
- if v.ServicePrincipal != nil {
- ok := object.Key("ServicePrincipal")
- ok.String(*v.ServicePrincipal)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDescribeAccountInput(v *DescribeAccountInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountId != nil {
- ok := object.Key("AccountId")
- ok.String(*v.AccountId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDescribeCreateAccountStatusInput(v *DescribeCreateAccountStatusInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.CreateAccountRequestId != nil {
- ok := object.Key("CreateAccountRequestId")
- ok.String(*v.CreateAccountRequestId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDescribeEffectivePolicyInput(v *DescribeEffectivePolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.PolicyType) > 0 {
- ok := object.Key("PolicyType")
- ok.String(string(v.PolicyType))
- }
-
- if v.TargetId != nil {
- ok := object.Key("TargetId")
- ok.String(*v.TargetId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDescribeHandshakeInput(v *DescribeHandshakeInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.HandshakeId != nil {
- ok := object.Key("HandshakeId")
- ok.String(*v.HandshakeId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDescribeOrganizationalUnitInput(v *DescribeOrganizationalUnitInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.OrganizationalUnitId != nil {
- ok := object.Key("OrganizationalUnitId")
- ok.String(*v.OrganizationalUnitId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDescribePolicyInput(v *DescribePolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.PolicyId != nil {
- ok := object.Key("PolicyId")
- ok.String(*v.PolicyId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDescribeResponsibilityTransferInput(v *DescribeResponsibilityTransferInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Id != nil {
- ok := object.Key("Id")
- ok.String(*v.Id)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDetachPolicyInput(v *DetachPolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.PolicyId != nil {
- ok := object.Key("PolicyId")
- ok.String(*v.PolicyId)
- }
-
- if v.TargetId != nil {
- ok := object.Key("TargetId")
- ok.String(*v.TargetId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDisableAWSServiceAccessInput(v *DisableAWSServiceAccessInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ServicePrincipal != nil {
- ok := object.Key("ServicePrincipal")
- ok.String(*v.ServicePrincipal)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentDisablePolicyTypeInput(v *DisablePolicyTypeInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.PolicyType) > 0 {
- ok := object.Key("PolicyType")
- ok.String(string(v.PolicyType))
- }
-
- if v.RootId != nil {
- ok := object.Key("RootId")
- ok.String(*v.RootId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentEnableAllFeaturesInput(v *EnableAllFeaturesInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentEnableAWSServiceAccessInput(v *EnableAWSServiceAccessInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ServicePrincipal != nil {
- ok := object.Key("ServicePrincipal")
- ok.String(*v.ServicePrincipal)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentEnablePolicyTypeInput(v *EnablePolicyTypeInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.PolicyType) > 0 {
- ok := object.Key("PolicyType")
- ok.String(string(v.PolicyType))
- }
-
- if v.RootId != nil {
- ok := object.Key("RootId")
- ok.String(*v.RootId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentInviteAccountToOrganizationInput(v *InviteAccountToOrganizationInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Notes != nil {
- ok := object.Key("Notes")
- ok.String(*v.Notes)
- }
-
- if v.Tags != nil {
- ok := object.Key("Tags")
- if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if v.Target != nil {
- ok := object.Key("Target")
- if err := awsAwsjson11_serializeDocumentHandshakeParty(v.Target, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentInviteOrganizationToTransferResponsibilityInput(v *InviteOrganizationToTransferResponsibilityInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Notes != nil {
- ok := object.Key("Notes")
- ok.String(*v.Notes)
- }
-
- if v.SourceName != nil {
- ok := object.Key("SourceName")
- ok.String(*v.SourceName)
- }
-
- if v.StartTimestamp != nil {
- ok := object.Key("StartTimestamp")
- ok.Double(smithytime.FormatEpochSeconds(*v.StartTimestamp))
- }
-
- if v.Tags != nil {
- ok := object.Key("Tags")
- if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil {
- return err
- }
- }
-
- if v.Target != nil {
- ok := object.Key("Target")
- if err := awsAwsjson11_serializeDocumentHandshakeParty(v.Target, ok); err != nil {
- return err
- }
- }
-
- if len(v.Type) > 0 {
- ok := object.Key("Type")
- ok.String(string(v.Type))
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListAccountsForParentInput(v *ListAccountsForParentInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if v.ParentId != nil {
- ok := object.Key("ParentId")
- ok.String(*v.ParentId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListAccountsInput(v *ListAccountsInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListAccountsWithInvalidEffectivePolicyInput(v *ListAccountsWithInvalidEffectivePolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if len(v.PolicyType) > 0 {
- ok := object.Key("PolicyType")
- ok.String(string(v.PolicyType))
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListAWSServiceAccessForOrganizationInput(v *ListAWSServiceAccessForOrganizationInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListChildrenInput(v *ListChildrenInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.ChildType) > 0 {
- ok := object.Key("ChildType")
- ok.String(string(v.ChildType))
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if v.ParentId != nil {
- ok := object.Key("ParentId")
- ok.String(*v.ParentId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListCreateAccountStatusInput(v *ListCreateAccountStatusInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if v.States != nil {
- ok := object.Key("States")
- if err := awsAwsjson11_serializeDocumentCreateAccountStates(v.States, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListDelegatedAdministratorsInput(v *ListDelegatedAdministratorsInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if v.ServicePrincipal != nil {
- ok := object.Key("ServicePrincipal")
- ok.String(*v.ServicePrincipal)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListDelegatedServicesForAccountInput(v *ListDelegatedServicesForAccountInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountId != nil {
- ok := object.Key("AccountId")
- ok.String(*v.AccountId)
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListEffectivePolicyValidationErrorsInput(v *ListEffectivePolicyValidationErrorsInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountId != nil {
- ok := object.Key("AccountId")
- ok.String(*v.AccountId)
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if len(v.PolicyType) > 0 {
- ok := object.Key("PolicyType")
- ok.String(string(v.PolicyType))
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListHandshakesForAccountInput(v *ListHandshakesForAccountInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Filter != nil {
- ok := object.Key("Filter")
- if err := awsAwsjson11_serializeDocumentHandshakeFilter(v.Filter, ok); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListHandshakesForOrganizationInput(v *ListHandshakesForOrganizationInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Filter != nil {
- ok := object.Key("Filter")
- if err := awsAwsjson11_serializeDocumentHandshakeFilter(v.Filter, ok); err != nil {
- return err
- }
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListInboundResponsibilityTransfersInput(v *ListInboundResponsibilityTransfersInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Id != nil {
- ok := object.Key("Id")
- ok.String(*v.Id)
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if len(v.Type) > 0 {
- ok := object.Key("Type")
- ok.String(string(v.Type))
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListOrganizationalUnitsForParentInput(v *ListOrganizationalUnitsForParentInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if v.ParentId != nil {
- ok := object.Key("ParentId")
- ok.String(*v.ParentId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListOutboundResponsibilityTransfersInput(v *ListOutboundResponsibilityTransfersInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if len(v.Type) > 0 {
- ok := object.Key("Type")
- ok.String(string(v.Type))
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListParentsInput(v *ListParentsInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ChildId != nil {
- ok := object.Key("ChildId")
- ok.String(*v.ChildId)
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListPoliciesForTargetInput(v *ListPoliciesForTargetInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.Filter) > 0 {
- ok := object.Key("Filter")
- ok.String(string(v.Filter))
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if v.TargetId != nil {
- ok := object.Key("TargetId")
- ok.String(*v.TargetId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListPoliciesInput(v *ListPoliciesInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if len(v.Filter) > 0 {
- ok := object.Key("Filter")
- ok.String(string(v.Filter))
- }
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListRootsInput(v *ListRootsInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if v.ResourceId != nil {
- ok := object.Key("ResourceId")
- ok.String(*v.ResourceId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentListTargetsForPolicyInput(v *ListTargetsForPolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.MaxResults != nil {
- ok := object.Key("MaxResults")
- ok.Integer(*v.MaxResults)
- }
-
- if v.NextToken != nil {
- ok := object.Key("NextToken")
- ok.String(*v.NextToken)
- }
-
- if v.PolicyId != nil {
- ok := object.Key("PolicyId")
- ok.String(*v.PolicyId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentMoveAccountInput(v *MoveAccountInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountId != nil {
- ok := object.Key("AccountId")
- ok.String(*v.AccountId)
- }
-
- if v.DestinationParentId != nil {
- ok := object.Key("DestinationParentId")
- ok.String(*v.DestinationParentId)
- }
-
- if v.SourceParentId != nil {
- ok := object.Key("SourceParentId")
- ok.String(*v.SourceParentId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Content != nil {
- ok := object.Key("Content")
- ok.String(*v.Content)
- }
-
- if v.Tags != nil {
- ok := object.Key("Tags")
- if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentRegisterDelegatedAdministratorInput(v *RegisterDelegatedAdministratorInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountId != nil {
- ok := object.Key("AccountId")
- ok.String(*v.AccountId)
- }
-
- if v.ServicePrincipal != nil {
- ok := object.Key("ServicePrincipal")
- ok.String(*v.ServicePrincipal)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentRemoveAccountFromOrganizationInput(v *RemoveAccountFromOrganizationInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.AccountId != nil {
- ok := object.Key("AccountId")
- ok.String(*v.AccountId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ResourceId != nil {
- ok := object.Key("ResourceId")
- ok.String(*v.ResourceId)
- }
-
- if v.Tags != nil {
- ok := object.Key("Tags")
- if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentTerminateResponsibilityTransferInput(v *TerminateResponsibilityTransferInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.EndTimestamp != nil {
- ok := object.Key("EndTimestamp")
- ok.Double(smithytime.FormatEpochSeconds(*v.EndTimestamp))
- }
-
- if v.Id != nil {
- ok := object.Key("Id")
- ok.String(*v.Id)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.ResourceId != nil {
- ok := object.Key("ResourceId")
- ok.String(*v.ResourceId)
- }
-
- if v.TagKeys != nil {
- ok := object.Key("TagKeys")
- if err := awsAwsjson11_serializeDocumentTagKeys(v.TagKeys, ok); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentUpdateOrganizationalUnitInput(v *UpdateOrganizationalUnitInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Name != nil {
- ok := object.Key("Name")
- ok.String(*v.Name)
- }
-
- if v.OrganizationalUnitId != nil {
- ok := object.Key("OrganizationalUnitId")
- ok.String(*v.OrganizationalUnitId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentUpdatePolicyInput(v *UpdatePolicyInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Content != nil {
- ok := object.Key("Content")
- ok.String(*v.Content)
- }
-
- if v.Description != nil {
- ok := object.Key("Description")
- ok.String(*v.Description)
- }
-
- if v.Name != nil {
- ok := object.Key("Name")
- ok.String(*v.Name)
- }
-
- if v.PolicyId != nil {
- ok := object.Key("PolicyId")
- ok.String(*v.PolicyId)
- }
-
- return nil
-}
-
-func awsAwsjson11_serializeOpDocumentUpdateResponsibilityTransferInput(v *UpdateResponsibilityTransferInput, value smithyjson.Value) error {
- object := value.Object()
- defer object.Close()
-
- if v.Id != nil {
- ok := object.Key("Id")
- ok.String(*v.Id)
- }
-
- if v.Name != nil {
- ok := object.Key("Name")
- ok.String(*v.Name)
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/enums.go
deleted file mode 100644
index 084655b1d..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/enums.go
+++ /dev/null
@@ -1,754 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package types
-
-type AccessDeniedForDependencyExceptionReason string
-
-// Enum values for AccessDeniedForDependencyExceptionReason
-const (
- AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole AccessDeniedForDependencyExceptionReason = "ACCESS_DENIED_DURING_CREATE_SERVICE_LINKED_ROLE"
-)
-
-// Values returns all known values for AccessDeniedForDependencyExceptionReason.
-// Note that this can be expanded in the future, and so it is only as up to date as
-// the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AccessDeniedForDependencyExceptionReason) Values() []AccessDeniedForDependencyExceptionReason {
- return []AccessDeniedForDependencyExceptionReason{
- "ACCESS_DENIED_DURING_CREATE_SERVICE_LINKED_ROLE",
- }
-}
-
-type AccountJoinedMethod string
-
-// Enum values for AccountJoinedMethod
-const (
- AccountJoinedMethodInvited AccountJoinedMethod = "INVITED"
- AccountJoinedMethodCreated AccountJoinedMethod = "CREATED"
-)
-
-// Values returns all known values for AccountJoinedMethod. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AccountJoinedMethod) Values() []AccountJoinedMethod {
- return []AccountJoinedMethod{
- "INVITED",
- "CREATED",
- }
-}
-
-type AccountState string
-
-// Enum values for AccountState
-const (
- AccountStatePendingActivation AccountState = "PENDING_ACTIVATION"
- AccountStateActive AccountState = "ACTIVE"
- AccountStateSuspended AccountState = "SUSPENDED"
- AccountStatePendingClosure AccountState = "PENDING_CLOSURE"
- AccountStateClosed AccountState = "CLOSED"
-)
-
-// Values returns all known values for AccountState. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AccountState) Values() []AccountState {
- return []AccountState{
- "PENDING_ACTIVATION",
- "ACTIVE",
- "SUSPENDED",
- "PENDING_CLOSURE",
- "CLOSED",
- }
-}
-
-type AccountStatus string
-
-// Enum values for AccountStatus
-const (
- AccountStatusActive AccountStatus = "ACTIVE"
- AccountStatusSuspended AccountStatus = "SUSPENDED"
- AccountStatusPendingClosure AccountStatus = "PENDING_CLOSURE"
-)
-
-// Values returns all known values for AccountStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (AccountStatus) Values() []AccountStatus {
- return []AccountStatus{
- "ACTIVE",
- "SUSPENDED",
- "PENDING_CLOSURE",
- }
-}
-
-type ActionType string
-
-// Enum values for ActionType
-const (
- ActionTypeInviteAccountToOrganization ActionType = "INVITE"
- ActionTypeEnableAllFeatures ActionType = "ENABLE_ALL_FEATURES"
- ActionTypeApproveAllFeatures ActionType = "APPROVE_ALL_FEATURES"
- ActionTypeAddOrganizationsServiceLinkedRole ActionType = "ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE"
- ActionTypeTransferResponsibility ActionType = "TRANSFER_RESPONSIBILITY"
-)
-
-// Values returns all known values for ActionType. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ActionType) Values() []ActionType {
- return []ActionType{
- "INVITE",
- "ENABLE_ALL_FEATURES",
- "APPROVE_ALL_FEATURES",
- "ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE",
- "TRANSFER_RESPONSIBILITY",
- }
-}
-
-type ChildType string
-
-// Enum values for ChildType
-const (
- ChildTypeAccount ChildType = "ACCOUNT"
- ChildTypeOrganizationalUnit ChildType = "ORGANIZATIONAL_UNIT"
-)
-
-// Values returns all known values for ChildType. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ChildType) Values() []ChildType {
- return []ChildType{
- "ACCOUNT",
- "ORGANIZATIONAL_UNIT",
- }
-}
-
-type ConstraintViolationExceptionReason string
-
-// Enum values for ConstraintViolationExceptionReason
-const (
- ConstraintViolationExceptionReasonAccountNumberLimitExceeded ConstraintViolationExceptionReason = "ACCOUNT_NUMBER_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonHandshakeRateLimitExceeded ConstraintViolationExceptionReason = "HANDSHAKE_RATE_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonOuNumberLimitExceeded ConstraintViolationExceptionReason = "OU_NUMBER_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonOuDepthLimitExceeded ConstraintViolationExceptionReason = "OU_DEPTH_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonPolicyNumberLimitExceeded ConstraintViolationExceptionReason = "POLICY_NUMBER_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonPolicyContentLimitExceeded ConstraintViolationExceptionReason = "POLICY_CONTENT_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded ConstraintViolationExceptionReason = "MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded ConstraintViolationExceptionReason = "MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonAccountCannotLeaveOrganization ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_ORGANIZATION"
- ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA"
- ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification ConstraintViolationExceptionReason = "ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION"
- ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired ConstraintViolationExceptionReason = "MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED"
- ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired ConstraintViolationExceptionReason = "MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED"
- ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded ConstraintViolationExceptionReason = "ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace ConstraintViolationExceptionReason = "MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE"
- ConstraintViolationExceptionReasonMasterAccountMissingContactInfo ConstraintViolationExceptionReason = "MASTER_ACCOUNT_MISSING_CONTACT_INFO"
- ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled ConstraintViolationExceptionReason = "MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED"
- ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode ConstraintViolationExceptionReason = "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE"
- ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion ConstraintViolationExceptionReason = "CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION"
- ConstraintViolationExceptionReasonEmailVerificationCodeExpired ConstraintViolationExceptionReason = "EMAIL_VERIFICATION_CODE_EXPIRED"
- ConstraintViolationExceptionReasonWaitPeriodActive ConstraintViolationExceptionReason = "WAIT_PERIOD_ACTIVE"
- ConstraintViolationExceptionReasonMaxTagLimitExceeded ConstraintViolationExceptionReason = "MAX_TAG_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonTagPolicyViolation ConstraintViolationExceptionReason = "TAG_POLICY_VIOLATION"
- ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded ConstraintViolationExceptionReason = "MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator ConstraintViolationExceptionReason = "CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR"
- ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg ConstraintViolationExceptionReason = "CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG"
- ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService ConstraintViolationExceptionReason = "DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE"
- ConstraintViolationExceptionReasonPolicyTypeEnabledForThisService ConstraintViolationExceptionReason = "POLICY_TYPE_ENABLED_FOR_THIS_SERVICE"
- ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense ConstraintViolationExceptionReason = "MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE"
- ConstraintViolationExceptionReasonCannotCloseManagementAccount ConstraintViolationExceptionReason = "CANNOT_CLOSE_MANAGEMENT_ACCOUNT"
- ConstraintViolationExceptionReasonCloseAccountQuotaExceeded ConstraintViolationExceptionReason = "CLOSE_ACCOUNT_QUOTA_EXCEEDED"
- ConstraintViolationExceptionReasonCloseAccountRequestsLimitExceeded ConstraintViolationExceptionReason = "CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonServiceAccessNotEnabled ConstraintViolationExceptionReason = "SERVICE_ACCESS_NOT_ENABLED"
- ConstraintViolationExceptionReasonInvalidPaymentInstrument ConstraintViolationExceptionReason = "INVALID_PAYMENT_INSTRUMENT"
- ConstraintViolationExceptionReasonAccountCreationNotComplete ConstraintViolationExceptionReason = "ACCOUNT_CREATION_NOT_COMPLETE"
- ConstraintViolationExceptionReasonCannotRegisterSuspendedAccountAsDelegatedAdministrator ConstraintViolationExceptionReason = "CANNOT_REGISTER_SUSPENDED_ACCOUNT_AS_DELEGATED_ADMINISTRATOR"
- ConstraintViolationExceptionReasonAllFeaturesMigrationOrganizationSizeLimitExceeded ConstraintViolationExceptionReason = "ALL_FEATURES_MIGRATION_ORGANIZATION_SIZE_LIMIT_EXCEEDED"
- ConstraintViolationExceptionReasonResponsibilityTransferMaxLevelViolation ConstraintViolationExceptionReason = "RESPONSIBILITY_TRANSFER_MAX_LEVEL_VIOLATION"
- ConstraintViolationExceptionReasonResponsibilityTransferMaxInboundQuotaViolation ConstraintViolationExceptionReason = "RESPONSIBILITY_TRANSFER_MAX_INBOUND_QUOTA_VIOLATION"
- ConstraintViolationExceptionReasonResponsibilityTransferMaxOutboundQuotaViolation ConstraintViolationExceptionReason = "RESPONSIBILITY_TRANSFER_MAX_OUTBOUND_QUOTA_VIOLATION"
- ConstraintViolationExceptionReasonResponsibilityTransferMaxTransfersQuotaViolation ConstraintViolationExceptionReason = "RESPONSIBILITY_TRANSFER_MAX_TRANSFERS_QUOTA_VIOLATION"
- ConstraintViolationExceptionReasonActiveResponsibilityTransferProcess ConstraintViolationExceptionReason = "ACTIVE_RESPONSIBILITY_TRANSFER_PROCESS"
- ConstraintViolationExceptionReasonTransferResponsibilityTargetDeletionInProgress ConstraintViolationExceptionReason = "TRANSFER_RESPONSIBILITY_TARGET_DELETION_IN_PROGRESS"
- ConstraintViolationExceptionReasonTransferResponsibilitySourceDeletionInProgress ConstraintViolationExceptionReason = "TRANSFER_RESPONSIBILITY_SOURCE_DELETION_IN_PROGRESS"
- ConstraintViolationExceptionReasonUnsupportedPricing ConstraintViolationExceptionReason = "UNSUPPORTED_PRICING"
-)
-
-// Values returns all known values for ConstraintViolationExceptionReason. Note
-// that this can be expanded in the future, and so it is only as up to date as the
-// client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ConstraintViolationExceptionReason) Values() []ConstraintViolationExceptionReason {
- return []ConstraintViolationExceptionReason{
- "ACCOUNT_NUMBER_LIMIT_EXCEEDED",
- "HANDSHAKE_RATE_LIMIT_EXCEEDED",
- "OU_NUMBER_LIMIT_EXCEEDED",
- "OU_DEPTH_LIMIT_EXCEEDED",
- "POLICY_NUMBER_LIMIT_EXCEEDED",
- "POLICY_CONTENT_LIMIT_EXCEEDED",
- "MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED",
- "MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED",
- "ACCOUNT_CANNOT_LEAVE_ORGANIZATION",
- "ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA",
- "ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION",
- "MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED",
- "MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED",
- "ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED",
- "MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE",
- "MASTER_ACCOUNT_MISSING_CONTACT_INFO",
- "MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED",
- "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE",
- "CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION",
- "EMAIL_VERIFICATION_CODE_EXPIRED",
- "WAIT_PERIOD_ACTIVE",
- "MAX_TAG_LIMIT_EXCEEDED",
- "TAG_POLICY_VIOLATION",
- "MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED",
- "CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR",
- "CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG",
- "DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE",
- "POLICY_TYPE_ENABLED_FOR_THIS_SERVICE",
- "MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE",
- "CANNOT_CLOSE_MANAGEMENT_ACCOUNT",
- "CLOSE_ACCOUNT_QUOTA_EXCEEDED",
- "CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED",
- "SERVICE_ACCESS_NOT_ENABLED",
- "INVALID_PAYMENT_INSTRUMENT",
- "ACCOUNT_CREATION_NOT_COMPLETE",
- "CANNOT_REGISTER_SUSPENDED_ACCOUNT_AS_DELEGATED_ADMINISTRATOR",
- "ALL_FEATURES_MIGRATION_ORGANIZATION_SIZE_LIMIT_EXCEEDED",
- "RESPONSIBILITY_TRANSFER_MAX_LEVEL_VIOLATION",
- "RESPONSIBILITY_TRANSFER_MAX_INBOUND_QUOTA_VIOLATION",
- "RESPONSIBILITY_TRANSFER_MAX_OUTBOUND_QUOTA_VIOLATION",
- "RESPONSIBILITY_TRANSFER_MAX_TRANSFERS_QUOTA_VIOLATION",
- "ACTIVE_RESPONSIBILITY_TRANSFER_PROCESS",
- "TRANSFER_RESPONSIBILITY_TARGET_DELETION_IN_PROGRESS",
- "TRANSFER_RESPONSIBILITY_SOURCE_DELETION_IN_PROGRESS",
- "UNSUPPORTED_PRICING",
- }
-}
-
-type CreateAccountFailureReason string
-
-// Enum values for CreateAccountFailureReason
-const (
- CreateAccountFailureReasonAccountLimitExceeded CreateAccountFailureReason = "ACCOUNT_LIMIT_EXCEEDED"
- CreateAccountFailureReasonEmailAlreadyExists CreateAccountFailureReason = "EMAIL_ALREADY_EXISTS"
- CreateAccountFailureReasonInvalidAddress CreateAccountFailureReason = "INVALID_ADDRESS"
- CreateAccountFailureReasonInvalidEmail CreateAccountFailureReason = "INVALID_EMAIL"
- CreateAccountFailureReasonConcurrentAccountModification CreateAccountFailureReason = "CONCURRENT_ACCOUNT_MODIFICATION"
- CreateAccountFailureReasonInternalFailure CreateAccountFailureReason = "INTERNAL_FAILURE"
- CreateAccountFailureReasonGovcloudAccountAlreadyExists CreateAccountFailureReason = "GOVCLOUD_ACCOUNT_ALREADY_EXISTS"
- CreateAccountFailureReasonMissingBusinessValidation CreateAccountFailureReason = "MISSING_BUSINESS_VALIDATION"
- CreateAccountFailureReasonFailedBusinessValidation CreateAccountFailureReason = "FAILED_BUSINESS_VALIDATION"
- CreateAccountFailureReasonPendingBusinessVALIDATIONv CreateAccountFailureReason = "PENDING_BUSINESS_VALIDATION"
- CreateAccountFailureReasonInvalidIdentityForBusinessValidation CreateAccountFailureReason = "INVALID_IDENTITY_FOR_BUSINESS_VALIDATION"
- CreateAccountFailureReasonUnknownBusinessValidation CreateAccountFailureReason = "UNKNOWN_BUSINESS_VALIDATION"
- CreateAccountFailureReasonMissingPaymentInstrument CreateAccountFailureReason = "MISSING_PAYMENT_INSTRUMENT"
- CreateAccountFailureReasonInvalidPaymentInstrument CreateAccountFailureReason = "INVALID_PAYMENT_INSTRUMENT"
- CreateAccountFailureReasonUpdateExistingResourcePolicyWithTagsNotSupported CreateAccountFailureReason = "UPDATE_EXISTING_RESOURCE_POLICY_WITH_TAGS_NOT_SUPPORTED"
-)
-
-// Values returns all known values for CreateAccountFailureReason. Note that this
-// can be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (CreateAccountFailureReason) Values() []CreateAccountFailureReason {
- return []CreateAccountFailureReason{
- "ACCOUNT_LIMIT_EXCEEDED",
- "EMAIL_ALREADY_EXISTS",
- "INVALID_ADDRESS",
- "INVALID_EMAIL",
- "CONCURRENT_ACCOUNT_MODIFICATION",
- "INTERNAL_FAILURE",
- "GOVCLOUD_ACCOUNT_ALREADY_EXISTS",
- "MISSING_BUSINESS_VALIDATION",
- "FAILED_BUSINESS_VALIDATION",
- "PENDING_BUSINESS_VALIDATION",
- "INVALID_IDENTITY_FOR_BUSINESS_VALIDATION",
- "UNKNOWN_BUSINESS_VALIDATION",
- "MISSING_PAYMENT_INSTRUMENT",
- "INVALID_PAYMENT_INSTRUMENT",
- "UPDATE_EXISTING_RESOURCE_POLICY_WITH_TAGS_NOT_SUPPORTED",
- }
-}
-
-type CreateAccountState string
-
-// Enum values for CreateAccountState
-const (
- CreateAccountStateInProgress CreateAccountState = "IN_PROGRESS"
- CreateAccountStateSucceeded CreateAccountState = "SUCCEEDED"
- CreateAccountStateFailed CreateAccountState = "FAILED"
-)
-
-// Values returns all known values for CreateAccountState. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (CreateAccountState) Values() []CreateAccountState {
- return []CreateAccountState{
- "IN_PROGRESS",
- "SUCCEEDED",
- "FAILED",
- }
-}
-
-type EffectivePolicyType string
-
-// Enum values for EffectivePolicyType
-const (
- EffectivePolicyTypeTagPolicy EffectivePolicyType = "TAG_POLICY"
- EffectivePolicyTypeBackupPolicy EffectivePolicyType = "BACKUP_POLICY"
- EffectivePolicyTypeAiservicesOptOutPolicy EffectivePolicyType = "AISERVICES_OPT_OUT_POLICY"
- EffectivePolicyTypeChatbotPolicy EffectivePolicyType = "CHATBOT_POLICY"
- EffectivePolicyTypeDeclarativePolicyEc2 EffectivePolicyType = "DECLARATIVE_POLICY_EC2"
- EffectivePolicyTypeSecurityhubPolicy EffectivePolicyType = "SECURITYHUB_POLICY"
- EffectivePolicyTypeInspectorPolicy EffectivePolicyType = "INSPECTOR_POLICY"
- EffectivePolicyTypeUpgradeRolloutPolicy EffectivePolicyType = "UPGRADE_ROLLOUT_POLICY"
- EffectivePolicyTypeBedrockPolicy EffectivePolicyType = "BEDROCK_POLICY"
- EffectivePolicyTypeS3Policy EffectivePolicyType = "S3_POLICY"
- EffectivePolicyTypeNetworkSecurityDirectorPolicy EffectivePolicyType = "NETWORK_SECURITY_DIRECTOR_POLICY"
-)
-
-// Values returns all known values for EffectivePolicyType. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (EffectivePolicyType) Values() []EffectivePolicyType {
- return []EffectivePolicyType{
- "TAG_POLICY",
- "BACKUP_POLICY",
- "AISERVICES_OPT_OUT_POLICY",
- "CHATBOT_POLICY",
- "DECLARATIVE_POLICY_EC2",
- "SECURITYHUB_POLICY",
- "INSPECTOR_POLICY",
- "UPGRADE_ROLLOUT_POLICY",
- "BEDROCK_POLICY",
- "S3_POLICY",
- "NETWORK_SECURITY_DIRECTOR_POLICY",
- }
-}
-
-type HandshakeConstraintViolationExceptionReason string
-
-// Enum values for HandshakeConstraintViolationExceptionReason
-const (
- HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded HandshakeConstraintViolationExceptionReason = "ACCOUNT_NUMBER_LIMIT_EXCEEDED"
- HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded HandshakeConstraintViolationExceptionReason = "HANDSHAKE_RATE_LIMIT_EXCEEDED"
- HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization HandshakeConstraintViolationExceptionReason = "ALREADY_IN_AN_ORGANIZATION"
- HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures HandshakeConstraintViolationExceptionReason = "ORGANIZATION_ALREADY_HAS_ALL_FEATURES"
- HandshakeConstraintViolationExceptionReasonOrganizationIsAlreadyPendingAllFeaturesMigration HandshakeConstraintViolationExceptionReason = "ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION"
- HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures HandshakeConstraintViolationExceptionReason = "INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES"
- HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired HandshakeConstraintViolationExceptionReason = "PAYMENT_INSTRUMENT_REQUIRED"
- HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord HandshakeConstraintViolationExceptionReason = "ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD"
- HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded HandshakeConstraintViolationExceptionReason = "ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED"
- HandshakeConstraintViolationExceptionReasonManagementAccountEmailNotVerified HandshakeConstraintViolationExceptionReason = "MANAGEMENT_ACCOUNT_EMAIL_NOT_VERIFIED"
- HandshakeConstraintViolationExceptionReasonResponsibilityTransferAlreadyExists HandshakeConstraintViolationExceptionReason = "RESPONSIBILITY_TRANSFER_ALREADY_EXISTS"
- HandshakeConstraintViolationExceptionReasonSourceAndTargetCannotMatch HandshakeConstraintViolationExceptionReason = "SOURCE_AND_TARGET_CANNOT_MATCH"
- HandshakeConstraintViolationExceptionReasonUnusedPrepaymentBalance HandshakeConstraintViolationExceptionReason = "UNUSED_PREPAYMENT_BALANCE"
- HandshakeConstraintViolationExceptionReasonLegacyPermissionsStillInUse HandshakeConstraintViolationExceptionReason = "LEGACY_PERMISSIONS_STILL_IN_USE"
-)
-
-// Values returns all known values for
-// HandshakeConstraintViolationExceptionReason. Note that this can be expanded in
-// the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (HandshakeConstraintViolationExceptionReason) Values() []HandshakeConstraintViolationExceptionReason {
- return []HandshakeConstraintViolationExceptionReason{
- "ACCOUNT_NUMBER_LIMIT_EXCEEDED",
- "HANDSHAKE_RATE_LIMIT_EXCEEDED",
- "ALREADY_IN_AN_ORGANIZATION",
- "ORGANIZATION_ALREADY_HAS_ALL_FEATURES",
- "ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION",
- "INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES",
- "PAYMENT_INSTRUMENT_REQUIRED",
- "ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD",
- "ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED",
- "MANAGEMENT_ACCOUNT_EMAIL_NOT_VERIFIED",
- "RESPONSIBILITY_TRANSFER_ALREADY_EXISTS",
- "SOURCE_AND_TARGET_CANNOT_MATCH",
- "UNUSED_PREPAYMENT_BALANCE",
- "LEGACY_PERMISSIONS_STILL_IN_USE",
- }
-}
-
-type HandshakePartyType string
-
-// Enum values for HandshakePartyType
-const (
- HandshakePartyTypeAccount HandshakePartyType = "ACCOUNT"
- HandshakePartyTypeOrganization HandshakePartyType = "ORGANIZATION"
- HandshakePartyTypeEmail HandshakePartyType = "EMAIL"
-)
-
-// Values returns all known values for HandshakePartyType. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (HandshakePartyType) Values() []HandshakePartyType {
- return []HandshakePartyType{
- "ACCOUNT",
- "ORGANIZATION",
- "EMAIL",
- }
-}
-
-type HandshakeResourceType string
-
-// Enum values for HandshakeResourceType
-const (
- HandshakeResourceTypeAccount HandshakeResourceType = "ACCOUNT"
- HandshakeResourceTypeOrganization HandshakeResourceType = "ORGANIZATION"
- HandshakeResourceTypeOrganizationFeatureSet HandshakeResourceType = "ORGANIZATION_FEATURE_SET"
- HandshakeResourceTypeEmail HandshakeResourceType = "EMAIL"
- HandshakeResourceTypeMasterEmail HandshakeResourceType = "MASTER_EMAIL"
- HandshakeResourceTypeMasterName HandshakeResourceType = "MASTER_NAME"
- HandshakeResourceTypeNotes HandshakeResourceType = "NOTES"
- HandshakeResourceTypeParentHandshake HandshakeResourceType = "PARENT_HANDSHAKE"
- HandshakeResourceTypeResponsibilityTransfer HandshakeResourceType = "RESPONSIBILITY_TRANSFER"
- HandshakeResourceTypeTransferStartTimestamp HandshakeResourceType = "TRANSFER_START_TIMESTAMP"
- HandshakeResourceTypeTransferType HandshakeResourceType = "TRANSFER_TYPE"
- HandshakeResourceTypeManagementAccount HandshakeResourceType = "MANAGEMENT_ACCOUNT"
- HandshakeResourceTypeManagementEmail HandshakeResourceType = "MANAGEMENT_EMAIL"
- HandshakeResourceTypeManagementName HandshakeResourceType = "MANAGEMENT_NAME"
-)
-
-// Values returns all known values for HandshakeResourceType. Note that this can
-// be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (HandshakeResourceType) Values() []HandshakeResourceType {
- return []HandshakeResourceType{
- "ACCOUNT",
- "ORGANIZATION",
- "ORGANIZATION_FEATURE_SET",
- "EMAIL",
- "MASTER_EMAIL",
- "MASTER_NAME",
- "NOTES",
- "PARENT_HANDSHAKE",
- "RESPONSIBILITY_TRANSFER",
- "TRANSFER_START_TIMESTAMP",
- "TRANSFER_TYPE",
- "MANAGEMENT_ACCOUNT",
- "MANAGEMENT_EMAIL",
- "MANAGEMENT_NAME",
- }
-}
-
-type HandshakeState string
-
-// Enum values for HandshakeState
-const (
- HandshakeStateRequested HandshakeState = "REQUESTED"
- HandshakeStateOpen HandshakeState = "OPEN"
- HandshakeStateCanceled HandshakeState = "CANCELED"
- HandshakeStateAccepted HandshakeState = "ACCEPTED"
- HandshakeStateDeclined HandshakeState = "DECLINED"
- HandshakeStateExpired HandshakeState = "EXPIRED"
-)
-
-// Values returns all known values for HandshakeState. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (HandshakeState) Values() []HandshakeState {
- return []HandshakeState{
- "REQUESTED",
- "OPEN",
- "CANCELED",
- "ACCEPTED",
- "DECLINED",
- "EXPIRED",
- }
-}
-
-type IAMUserAccessToBilling string
-
-// Enum values for IAMUserAccessToBilling
-const (
- IAMUserAccessToBillingAllow IAMUserAccessToBilling = "ALLOW"
- IAMUserAccessToBillingDeny IAMUserAccessToBilling = "DENY"
-)
-
-// Values returns all known values for IAMUserAccessToBilling. Note that this can
-// be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (IAMUserAccessToBilling) Values() []IAMUserAccessToBilling {
- return []IAMUserAccessToBilling{
- "ALLOW",
- "DENY",
- }
-}
-
-type InvalidInputExceptionReason string
-
-// Enum values for InvalidInputExceptionReason
-const (
- InvalidInputExceptionReasonInvalidPartyTypeTarget InvalidInputExceptionReason = "INVALID_PARTY_TYPE_TARGET"
- InvalidInputExceptionReasonInvalidSyntaxOrganization InvalidInputExceptionReason = "INVALID_SYNTAX_ORGANIZATION_ARN"
- InvalidInputExceptionReasonInvalidSyntaxPolicy InvalidInputExceptionReason = "INVALID_SYNTAX_POLICY_ID"
- InvalidInputExceptionReasonInvalidEnum InvalidInputExceptionReason = "INVALID_ENUM"
- InvalidInputExceptionReasonInvalidEnumPolicyType InvalidInputExceptionReason = "INVALID_ENUM_POLICY_TYPE"
- InvalidInputExceptionReasonInvalidListMember InvalidInputExceptionReason = "INVALID_LIST_MEMBER"
- InvalidInputExceptionReasonMaxLengthExceeded InvalidInputExceptionReason = "MAX_LENGTH_EXCEEDED"
- InvalidInputExceptionReasonMaxValueExceeded InvalidInputExceptionReason = "MAX_VALUE_EXCEEDED"
- InvalidInputExceptionReasonMinLengthExceeded InvalidInputExceptionReason = "MIN_LENGTH_EXCEEDED"
- InvalidInputExceptionReasonMinValueExceeded InvalidInputExceptionReason = "MIN_VALUE_EXCEEDED"
- InvalidInputExceptionReasonImmutablePolicy InvalidInputExceptionReason = "IMMUTABLE_POLICY"
- InvalidInputExceptionReasonInvalidPattern InvalidInputExceptionReason = "INVALID_PATTERN"
- InvalidInputExceptionReasonInvalidPatternTargetId InvalidInputExceptionReason = "INVALID_PATTERN_TARGET_ID"
- InvalidInputExceptionReasonInputRequired InvalidInputExceptionReason = "INPUT_REQUIRED"
- InvalidInputExceptionReasonInvalidPaginationToken InvalidInputExceptionReason = "INVALID_NEXT_TOKEN"
- InvalidInputExceptionReasonMaxFilterLimitExceeded InvalidInputExceptionReason = "MAX_LIMIT_EXCEEDED_FILTER"
- InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots InvalidInputExceptionReason = "MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS"
- InvalidInputExceptionReasonInvalidFullNameTarget InvalidInputExceptionReason = "INVALID_FULL_NAME_TARGET"
- InvalidInputExceptionReasonUnrecognizedServicePrincipal InvalidInputExceptionReason = "UNRECOGNIZED_SERVICE_PRINCIPAL"
- InvalidInputExceptionReasonInvalidRoleName InvalidInputExceptionReason = "INVALID_ROLE_NAME"
- InvalidInputExceptionReasonInvalidSystemTagsParameter InvalidInputExceptionReason = "INVALID_SYSTEM_TAGS_PARAMETER"
- InvalidInputExceptionReasonDuplicateTagKey InvalidInputExceptionReason = "DUPLICATE_TAG_KEY"
- InvalidInputExceptionReasonTargetNotSupported InvalidInputExceptionReason = "TARGET_NOT_SUPPORTED"
- InvalidInputExceptionReasonInvalidEmailAddressTarget InvalidInputExceptionReason = "INVALID_EMAIL_ADDRESS_TARGET"
- InvalidInputExceptionReasonInvalidResourcePolicyJson InvalidInputExceptionReason = "INVALID_RESOURCE_POLICY_JSON"
- InvalidInputExceptionReasonInvalidPrincipal InvalidInputExceptionReason = "INVALID_PRINCIPAL"
- InvalidInputExceptionReasonUnsupportedActionInResourcePolicy InvalidInputExceptionReason = "UNSUPPORTED_ACTION_IN_RESOURCE_POLICY"
- InvalidInputExceptionReasonUnsupportedPolicyTypeInResourcePolicy InvalidInputExceptionReason = "UNSUPPORTED_POLICY_TYPE_IN_RESOURCE_POLICY"
- InvalidInputExceptionReasonUnsupportedResourceInResourcePolicy InvalidInputExceptionReason = "UNSUPPORTED_RESOURCE_IN_RESOURCE_POLICY"
- InvalidInputExceptionReasonNonDetachablePolicy InvalidInputExceptionReason = "NON_DETACHABLE_POLICY"
- InvalidInputExceptionReasonCallerRequiredFieldMissing InvalidInputExceptionReason = "CALLER_REQUIRED_FIELD_MISSING"
- InvalidInputExceptionReasonUnsupportedActionInResponsibilityTransfer InvalidInputExceptionReason = "UNSUPPORTED_ACTION_IN_RESPONSIBILITY_TRANSFER"
- InvalidInputExceptionReasonStartDateNotBeginningOfMonth InvalidInputExceptionReason = "START_DATE_NOT_BEGINNING_OF_MONTH"
- InvalidInputExceptionReasonStartDateNotBeginningOfDay InvalidInputExceptionReason = "START_DATE_NOT_BEGINNING_OF_DAY"
- InvalidInputExceptionReasonStartDateTooEarly InvalidInputExceptionReason = "START_DATE_TOO_EARLY"
- InvalidInputExceptionReasonStartDateTooLate InvalidInputExceptionReason = "START_DATE_TOO_LATE"
- InvalidInputExceptionReasonInvalidStartDate InvalidInputExceptionReason = "INVALID_START_DATE"
- InvalidInputExceptionReasonEndDateNotEndOfMonth InvalidInputExceptionReason = "END_DATE_NOT_END_OF_MONTH"
- InvalidInputExceptionReasonEndDateTooEarly InvalidInputExceptionReason = "END_DATE_TOO_EARLY"
- InvalidInputExceptionReasonInvalidEndDate InvalidInputExceptionReason = "INVALID_END_DATE"
-)
-
-// Values returns all known values for InvalidInputExceptionReason. Note that this
-// can be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (InvalidInputExceptionReason) Values() []InvalidInputExceptionReason {
- return []InvalidInputExceptionReason{
- "INVALID_PARTY_TYPE_TARGET",
- "INVALID_SYNTAX_ORGANIZATION_ARN",
- "INVALID_SYNTAX_POLICY_ID",
- "INVALID_ENUM",
- "INVALID_ENUM_POLICY_TYPE",
- "INVALID_LIST_MEMBER",
- "MAX_LENGTH_EXCEEDED",
- "MAX_VALUE_EXCEEDED",
- "MIN_LENGTH_EXCEEDED",
- "MIN_VALUE_EXCEEDED",
- "IMMUTABLE_POLICY",
- "INVALID_PATTERN",
- "INVALID_PATTERN_TARGET_ID",
- "INPUT_REQUIRED",
- "INVALID_NEXT_TOKEN",
- "MAX_LIMIT_EXCEEDED_FILTER",
- "MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS",
- "INVALID_FULL_NAME_TARGET",
- "UNRECOGNIZED_SERVICE_PRINCIPAL",
- "INVALID_ROLE_NAME",
- "INVALID_SYSTEM_TAGS_PARAMETER",
- "DUPLICATE_TAG_KEY",
- "TARGET_NOT_SUPPORTED",
- "INVALID_EMAIL_ADDRESS_TARGET",
- "INVALID_RESOURCE_POLICY_JSON",
- "INVALID_PRINCIPAL",
- "UNSUPPORTED_ACTION_IN_RESOURCE_POLICY",
- "UNSUPPORTED_POLICY_TYPE_IN_RESOURCE_POLICY",
- "UNSUPPORTED_RESOURCE_IN_RESOURCE_POLICY",
- "NON_DETACHABLE_POLICY",
- "CALLER_REQUIRED_FIELD_MISSING",
- "UNSUPPORTED_ACTION_IN_RESPONSIBILITY_TRANSFER",
- "START_DATE_NOT_BEGINNING_OF_MONTH",
- "START_DATE_NOT_BEGINNING_OF_DAY",
- "START_DATE_TOO_EARLY",
- "START_DATE_TOO_LATE",
- "INVALID_START_DATE",
- "END_DATE_NOT_END_OF_MONTH",
- "END_DATE_TOO_EARLY",
- "INVALID_END_DATE",
- }
-}
-
-type OrganizationFeatureSet string
-
-// Enum values for OrganizationFeatureSet
-const (
- OrganizationFeatureSetAll OrganizationFeatureSet = "ALL"
- OrganizationFeatureSetConsolidatedBilling OrganizationFeatureSet = "CONSOLIDATED_BILLING"
-)
-
-// Values returns all known values for OrganizationFeatureSet. Note that this can
-// be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (OrganizationFeatureSet) Values() []OrganizationFeatureSet {
- return []OrganizationFeatureSet{
- "ALL",
- "CONSOLIDATED_BILLING",
- }
-}
-
-type ParentType string
-
-// Enum values for ParentType
-const (
- ParentTypeRoot ParentType = "ROOT"
- ParentTypeOrganizationalUnit ParentType = "ORGANIZATIONAL_UNIT"
-)
-
-// Values returns all known values for ParentType. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ParentType) Values() []ParentType {
- return []ParentType{
- "ROOT",
- "ORGANIZATIONAL_UNIT",
- }
-}
-
-type PolicyType string
-
-// Enum values for PolicyType
-const (
- PolicyTypeServiceControlPolicy PolicyType = "SERVICE_CONTROL_POLICY"
- PolicyTypeResourceControlPolicy PolicyType = "RESOURCE_CONTROL_POLICY"
- PolicyTypeTagPolicy PolicyType = "TAG_POLICY"
- PolicyTypeBackupPolicy PolicyType = "BACKUP_POLICY"
- PolicyTypeAiservicesOptOutPolicy PolicyType = "AISERVICES_OPT_OUT_POLICY"
- PolicyTypeChatbotPolicy PolicyType = "CHATBOT_POLICY"
- PolicyTypeDeclarativePolicyEc2 PolicyType = "DECLARATIVE_POLICY_EC2"
- PolicyTypeSecurityhubPolicy PolicyType = "SECURITYHUB_POLICY"
- PolicyTypeInspectorPolicy PolicyType = "INSPECTOR_POLICY"
- PolicyTypeUpgradeRolloutPolicy PolicyType = "UPGRADE_ROLLOUT_POLICY"
- PolicyTypeBedrockPolicy PolicyType = "BEDROCK_POLICY"
- PolicyTypeS3Policy PolicyType = "S3_POLICY"
- PolicyTypeNetworkSecurityDirectorPolicy PolicyType = "NETWORK_SECURITY_DIRECTOR_POLICY"
-)
-
-// Values returns all known values for PolicyType. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (PolicyType) Values() []PolicyType {
- return []PolicyType{
- "SERVICE_CONTROL_POLICY",
- "RESOURCE_CONTROL_POLICY",
- "TAG_POLICY",
- "BACKUP_POLICY",
- "AISERVICES_OPT_OUT_POLICY",
- "CHATBOT_POLICY",
- "DECLARATIVE_POLICY_EC2",
- "SECURITYHUB_POLICY",
- "INSPECTOR_POLICY",
- "UPGRADE_ROLLOUT_POLICY",
- "BEDROCK_POLICY",
- "S3_POLICY",
- "NETWORK_SECURITY_DIRECTOR_POLICY",
- }
-}
-
-type PolicyTypeStatus string
-
-// Enum values for PolicyTypeStatus
-const (
- PolicyTypeStatusEnabled PolicyTypeStatus = "ENABLED"
- PolicyTypeStatusPendingEnable PolicyTypeStatus = "PENDING_ENABLE"
- PolicyTypeStatusPendingDisable PolicyTypeStatus = "PENDING_DISABLE"
-)
-
-// Values returns all known values for PolicyTypeStatus. Note that this can be
-// expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (PolicyTypeStatus) Values() []PolicyTypeStatus {
- return []PolicyTypeStatus{
- "ENABLED",
- "PENDING_ENABLE",
- "PENDING_DISABLE",
- }
-}
-
-type ResponsibilityTransferStatus string
-
-// Enum values for ResponsibilityTransferStatus
-const (
- ResponsibilityTransferStatusRequested ResponsibilityTransferStatus = "REQUESTED"
- ResponsibilityTransferStatusDeclined ResponsibilityTransferStatus = "DECLINED"
- ResponsibilityTransferStatusCanceled ResponsibilityTransferStatus = "CANCELED"
- ResponsibilityTransferStatusExpired ResponsibilityTransferStatus = "EXPIRED"
- ResponsibilityTransferStatusAccepted ResponsibilityTransferStatus = "ACCEPTED"
- ResponsibilityTransferStatusWithdrawn ResponsibilityTransferStatus = "WITHDRAWN"
-)
-
-// Values returns all known values for ResponsibilityTransferStatus. Note that
-// this can be expanded in the future, and so it is only as up to date as the
-// client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ResponsibilityTransferStatus) Values() []ResponsibilityTransferStatus {
- return []ResponsibilityTransferStatus{
- "REQUESTED",
- "DECLINED",
- "CANCELED",
- "EXPIRED",
- "ACCEPTED",
- "WITHDRAWN",
- }
-}
-
-type ResponsibilityTransferType string
-
-// Enum values for ResponsibilityTransferType
-const (
- ResponsibilityTransferTypeBilling ResponsibilityTransferType = "BILLING"
-)
-
-// Values returns all known values for ResponsibilityTransferType. Note that this
-// can be expanded in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (ResponsibilityTransferType) Values() []ResponsibilityTransferType {
- return []ResponsibilityTransferType{
- "BILLING",
- }
-}
-
-type TargetType string
-
-// Enum values for TargetType
-const (
- TargetTypeAccount TargetType = "ACCOUNT"
- TargetTypeOrganizationalUnit TargetType = "ORGANIZATIONAL_UNIT"
- TargetTypeRoot TargetType = "ROOT"
-)
-
-// Values returns all known values for TargetType. Note that this can be expanded
-// in the future, and so it is only as up to date as the client.
-//
-// The ordering of this slice is not guaranteed to be stable across updates.
-func (TargetType) Values() []TargetType {
- return []TargetType{
- "ACCOUNT",
- "ORGANIZATIONAL_UNIT",
- "ROOT",
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/errors.go
deleted file mode 100644
index aa24c0366..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/errors.go
+++ /dev/null
@@ -1,1782 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package types
-
-import (
- "fmt"
- smithy "github.com/aws/smithy-go"
-)
-
-// You don't have permissions to perform the requested operation. The user or role
-// that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see [Access Management]in the
-// IAM User Guide.
-//
-// [Access Management]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html
-type AccessDeniedException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AccessDeniedException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AccessDeniedException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AccessDeniedException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AccessDeniedException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The operation that you attempted requires you to have the
-// iam:CreateServiceLinkedRole for organizations.amazonaws.com permission so that
-// Organizations can create the required service-linked role. You don't have that
-// permission.
-type AccessDeniedForDependencyException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- Reason AccessDeniedForDependencyExceptionReason
-
- noSmithyDocumentSerde
-}
-
-func (e *AccessDeniedForDependencyException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AccessDeniedForDependencyException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AccessDeniedForDependencyException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AccessDeniedForDependencyException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AccessDeniedForDependencyException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// You attempted to close an account that is already closed.
-type AccountAlreadyClosedException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AccountAlreadyClosedException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AccountAlreadyClosedException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AccountAlreadyClosedException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AccountAlreadyClosedException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AccountAlreadyClosedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The specified account is already a delegated administrator for this Amazon Web
-// Services service.
-type AccountAlreadyRegisteredException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AccountAlreadyRegisteredException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AccountAlreadyRegisteredException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AccountAlreadyRegisteredException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AccountAlreadyRegisteredException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AccountAlreadyRegisteredException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// We can't find an Amazon Web Services account with the AccountId that you
-//
-// specified, or the account whose credentials you used to make this request isn't
-// a member of an organization.
-type AccountNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AccountNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AccountNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AccountNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AccountNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AccountNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The specified account is not a delegated administrator for this Amazon Web
-// Services service.
-type AccountNotRegisteredException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AccountNotRegisteredException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AccountNotRegisteredException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AccountNotRegisteredException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AccountNotRegisteredException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AccountNotRegisteredException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// You can't invite an existing account to your organization until you verify that
-// you own the email address associated with the management account. For more
-// information, see [Email address verification]in the Organizations User Guide.
-//
-// [Email address verification]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification
-type AccountOwnerNotVerifiedException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AccountOwnerNotVerifiedException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AccountOwnerNotVerifiedException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AccountOwnerNotVerifiedException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AccountOwnerNotVerifiedException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AccountOwnerNotVerifiedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// This account is already a member of an organization. An account can belong to
-// only one organization at a time.
-type AlreadyInOrganizationException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AlreadyInOrganizationException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AlreadyInOrganizationException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AlreadyInOrganizationException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AlreadyInOrganizationException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AlreadyInOrganizationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// Your account isn't a member of an organization. To make this request, you must
-// use the credentials of an account that belongs to an organization.
-type AWSOrganizationsNotInUseException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *AWSOrganizationsNotInUseException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *AWSOrganizationsNotInUseException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *AWSOrganizationsNotInUseException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "AWSOrganizationsNotInUseException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *AWSOrganizationsNotInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// We can't find an organizational unit (OU) or Amazon Web Services account with
-// the ChildId that you specified.
-type ChildNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ChildNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ChildNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ChildNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ChildNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ChildNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-type ConcurrentModificationException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ConcurrentModificationException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ConcurrentModificationException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ConcurrentModificationException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ConcurrentModificationException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ConcurrentModificationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The request failed because it conflicts with the current state of the specified
-// resource.
-type ConflictException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ConflictException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ConflictException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ConflictException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ConflictException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from an OU
-// or root, inviting or creating too many accounts to the organization, or
-// attaching too many policies to an account, OU, or root. This exception includes
-// a reason that contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// - ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account. Instead,
-// after you remove all member accounts, delete the organization itself.
-//
-// - ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove an
-// account from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first complete phone
-// verification. Follow the steps at [Removing a member account from your organization]in the Organizations User Guide.
-//
-// - ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// accounts that you can create in one day.
-//
-// - ACCOUNT_CREATION_NOT_COMPLETE: Your account setup isn't complete or your
-// account isn't fully active. You must complete the account setup before you
-// create an organization.
-//
-// - ACTIVE_RESPONSIBILITY_TRANSFER_PROCESS: You cannot delete organization due
-// to an ongoing responsibility transfer process. For example, a pending invitation
-// or an in-progress transfer. To delete the organization, you must resolve the
-// current transfer process.
-//
-// - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the
-// number of accounts in an organization. If you need more accounts, contact [Amazon Web Services Support]to
-// request an increase in your limit.
-//
-// Or the number of invitations that you tried to send would cause you to exceed
-//
-// the limit of accounts in your organization. Send fewer invitations or contact
-// Amazon Web Services Support to request an increase in the number of accounts.
-//
-// Deleted and closed accounts still count toward your limit.
-//
-// If you get this exception when running a command immediately after creating the
-//
-// organization, wait one hour and try again. After an hour, if the command
-// continues to fail with this error, contact [Amazon Web Services Support].
-//
-// - ALL_FEATURES_MIGRATION_ORGANIZATION_SIZE_LIMIT_EXCEEDED: Your organization
-// has more than 5000 accounts, and you can only use the standard migration process
-// for organizations with less than 5000 accounts. Use the assisted migration
-// process to enable all features mode, or create a support case for assistance if
-// you are unable to use assisted migration.
-//
-// - CANNOT_REGISTER_SUSPENDED_ACCOUNT_AS_DELEGATED_ADMINISTRATOR: You cannot
-// register a suspended account as a delegated administrator.
-//
-// - CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an Amazon Web Services service integrated with Organizations. You can
-// designate only a member account as a delegated administrator.
-//
-// - CANNOT_CLOSE_MANAGEMENT_ACCOUNT: You attempted to close the management
-// account. To close the management account for the organization, you must first
-// either remove or close all member accounts in the organization. Follow standard
-// account closure process using root credentials.
-//
-// - CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove an
-// account that is registered as a delegated administrator for a service integrated
-// with your organization. To complete this operation, you must first deregister
-// this account as a delegated administrator.
-//
-// - CLOSE_ACCOUNT_QUOTA_EXCEEDED: You have exceeded close account quota for the
-// past 30 days.
-//
-// - CLOSE_ACCOUNT_REQUESTS_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can close at a time.
-//
-// - CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// - DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an Amazon Web Services account as a delegated administrator for an Amazon Web
-// Services service that already has a delegated administrator. To complete this
-// operation, you must first deregister any existing delegated administrators for
-// this service.
-//
-// - EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only valid
-// for a limited period of time. You must resubmit the request and generate a new
-// verification code.
-//
-// - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// - INVALID_PAYMENT_INSTRUMENT: You cannot remove an account because no
-// supported payment method is associated with the account. Amazon Web Services
-// does not support cards issued by financial institutions in Russia or Belarus.
-// For more information, see [Managing your Amazon Web Services payments].
-//
-// - MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account in
-// this organization, you first must migrate the organization's management account
-// to the marketplace that corresponds to the management account's address. All
-// accounts in an organization must be associated with the same marketplace.
-//
-// - MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the Amazon Web
-// Services Regions in China. To create an organization, the master must have a
-// valid business license. For more information, contact customer support.
-//
-// - MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you must
-// first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// - MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the Amazon Web Services
-// GovCloud (US-West) Region. For more information, see [Organizations]in the Amazon Web
-// Services GovCloud User Guide.
-//
-// - MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization with
-// this management account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. For more information, see [Considerations before removing an account from an organization]in the
-// Organizations User Guide.
-//
-// - MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted to
-// register more delegated administrators than allowed for the service principal.
-//
-// - MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity at one
-// time.
-//
-// - MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed on
-// this resource.
-//
-// - MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation with
-// this member account, you first must associate a valid payment instrument, such
-// as a credit card, with the account. For more information, see [Considerations before removing an account from an organization]in the
-// Organizations User Guide.
-//
-// - MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a policy
-// from an entity that would cause the entity to have fewer than the minimum number
-// of policies of a certain type required.
-//
-// - ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an
-// operation that requires the organization to be configured to support all
-// features. An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// - OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is too
-// many levels deep.
-//
-// - OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs that
-// you can have in an organization.
-//
-// - POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that is
-// larger than the maximum size.
-//
-// - POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// - POLICY_TYPE_ENABLED_FOR_THIS_SERVICE: You attempted to disable service
-// access before you disabled the policy type (for example, SECURITYHUB_POLICY). To
-// complete this operation, you must first disable the policy type.
-//
-// - RESPONSIBILITY_TRANSFER_MAX_INBOUND_QUOTA_VIOLATION: You have exceeded your
-// inbound transfers limit.
-//
-// - RESPONSIBILITY_TRANSFER_MAX_LEVEL_VIOLATION: You have exceeded the maximum
-// length of your transfer chain.
-//
-// - RESPONSIBILITY_TRANSFER_MAX_OUTBOUND_QUOTA_VIOLATION: You have exceeded
-// your outbound transfers limit.
-//
-// - RESPONSIBILITY_TRANSFER_MAX_TRANSFERS_QUOTA_VIOLATION: You have exceeded
-// the maximum number of inbound transfers allowed in a transfer chain.
-//
-// - SERVICE_ACCESS_NOT_ENABLED:
-//
-// - You attempted to register a delegated administrator before you enabled
-// service access. Call the EnableAWSServiceAccess API first.
-//
-// - You attempted to enable a policy type before you enabled service access.
-// Call the EnableAWSServiceAccess API first.
-//
-// - TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this account.
-//
-// - TRANSFER_RESPONSIBILITY_SOURCE_DELETION_IN_PROGRESS: The source
-// organization cannot accept this transfer invitation because it is marked for
-// deletion.
-//
-// - TRANSFER_RESPONSIBILITY_TARGET_DELETION_IN_PROGRESS: The source
-// organization cannot accept this transfer invitation because target organization
-// is marked for deletion.
-//
-// - UNSUPPORTED_PRICING: Your organization has a pricing contract that is
-// unsupported.
-//
-// - WAIT_PERIOD_ACTIVE: After you create an Amazon Web Services account, you
-// must wait until at least four days after the account was created. Invited
-// accounts aren't subject to this waiting period.
-//
-// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/
-// [Removing a member account from your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master
-//
-// [Managing your Amazon Web Services payments]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html
-// [Organizations]: https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html
-// [Considerations before removing an account from an organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_account-before-remove.html
-type ConstraintViolationException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- Reason ConstraintViolationExceptionReason
-
- noSmithyDocumentSerde
-}
-
-func (e *ConstraintViolationException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ConstraintViolationException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ConstraintViolationException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ConstraintViolationException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ConstraintViolationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// We can't find an create account request with the CreateAccountRequestId that
-// you specified.
-type CreateAccountStatusNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *CreateAccountStatusNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *CreateAccountStatusNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *CreateAccountStatusNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "CreateAccountStatusNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *CreateAccountStatusNotFoundException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// We can't find the destination container (a root or OU) with the ParentId that
-// you specified.
-type DestinationParentNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *DestinationParentNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *DestinationParentNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *DestinationParentNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "DestinationParentNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *DestinationParentNotFoundException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// That account is already present in the specified destination.
-type DuplicateAccountException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *DuplicateAccountException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *DuplicateAccountException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *DuplicateAccountException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "DuplicateAccountException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *DuplicateAccountException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// A handshake with the same action and target already exists. For example, if you
-// invited an account to join your organization, the invited account might already
-// have a pending invitation from this organization. If you intend to resend an
-// invitation to an account, ensure that existing handshakes that might be
-// considered duplicates are canceled or declined.
-type DuplicateHandshakeException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *DuplicateHandshakeException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *DuplicateHandshakeException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *DuplicateHandshakeException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "DuplicateHandshakeException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *DuplicateHandshakeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// An OU with the same name already exists.
-type DuplicateOrganizationalUnitException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *DuplicateOrganizationalUnitException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *DuplicateOrganizationalUnitException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *DuplicateOrganizationalUnitException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "DuplicateOrganizationalUnitException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *DuplicateOrganizationalUnitException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// The selected policy is already attached to the specified target.
-type DuplicatePolicyAttachmentException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *DuplicatePolicyAttachmentException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *DuplicatePolicyAttachmentException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *DuplicatePolicyAttachmentException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "DuplicatePolicyAttachmentException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *DuplicatePolicyAttachmentException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// A policy with the same name already exists.
-type DuplicatePolicyException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *DuplicatePolicyException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *DuplicatePolicyException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *DuplicatePolicyException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "DuplicatePolicyException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *DuplicatePolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// If you ran this action on the management account, this policy type is not
-// enabled. If you ran the action on a member account, the account doesn't have an
-// effective policy of this type. Contact the administrator of your organization
-// about attaching a policy of this type to the account.
-type EffectivePolicyNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *EffectivePolicyNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *EffectivePolicyNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *EffectivePolicyNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "EffectivePolicyNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *EffectivePolicyNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// Organizations couldn't perform the operation because your organization hasn't
-// finished initializing. This can take up to an hour. Try again later. If after
-// one hour you continue to receive this error, contact [Amazon Web Services Support].
-//
-// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/
-type FinalizingOrganizationException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *FinalizingOrganizationException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *FinalizingOrganizationException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *FinalizingOrganizationException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "FinalizingOrganizationException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *FinalizingOrganizationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The specified handshake is already in the requested state. For example, you
-// can't accept a handshake that was already accepted.
-type HandshakeAlreadyInStateException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *HandshakeAlreadyInStateException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *HandshakeAlreadyInStateException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *HandshakeAlreadyInStateException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "HandshakeAlreadyInStateException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *HandshakeAlreadyInStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The requested operation would violate the constraint identified in the reason
-// code.
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation:
-//
-// - ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on the
-// number of accounts in an organization. Note that deleted and closed accounts
-// still count toward your limit.
-//
-// If you get this exception immediately after creating the organization, wait one
-//
-// hour and try again. If after an hour it continues to fail with this error,
-// contact [Amazon Web Services Support].
-//
-// - ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because the
-// invited account is already a member of an organization.
-//
-// - HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// - INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
-// to join an organization while it's in the process of enabling all features. You
-// can resume inviting accounts after you finalize the process when all accounts
-// have agreed to the change.
-//
-// - LEGACY_PERMISSIONS_STILL_IN_USE: Your organization must migrate to use the
-// new IAM fine-grained actions for billing, cost management, and accounts.
-//
-// - ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
-// because the organization has already enabled all features.
-//
-// - ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
-// the account is from a different marketplace than the accounts in the
-// organization.
-//
-// - ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
-// request is invalid because the organization has already started the process to
-// enable all features.
-//
-// - ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to change
-// the membership of an account too quickly after its previous change.
-//
-// - PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
-// account that doesn't have a payment instrument, such as a credit card,
-// associated with it.
-//
-// - RESPONSIBILITY_TRANSFER_ALREADY_EXISTS: You cannot perform this operation
-// with the current transfer.
-//
-// - SOURCE_AND_TARGET_CANNOT_MATCH: An account can't accept a transfer
-// invitation if it is both the sender and recipient of the invitation.
-//
-// - UNUSED_PREPAYMENT_BALANCE: Your organization has an outstanding pre-payment
-// balance.
-//
-// [Amazon Web Services Support]: https://console.aws.amazon.com/support/home#/
-type HandshakeConstraintViolationException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- Reason HandshakeConstraintViolationExceptionReason
-
- noSmithyDocumentSerde
-}
-
-func (e *HandshakeConstraintViolationException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *HandshakeConstraintViolationException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *HandshakeConstraintViolationException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "HandshakeConstraintViolationException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *HandshakeConstraintViolationException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// We can't find a handshake with the HandshakeId that you specified.
-type HandshakeNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *HandshakeNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *HandshakeNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *HandshakeNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "HandshakeNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *HandshakeNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// You can't perform the operation on the handshake in its current state. For
-// example, you can't cancel a handshake that was already accepted or accept a
-// handshake that was already declined.
-type InvalidHandshakeTransitionException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *InvalidHandshakeTransitionException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *InvalidHandshakeTransitionException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *InvalidHandshakeTransitionException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "InvalidHandshakeTransitionException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *InvalidHandshakeTransitionException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// The requested operation failed because you provided invalid values for one or
-// more of the request parameters. This exception includes a reason that contains
-// additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// - CALLER_REQUIRED_FIELD_MISSING: At least one of the required field is
-// missing: Caller Account Id, Management Account Id or Organization Id.
-//
-// - DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to the
-// same entity.
-//
-// - END_DATE_NOT_END_OF_MONTH: You provided an invalid end date. The end date
-// must be the end of the last day of the month (23.59.59.999).
-//
-// - END_DATE_TOO_EARLY: You provided an invalid end date. It is too early for
-// the transfer to end.
-//
-// - IMMUTABLE_POLICY: You specified a policy that is managed by Amazon Web
-// Services and can't be modified.
-//
-// - INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// - INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address for
-// the invited account owner.
-//
-// - INVALID_END_DATE: The selected withdrawal date doesn't meet the terms of
-// your partner agreement. Visit Amazon Web Services Partner Central to view your
-// partner agreements or contact your Amazon Web Services Partner for help.
-//
-// - INVALID_ENUM: You specified an invalid value.
-//
-// - INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// - INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// - INVALID_LIST_MEMBER: You provided a list to a parameter that contains at
-// least one invalid value.
-//
-// - INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter from the
-// response to a previous call of the operation.
-//
-// - INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// - INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// - INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// - INVALID_PRINCIPAL: You specified an invalid principal element in the policy.
-//
-// - INVALID_ROLE_NAME: You provided a role name that isn't valid. A role name
-// can't begin with the reserved prefix AWSServiceRoleFor .
-//
-// - INVALID_START_DATE: The start date doesn't meet the minimum requirements.
-//
-// - INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// - INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// - INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're reserved for
-// Amazon Web Services use. System tags don’t count against your tags per resource
-// limit.
-//
-// - MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter for
-// the operation.
-//
-// - MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer than
-// allowed.
-//
-// - MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// - MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter than
-// allowed.
-//
-// - MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// - MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// - NON_DETACHABLE_POLICY: You can't detach this Amazon Web Services Managed
-// Policy.
-//
-// - START_DATE_NOT_BEGINNING_OF_DAY: You provided an invalid start date. The
-// start date must be the beginning of the day (00:00:00.000).
-//
-// - START_DATE_NOT_BEGINNING_OF_MONTH: You provided an invalid start date. The
-// start date must be the first day of the month.
-//
-// - START_DATE_TOO_EARLY: You provided an invalid start date. The start date is
-// too early.
-//
-// - START_DATE_TOO_LATE: You provided an invalid start date. The start date is
-// too late.
-//
-// - TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// - UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// - UNSUPPORTED_ACTION_IN_RESPONSIBILITY_TRANSFER: You provided a value that is
-// not supported by this operation.
-type InvalidInputException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- Reason InvalidInputExceptionReason
-
- noSmithyDocumentSerde
-}
-
-func (e *InvalidInputException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *InvalidInputException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *InvalidInputException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "InvalidInputException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *InvalidInputException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The responsibility transfer can't transition to the requested state because
-// it's not in a valid state for this operation.
-type InvalidResponsibilityTransferTransitionException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *InvalidResponsibilityTransferTransitionException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *InvalidResponsibilityTransferTransitionException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *InvalidResponsibilityTransferTransitionException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "InvalidResponsibilityTransferTransitionException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *InvalidResponsibilityTransferTransitionException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// The provided policy document doesn't meet the requirements of the specified
-// policy type. For example, the syntax might be incorrect. For details about
-// service control policy syntax, see [SCP syntax]in the Organizations User Guide.
-//
-// [SCP syntax]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_syntax.html
-type MalformedPolicyDocumentException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *MalformedPolicyDocumentException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *MalformedPolicyDocumentException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *MalformedPolicyDocumentException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "MalformedPolicyDocumentException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// You can't remove a management account from an organization. If you want the
-// management account to become a member account in another organization, you must
-// first delete the current organization of the management account.
-type MasterCannotLeaveOrganizationException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *MasterCannotLeaveOrganizationException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *MasterCannotLeaveOrganizationException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *MasterCannotLeaveOrganizationException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "MasterCannotLeaveOrganizationException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *MasterCannotLeaveOrganizationException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// The specified OU is not empty. Move all accounts to another root or to other
-// OUs, remove all child OUs, and try the operation again.
-type OrganizationalUnitNotEmptyException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *OrganizationalUnitNotEmptyException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *OrganizationalUnitNotEmptyException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *OrganizationalUnitNotEmptyException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "OrganizationalUnitNotEmptyException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *OrganizationalUnitNotEmptyException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// We can't find an OU with the OrganizationalUnitId that you specified.
-type OrganizationalUnitNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *OrganizationalUnitNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *OrganizationalUnitNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *OrganizationalUnitNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "OrganizationalUnitNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *OrganizationalUnitNotFoundException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// The organization isn't empty. To delete an organization, you must first remove
-// all accounts except the management account.
-type OrganizationNotEmptyException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *OrganizationNotEmptyException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *OrganizationNotEmptyException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *OrganizationNotEmptyException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "OrganizationNotEmptyException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *OrganizationNotEmptyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// We can't find a root or OU with the ParentId that you specified.
-type ParentNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ParentNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ParentNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ParentNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ParentNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ParentNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// Changes to the effective policy are in progress, and its contents can't be
-// returned. Try the operation again later.
-type PolicyChangesInProgressException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *PolicyChangesInProgressException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *PolicyChangesInProgressException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *PolicyChangesInProgressException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "PolicyChangesInProgressException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *PolicyChangesInProgressException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The policy is attached to one or more entities. You must detach it from all
-// roots, OUs, and accounts before performing this operation.
-type PolicyInUseException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *PolicyInUseException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *PolicyInUseException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *PolicyInUseException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "PolicyInUseException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *PolicyInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The policy isn't attached to the specified target in the specified root.
-type PolicyNotAttachedException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *PolicyNotAttachedException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *PolicyNotAttachedException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *PolicyNotAttachedException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "PolicyNotAttachedException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *PolicyNotAttachedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// We can't find a policy with the PolicyId that you specified.
-type PolicyNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *PolicyNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *PolicyNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *PolicyNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "PolicyNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *PolicyNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The specified policy type is already enabled in the specified root.
-type PolicyTypeAlreadyEnabledException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *PolicyTypeAlreadyEnabledException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *PolicyTypeAlreadyEnabledException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *PolicyTypeAlreadyEnabledException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "PolicyTypeAlreadyEnabledException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *PolicyTypeAlreadyEnabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// You can't use the specified policy type with the feature set currently enabled
-// for this organization. For example, you can enable SCPs only after you enable
-// all features in the organization. For more information, see [Managing Organizations policies]in the
-// Organizations User Guide.
-//
-// [Managing Organizations policies]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root
-type PolicyTypeNotAvailableForOrganizationException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *PolicyTypeNotAvailableForOrganizationException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *PolicyTypeNotAvailableForOrganizationException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *PolicyTypeNotAvailableForOrganizationException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "PolicyTypeNotAvailableForOrganizationException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *PolicyTypeNotAvailableForOrganizationException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// The specified policy type isn't currently enabled in this root. You can't
-// attach policies of the specified type to entities in a root until you enable
-// that type in the root. For more information, see [Enabling all features in your organization]in the Organizations User
-// Guide.
-//
-// [Enabling all features in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
-type PolicyTypeNotEnabledException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *PolicyTypeNotEnabledException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *PolicyTypeNotEnabledException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *PolicyTypeNotEnabledException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "PolicyTypeNotEnabledException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *PolicyTypeNotEnabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// We can't find a resource policy request with the parameter that you specified.
-type ResourcePolicyNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ResourcePolicyNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ResourcePolicyNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ResourcePolicyNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ResourcePolicyNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ResourcePolicyNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// The responsibility transfer is already in the status that you specified.
-type ResponsibilityTransferAlreadyInStatusException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ResponsibilityTransferAlreadyInStatusException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ResponsibilityTransferAlreadyInStatusException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ResponsibilityTransferAlreadyInStatusException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ResponsibilityTransferAlreadyInStatusException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ResponsibilityTransferAlreadyInStatusException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// We can't find a transfer that you specified.
-type ResponsibilityTransferNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ResponsibilityTransferNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ResponsibilityTransferNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ResponsibilityTransferNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ResponsibilityTransferNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ResponsibilityTransferNotFoundException) ErrorFault() smithy.ErrorFault {
- return smithy.FaultClient
-}
-
-// We can't find a root with the RootId that you specified.
-type RootNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *RootNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *RootNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *RootNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "RootNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *RootNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// Organizations can't complete your request because of an internal service error.
-// Try again later.
-type ServiceException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *ServiceException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *ServiceException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *ServiceException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "ServiceException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *ServiceException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
-
-// We can't find a source root or OU with the ParentId that you specified.
-type SourceParentNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *SourceParentNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *SourceParentNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *SourceParentNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "SourceParentNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *SourceParentNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// We can't find a root, OU, account, or policy with the TargetId that you
-// specified.
-type TargetNotFoundException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *TargetNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *TargetNotFoundException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *TargetNotFoundException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "TargetNotFoundException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *TargetNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// You have sent too many requests in too short a period of time. The quota helps
-// protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect Organizations, see [Quotas for Organizations] in the
-// Organizations User Guide.
-//
-// [Quotas for Organizations]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html
-type TooManyRequestsException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- Type *string
-
- noSmithyDocumentSerde
-}
-
-func (e *TooManyRequestsException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *TooManyRequestsException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *TooManyRequestsException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "TooManyRequestsException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
-
-// This action isn't available in the current Amazon Web Services Region.
-type UnsupportedAPIEndpointException struct {
- Message *string
-
- ErrorCodeOverride *string
-
- noSmithyDocumentSerde
-}
-
-func (e *UnsupportedAPIEndpointException) Error() string {
- return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
-}
-func (e *UnsupportedAPIEndpointException) ErrorMessage() string {
- if e.Message == nil {
- return ""
- }
- return *e.Message
-}
-func (e *UnsupportedAPIEndpointException) ErrorCode() string {
- if e == nil || e.ErrorCodeOverride == nil {
- return "UnsupportedAPIEndpointException"
- }
- return *e.ErrorCodeOverride
-}
-func (e *UnsupportedAPIEndpointException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/types.go
deleted file mode 100644
index 203af0b68..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/types/types.go
+++ /dev/null
@@ -1,838 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package types
-
-import (
- smithydocument "github.com/aws/smithy-go/document"
- "time"
-)
-
-// Contains information about an Amazon Web Services account that is a member of
-// an organization.
-type Account struct {
-
- // The Amazon Resource Name (ARN) of the account.
- //
- // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web
- // Services Service Authorization Reference.
- //
- // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies
- Arn *string
-
- // The email address associated with the Amazon Web Services account.
- //
- // The [regex pattern] for this parameter is a string of characters that represents a standard
- // internet email address.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Email *string
-
- // The unique identifier (ID) of the account.
- //
- // The [regex pattern] for an account ID string requires exactly 12 digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // The method by which the account joined the organization.
- JoinedMethod AccountJoinedMethod
-
- // The date the account became a part of the organization.
- JoinedTimestamp *time.Time
-
- // The friendly name of the account.
- //
- // The [regex pattern] that is used to validate this parameter is a string of any of the
- // characters in the ASCII character range.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Name *string
-
- // The paths in the organization where the account exists.
- Paths []string
-
- // Each state represents a specific phase in the account lifecycle. Use this
- // information to manage account access, automate workflows, or trigger actions
- // based on account state changes.
- //
- // For more information about account states and their implications, see [Monitor the state of your Amazon Web Services accounts] in the
- // Organizations User Guide.
- //
- // [Monitor the state of your Amazon Web Services accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_account_state.html
- State AccountState
-
- // The status of the account in the organization.
- //
- // The Status parameter in the Account object will be retired on September 9,
- // 2026. Although both the account State and account Status parameters are
- // currently available in the Organizations APIs ( DescribeAccount , ListAccounts ,
- // ListAccountsForParent ), we recommend that you update your scripts or other code
- // to use the State parameter instead of Status before September 9, 2026.
- Status AccountStatus
-
- noSmithyDocumentSerde
-}
-
-// Contains a list of child entities, either OUs or accounts.
-type Child struct {
-
- // The unique identifier (ID) of this child entity.
- //
- // The [regex pattern] for a child ID string requires one of the following:
- //
- // - Account - A string that consists of exactly 12 digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that contains the OU).
- // This string is followed by a second "-" dash and from 8 to 32 additional
- // lowercase letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // The type of this child entity.
- Type ChildType
-
- noSmithyDocumentSerde
-}
-
-// Contains the status about a CreateAccount or CreateGovCloudAccount request to create an Amazon Web Services
-// account or an Amazon Web Services GovCloud (US) account in an organization.
-type CreateAccountStatus struct {
-
- // If the account was created successfully, the unique identifier (ID) of the new
- // account.
- //
- // The [regex pattern] for an account ID string requires exactly 12 digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- AccountId *string
-
- // The account name given to the account when it was created.
- AccountName *string
-
- // The date and time that the account was created and the request completed.
- CompletedTimestamp *time.Time
-
- // If the request failed, a description of the reason for the failure.
- //
- // - ACCOUNT_LIMIT_EXCEEDED: The account couldn't be created because you reached
- // the limit on the number of accounts in your organization.
- //
- // - CONCURRENT_ACCOUNT_MODIFICATION: You already submitted a request with the
- // same information.
- //
- // - EMAIL_ALREADY_EXISTS: The account could not be created because another
- // Amazon Web Services account with that email address already exists.
- //
- // - FAILED_BUSINESS_VALIDATION: The Amazon Web Services account that owns your
- // organization failed to receive business license validation.
- //
- // - GOVCLOUD_ACCOUNT_ALREADY_EXISTS: The account in the Amazon Web Services
- // GovCloud (US) Region could not be created because this Region already includes
- // an account with that email address.
- //
- // - IDENTITY_INVALID_BUSINESS_VALIDATION: The Amazon Web Services account that
- // owns your organization can't complete business license validation because it
- // doesn't have valid identity data.
- //
- // - INVALID_ADDRESS: The account could not be created because the address you
- // provided is not valid.
- //
- // - INVALID_EMAIL: The account could not be created because the email address
- // you provided is not valid.
- //
- // - INVALID_PAYMENT_INSTRUMENT: The Amazon Web Services account that owns your
- // organization does not have a supported payment method associated with the
- // account. Amazon Web Services does not support cards issued by financial
- // institutions in Russia or Belarus. For more information, see [Managing your Amazon Web Services payments].
- //
- // - INTERNAL_FAILURE: The account could not be created because of an internal
- // failure. Try again later. If the problem persists, contact Amazon Web Services
- // Customer Support.
- //
- // - MISSING_BUSINESS_VALIDATION: The Amazon Web Services account that owns your
- // organization has not received Business Validation.
- //
- // - MISSING_PAYMENT_INSTRUMENT: You must configure the management account with
- // a valid payment method, such as a credit card.
- //
- // - PENDING_BUSINESS_VALIDATION: The Amazon Web Services account that owns your
- // organization is still in the process of completing business license validation.
- //
- // - UNKNOWN_BUSINESS_VALIDATION: The Amazon Web Services account that owns your
- // organization has an unknown issue with business license validation.
- //
- // [Managing your Amazon Web Services payments]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-general.html
- FailureReason CreateAccountFailureReason
-
- // If the account was created successfully, the ID for the new account in the
- // Amazon Web Services GovCloud (US) Region.
- GovCloudAccountId *string
-
- // The unique identifier (ID) that references this request. You get this value
- // from the response of the initial CreateAccountrequest to create the account.
- //
- // The [regex pattern] for a create account request ID string requires "car-" followed by from 8
- // to 32 lowercase letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // The date and time that the request was made for the account creation.
- RequestedTimestamp *time.Time
-
- // The status of the asynchronous request to create an Amazon Web Services account.
- State CreateAccountState
-
- noSmithyDocumentSerde
-}
-
-// Contains information about the delegated administrator.
-type DelegatedAdministrator struct {
-
- // The Amazon Resource Name (ARN) of the delegated administrator's account.
- Arn *string
-
- // The date when the account was made a delegated administrator.
- DelegationEnabledDate *time.Time
-
- // The email address that is associated with the delegated administrator's Amazon
- // Web Services account.
- Email *string
-
- // The unique identifier (ID) of the delegated administrator's account.
- Id *string
-
- // The method by which the delegated administrator's account joined the
- // organization.
- JoinedMethod AccountJoinedMethod
-
- // The date when the delegated administrator's account became a part of the
- // organization.
- JoinedTimestamp *time.Time
-
- // The friendly name of the delegated administrator's account.
- Name *string
-
- // Each state represents a specific phase in the account lifecycle. Use this
- // information to manage account access, automate workflows, or trigger actions
- // based on account state changes.
- //
- // For more information about account states and their implications, see [Monitor the state of your Amazon Web Services accounts] in the
- // Organizations User Guide.
- //
- // [Monitor the state of your Amazon Web Services accounts]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_account_state.html
- State AccountState
-
- // The status of the delegated administrator's account in the organization.
- Status AccountStatus
-
- noSmithyDocumentSerde
-}
-
-// Contains information about the Amazon Web Services service for which the
-// account is a delegated administrator.
-type DelegatedService struct {
-
- // The date that the account became a delegated administrator for this service.
- DelegationEnabledDate *time.Time
-
- // The name of an Amazon Web Services service that can request an operation for
- // the specified service. This is typically in the form of a URL, such as:
- // servicename.amazonaws.com .
- ServicePrincipal *string
-
- noSmithyDocumentSerde
-}
-
-// Contains rules to be applied to the affected accounts. The effective policy is
-// the aggregation of any policies the account inherits, plus any policy directly
-// attached to the account.
-type EffectivePolicy struct {
-
- // The time of the last update to this policy.
- LastUpdatedTimestamp *time.Time
-
- // The text content of the policy.
- PolicyContent *string
-
- // The policy type.
- PolicyType EffectivePolicyType
-
- // The account ID of the policy target.
- TargetId *string
-
- noSmithyDocumentSerde
-}
-
-// Contains details about the validation errors that occurred when generating or
-// enforcing an [effective policy], such as which policies contributed to the error and location of
-// the error.
-//
-// [effective policy]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_effective.html
-type EffectivePolicyValidationError struct {
-
- // The individual policies [inherited] and [attached] to the account which contributed to the
- // validation error.
- //
- // [inherited]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_inheritance_mgmt.html
- // [attached]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_policies_attach.html
- ContributingPolicies []string
-
- // The error code for the validation error. For example, ELEMENTS_TOO_MANY .
- ErrorCode *string
-
- // The error message for the validation error.
- ErrorMessage *string
-
- // The path within the effective policy where the validation error occurred.
- PathToError *string
-
- noSmithyDocumentSerde
-}
-
-// A structure that contains details of a service principal that represents an
-// Amazon Web Services service that is enabled to integrate with Organizations.
-type EnabledServicePrincipal struct {
-
- // The date that the service principal was enabled for integration with
- // Organizations.
- DateEnabled *time.Time
-
- // The name of the service principal. This is typically in the form of a URL, such
- // as: servicename.amazonaws.com .
- ServicePrincipal *string
-
- noSmithyDocumentSerde
-}
-
-// Contains details for a handshake. A handshake is the secure exchange of
-// information between two Amazon Web Services accounts: a sender and a recipient.
-//
-// Note: Handshakes that are CANCELED , ACCEPTED , DECLINED , or EXPIRED show up
-// in lists for only 30 days after entering that state After that they are deleted.
-type Handshake struct {
-
- // The type of handshake:
- //
- // - INVITE: Handshake sent to a standalone account requesting that it to join
- // the sender's organization.
- //
- // - ENABLE_ALL_FEATURES: Handshake sent to invited member accounts to enable
- // all features for the organization.
- //
- // - APPROVE_ALL_FEATURES: Handshake sent to the management account when all
- // invited member accounts have approved to enable all features.
- //
- // - TRANSFER_RESPONSIBILITY: Handshake sent to another organization's
- // management account requesting that it designate the sender with the specified
- // responsibilities for recipient's organization.
- Action ActionType
-
- // Amazon Resource Name (ARN) for the handshake.
- //
- // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web
- // Services Service Authorization Reference.
- //
- // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies
- Arn *string
-
- // Timestamp when the handshake expires.
- ExpirationTimestamp *time.Time
-
- // ID for the handshake.
- //
- // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // An array of HandshakeParty objects. Contains details for participant in a
- // handshake.
- Parties []HandshakeParty
-
- // Timestamp when the handshake request was made.
- RequestedTimestamp *time.Time
-
- // An array of HandshakeResource objects. When needed, contains additional details
- // for a handshake. For example, the email address for the sender.
- Resources []HandshakeResource
-
- // Current state for the handshake.
- //
- // - REQUESTED: Handshake awaiting a response from the recipient.
- //
- // - OPEN: Handshake sent to multiple recipients and all recipients have
- // responded. The sender can now complete the handshake action.
- //
- // - CANCELED: Handshake canceled by the sender.
- //
- // - ACCEPTED: Handshake accepted by the recipient.
- //
- // - DECLINED: Handshake declined by the recipient.
- //
- // - EXPIRED: Handshake has expired.
- State HandshakeState
-
- noSmithyDocumentSerde
-}
-
-// Contains the filter used to select the handshakes for an operation.
-type HandshakeFilter struct {
-
- // The type of handshake.
- //
- // If you specify ActionType , you cannot also specify ParentHandshakeId .
- ActionType ActionType
-
- // The parent handshake. Only used for handshake types that are a child of another
- // type.
- //
- // If you specify ParentHandshakeId , you cannot also specify ActionType .
- //
- // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- ParentHandshakeId *string
-
- noSmithyDocumentSerde
-}
-
-// Contains details for a participant in a handshake.
-type HandshakeParty struct {
-
- // ID for the participant: Acccount ID, organization ID, or email address.
- //
- // The [regex pattern] for handshake ID string requires "h-" followed by from 8 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- //
- // This member is required.
- Id *string
-
- // The type of ID for the participant.
- //
- // This member is required.
- Type HandshakePartyType
-
- noSmithyDocumentSerde
-}
-
-// Contains additional details for a handshake.
-type HandshakeResource struct {
-
- // An array of HandshakeResource objects. When needed, contains additional details
- // for a handshake. For example, the email address for the sender.
- Resources []HandshakeResource
-
- // The type of information being passed, specifying how the value is to be
- // interpreted by the other party:
- //
- // - ACCOUNT: ID for an Amazon Web Services account.
- //
- // - ORGANIZATION: ID for an organization.
- //
- // - EMAIL: Email address for the recipient.
- //
- // - OWNER_EMAIL: Email address for the sender.
- //
- // - OWNER_NAME: Name of the sender.
- //
- // - NOTES: Additional text included by the sender for the recipient.
- Type HandshakeResourceType
-
- // Additional information for the handshake. The format of the value string must
- // match the requirements of the specified type.
- Value *string
-
- noSmithyDocumentSerde
-}
-
-// Contains details about an organization. An organization is a collection of
-// accounts that are centrally managed together using consolidated billing,
-// organized hierarchically with organizational units (OUs), and controlled with
-// policies .
-type Organization struct {
-
- // The Amazon Resource Name (ARN) of an organization.
- //
- // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web
- // Services Service Authorization Reference.
- //
- // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies
- Arn *string
-
- // Do not use. This field is deprecated and doesn't provide complete information
- // about the policies in your organization.
- //
- // To determine the policies that are enabled and available for use in your
- // organization, use the ListRootsoperation instead.
- AvailablePolicyTypes []PolicyTypeSummary
-
- // Specifies the functionality that currently is available to the organization. If
- // set to "ALL", then all features are enabled and policies can be applied to
- // accounts in the organization. If set to "CONSOLIDATED_BILLING", then only
- // consolidated billing functionality is available. For more information, see [Enabling all features in your organization]in
- // the Organizations User Guide.
- //
- // [Enabling all features in your organization]: https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html
- FeatureSet OrganizationFeatureSet
-
- // The unique identifier (ID) of an organization.
- //
- // The [regex pattern] for an organization ID string requires "o-" followed by from 10 to 32
- // lowercase letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // The Amazon Resource Name (ARN) of the account that is designated as the
- // management account for the organization.
- //
- // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web
- // Services Service Authorization Reference.
- //
- // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies
- MasterAccountArn *string
-
- // The email address that is associated with the Amazon Web Services account that
- // is designated as the management account for the organization.
- MasterAccountEmail *string
-
- // The unique identifier (ID) of the management account of an organization.
- //
- // The [regex pattern] for an account ID string requires exactly 12 digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- MasterAccountId *string
-
- noSmithyDocumentSerde
-}
-
-// Contains details about an organizational unit (OU). An OU is a container of
-// Amazon Web Services accounts within a root of an organization. Policies that are
-// attached to an OU apply to all accounts contained in that OU and in any child
-// OUs.
-type OrganizationalUnit struct {
-
- // The Amazon Resource Name (ARN) of this OU.
- //
- // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web
- // Services Service Authorization Reference.
- //
- // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies
- Arn *string
-
- // The unique identifier (ID) associated with this OU. The ID is unique to the
- // organization only.
- //
- // The [regex pattern] for an organizational unit ID string requires "ou-" followed by from 4 to
- // 32 lowercase letters or digits (the ID of the root that contains the OU). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // The friendly name of this OU.
- //
- // The [regex pattern] that is used to validate this parameter is a string of any of the
- // characters in the ASCII character range.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Name *string
-
- // The path in the organization where this OU exists.
- Path *string
-
- noSmithyDocumentSerde
-}
-
-// Contains information about either a root or an organizational unit (OU) that
-// can contain OUs or accounts in an organization.
-type Parent struct {
-
- // The unique identifier (ID) of the parent entity.
- //
- // The [regex pattern] for a parent ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // The type of the parent entity.
- Type ParentType
-
- noSmithyDocumentSerde
-}
-
-// Contains rules to be applied to the affected accounts. Policies can be attached
-// directly to accounts, or to roots and OUs to affect all accounts in those
-// hierarchies.
-type Policy struct {
-
- // The text content of the policy.
- Content *string
-
- // A structure that contains additional details about the policy.
- PolicySummary *PolicySummary
-
- noSmithyDocumentSerde
-}
-
-// Contains information about a policy, but does not include the content. To see
-// the content of a policy, see DescribePolicy.
-type PolicySummary struct {
-
- // The Amazon Resource Name (ARN) of the policy.
- //
- // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web
- // Services Service Authorization Reference.
- //
- // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies
- Arn *string
-
- // A boolean value that indicates whether the specified policy is an Amazon Web
- // Services managed policy. If true, then you can attach the policy to roots, OUs,
- // or accounts, but you cannot edit it.
- AwsManaged bool
-
- // The description of the policy.
- Description *string
-
- // The unique identifier (ID) of the policy.
- //
- // The [regex pattern] for a policy ID string requires "p-" followed by from 8 to 128 lowercase
- // or uppercase letters, digits, or the underscore character (_).
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // The friendly name of the policy.
- //
- // The [regex pattern] that is used to validate this parameter is a string of any of the
- // characters in the ASCII character range.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Name *string
-
- // The type of policy.
- Type PolicyType
-
- noSmithyDocumentSerde
-}
-
-// Contains information about a root, OU, or account that a policy is attached to.
-type PolicyTargetSummary struct {
-
- // The Amazon Resource Name (ARN) of the policy target.
- //
- // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web
- // Services Service Authorization Reference.
- //
- // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies
- Arn *string
-
- // The friendly name of the policy target.
- //
- // The [regex pattern] that is used to validate this parameter is a string of any of the
- // characters in the ASCII character range.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Name *string
-
- // The unique identifier (ID) of the policy target.
- //
- // The [regex pattern] for a target ID string requires one of the following:
- //
- // - Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // - Account - A string that consists of exactly 12 digits.
- //
- // - Organizational unit (OU) - A string that begins with "ou-" followed by from
- // 4 to 32 lowercase letters or digits (the ID of the root that the OU is in). This
- // string is followed by a second "-" dash and from 8 to 32 additional lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- TargetId *string
-
- // The type of the policy target.
- Type TargetType
-
- noSmithyDocumentSerde
-}
-
-// Contains information about a policy type and its status in the associated root.
-type PolicyTypeSummary struct {
-
- // The status of the policy type as it relates to the associated root. To attach a
- // policy of the specified type to a root or to an OU or account in that root, it
- // must be available in the organization and enabled for that root.
- Status PolicyTypeStatus
-
- // The name of the policy type.
- Type PolicyType
-
- noSmithyDocumentSerde
-}
-
-// A structure that contains details about a resource policy.
-type ResourcePolicy struct {
-
- // The policy text of the resource policy.
- Content *string
-
- // A structure that contains resource policy ID and Amazon Resource Name (ARN).
- ResourcePolicySummary *ResourcePolicySummary
-
- noSmithyDocumentSerde
-}
-
-// A structure that contains resource policy ID and Amazon Resource Name (ARN).
-type ResourcePolicySummary struct {
-
- // The Amazon Resource Name (ARN) of the resource policy.
- Arn *string
-
- // The unique identifier (ID) of the resource policy.
- Id *string
-
- noSmithyDocumentSerde
-}
-
-// Contains details for a transfer. A transfer is the arrangement between two
-// management accounts where one account designates the other with specified
-// responsibilities for their organization.
-type ResponsibilityTransfer struct {
-
- // ID for the handshake of the transfer.
- ActiveHandshakeId *string
-
- // Amazon Resource Name (ARN) for the transfer.
- Arn *string
-
- // Timestamp when the transfer ends.
- EndTimestamp *time.Time
-
- // ID for the transfer.
- Id *string
-
- // Name assigned to the transfer.
- Name *string
-
- // Account that allows another account external to its organization to manage the
- // specified responsibilities for the organization.
- Source *TransferParticipant
-
- // Timestamp when the transfer starts.
- StartTimestamp *time.Time
-
- // Status for the transfer.
- Status ResponsibilityTransferStatus
-
- // Account that manages the specified responsibilities for another organization.
- Target *TransferParticipant
-
- // The type of transfer. Currently, only BILLING is supported.
- Type ResponsibilityTransferType
-
- noSmithyDocumentSerde
-}
-
-// Contains details about a root. A root is a top-level parent node in the
-// hierarchy of an organization that can contain organizational units (OUs) and
-// accounts. The root contains every Amazon Web Services account in the
-// organization.
-type Root struct {
-
- // The Amazon Resource Name (ARN) of the root.
- //
- // For more information about ARNs in Organizations, see [ARN Formats Supported by Organizations] in the Amazon Web
- // Services Service Authorization Reference.
- //
- // [ARN Formats Supported by Organizations]: https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies
- Arn *string
-
- // The unique identifier (ID) for the root. The ID is unique to the organization
- // only.
- //
- // The [regex pattern] for a root ID string requires "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Id *string
-
- // The friendly name of the root.
- //
- // The [regex pattern] that is used to validate this parameter is a string of any of the
- // characters in the ASCII character range.
- //
- // [regex pattern]: http://wikipedia.org/wiki/regex
- Name *string
-
- // The types of policies that are currently enabled for the root and therefore can
- // be attached to the root or to its OUs or accounts.
- //
- // Even if a policy type is shown as available in the organization, you can
- // separately enable and disable them at the root level by using EnablePolicyTypeand DisablePolicyType. Use DescribeOrganization to see
- // the availability of the policy types in that organization.
- PolicyTypes []PolicyTypeSummary
-
- noSmithyDocumentSerde
-}
-
-// A custom key-value pair associated with a resource within your organization.
-//
-// You can attach tags to any of the following organization resources.
-//
-// - Amazon Web Services account
-//
-// - Organizational unit (OU)
-//
-// - Organization root
-//
-// - Policy
-type Tag struct {
-
- // The key identifier, or name, of the tag.
- //
- // This member is required.
- Key *string
-
- // The string value that's associated with the key of the tag. You can set the
- // value of a tag to an empty string, but you can't set the value of a tag to null.
- //
- // This member is required.
- Value *string
-
- noSmithyDocumentSerde
-}
-
-// Contains details for a participant in a transfer. A transfer is the arrangement
-// between two management accounts where one account designates the other with
-// specified responsibilities for their organization.
-type TransferParticipant struct {
-
- // Email address for the management account.
- ManagementAccountEmail *string
-
- // ID for the management account.
- ManagementAccountId *string
-
- noSmithyDocumentSerde
-}
-
-type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/validators.go
deleted file mode 100644
index 50c9264af..000000000
--- a/vendor/github.com/aws/aws-sdk-go-v2/service/organizations/validators.go
+++ /dev/null
@@ -1,2091 +0,0 @@
-// Code generated by smithy-go-codegen DO NOT EDIT.
-
-package organizations
-
-import (
- "context"
- "fmt"
- "github.com/aws/aws-sdk-go-v2/service/organizations/types"
- smithy "github.com/aws/smithy-go"
- "github.com/aws/smithy-go/middleware"
-)
-
-type validateOpAcceptHandshake struct {
-}
-
-func (*validateOpAcceptHandshake) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpAcceptHandshake) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*AcceptHandshakeInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpAcceptHandshakeInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpAttachPolicy struct {
-}
-
-func (*validateOpAttachPolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpAttachPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*AttachPolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpAttachPolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCancelHandshake struct {
-}
-
-func (*validateOpCancelHandshake) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCancelHandshake) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CancelHandshakeInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCancelHandshakeInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCloseAccount struct {
-}
-
-func (*validateOpCloseAccount) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCloseAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CloseAccountInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCloseAccountInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateAccount struct {
-}
-
-func (*validateOpCreateAccount) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateAccountInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateAccountInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateGovCloudAccount struct {
-}
-
-func (*validateOpCreateGovCloudAccount) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateGovCloudAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateGovCloudAccountInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateGovCloudAccountInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreateOrganizationalUnit struct {
-}
-
-func (*validateOpCreateOrganizationalUnit) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreateOrganizationalUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreateOrganizationalUnitInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreateOrganizationalUnitInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpCreatePolicy struct {
-}
-
-func (*validateOpCreatePolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpCreatePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*CreatePolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpCreatePolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeclineHandshake struct {
-}
-
-func (*validateOpDeclineHandshake) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeclineHandshake) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeclineHandshakeInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeclineHandshakeInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeleteOrganizationalUnit struct {
-}
-
-func (*validateOpDeleteOrganizationalUnit) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeleteOrganizationalUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeleteOrganizationalUnitInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeleteOrganizationalUnitInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeletePolicy struct {
-}
-
-func (*validateOpDeletePolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeletePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeletePolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeletePolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDeregisterDelegatedAdministrator struct {
-}
-
-func (*validateOpDeregisterDelegatedAdministrator) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDeregisterDelegatedAdministrator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DeregisterDelegatedAdministratorInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDeregisterDelegatedAdministratorInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeAccount struct {
-}
-
-func (*validateOpDescribeAccount) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeAccountInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeAccountInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeCreateAccountStatus struct {
-}
-
-func (*validateOpDescribeCreateAccountStatus) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeCreateAccountStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeCreateAccountStatusInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeCreateAccountStatusInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeEffectivePolicy struct {
-}
-
-func (*validateOpDescribeEffectivePolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeEffectivePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeEffectivePolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeEffectivePolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeHandshake struct {
-}
-
-func (*validateOpDescribeHandshake) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeHandshake) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeHandshakeInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeHandshakeInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeOrganizationalUnit struct {
-}
-
-func (*validateOpDescribeOrganizationalUnit) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeOrganizationalUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeOrganizationalUnitInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeOrganizationalUnitInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribePolicy struct {
-}
-
-func (*validateOpDescribePolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribePolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribePolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDescribeResponsibilityTransfer struct {
-}
-
-func (*validateOpDescribeResponsibilityTransfer) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDescribeResponsibilityTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DescribeResponsibilityTransferInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDescribeResponsibilityTransferInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDetachPolicy struct {
-}
-
-func (*validateOpDetachPolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDetachPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DetachPolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDetachPolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDisableAWSServiceAccess struct {
-}
-
-func (*validateOpDisableAWSServiceAccess) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDisableAWSServiceAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DisableAWSServiceAccessInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDisableAWSServiceAccessInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpDisablePolicyType struct {
-}
-
-func (*validateOpDisablePolicyType) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpDisablePolicyType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*DisablePolicyTypeInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpDisablePolicyTypeInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpEnableAWSServiceAccess struct {
-}
-
-func (*validateOpEnableAWSServiceAccess) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpEnableAWSServiceAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*EnableAWSServiceAccessInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpEnableAWSServiceAccessInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpEnablePolicyType struct {
-}
-
-func (*validateOpEnablePolicyType) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpEnablePolicyType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*EnablePolicyTypeInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpEnablePolicyTypeInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpInviteAccountToOrganization struct {
-}
-
-func (*validateOpInviteAccountToOrganization) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpInviteAccountToOrganization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*InviteAccountToOrganizationInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpInviteAccountToOrganizationInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpInviteOrganizationToTransferResponsibility struct {
-}
-
-func (*validateOpInviteOrganizationToTransferResponsibility) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpInviteOrganizationToTransferResponsibility) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*InviteOrganizationToTransferResponsibilityInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpInviteOrganizationToTransferResponsibilityInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListAccountsForParent struct {
-}
-
-func (*validateOpListAccountsForParent) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListAccountsForParent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListAccountsForParentInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListAccountsForParentInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListAccountsWithInvalidEffectivePolicy struct {
-}
-
-func (*validateOpListAccountsWithInvalidEffectivePolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListAccountsWithInvalidEffectivePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListAccountsWithInvalidEffectivePolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListAccountsWithInvalidEffectivePolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListChildren struct {
-}
-
-func (*validateOpListChildren) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListChildren) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListChildrenInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListChildrenInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListDelegatedServicesForAccount struct {
-}
-
-func (*validateOpListDelegatedServicesForAccount) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListDelegatedServicesForAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListDelegatedServicesForAccountInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListDelegatedServicesForAccountInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListEffectivePolicyValidationErrors struct {
-}
-
-func (*validateOpListEffectivePolicyValidationErrors) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListEffectivePolicyValidationErrors) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListEffectivePolicyValidationErrorsInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListEffectivePolicyValidationErrorsInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListInboundResponsibilityTransfers struct {
-}
-
-func (*validateOpListInboundResponsibilityTransfers) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListInboundResponsibilityTransfers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListInboundResponsibilityTransfersInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListInboundResponsibilityTransfersInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListOrganizationalUnitsForParent struct {
-}
-
-func (*validateOpListOrganizationalUnitsForParent) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListOrganizationalUnitsForParent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListOrganizationalUnitsForParentInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListOrganizationalUnitsForParentInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListOutboundResponsibilityTransfers struct {
-}
-
-func (*validateOpListOutboundResponsibilityTransfers) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListOutboundResponsibilityTransfers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListOutboundResponsibilityTransfersInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListOutboundResponsibilityTransfersInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListParents struct {
-}
-
-func (*validateOpListParents) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListParents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListParentsInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListParentsInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListPoliciesForTarget struct {
-}
-
-func (*validateOpListPoliciesForTarget) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListPoliciesForTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListPoliciesForTargetInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListPoliciesForTargetInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListPolicies struct {
-}
-
-func (*validateOpListPolicies) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListPoliciesInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListPoliciesInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListTagsForResource struct {
-}
-
-func (*validateOpListTagsForResource) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListTagsForResourceInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListTagsForResourceInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpListTargetsForPolicy struct {
-}
-
-func (*validateOpListTargetsForPolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpListTargetsForPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*ListTargetsForPolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpListTargetsForPolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpMoveAccount struct {
-}
-
-func (*validateOpMoveAccount) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpMoveAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*MoveAccountInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpMoveAccountInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpPutResourcePolicy struct {
-}
-
-func (*validateOpPutResourcePolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*PutResourcePolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpPutResourcePolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpRegisterDelegatedAdministrator struct {
-}
-
-func (*validateOpRegisterDelegatedAdministrator) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpRegisterDelegatedAdministrator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*RegisterDelegatedAdministratorInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpRegisterDelegatedAdministratorInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpRemoveAccountFromOrganization struct {
-}
-
-func (*validateOpRemoveAccountFromOrganization) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpRemoveAccountFromOrganization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*RemoveAccountFromOrganizationInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpRemoveAccountFromOrganizationInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpTagResource struct {
-}
-
-func (*validateOpTagResource) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*TagResourceInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpTagResourceInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpTerminateResponsibilityTransfer struct {
-}
-
-func (*validateOpTerminateResponsibilityTransfer) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpTerminateResponsibilityTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*TerminateResponsibilityTransferInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpTerminateResponsibilityTransferInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUntagResource struct {
-}
-
-func (*validateOpUntagResource) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UntagResourceInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUntagResourceInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateOrganizationalUnit struct {
-}
-
-func (*validateOpUpdateOrganizationalUnit) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateOrganizationalUnit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateOrganizationalUnitInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateOrganizationalUnitInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdatePolicy struct {
-}
-
-func (*validateOpUpdatePolicy) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdatePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdatePolicyInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdatePolicyInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-type validateOpUpdateResponsibilityTransfer struct {
-}
-
-func (*validateOpUpdateResponsibilityTransfer) ID() string {
- return "OperationInputValidation"
-}
-
-func (m *validateOpUpdateResponsibilityTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
- out middleware.InitializeOutput, metadata middleware.Metadata, err error,
-) {
- input, ok := in.Parameters.(*UpdateResponsibilityTransferInput)
- if !ok {
- return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
- }
- if err := validateOpUpdateResponsibilityTransferInput(input); err != nil {
- return out, metadata, err
- }
- return next.HandleInitialize(ctx, in)
-}
-
-func addOpAcceptHandshakeValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpAcceptHandshake{}, middleware.After)
-}
-
-func addOpAttachPolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpAttachPolicy{}, middleware.After)
-}
-
-func addOpCancelHandshakeValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCancelHandshake{}, middleware.After)
-}
-
-func addOpCloseAccountValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCloseAccount{}, middleware.After)
-}
-
-func addOpCreateAccountValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateAccount{}, middleware.After)
-}
-
-func addOpCreateGovCloudAccountValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateGovCloudAccount{}, middleware.After)
-}
-
-func addOpCreateOrganizationalUnitValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreateOrganizationalUnit{}, middleware.After)
-}
-
-func addOpCreatePolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpCreatePolicy{}, middleware.After)
-}
-
-func addOpDeclineHandshakeValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeclineHandshake{}, middleware.After)
-}
-
-func addOpDeleteOrganizationalUnitValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeleteOrganizationalUnit{}, middleware.After)
-}
-
-func addOpDeletePolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeletePolicy{}, middleware.After)
-}
-
-func addOpDeregisterDelegatedAdministratorValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDeregisterDelegatedAdministrator{}, middleware.After)
-}
-
-func addOpDescribeAccountValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeAccount{}, middleware.After)
-}
-
-func addOpDescribeCreateAccountStatusValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeCreateAccountStatus{}, middleware.After)
-}
-
-func addOpDescribeEffectivePolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeEffectivePolicy{}, middleware.After)
-}
-
-func addOpDescribeHandshakeValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeHandshake{}, middleware.After)
-}
-
-func addOpDescribeOrganizationalUnitValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeOrganizationalUnit{}, middleware.After)
-}
-
-func addOpDescribePolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribePolicy{}, middleware.After)
-}
-
-func addOpDescribeResponsibilityTransferValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDescribeResponsibilityTransfer{}, middleware.After)
-}
-
-func addOpDetachPolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDetachPolicy{}, middleware.After)
-}
-
-func addOpDisableAWSServiceAccessValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDisableAWSServiceAccess{}, middleware.After)
-}
-
-func addOpDisablePolicyTypeValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpDisablePolicyType{}, middleware.After)
-}
-
-func addOpEnableAWSServiceAccessValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpEnableAWSServiceAccess{}, middleware.After)
-}
-
-func addOpEnablePolicyTypeValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpEnablePolicyType{}, middleware.After)
-}
-
-func addOpInviteAccountToOrganizationValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpInviteAccountToOrganization{}, middleware.After)
-}
-
-func addOpInviteOrganizationToTransferResponsibilityValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpInviteOrganizationToTransferResponsibility{}, middleware.After)
-}
-
-func addOpListAccountsForParentValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListAccountsForParent{}, middleware.After)
-}
-
-func addOpListAccountsWithInvalidEffectivePolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListAccountsWithInvalidEffectivePolicy{}, middleware.After)
-}
-
-func addOpListChildrenValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListChildren{}, middleware.After)
-}
-
-func addOpListDelegatedServicesForAccountValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListDelegatedServicesForAccount{}, middleware.After)
-}
-
-func addOpListEffectivePolicyValidationErrorsValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListEffectivePolicyValidationErrors{}, middleware.After)
-}
-
-func addOpListInboundResponsibilityTransfersValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListInboundResponsibilityTransfers{}, middleware.After)
-}
-
-func addOpListOrganizationalUnitsForParentValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListOrganizationalUnitsForParent{}, middleware.After)
-}
-
-func addOpListOutboundResponsibilityTransfersValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListOutboundResponsibilityTransfers{}, middleware.After)
-}
-
-func addOpListParentsValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListParents{}, middleware.After)
-}
-
-func addOpListPoliciesForTargetValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListPoliciesForTarget{}, middleware.After)
-}
-
-func addOpListPoliciesValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListPolicies{}, middleware.After)
-}
-
-func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After)
-}
-
-func addOpListTargetsForPolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpListTargetsForPolicy{}, middleware.After)
-}
-
-func addOpMoveAccountValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpMoveAccount{}, middleware.After)
-}
-
-func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After)
-}
-
-func addOpRegisterDelegatedAdministratorValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpRegisterDelegatedAdministrator{}, middleware.After)
-}
-
-func addOpRemoveAccountFromOrganizationValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpRemoveAccountFromOrganization{}, middleware.After)
-}
-
-func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpTagResource{}, middleware.After)
-}
-
-func addOpTerminateResponsibilityTransferValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpTerminateResponsibilityTransfer{}, middleware.After)
-}
-
-func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After)
-}
-
-func addOpUpdateOrganizationalUnitValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateOrganizationalUnit{}, middleware.After)
-}
-
-func addOpUpdatePolicyValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdatePolicy{}, middleware.After)
-}
-
-func addOpUpdateResponsibilityTransferValidationMiddleware(stack *middleware.Stack) error {
- return stack.Initialize.Add(&validateOpUpdateResponsibilityTransfer{}, middleware.After)
-}
-
-func validateHandshakeParty(v *types.HandshakeParty) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "HandshakeParty"}
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if len(v.Type) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Type"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateTag(v *types.Tag) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "Tag"}
- if v.Key == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Key"))
- }
- if v.Value == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Value"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateTags(v []types.Tag) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "Tags"}
- for i := range v {
- if err := validateTag(&v[i]); err != nil {
- invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpAcceptHandshakeInput(v *AcceptHandshakeInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "AcceptHandshakeInput"}
- if v.HandshakeId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("HandshakeId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpAttachPolicyInput(v *AttachPolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "AttachPolicyInput"}
- if v.PolicyId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyId"))
- }
- if v.TargetId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("TargetId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCancelHandshakeInput(v *CancelHandshakeInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CancelHandshakeInput"}
- if v.HandshakeId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("HandshakeId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCloseAccountInput(v *CloseAccountInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CloseAccountInput"}
- if v.AccountId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateAccountInput(v *CreateAccountInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateAccountInput"}
- if v.Email == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Email"))
- }
- if v.AccountName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountName"))
- }
- if v.Tags != nil {
- if err := validateTags(v.Tags); err != nil {
- invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateGovCloudAccountInput(v *CreateGovCloudAccountInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateGovCloudAccountInput"}
- if v.Email == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Email"))
- }
- if v.AccountName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountName"))
- }
- if v.Tags != nil {
- if err := validateTags(v.Tags); err != nil {
- invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreateOrganizationalUnitInput(v *CreateOrganizationalUnitInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreateOrganizationalUnitInput"}
- if v.ParentId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ParentId"))
- }
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if v.Tags != nil {
- if err := validateTags(v.Tags); err != nil {
- invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpCreatePolicyInput(v *CreatePolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "CreatePolicyInput"}
- if v.Content == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Content"))
- }
- if v.Description == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Description"))
- }
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if len(v.Type) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Type"))
- }
- if v.Tags != nil {
- if err := validateTags(v.Tags); err != nil {
- invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeclineHandshakeInput(v *DeclineHandshakeInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeclineHandshakeInput"}
- if v.HandshakeId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("HandshakeId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeleteOrganizationalUnitInput(v *DeleteOrganizationalUnitInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeleteOrganizationalUnitInput"}
- if v.OrganizationalUnitId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("OrganizationalUnitId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeletePolicyInput(v *DeletePolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeletePolicyInput"}
- if v.PolicyId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDeregisterDelegatedAdministratorInput(v *DeregisterDelegatedAdministratorInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DeregisterDelegatedAdministratorInput"}
- if v.AccountId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
- }
- if v.ServicePrincipal == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ServicePrincipal"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeAccountInput(v *DescribeAccountInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeAccountInput"}
- if v.AccountId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeCreateAccountStatusInput(v *DescribeCreateAccountStatusInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeCreateAccountStatusInput"}
- if v.CreateAccountRequestId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("CreateAccountRequestId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeEffectivePolicyInput(v *DescribeEffectivePolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeEffectivePolicyInput"}
- if len(v.PolicyType) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyType"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeHandshakeInput(v *DescribeHandshakeInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeHandshakeInput"}
- if v.HandshakeId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("HandshakeId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeOrganizationalUnitInput(v *DescribeOrganizationalUnitInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeOrganizationalUnitInput"}
- if v.OrganizationalUnitId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("OrganizationalUnitId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribePolicyInput(v *DescribePolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribePolicyInput"}
- if v.PolicyId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDescribeResponsibilityTransferInput(v *DescribeResponsibilityTransferInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DescribeResponsibilityTransferInput"}
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDetachPolicyInput(v *DetachPolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DetachPolicyInput"}
- if v.PolicyId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyId"))
- }
- if v.TargetId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("TargetId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDisableAWSServiceAccessInput(v *DisableAWSServiceAccessInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DisableAWSServiceAccessInput"}
- if v.ServicePrincipal == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ServicePrincipal"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpDisablePolicyTypeInput(v *DisablePolicyTypeInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "DisablePolicyTypeInput"}
- if v.RootId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("RootId"))
- }
- if len(v.PolicyType) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyType"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpEnableAWSServiceAccessInput(v *EnableAWSServiceAccessInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "EnableAWSServiceAccessInput"}
- if v.ServicePrincipal == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ServicePrincipal"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpEnablePolicyTypeInput(v *EnablePolicyTypeInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "EnablePolicyTypeInput"}
- if v.RootId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("RootId"))
- }
- if len(v.PolicyType) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyType"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpInviteAccountToOrganizationInput(v *InviteAccountToOrganizationInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "InviteAccountToOrganizationInput"}
- if v.Target == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Target"))
- } else if v.Target != nil {
- if err := validateHandshakeParty(v.Target); err != nil {
- invalidParams.AddNested("Target", err.(smithy.InvalidParamsError))
- }
- }
- if v.Tags != nil {
- if err := validateTags(v.Tags); err != nil {
- invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpInviteOrganizationToTransferResponsibilityInput(v *InviteOrganizationToTransferResponsibilityInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "InviteOrganizationToTransferResponsibilityInput"}
- if len(v.Type) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Type"))
- }
- if v.Target == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Target"))
- } else if v.Target != nil {
- if err := validateHandshakeParty(v.Target); err != nil {
- invalidParams.AddNested("Target", err.(smithy.InvalidParamsError))
- }
- }
- if v.StartTimestamp == nil {
- invalidParams.Add(smithy.NewErrParamRequired("StartTimestamp"))
- }
- if v.SourceName == nil {
- invalidParams.Add(smithy.NewErrParamRequired("SourceName"))
- }
- if v.Tags != nil {
- if err := validateTags(v.Tags); err != nil {
- invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListAccountsForParentInput(v *ListAccountsForParentInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListAccountsForParentInput"}
- if v.ParentId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ParentId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListAccountsWithInvalidEffectivePolicyInput(v *ListAccountsWithInvalidEffectivePolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListAccountsWithInvalidEffectivePolicyInput"}
- if len(v.PolicyType) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyType"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListChildrenInput(v *ListChildrenInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListChildrenInput"}
- if v.ParentId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ParentId"))
- }
- if len(v.ChildType) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("ChildType"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListDelegatedServicesForAccountInput(v *ListDelegatedServicesForAccountInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListDelegatedServicesForAccountInput"}
- if v.AccountId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListEffectivePolicyValidationErrorsInput(v *ListEffectivePolicyValidationErrorsInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListEffectivePolicyValidationErrorsInput"}
- if v.AccountId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
- }
- if len(v.PolicyType) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyType"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListInboundResponsibilityTransfersInput(v *ListInboundResponsibilityTransfersInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListInboundResponsibilityTransfersInput"}
- if len(v.Type) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Type"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListOrganizationalUnitsForParentInput(v *ListOrganizationalUnitsForParentInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListOrganizationalUnitsForParentInput"}
- if v.ParentId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ParentId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListOutboundResponsibilityTransfersInput(v *ListOutboundResponsibilityTransfersInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListOutboundResponsibilityTransfersInput"}
- if len(v.Type) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Type"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListParentsInput(v *ListParentsInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListParentsInput"}
- if v.ChildId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ChildId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListPoliciesForTargetInput(v *ListPoliciesForTargetInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListPoliciesForTargetInput"}
- if v.TargetId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("TargetId"))
- }
- if len(v.Filter) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Filter"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListPoliciesInput(v *ListPoliciesInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListPoliciesInput"}
- if len(v.Filter) == 0 {
- invalidParams.Add(smithy.NewErrParamRequired("Filter"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"}
- if v.ResourceId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ResourceId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpListTargetsForPolicyInput(v *ListTargetsForPolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "ListTargetsForPolicyInput"}
- if v.PolicyId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpMoveAccountInput(v *MoveAccountInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "MoveAccountInput"}
- if v.AccountId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
- }
- if v.SourceParentId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("SourceParentId"))
- }
- if v.DestinationParentId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("DestinationParentId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"}
- if v.Content == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Content"))
- }
- if v.Tags != nil {
- if err := validateTags(v.Tags); err != nil {
- invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpRegisterDelegatedAdministratorInput(v *RegisterDelegatedAdministratorInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "RegisterDelegatedAdministratorInput"}
- if v.AccountId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
- }
- if v.ServicePrincipal == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ServicePrincipal"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpRemoveAccountFromOrganizationInput(v *RemoveAccountFromOrganizationInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "RemoveAccountFromOrganizationInput"}
- if v.AccountId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("AccountId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpTagResourceInput(v *TagResourceInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"}
- if v.ResourceId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ResourceId"))
- }
- if v.Tags == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Tags"))
- } else if v.Tags != nil {
- if err := validateTags(v.Tags); err != nil {
- invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
- }
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpTerminateResponsibilityTransferInput(v *TerminateResponsibilityTransferInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "TerminateResponsibilityTransferInput"}
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUntagResourceInput(v *UntagResourceInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"}
- if v.ResourceId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("ResourceId"))
- }
- if v.TagKeys == nil {
- invalidParams.Add(smithy.NewErrParamRequired("TagKeys"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateOrganizationalUnitInput(v *UpdateOrganizationalUnitInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateOrganizationalUnitInput"}
- if v.OrganizationalUnitId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("OrganizationalUnitId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdatePolicyInput(v *UpdatePolicyInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdatePolicyInput"}
- if v.PolicyId == nil {
- invalidParams.Add(smithy.NewErrParamRequired("PolicyId"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
-
-func validateOpUpdateResponsibilityTransferInput(v *UpdateResponsibilityTransferInput) error {
- if v == nil {
- return nil
- }
- invalidParams := smithy.InvalidParamsError{Context: "UpdateResponsibilityTransferInput"}
- if v.Id == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Id"))
- }
- if v.Name == nil {
- invalidParams.Add(smithy.NewErrParamRequired("Name"))
- }
- if invalidParams.Len() > 0 {
- return invalidParams
- } else {
- return nil
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go b/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go
deleted file mode 100644
index 1c4967429..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/arn/arn.go
+++ /dev/null
@@ -1,93 +0,0 @@
-// Package arn provides a parser for interacting with Amazon Resource Names.
-package arn
-
-import (
- "errors"
- "strings"
-)
-
-const (
- arnDelimiter = ":"
- arnSections = 6
- arnPrefix = "arn:"
-
- // zero-indexed
- sectionPartition = 1
- sectionService = 2
- sectionRegion = 3
- sectionAccountID = 4
- sectionResource = 5
-
- // errors
- invalidPrefix = "arn: invalid prefix"
- invalidSections = "arn: not enough sections"
-)
-
-// ARN captures the individual fields of an Amazon Resource Name.
-// See http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html for more information.
-type ARN struct {
- // The partition that the resource is in. For standard AWS regions, the partition is "aws". If you have resources in
- // other partitions, the partition is "aws-partitionname". For example, the partition for resources in the China
- // (Beijing) region is "aws-cn".
- Partition string
-
- // The service namespace that identifies the AWS product (for example, Amazon S3, IAM, or Amazon RDS). For a list of
- // namespaces, see
- // http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces.
- Service string
-
- // The region the resource resides in. Note that the ARNs for some resources do not require a region, so this
- // component might be omitted.
- Region string
-
- // The ID of the AWS account that owns the resource, without the hyphens. For example, 123456789012. Note that the
- // ARNs for some resources don't require an account number, so this component might be omitted.
- AccountID string
-
- // The content of this part of the ARN varies by service. It often includes an indicator of the type of resource —
- // for example, an IAM user or Amazon RDS database - followed by a slash (/) or a colon (:), followed by the
- // resource name itself. Some services allows paths for resource names, as described in
- // http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-paths.
- Resource string
-}
-
-// Parse parses an ARN into its constituent parts.
-//
-// Some example ARNs:
-// arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment
-// arn:aws:iam::123456789012:user/David
-// arn:aws:rds:eu-west-1:123456789012:db:mysql-db
-// arn:aws:s3:::my_corporate_bucket/exampleobject.png
-func Parse(arn string) (ARN, error) {
- if !strings.HasPrefix(arn, arnPrefix) {
- return ARN{}, errors.New(invalidPrefix)
- }
- sections := strings.SplitN(arn, arnDelimiter, arnSections)
- if len(sections) != arnSections {
- return ARN{}, errors.New(invalidSections)
- }
- return ARN{
- Partition: sections[sectionPartition],
- Service: sections[sectionService],
- Region: sections[sectionRegion],
- AccountID: sections[sectionAccountID],
- Resource: sections[sectionResource],
- }, nil
-}
-
-// IsARN returns whether the given string is an ARN by looking for
-// whether the string starts with "arn:" and contains the correct number
-// of sections delimited by colons(:).
-func IsARN(arn string) bool {
- return strings.HasPrefix(arn, arnPrefix) && strings.Count(arn, ":") >= arnSections-1
-}
-
-// String returns the canonical representation of the ARN
-func (arn ARN) String() string {
- return arnPrefix +
- arn.Partition + arnDelimiter +
- arn.Service + arnDelimiter +
- arn.Region + arnDelimiter +
- arn.AccountID + arnDelimiter +
- arn.Resource
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go
deleted file mode 100644
index bf18031a3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/accesspoint_arn.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package arn
-
-import (
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/arn"
-)
-
-// AccessPointARN provides representation
-type AccessPointARN struct {
- arn.ARN
- AccessPointName string
-}
-
-// GetARN returns the base ARN for the Access Point resource
-func (a AccessPointARN) GetARN() arn.ARN {
- return a.ARN
-}
-
-// ParseAccessPointResource attempts to parse the ARN's resource as an
-// AccessPoint resource.
-//
-// Supported Access point resource format:
-// - Access point format: arn:{partition}:s3:{region}:{accountId}:accesspoint/{accesspointName}
-// - example: arn.aws.s3.us-west-2.012345678901:accesspoint/myaccesspoint
-//
-func ParseAccessPointResource(a arn.ARN, resParts []string) (AccessPointARN, error) {
- if len(a.Region) == 0 {
- return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "region not set"}
- }
- if len(a.AccountID) == 0 {
- return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "account-id not set"}
- }
- if len(resParts) == 0 {
- return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "resource-id not set"}
- }
- if len(resParts) > 1 {
- return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "sub resource not supported"}
- }
-
- resID := resParts[0]
- if len(strings.TrimSpace(resID)) == 0 {
- return AccessPointARN{}, InvalidARNError{ARN: a, Reason: "resource-id not set"}
- }
-
- return AccessPointARN{
- ARN: a,
- AccessPointName: resID,
- }, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go
deleted file mode 100644
index 216c4baab..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/arn.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package arn
-
-import (
- "fmt"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/arn"
-)
-
-var supportedServiceARN = []string{
- "s3",
- "s3-outposts",
- "s3-object-lambda",
-}
-
-func isSupportedServiceARN(service string) bool {
- for _, name := range supportedServiceARN {
- if name == service {
- return true
- }
- }
- return false
-}
-
-// Resource provides the interfaces abstracting ARNs of specific resource
-// types.
-type Resource interface {
- GetARN() arn.ARN
- String() string
-}
-
-// ResourceParser provides the function for parsing an ARN's resource
-// component into a typed resource.
-type ResourceParser func(arn.ARN) (Resource, error)
-
-// ParseResource parses an AWS ARN into a typed resource for the S3 API.
-func ParseResource(s string, resParser ResourceParser) (resARN Resource, err error) {
- a, err := arn.Parse(s)
- if err != nil {
- return nil, err
- }
-
- if len(a.Partition) == 0 {
- return nil, InvalidARNError{ARN: a, Reason: "partition not set"}
- }
-
- if !isSupportedServiceARN(a.Service) {
- return nil, InvalidARNError{ARN: a, Reason: "service is not supported"}
- }
-
- if strings.HasPrefix(a.Region, "fips-") || strings.HasSuffix(a.Region, "-fips") {
- return nil, InvalidARNError{ARN: a, Reason: "FIPS region not allowed in ARN"}
- }
-
- if len(a.Resource) == 0 {
- return nil, InvalidARNError{ARN: a, Reason: "resource not set"}
- }
-
- return resParser(a)
-}
-
-// SplitResource splits the resource components by the ARN resource delimiters.
-func SplitResource(v string) []string {
- var parts []string
- var offset int
-
- for offset <= len(v) {
- idx := strings.IndexAny(v[offset:], "/:")
- if idx < 0 {
- parts = append(parts, v[offset:])
- break
- }
- parts = append(parts, v[offset:idx+offset])
- offset += idx + 1
- }
-
- return parts
-}
-
-// IsARN returns whether the given string is an ARN
-func IsARN(s string) bool {
- return arn.IsARN(s)
-}
-
-// InvalidARNError provides the error for an invalid ARN error.
-type InvalidARNError struct {
- ARN arn.ARN
- Reason string
-}
-
-// Error returns a string denoting the occurred InvalidARNError
-func (e InvalidARNError) Error() string {
- return fmt.Sprintf("invalid Amazon %s ARN, %s, %s", e.ARN.Service, e.Reason, e.ARN.String())
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go
deleted file mode 100644
index 1e10f8de0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/outpost_arn.go
+++ /dev/null
@@ -1,126 +0,0 @@
-package arn
-
-import (
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/arn"
-)
-
-// OutpostARN interface that should be satisfied by outpost ARNs
-type OutpostARN interface {
- Resource
- GetOutpostID() string
-}
-
-// ParseOutpostARNResource will parse a provided ARNs resource using the appropriate ARN format
-// and return a specific OutpostARN type
-//
-// Currently supported outpost ARN formats:
-// * Outpost AccessPoint ARN format:
-// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName}
-// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint
-//
-// * Outpost Bucket ARN format:
-// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/bucket/{bucketName}
-// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/bucket/mybucket
-//
-// Other outpost ARN formats may be supported and added in the future.
-//
-func ParseOutpostARNResource(a arn.ARN, resParts []string) (OutpostARN, error) {
- if len(a.Region) == 0 {
- return nil, InvalidARNError{ARN: a, Reason: "region not set"}
- }
-
- if len(a.AccountID) == 0 {
- return nil, InvalidARNError{ARN: a, Reason: "account-id not set"}
- }
-
- // verify if outpost id is present and valid
- if len(resParts) == 0 || len(strings.TrimSpace(resParts[0])) == 0 {
- return nil, InvalidARNError{ARN: a, Reason: "outpost resource-id not set"}
- }
-
- // verify possible resource type exists
- if len(resParts) < 3 {
- return nil, InvalidARNError{
- ARN: a, Reason: "incomplete outpost resource type. Expected bucket or access-point resource to be present",
- }
- }
-
- // Since we know this is a OutpostARN fetch outpostID
- outpostID := strings.TrimSpace(resParts[0])
-
- switch resParts[1] {
- case "accesspoint":
- accesspointARN, err := ParseAccessPointResource(a, resParts[2:])
- if err != nil {
- return OutpostAccessPointARN{}, err
- }
- return OutpostAccessPointARN{
- AccessPointARN: accesspointARN,
- OutpostID: outpostID,
- }, nil
-
- case "bucket":
- bucketName, err := parseBucketResource(a, resParts[2:])
- if err != nil {
- return nil, err
- }
- return OutpostBucketARN{
- ARN: a,
- BucketName: bucketName,
- OutpostID: outpostID,
- }, nil
-
- default:
- return nil, InvalidARNError{ARN: a, Reason: "unknown resource set for outpost ARN"}
- }
-}
-
-// OutpostAccessPointARN represents outpost access point ARN.
-type OutpostAccessPointARN struct {
- AccessPointARN
- OutpostID string
-}
-
-// GetOutpostID returns the outpost id of outpost access point arn
-func (o OutpostAccessPointARN) GetOutpostID() string {
- return o.OutpostID
-}
-
-// OutpostBucketARN represents the outpost bucket ARN.
-type OutpostBucketARN struct {
- arn.ARN
- BucketName string
- OutpostID string
-}
-
-// GetOutpostID returns the outpost id of outpost bucket arn
-func (o OutpostBucketARN) GetOutpostID() string {
- return o.OutpostID
-}
-
-// GetARN retrives the base ARN from outpost bucket ARN resource
-func (o OutpostBucketARN) GetARN() arn.ARN {
- return o.ARN
-}
-
-// parseBucketResource attempts to parse the ARN's bucket resource and retrieve the
-// bucket resource id.
-//
-// parseBucketResource only parses the bucket resource id.
-//
-func parseBucketResource(a arn.ARN, resParts []string) (bucketName string, err error) {
- if len(resParts) == 0 {
- return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"}
- }
- if len(resParts) > 1 {
- return bucketName, InvalidARNError{ARN: a, Reason: "sub resource not supported"}
- }
-
- bucketName = strings.TrimSpace(resParts[0])
- if len(bucketName) == 0 {
- return bucketName, InvalidARNError{ARN: a, Reason: "bucket resource-id not set"}
- }
- return bucketName, err
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go
deleted file mode 100644
index 513154cc0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/arn/s3_object_lambda_arn.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package arn
-
-// S3ObjectLambdaARN represents an ARN for the s3-object-lambda service
-type S3ObjectLambdaARN interface {
- Resource
-
- isS3ObjectLambdasARN()
-}
-
-// S3ObjectLambdaAccessPointARN is an S3ObjectLambdaARN for the Access Point resource type
-type S3ObjectLambdaAccessPointARN struct {
- AccessPointARN
-}
-
-func (s S3ObjectLambdaAccessPointARN) isS3ObjectLambdasARN() {}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go
deleted file mode 100644
index 4290ff676..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/endpoint_errors.go
+++ /dev/null
@@ -1,202 +0,0 @@
-package s3shared
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
-)
-
-const (
- invalidARNErrorErrCode = "InvalidARNError"
- configurationErrorErrCode = "ConfigurationError"
-)
-
-// InvalidARNError denotes the error for Invalid ARN
-type InvalidARNError struct {
- message string
- resource arn.Resource
- origErr error
-}
-
-// Error returns the InvalidARNError
-func (e InvalidARNError) Error() string {
- var extra string
- if e.resource != nil {
- extra = "ARN: " + e.resource.String()
- }
- return awserr.SprintError(e.Code(), e.Message(), extra, e.origErr)
-}
-
-// Code returns the invalid ARN error code
-func (e InvalidARNError) Code() string {
- return invalidARNErrorErrCode
-}
-
-// Message returns the message for Invalid ARN error
-func (e InvalidARNError) Message() string {
- return e.message
-}
-
-// OrigErr is the original error wrapped by Invalid ARN Error
-func (e InvalidARNError) OrigErr() error {
- return e.origErr
-}
-
-// NewInvalidARNError denotes invalid arn error
-func NewInvalidARNError(resource arn.Resource, err error) InvalidARNError {
- return InvalidARNError{
- message: "invalid ARN",
- origErr: err,
- resource: resource,
- }
-}
-
-// NewInvalidARNWithCustomEndpointError ARN not supported for custom clients endpoints
-func NewInvalidARNWithCustomEndpointError(resource arn.Resource, err error) InvalidARNError {
- return InvalidARNError{
- message: "resource ARN not supported with custom client endpoints",
- origErr: err,
- resource: resource,
- }
-}
-
-// NewInvalidARNWithUnsupportedPartitionError ARN not supported for the target partition
-func NewInvalidARNWithUnsupportedPartitionError(resource arn.Resource, err error) InvalidARNError {
- return InvalidARNError{
- message: "resource ARN not supported for the target ARN partition",
- origErr: err,
- resource: resource,
- }
-}
-
-// NewInvalidARNWithFIPSError ARN not supported for FIPS region
-//
-// Deprecated: FIPS will not appear in the ARN region component.
-func NewInvalidARNWithFIPSError(resource arn.Resource, err error) InvalidARNError {
- return InvalidARNError{
- message: "resource ARN not supported for FIPS region",
- resource: resource,
- origErr: err,
- }
-}
-
-// ConfigurationError is used to denote a client configuration error
-type ConfigurationError struct {
- message string
- resource arn.Resource
- clientPartitionID string
- clientRegion string
- origErr error
-}
-
-// Error returns the Configuration error string
-func (e ConfigurationError) Error() string {
- extra := fmt.Sprintf("ARN: %s, client partition: %s, client region: %s",
- e.resource, e.clientPartitionID, e.clientRegion)
-
- return awserr.SprintError(e.Code(), e.Message(), extra, e.origErr)
-}
-
-// Code returns configuration error's error-code
-func (e ConfigurationError) Code() string {
- return configurationErrorErrCode
-}
-
-// Message returns the configuration error message
-func (e ConfigurationError) Message() string {
- return e.message
-}
-
-// OrigErr is the original error wrapped by Configuration Error
-func (e ConfigurationError) OrigErr() error {
- return e.origErr
-}
-
-// NewClientPartitionMismatchError stub
-func NewClientPartitionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
- return ConfigurationError{
- message: "client partition does not match provided ARN partition",
- origErr: err,
- resource: resource,
- clientPartitionID: clientPartitionID,
- clientRegion: clientRegion,
- }
-}
-
-// NewClientRegionMismatchError denotes cross region access error
-func NewClientRegionMismatchError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
- return ConfigurationError{
- message: "client region does not match provided ARN region",
- origErr: err,
- resource: resource,
- clientPartitionID: clientPartitionID,
- clientRegion: clientRegion,
- }
-}
-
-// NewFailedToResolveEndpointError denotes endpoint resolving error
-func NewFailedToResolveEndpointError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
- return ConfigurationError{
- message: "endpoint resolver failed to find an endpoint for the provided ARN region",
- origErr: err,
- resource: resource,
- clientPartitionID: clientPartitionID,
- clientRegion: clientRegion,
- }
-}
-
-// NewClientConfiguredForFIPSError denotes client config error for unsupported cross region FIPS access
-func NewClientConfiguredForFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
- return ConfigurationError{
- message: "client configured for fips but cross-region resource ARN provided",
- origErr: err,
- resource: resource,
- clientPartitionID: clientPartitionID,
- clientRegion: clientRegion,
- }
-}
-
-// NewFIPSConfigurationError denotes a configuration error when a client or request is configured for FIPS
-func NewFIPSConfigurationError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
- return ConfigurationError{
- message: "use of ARN is not supported when client or request is configured for FIPS",
- origErr: err,
- resource: resource,
- clientPartitionID: clientPartitionID,
- clientRegion: clientRegion,
- }
-}
-
-// NewClientConfiguredForAccelerateError denotes client config error for unsupported S3 accelerate
-func NewClientConfiguredForAccelerateError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
- return ConfigurationError{
- message: "client configured for S3 Accelerate but is not supported with resource ARN",
- origErr: err,
- resource: resource,
- clientPartitionID: clientPartitionID,
- clientRegion: clientRegion,
- }
-}
-
-// NewClientConfiguredForCrossRegionFIPSError denotes client config error for unsupported cross region FIPS request
-func NewClientConfiguredForCrossRegionFIPSError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
- return ConfigurationError{
- message: "client configured for FIPS with cross-region enabled but is supported with cross-region resource ARN",
- origErr: err,
- resource: resource,
- clientPartitionID: clientPartitionID,
- clientRegion: clientRegion,
- }
-}
-
-// NewClientConfiguredForDualStackError denotes client config error for unsupported S3 Dual-stack
-func NewClientConfiguredForDualStackError(resource arn.Resource, clientPartitionID, clientRegion string, err error) ConfigurationError {
- return ConfigurationError{
- message: "client configured for S3 Dual-stack but is not supported with resource ARN",
- origErr: err,
- resource: resource,
- clientPartitionID: clientPartitionID,
- clientRegion: clientRegion,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go
deleted file mode 100644
index 2091ba6ba..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/resource_request.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package s3shared
-
-import (
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- awsarn "github.com/aws/aws-sdk-go/aws/arn"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
-)
-
-// ResourceRequest represents the request and arn resource
-type ResourceRequest struct {
- Resource arn.Resource
- Request *request.Request
-}
-
-// ARN returns the resource ARN
-func (r ResourceRequest) ARN() awsarn.ARN {
- return r.Resource.GetARN()
-}
-
-// AllowCrossRegion returns a bool value to denote if S3UseARNRegion flag is set
-func (r ResourceRequest) AllowCrossRegion() bool {
- return aws.BoolValue(r.Request.Config.S3UseARNRegion)
-}
-
-// UseFIPS returns true if request config region is FIPS
-func (r ResourceRequest) UseFIPS() bool {
- return IsFIPS(aws.StringValue(r.Request.Config.Region))
-}
-
-// ResourceConfiguredForFIPS returns true if resource ARNs region is FIPS
-//
-// Deprecated: FIPS pseudo-regions will not be in the ARN
-func (r ResourceRequest) ResourceConfiguredForFIPS() bool {
- return IsFIPS(r.ARN().Region)
-}
-
-// IsCrossPartition returns true if client is configured for another partition, than
-// the partition that resource ARN region resolves to.
-func (r ResourceRequest) IsCrossPartition() bool {
- return r.Request.ClientInfo.PartitionID != r.Resource.GetARN().Partition
-}
-
-// IsCrossRegion returns true if ARN region is different than client configured region
-func (r ResourceRequest) IsCrossRegion() bool {
- return IsCrossRegion(r.Request, r.Resource.GetARN().Region)
-}
-
-// HasCustomEndpoint returns true if custom client endpoint is provided
-func (r ResourceRequest) HasCustomEndpoint() bool {
- return len(aws.StringValue(r.Request.Config.Endpoint)) > 0
-}
-
-// IsFIPS returns true if region is a fips region
-func IsFIPS(clientRegion string) bool {
- return strings.HasPrefix(clientRegion, "fips-") || strings.HasSuffix(clientRegion, "-fips")
-}
-
-// IsCrossRegion returns true if request signing region is not same as configured region
-func IsCrossRegion(req *request.Request, otherRegion string) bool {
- return req.ClientInfo.SigningRegion != otherRegion
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go b/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go
deleted file mode 100644
index 0b9b0dfce..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/s3shared/s3err/error.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package s3err
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// RequestFailure provides additional S3 specific metadata for the request
-// failure.
-type RequestFailure struct {
- awserr.RequestFailure
-
- hostID string
-}
-
-// NewRequestFailure returns a request failure error decordated with S3
-// specific metadata.
-func NewRequestFailure(err awserr.RequestFailure, hostID string) *RequestFailure {
- return &RequestFailure{RequestFailure: err, hostID: hostID}
-}
-
-func (r RequestFailure) Error() string {
- extra := fmt.Sprintf("status code: %d, request id: %s, host id: %s",
- r.StatusCode(), r.RequestID(), r.hostID)
- return awserr.SprintError(r.Code(), r.Message(), extra, r.OrigErr())
-}
-func (r RequestFailure) String() string {
- return r.Error()
-}
-
-// HostID returns the HostID request response value.
-func (r RequestFailure) HostID() string {
- return r.hostID
-}
-
-// RequestFailureWrapperHandler returns a handler to rap an
-// awserr.RequestFailure with the S3 request ID 2 from the response.
-func RequestFailureWrapperHandler() request.NamedHandler {
- return request.NamedHandler{
- Name: "awssdk.s3.errorHandler",
- Fn: func(req *request.Request) {
- reqErr, ok := req.Error.(awserr.RequestFailure)
- if !ok || reqErr == nil {
- return
- }
-
- hostID := req.HTTPResponse.Header.Get("X-Amz-Id-2")
- if req.Error == nil {
- return
- }
-
- req.Error = NewRequestFailure(reqErr, hostID)
- },
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go b/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go
deleted file mode 100644
index e045f38d8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/checksum/content_md5.go
+++ /dev/null
@@ -1,53 +0,0 @@
-package checksum
-
-import (
- "crypto/md5"
- "encoding/base64"
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const contentMD5Header = "Content-Md5"
-
-// AddBodyContentMD5Handler computes and sets the HTTP Content-MD5 header for requests that
-// require it.
-func AddBodyContentMD5Handler(r *request.Request) {
- // if Content-MD5 header is already present, return
- if v := r.HTTPRequest.Header.Get(contentMD5Header); len(v) != 0 {
- return
- }
-
- // if S3DisableContentMD5Validation flag is set, return
- if aws.BoolValue(r.Config.S3DisableContentMD5Validation) {
- return
- }
-
- // if request is presigned, return
- if r.IsPresigned() {
- return
- }
-
- // if body is not seekable, return
- if !aws.IsReaderSeekable(r.Body) {
- if r.Config.Logger != nil {
- r.Config.Logger.Log(fmt.Sprintf(
- "Unable to compute Content-MD5 for unseekable body, S3.%s",
- r.Operation.Name))
- }
- return
- }
-
- h := md5.New()
-
- if _, err := aws.CopySeekableBody(h, r.Body); err != nil {
- r.Error = awserr.New("ContentMD5", "failed to compute body MD5", err)
- return
- }
-
- // encode the md5 checksum in base64 and set the request header.
- v := base64.StdEncoding.EncodeToString(h.Sum(nil))
- r.HTTPRequest.Header.Set(contentMD5Header, v)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go
deleted file mode 100644
index 151054971..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/debug.go
+++ /dev/null
@@ -1,144 +0,0 @@
-package eventstream
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "strconv"
-)
-
-type decodedMessage struct {
- rawMessage
- Headers decodedHeaders `json:"headers"`
-}
-type jsonMessage struct {
- Length json.Number `json:"total_length"`
- HeadersLen json.Number `json:"headers_length"`
- PreludeCRC json.Number `json:"prelude_crc"`
- Headers decodedHeaders `json:"headers"`
- Payload []byte `json:"payload"`
- CRC json.Number `json:"message_crc"`
-}
-
-func (d *decodedMessage) UnmarshalJSON(b []byte) (err error) {
- var jsonMsg jsonMessage
- if err = json.Unmarshal(b, &jsonMsg); err != nil {
- return err
- }
-
- d.Length, err = numAsUint32(jsonMsg.Length)
- if err != nil {
- return err
- }
- d.HeadersLen, err = numAsUint32(jsonMsg.HeadersLen)
- if err != nil {
- return err
- }
- d.PreludeCRC, err = numAsUint32(jsonMsg.PreludeCRC)
- if err != nil {
- return err
- }
- d.Headers = jsonMsg.Headers
- d.Payload = jsonMsg.Payload
- d.CRC, err = numAsUint32(jsonMsg.CRC)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func (d *decodedMessage) MarshalJSON() ([]byte, error) {
- jsonMsg := jsonMessage{
- Length: json.Number(strconv.Itoa(int(d.Length))),
- HeadersLen: json.Number(strconv.Itoa(int(d.HeadersLen))),
- PreludeCRC: json.Number(strconv.Itoa(int(d.PreludeCRC))),
- Headers: d.Headers,
- Payload: d.Payload,
- CRC: json.Number(strconv.Itoa(int(d.CRC))),
- }
-
- return json.Marshal(jsonMsg)
-}
-
-func numAsUint32(n json.Number) (uint32, error) {
- v, err := n.Int64()
- if err != nil {
- return 0, fmt.Errorf("failed to get int64 json number, %v", err)
- }
-
- return uint32(v), nil
-}
-
-func (d decodedMessage) Message() Message {
- return Message{
- Headers: Headers(d.Headers),
- Payload: d.Payload,
- }
-}
-
-type decodedHeaders Headers
-
-func (hs *decodedHeaders) UnmarshalJSON(b []byte) error {
- var jsonHeaders []struct {
- Name string `json:"name"`
- Type valueType `json:"type"`
- Value interface{} `json:"value"`
- }
-
- decoder := json.NewDecoder(bytes.NewReader(b))
- decoder.UseNumber()
- if err := decoder.Decode(&jsonHeaders); err != nil {
- return err
- }
-
- var headers Headers
- for _, h := range jsonHeaders {
- value, err := valueFromType(h.Type, h.Value)
- if err != nil {
- return err
- }
- headers.Set(h.Name, value)
- }
- *hs = decodedHeaders(headers)
-
- return nil
-}
-
-func valueFromType(typ valueType, val interface{}) (Value, error) {
- switch typ {
- case trueValueType:
- return BoolValue(true), nil
- case falseValueType:
- return BoolValue(false), nil
- case int8ValueType:
- v, err := val.(json.Number).Int64()
- return Int8Value(int8(v)), err
- case int16ValueType:
- v, err := val.(json.Number).Int64()
- return Int16Value(int16(v)), err
- case int32ValueType:
- v, err := val.(json.Number).Int64()
- return Int32Value(int32(v)), err
- case int64ValueType:
- v, err := val.(json.Number).Int64()
- return Int64Value(v), err
- case bytesValueType:
- v, err := base64.StdEncoding.DecodeString(val.(string))
- return BytesValue(v), err
- case stringValueType:
- v, err := base64.StdEncoding.DecodeString(val.(string))
- return StringValue(string(v)), err
- case timestampValueType:
- v, err := val.(json.Number).Int64()
- return TimestampValue(timeFromEpochMilli(v)), err
- case uuidValueType:
- v, err := base64.StdEncoding.DecodeString(val.(string))
- var tv UUIDValue
- copy(tv[:], v)
- return tv, err
- default:
- panic(fmt.Sprintf("unknown type, %s, %T", typ.String(), val))
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go
deleted file mode 100644
index 474339391..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/decode.go
+++ /dev/null
@@ -1,216 +0,0 @@
-package eventstream
-
-import (
- "bytes"
- "encoding/binary"
- "encoding/hex"
- "encoding/json"
- "fmt"
- "hash"
- "hash/crc32"
- "io"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-// Decoder provides decoding of an Event Stream messages.
-type Decoder struct {
- r io.Reader
- logger aws.Logger
-}
-
-// NewDecoder initializes and returns a Decoder for decoding event
-// stream messages from the reader provided.
-func NewDecoder(r io.Reader, opts ...func(*Decoder)) *Decoder {
- d := &Decoder{
- r: r,
- }
-
- for _, opt := range opts {
- opt(d)
- }
-
- return d
-}
-
-// DecodeWithLogger adds a logger to be used by the decoder when decoding
-// stream events.
-func DecodeWithLogger(logger aws.Logger) func(*Decoder) {
- return func(d *Decoder) {
- d.logger = logger
- }
-}
-
-// Decode attempts to decode a single message from the event stream reader.
-// Will return the event stream message, or error if Decode fails to read
-// the message from the stream.
-func (d *Decoder) Decode(payloadBuf []byte) (m Message, err error) {
- reader := d.r
- if d.logger != nil {
- debugMsgBuf := bytes.NewBuffer(nil)
- reader = io.TeeReader(reader, debugMsgBuf)
- defer func() {
- logMessageDecode(d.logger, debugMsgBuf, m, err)
- }()
- }
-
- m, err = Decode(reader, payloadBuf)
-
- return m, err
-}
-
-// Decode attempts to decode a single message from the event stream reader.
-// Will return the event stream message, or error if Decode fails to read
-// the message from the reader.
-func Decode(reader io.Reader, payloadBuf []byte) (m Message, err error) {
- crc := crc32.New(crc32IEEETable)
- hashReader := io.TeeReader(reader, crc)
-
- prelude, err := decodePrelude(hashReader, crc)
- if err != nil {
- return Message{}, err
- }
-
- if prelude.HeadersLen > 0 {
- lr := io.LimitReader(hashReader, int64(prelude.HeadersLen))
- m.Headers, err = decodeHeaders(lr)
- if err != nil {
- return Message{}, err
- }
- }
-
- if payloadLen := prelude.PayloadLen(); payloadLen > 0 {
- buf, err := decodePayload(payloadBuf, io.LimitReader(hashReader, int64(payloadLen)))
- if err != nil {
- return Message{}, err
- }
- m.Payload = buf
- }
-
- msgCRC := crc.Sum32()
- if err := validateCRC(reader, msgCRC); err != nil {
- return Message{}, err
- }
-
- return m, nil
-}
-
-func logMessageDecode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, decodeErr error) {
- w := bytes.NewBuffer(nil)
- defer func() { logger.Log(w.String()) }()
-
- fmt.Fprintf(w, "Raw message:\n%s\n",
- hex.Dump(msgBuf.Bytes()))
-
- if decodeErr != nil {
- fmt.Fprintf(w, "Decode error: %v\n", decodeErr)
- return
- }
-
- rawMsg, err := msg.rawMessage()
- if err != nil {
- fmt.Fprintf(w, "failed to create raw message, %v\n", err)
- return
- }
-
- decodedMsg := decodedMessage{
- rawMessage: rawMsg,
- Headers: decodedHeaders(msg.Headers),
- }
-
- fmt.Fprintf(w, "Decoded message:\n")
- encoder := json.NewEncoder(w)
- if err := encoder.Encode(decodedMsg); err != nil {
- fmt.Fprintf(w, "failed to generate decoded message, %v\n", err)
- }
-}
-
-func decodePrelude(r io.Reader, crc hash.Hash32) (messagePrelude, error) {
- var p messagePrelude
-
- var err error
- p.Length, err = decodeUint32(r)
- if err != nil {
- return messagePrelude{}, err
- }
-
- p.HeadersLen, err = decodeUint32(r)
- if err != nil {
- return messagePrelude{}, err
- }
-
- if err := p.ValidateLens(); err != nil {
- return messagePrelude{}, err
- }
-
- preludeCRC := crc.Sum32()
- if err := validateCRC(r, preludeCRC); err != nil {
- return messagePrelude{}, err
- }
-
- p.PreludeCRC = preludeCRC
-
- return p, nil
-}
-
-func decodePayload(buf []byte, r io.Reader) ([]byte, error) {
- w := bytes.NewBuffer(buf[0:0])
-
- _, err := io.Copy(w, r)
- return w.Bytes(), err
-}
-
-func decodeUint8(r io.Reader) (uint8, error) {
- type byteReader interface {
- ReadByte() (byte, error)
- }
-
- if br, ok := r.(byteReader); ok {
- v, err := br.ReadByte()
- return uint8(v), err
- }
-
- var b [1]byte
- _, err := io.ReadFull(r, b[:])
- return uint8(b[0]), err
-}
-func decodeUint16(r io.Reader) (uint16, error) {
- var b [2]byte
- bs := b[:]
- _, err := io.ReadFull(r, bs)
- if err != nil {
- return 0, err
- }
- return binary.BigEndian.Uint16(bs), nil
-}
-func decodeUint32(r io.Reader) (uint32, error) {
- var b [4]byte
- bs := b[:]
- _, err := io.ReadFull(r, bs)
- if err != nil {
- return 0, err
- }
- return binary.BigEndian.Uint32(bs), nil
-}
-func decodeUint64(r io.Reader) (uint64, error) {
- var b [8]byte
- bs := b[:]
- _, err := io.ReadFull(r, bs)
- if err != nil {
- return 0, err
- }
- return binary.BigEndian.Uint64(bs), nil
-}
-
-func validateCRC(r io.Reader, expect uint32) error {
- msgCRC, err := decodeUint32(r)
- if err != nil {
- return err
- }
-
- if msgCRC != expect {
- return ChecksumError{}
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go
deleted file mode 100644
index ffade3bc0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/encode.go
+++ /dev/null
@@ -1,162 +0,0 @@
-package eventstream
-
-import (
- "bytes"
- "encoding/binary"
- "encoding/hex"
- "encoding/json"
- "fmt"
- "hash"
- "hash/crc32"
- "io"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-// Encoder provides EventStream message encoding.
-type Encoder struct {
- w io.Writer
- logger aws.Logger
-
- headersBuf *bytes.Buffer
-}
-
-// NewEncoder initializes and returns an Encoder to encode Event Stream
-// messages to an io.Writer.
-func NewEncoder(w io.Writer, opts ...func(*Encoder)) *Encoder {
- e := &Encoder{
- w: w,
- headersBuf: bytes.NewBuffer(nil),
- }
-
- for _, opt := range opts {
- opt(e)
- }
-
- return e
-}
-
-// EncodeWithLogger adds a logger to be used by the encode when decoding
-// stream events.
-func EncodeWithLogger(logger aws.Logger) func(*Encoder) {
- return func(d *Encoder) {
- d.logger = logger
- }
-}
-
-// Encode encodes a single EventStream message to the io.Writer the Encoder
-// was created with. An error is returned if writing the message fails.
-func (e *Encoder) Encode(msg Message) (err error) {
- e.headersBuf.Reset()
-
- writer := e.w
- if e.logger != nil {
- encodeMsgBuf := bytes.NewBuffer(nil)
- writer = io.MultiWriter(writer, encodeMsgBuf)
- defer func() {
- logMessageEncode(e.logger, encodeMsgBuf, msg, err)
- }()
- }
-
- if err = EncodeHeaders(e.headersBuf, msg.Headers); err != nil {
- return err
- }
-
- crc := crc32.New(crc32IEEETable)
- hashWriter := io.MultiWriter(writer, crc)
-
- headersLen := uint32(e.headersBuf.Len())
- payloadLen := uint32(len(msg.Payload))
-
- if err = encodePrelude(hashWriter, crc, headersLen, payloadLen); err != nil {
- return err
- }
-
- if headersLen > 0 {
- if _, err = io.Copy(hashWriter, e.headersBuf); err != nil {
- return err
- }
- }
-
- if payloadLen > 0 {
- if _, err = hashWriter.Write(msg.Payload); err != nil {
- return err
- }
- }
-
- msgCRC := crc.Sum32()
- return binary.Write(writer, binary.BigEndian, msgCRC)
-}
-
-func logMessageEncode(logger aws.Logger, msgBuf *bytes.Buffer, msg Message, encodeErr error) {
- w := bytes.NewBuffer(nil)
- defer func() { logger.Log(w.String()) }()
-
- fmt.Fprintf(w, "Message to encode:\n")
- encoder := json.NewEncoder(w)
- if err := encoder.Encode(msg); err != nil {
- fmt.Fprintf(w, "Failed to get encoded message, %v\n", err)
- }
-
- if encodeErr != nil {
- fmt.Fprintf(w, "Encode error: %v\n", encodeErr)
- return
- }
-
- fmt.Fprintf(w, "Raw message:\n%s\n", hex.Dump(msgBuf.Bytes()))
-}
-
-func encodePrelude(w io.Writer, crc hash.Hash32, headersLen, payloadLen uint32) error {
- p := messagePrelude{
- Length: minMsgLen + headersLen + payloadLen,
- HeadersLen: headersLen,
- }
- if err := p.ValidateLens(); err != nil {
- return err
- }
-
- err := binaryWriteFields(w, binary.BigEndian,
- p.Length,
- p.HeadersLen,
- )
- if err != nil {
- return err
- }
-
- p.PreludeCRC = crc.Sum32()
- err = binary.Write(w, binary.BigEndian, p.PreludeCRC)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-// EncodeHeaders writes the header values to the writer encoded in the event
-// stream format. Returns an error if a header fails to encode.
-func EncodeHeaders(w io.Writer, headers Headers) error {
- for _, h := range headers {
- hn := headerName{
- Len: uint8(len(h.Name)),
- }
- copy(hn.Name[:hn.Len], h.Name)
- if err := hn.encode(w); err != nil {
- return err
- }
-
- if err := h.Value.encode(w); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func binaryWriteFields(w io.Writer, order binary.ByteOrder, vs ...interface{}) error {
- for _, v := range vs {
- if err := binary.Write(w, order, v); err != nil {
- return err
- }
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go
deleted file mode 100644
index 5481ef307..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/error.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package eventstream
-
-import "fmt"
-
-// LengthError provides the error for items being larger than a maximum length.
-type LengthError struct {
- Part string
- Want int
- Have int
- Value interface{}
-}
-
-func (e LengthError) Error() string {
- return fmt.Sprintf("%s length invalid, %d/%d, %v",
- e.Part, e.Want, e.Have, e.Value)
-}
-
-// ChecksumError provides the error for message checksum invalidation errors.
-type ChecksumError struct{}
-
-func (e ChecksumError) Error() string {
- return "message checksum mismatch"
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go
deleted file mode 100644
index 0a63340e4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/error.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package eventstreamapi
-
-import (
- "fmt"
- "sync"
-)
-
-// InputWriterCloseErrorCode is used to denote an error occurred
-// while closing the event stream input writer.
-const InputWriterCloseErrorCode = "EventStreamInputWriterCloseError"
-
-type messageError struct {
- code string
- msg string
-}
-
-func (e messageError) Code() string {
- return e.code
-}
-
-func (e messageError) Message() string {
- return e.msg
-}
-
-func (e messageError) Error() string {
- return fmt.Sprintf("%s: %s", e.code, e.msg)
-}
-
-func (e messageError) OrigErr() error {
- return nil
-}
-
-// OnceError wraps the behavior of recording an error
-// once and signal on a channel when this has occurred.
-// Signaling is done by closing of the channel.
-//
-// Type is safe for concurrent usage.
-type OnceError struct {
- mu sync.RWMutex
- err error
- ch chan struct{}
-}
-
-// NewOnceError return a new OnceError
-func NewOnceError() *OnceError {
- return &OnceError{
- ch: make(chan struct{}, 1),
- }
-}
-
-// Err acquires a read-lock and returns an
-// error if one has been set.
-func (e *OnceError) Err() error {
- e.mu.RLock()
- err := e.err
- e.mu.RUnlock()
-
- return err
-}
-
-// SetError acquires a write-lock and will set
-// the underlying error value if one has not been set.
-func (e *OnceError) SetError(err error) {
- if err == nil {
- return
- }
-
- e.mu.Lock()
- if e.err == nil {
- e.err = err
- close(e.ch)
- }
- e.mu.Unlock()
-}
-
-// ErrorSet returns a channel that will be used to signal
-// that an error has been set. This channel will be closed
-// when the error value has been set for OnceError.
-func (e *OnceError) ErrorSet() <-chan struct{} {
- return e.ch
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go
deleted file mode 100644
index 0e4aa42f3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/reader.go
+++ /dev/null
@@ -1,173 +0,0 @@
-package eventstreamapi
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/eventstream"
-)
-
-// Unmarshaler provides the interface for unmarshaling a EventStream
-// message into a SDK type.
-type Unmarshaler interface {
- UnmarshalEvent(protocol.PayloadUnmarshaler, eventstream.Message) error
-}
-
-// EventReader provides reading from the EventStream of an reader.
-type EventReader struct {
- decoder *eventstream.Decoder
-
- unmarshalerForEventType func(string) (Unmarshaler, error)
- payloadUnmarshaler protocol.PayloadUnmarshaler
-
- payloadBuf []byte
-}
-
-// NewEventReader returns a EventReader built from the reader and unmarshaler
-// provided. Use ReadStream method to start reading from the EventStream.
-func NewEventReader(
- decoder *eventstream.Decoder,
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- unmarshalerForEventType func(string) (Unmarshaler, error),
-) *EventReader {
- return &EventReader{
- decoder: decoder,
- payloadUnmarshaler: payloadUnmarshaler,
- unmarshalerForEventType: unmarshalerForEventType,
- payloadBuf: make([]byte, 10*1024),
- }
-}
-
-// ReadEvent attempts to read a message from the EventStream and return the
-// unmarshaled event value that the message is for.
-//
-// For EventStream API errors check if the returned error satisfies the
-// awserr.Error interface to get the error's Code and Message components.
-//
-// EventUnmarshalers called with EventStream messages must take copies of the
-// message's Payload. The payload will is reused between events read.
-func (r *EventReader) ReadEvent() (event interface{}, err error) {
- msg, err := r.decoder.Decode(r.payloadBuf)
- if err != nil {
- return nil, err
- }
- defer func() {
- // Reclaim payload buffer for next message read.
- r.payloadBuf = msg.Payload[0:0]
- }()
-
- typ, err := GetHeaderString(msg, MessageTypeHeader)
- if err != nil {
- return nil, err
- }
-
- switch typ {
- case EventMessageType:
- return r.unmarshalEventMessage(msg)
- case ExceptionMessageType:
- return nil, r.unmarshalEventException(msg)
- case ErrorMessageType:
- return nil, r.unmarshalErrorMessage(msg)
- default:
- return nil, &UnknownMessageTypeError{
- Type: typ, Message: msg.Clone(),
- }
- }
-}
-
-// UnknownMessageTypeError provides an error when a message is received from
-// the stream, but the reader is unable to determine what kind of message it is.
-type UnknownMessageTypeError struct {
- Type string
- Message eventstream.Message
-}
-
-func (e *UnknownMessageTypeError) Error() string {
- return "unknown eventstream message type, " + e.Type
-}
-
-func (r *EventReader) unmarshalEventMessage(
- msg eventstream.Message,
-) (event interface{}, err error) {
- eventType, err := GetHeaderString(msg, EventTypeHeader)
- if err != nil {
- return nil, err
- }
-
- ev, err := r.unmarshalerForEventType(eventType)
- if err != nil {
- return nil, err
- }
-
- err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg)
- if err != nil {
- return nil, err
- }
-
- return ev, nil
-}
-
-func (r *EventReader) unmarshalEventException(
- msg eventstream.Message,
-) (err error) {
- eventType, err := GetHeaderString(msg, ExceptionTypeHeader)
- if err != nil {
- return err
- }
-
- ev, err := r.unmarshalerForEventType(eventType)
- if err != nil {
- return err
- }
-
- err = ev.UnmarshalEvent(r.payloadUnmarshaler, msg)
- if err != nil {
- return err
- }
-
- var ok bool
- err, ok = ev.(error)
- if !ok {
- err = messageError{
- code: "SerializationError",
- msg: fmt.Sprintf(
- "event stream exception %s mapped to non-error %T, %v",
- eventType, ev, ev,
- ),
- }
- }
-
- return err
-}
-
-func (r *EventReader) unmarshalErrorMessage(msg eventstream.Message) (err error) {
- var msgErr messageError
-
- msgErr.code, err = GetHeaderString(msg, ErrorCodeHeader)
- if err != nil {
- return err
- }
-
- msgErr.msg, err = GetHeaderString(msg, ErrorMessageHeader)
- if err != nil {
- return err
- }
-
- return msgErr
-}
-
-// GetHeaderString returns the value of the header as a string. If the header
-// is not set or the value is not a string an error will be returned.
-func GetHeaderString(msg eventstream.Message, headerName string) (string, error) {
- headerVal := msg.Headers.Get(headerName)
- if headerVal == nil {
- return "", fmt.Errorf("error header %s not present", headerName)
- }
-
- v, ok := headerVal.Get().(string)
- if !ok {
- return "", fmt.Errorf("error header value is not a string, %T", headerVal)
- }
-
- return v, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go
deleted file mode 100644
index e46b8acc2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/shared.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package eventstreamapi
-
-// EventStream headers with specific meaning to async API functionality.
-const (
- ChunkSignatureHeader = `:chunk-signature` // chunk signature for message
- DateHeader = `:date` // Date header for signature
-
- // Message header and values
- MessageTypeHeader = `:message-type` // Identifies type of message.
- EventMessageType = `event`
- ErrorMessageType = `error`
- ExceptionMessageType = `exception`
-
- // Message Events
- EventTypeHeader = `:event-type` // Identifies message event type e.g. "Stats".
-
- // Message Error
- ErrorCodeHeader = `:error-code`
- ErrorMessageHeader = `:error-message`
-
- // Message Exception
- ExceptionTypeHeader = `:exception-type`
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go
deleted file mode 100644
index 3a7ba5cd5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/signer.go
+++ /dev/null
@@ -1,123 +0,0 @@
-package eventstreamapi
-
-import (
- "bytes"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/private/protocol/eventstream"
-)
-
-var timeNow = time.Now
-
-// StreamSigner defines an interface for the implementation of signing of event stream payloads
-type StreamSigner interface {
- GetSignature(headers, payload []byte, date time.Time) ([]byte, error)
-}
-
-// SignEncoder envelopes event stream messages
-// into an event stream message payload with included
-// signature headers using the provided signer and encoder.
-type SignEncoder struct {
- signer StreamSigner
- encoder Encoder
- bufEncoder *BufferEncoder
-
- closeErr error
- closed bool
-}
-
-// NewSignEncoder returns a new SignEncoder using the provided stream signer and
-// event stream encoder.
-func NewSignEncoder(signer StreamSigner, encoder Encoder) *SignEncoder {
- // TODO: Need to pass down logging
-
- return &SignEncoder{
- signer: signer,
- encoder: encoder,
- bufEncoder: NewBufferEncoder(),
- }
-}
-
-// Close encodes a final event stream signing envelope with an empty event stream
-// payload. This final end-frame is used to mark the conclusion of the stream.
-func (s *SignEncoder) Close() error {
- if s.closed {
- return s.closeErr
- }
-
- if err := s.encode([]byte{}); err != nil {
- if strings.Contains(err.Error(), "on closed pipe") {
- return nil
- }
-
- s.closeErr = err
- s.closed = true
- return s.closeErr
- }
-
- return nil
-}
-
-// Encode takes the provided message and add envelopes the message
-// with the required signature.
-func (s *SignEncoder) Encode(msg eventstream.Message) error {
- payload, err := s.bufEncoder.Encode(msg)
- if err != nil {
- return err
- }
-
- return s.encode(payload)
-}
-
-func (s SignEncoder) encode(payload []byte) error {
- date := timeNow()
-
- var msg eventstream.Message
- msg.Headers.Set(DateHeader, eventstream.TimestampValue(date))
- msg.Payload = payload
-
- var headers bytes.Buffer
- if err := eventstream.EncodeHeaders(&headers, msg.Headers); err != nil {
- return err
- }
-
- sig, err := s.signer.GetSignature(headers.Bytes(), msg.Payload, date)
- if err != nil {
- return err
- }
-
- msg.Headers.Set(ChunkSignatureHeader, eventstream.BytesValue(sig))
-
- return s.encoder.Encode(msg)
-}
-
-// BufferEncoder is a utility that provides a buffered
-// event stream encoder
-type BufferEncoder struct {
- encoder Encoder
- buffer *bytes.Buffer
-}
-
-// NewBufferEncoder returns a new BufferEncoder initialized
-// with a 1024 byte buffer.
-func NewBufferEncoder() *BufferEncoder {
- buf := bytes.NewBuffer(make([]byte, 1024))
- return &BufferEncoder{
- encoder: eventstream.NewEncoder(buf),
- buffer: buf,
- }
-}
-
-// Encode returns the encoded message as a byte slice.
-// The returned byte slice will be modified on the next encode call
-// and should not be held onto.
-func (e *BufferEncoder) Encode(msg eventstream.Message) ([]byte, error) {
- e.buffer.Reset()
-
- if err := e.encoder.Encode(msg); err != nil {
- return nil, err
- }
-
- return e.buffer.Bytes(), nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go
deleted file mode 100644
index 433bb1630..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/stream_writer.go
+++ /dev/null
@@ -1,129 +0,0 @@
-package eventstreamapi
-
-import (
- "fmt"
- "io"
- "sync"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-// StreamWriter provides concurrent safe writing to an event stream.
-type StreamWriter struct {
- eventWriter *EventWriter
- stream chan eventWriteAsyncReport
-
- done chan struct{}
- closeOnce sync.Once
- err *OnceError
-
- streamCloser io.Closer
-}
-
-// NewStreamWriter returns a StreamWriter for the event writer, and stream
-// closer provided.
-func NewStreamWriter(eventWriter *EventWriter, streamCloser io.Closer) *StreamWriter {
- w := &StreamWriter{
- eventWriter: eventWriter,
- streamCloser: streamCloser,
- stream: make(chan eventWriteAsyncReport),
- done: make(chan struct{}),
- err: NewOnceError(),
- }
- go w.writeStream()
-
- return w
-}
-
-// Close terminates the writers ability to write new events to the stream. Any
-// future call to Send will fail with an error.
-func (w *StreamWriter) Close() error {
- w.closeOnce.Do(w.safeClose)
- return w.Err()
-}
-
-func (w *StreamWriter) safeClose() {
- close(w.done)
-}
-
-// ErrorSet returns a channel which will be closed
-// if an error occurs.
-func (w *StreamWriter) ErrorSet() <-chan struct{} {
- return w.err.ErrorSet()
-}
-
-// Err returns any error that occurred while attempting to write an event to the
-// stream.
-func (w *StreamWriter) Err() error {
- return w.err.Err()
-}
-
-// Send writes a single event to the stream returning an error if the write
-// failed.
-//
-// Send may be called concurrently. Events will be written to the stream
-// safely.
-func (w *StreamWriter) Send(ctx aws.Context, event Marshaler) error {
- if err := w.Err(); err != nil {
- return err
- }
-
- resultCh := make(chan error)
- wrapped := eventWriteAsyncReport{
- Event: event,
- Result: resultCh,
- }
-
- select {
- case w.stream <- wrapped:
- case <-ctx.Done():
- return ctx.Err()
- case <-w.done:
- return fmt.Errorf("stream closed, unable to send event")
- }
-
- select {
- case err := <-resultCh:
- return err
- case <-ctx.Done():
- return ctx.Err()
- case <-w.done:
- return fmt.Errorf("stream closed, unable to send event")
- }
-}
-
-func (w *StreamWriter) writeStream() {
- defer w.Close()
-
- for {
- select {
- case wrapper := <-w.stream:
- err := w.eventWriter.WriteEvent(wrapper.Event)
- wrapper.ReportResult(w.done, err)
- if err != nil {
- w.err.SetError(err)
- return
- }
-
- case <-w.done:
- if err := w.streamCloser.Close(); err != nil {
- w.err.SetError(err)
- }
- return
- }
- }
-}
-
-type eventWriteAsyncReport struct {
- Event Marshaler
- Result chan<- error
-}
-
-func (e eventWriteAsyncReport) ReportResult(cancel <-chan struct{}, err error) bool {
- select {
- case e.Result <- err:
- return true
- case <-cancel:
- return false
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go
deleted file mode 100644
index 7d7a79352..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi/writer.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package eventstreamapi
-
-import (
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/eventstream"
-)
-
-// Marshaler provides a marshaling interface for event types to event stream
-// messages.
-type Marshaler interface {
- MarshalEvent(protocol.PayloadMarshaler) (eventstream.Message, error)
-}
-
-// Encoder is an stream encoder that will encode an event stream message for
-// the transport.
-type Encoder interface {
- Encode(eventstream.Message) error
-}
-
-// EventWriter provides a wrapper around the underlying event stream encoder
-// for an io.WriteCloser.
-type EventWriter struct {
- encoder Encoder
- payloadMarshaler protocol.PayloadMarshaler
- eventTypeFor func(Marshaler) (string, error)
-}
-
-// NewEventWriter returns a new event stream writer, that will write to the
-// writer provided. Use the WriteEvent method to write an event to the stream.
-func NewEventWriter(encoder Encoder, pm protocol.PayloadMarshaler, eventTypeFor func(Marshaler) (string, error),
-) *EventWriter {
- return &EventWriter{
- encoder: encoder,
- payloadMarshaler: pm,
- eventTypeFor: eventTypeFor,
- }
-}
-
-// WriteEvent writes an event to the stream. Returns an error if the event
-// fails to marshal into a message, or writing to the underlying writer fails.
-func (w *EventWriter) WriteEvent(event Marshaler) error {
- msg, err := w.marshal(event)
- if err != nil {
- return err
- }
-
- return w.encoder.Encode(msg)
-}
-
-func (w *EventWriter) marshal(event Marshaler) (eventstream.Message, error) {
- eventType, err := w.eventTypeFor(event)
- if err != nil {
- return eventstream.Message{}, err
- }
-
- msg, err := event.MarshalEvent(w.payloadMarshaler)
- if err != nil {
- return eventstream.Message{}, err
- }
-
- msg.Headers.Set(EventTypeHeader, eventstream.StringValue(eventType))
- return msg, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go
deleted file mode 100644
index f6f8c5674..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header.go
+++ /dev/null
@@ -1,175 +0,0 @@
-package eventstream
-
-import (
- "encoding/binary"
- "fmt"
- "io"
-)
-
-// Headers are a collection of EventStream header values.
-type Headers []Header
-
-// Header is a single EventStream Key Value header pair.
-type Header struct {
- Name string
- Value Value
-}
-
-// Set associates the name with a value. If the header name already exists in
-// the Headers the value will be replaced with the new one.
-func (hs *Headers) Set(name string, value Value) {
- var i int
- for ; i < len(*hs); i++ {
- if (*hs)[i].Name == name {
- (*hs)[i].Value = value
- return
- }
- }
-
- *hs = append(*hs, Header{
- Name: name, Value: value,
- })
-}
-
-// Get returns the Value associated with the header. Nil is returned if the
-// value does not exist.
-func (hs Headers) Get(name string) Value {
- for i := 0; i < len(hs); i++ {
- if h := hs[i]; h.Name == name {
- return h.Value
- }
- }
- return nil
-}
-
-// Del deletes the value in the Headers if it exists.
-func (hs *Headers) Del(name string) {
- for i := 0; i < len(*hs); i++ {
- if (*hs)[i].Name == name {
- copy((*hs)[i:], (*hs)[i+1:])
- (*hs) = (*hs)[:len(*hs)-1]
- }
- }
-}
-
-// Clone returns a deep copy of the headers
-func (hs Headers) Clone() Headers {
- o := make(Headers, 0, len(hs))
- for _, h := range hs {
- o.Set(h.Name, h.Value)
- }
- return o
-}
-
-func decodeHeaders(r io.Reader) (Headers, error) {
- hs := Headers{}
-
- for {
- name, err := decodeHeaderName(r)
- if err != nil {
- if err == io.EOF {
- // EOF while getting header name means no more headers
- break
- }
- return nil, err
- }
-
- value, err := decodeHeaderValue(r)
- if err != nil {
- return nil, err
- }
-
- hs.Set(name, value)
- }
-
- return hs, nil
-}
-
-func decodeHeaderName(r io.Reader) (string, error) {
- var n headerName
-
- var err error
- n.Len, err = decodeUint8(r)
- if err != nil {
- return "", err
- }
-
- name := n.Name[:n.Len]
- if _, err := io.ReadFull(r, name); err != nil {
- return "", err
- }
-
- return string(name), nil
-}
-
-func decodeHeaderValue(r io.Reader) (Value, error) {
- var raw rawValue
-
- typ, err := decodeUint8(r)
- if err != nil {
- return nil, err
- }
- raw.Type = valueType(typ)
-
- var v Value
-
- switch raw.Type {
- case trueValueType:
- v = BoolValue(true)
- case falseValueType:
- v = BoolValue(false)
- case int8ValueType:
- var tv Int8Value
- err = tv.decode(r)
- v = tv
- case int16ValueType:
- var tv Int16Value
- err = tv.decode(r)
- v = tv
- case int32ValueType:
- var tv Int32Value
- err = tv.decode(r)
- v = tv
- case int64ValueType:
- var tv Int64Value
- err = tv.decode(r)
- v = tv
- case bytesValueType:
- var tv BytesValue
- err = tv.decode(r)
- v = tv
- case stringValueType:
- var tv StringValue
- err = tv.decode(r)
- v = tv
- case timestampValueType:
- var tv TimestampValue
- err = tv.decode(r)
- v = tv
- case uuidValueType:
- var tv UUIDValue
- err = tv.decode(r)
- v = tv
- default:
- panic(fmt.Sprintf("unknown value type %d", raw.Type))
- }
-
- // Error could be EOF, let caller deal with it
- return v, err
-}
-
-const maxHeaderNameLen = 255
-
-type headerName struct {
- Len uint8
- Name [maxHeaderNameLen]byte
-}
-
-func (v headerName) encode(w io.Writer) error {
- if err := binary.Write(w, binary.BigEndian, v.Len); err != nil {
- return err
- }
-
- _, err := w.Write(v.Name[:v.Len])
- return err
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go
deleted file mode 100644
index 9f509d8f6..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/header_value.go
+++ /dev/null
@@ -1,506 +0,0 @@
-package eventstream
-
-import (
- "encoding/base64"
- "encoding/binary"
- "fmt"
- "io"
- "strconv"
- "time"
-)
-
-const maxHeaderValueLen = 1<<15 - 1 // 2^15-1 or 32KB - 1
-
-// valueType is the EventStream header value type.
-type valueType uint8
-
-// Header value types
-const (
- trueValueType valueType = iota
- falseValueType
- int8ValueType // Byte
- int16ValueType // Short
- int32ValueType // Integer
- int64ValueType // Long
- bytesValueType
- stringValueType
- timestampValueType
- uuidValueType
-)
-
-func (t valueType) String() string {
- switch t {
- case trueValueType:
- return "bool"
- case falseValueType:
- return "bool"
- case int8ValueType:
- return "int8"
- case int16ValueType:
- return "int16"
- case int32ValueType:
- return "int32"
- case int64ValueType:
- return "int64"
- case bytesValueType:
- return "byte_array"
- case stringValueType:
- return "string"
- case timestampValueType:
- return "timestamp"
- case uuidValueType:
- return "uuid"
- default:
- return fmt.Sprintf("unknown value type %d", uint8(t))
- }
-}
-
-type rawValue struct {
- Type valueType
- Len uint16 // Only set for variable length slices
- Value []byte // byte representation of value, BigEndian encoding.
-}
-
-func (r rawValue) encodeScalar(w io.Writer, v interface{}) error {
- return binaryWriteFields(w, binary.BigEndian,
- r.Type,
- v,
- )
-}
-
-func (r rawValue) encodeFixedSlice(w io.Writer, v []byte) error {
- binary.Write(w, binary.BigEndian, r.Type)
-
- _, err := w.Write(v)
- return err
-}
-
-func (r rawValue) encodeBytes(w io.Writer, v []byte) error {
- if len(v) > maxHeaderValueLen {
- return LengthError{
- Part: "header value",
- Want: maxHeaderValueLen, Have: len(v),
- Value: v,
- }
- }
- r.Len = uint16(len(v))
-
- err := binaryWriteFields(w, binary.BigEndian,
- r.Type,
- r.Len,
- )
- if err != nil {
- return err
- }
-
- _, err = w.Write(v)
- return err
-}
-
-func (r rawValue) encodeString(w io.Writer, v string) error {
- if len(v) > maxHeaderValueLen {
- return LengthError{
- Part: "header value",
- Want: maxHeaderValueLen, Have: len(v),
- Value: v,
- }
- }
- r.Len = uint16(len(v))
-
- type stringWriter interface {
- WriteString(string) (int, error)
- }
-
- err := binaryWriteFields(w, binary.BigEndian,
- r.Type,
- r.Len,
- )
- if err != nil {
- return err
- }
-
- if sw, ok := w.(stringWriter); ok {
- _, err = sw.WriteString(v)
- } else {
- _, err = w.Write([]byte(v))
- }
-
- return err
-}
-
-func decodeFixedBytesValue(r io.Reader, buf []byte) error {
- _, err := io.ReadFull(r, buf)
- return err
-}
-
-func decodeBytesValue(r io.Reader) ([]byte, error) {
- var raw rawValue
- var err error
- raw.Len, err = decodeUint16(r)
- if err != nil {
- return nil, err
- }
-
- buf := make([]byte, raw.Len)
- _, err = io.ReadFull(r, buf)
- if err != nil {
- return nil, err
- }
-
- return buf, nil
-}
-
-func decodeStringValue(r io.Reader) (string, error) {
- v, err := decodeBytesValue(r)
- return string(v), err
-}
-
-// Value represents the abstract header value.
-type Value interface {
- Get() interface{}
- String() string
- valueType() valueType
- encode(io.Writer) error
-}
-
-// An BoolValue provides eventstream encoding, and representation
-// of a Go bool value.
-type BoolValue bool
-
-// Get returns the underlying type
-func (v BoolValue) Get() interface{} {
- return bool(v)
-}
-
-// valueType returns the EventStream header value type value.
-func (v BoolValue) valueType() valueType {
- if v {
- return trueValueType
- }
- return falseValueType
-}
-
-func (v BoolValue) String() string {
- return strconv.FormatBool(bool(v))
-}
-
-// encode encodes the BoolValue into an eventstream binary value
-// representation.
-func (v BoolValue) encode(w io.Writer) error {
- return binary.Write(w, binary.BigEndian, v.valueType())
-}
-
-// An Int8Value provides eventstream encoding, and representation of a Go
-// int8 value.
-type Int8Value int8
-
-// Get returns the underlying value.
-func (v Int8Value) Get() interface{} {
- return int8(v)
-}
-
-// valueType returns the EventStream header value type value.
-func (Int8Value) valueType() valueType {
- return int8ValueType
-}
-
-func (v Int8Value) String() string {
- return fmt.Sprintf("0x%02x", int8(v))
-}
-
-// encode encodes the Int8Value into an eventstream binary value
-// representation.
-func (v Int8Value) encode(w io.Writer) error {
- raw := rawValue{
- Type: v.valueType(),
- }
-
- return raw.encodeScalar(w, v)
-}
-
-func (v *Int8Value) decode(r io.Reader) error {
- n, err := decodeUint8(r)
- if err != nil {
- return err
- }
-
- *v = Int8Value(n)
- return nil
-}
-
-// An Int16Value provides eventstream encoding, and representation of a Go
-// int16 value.
-type Int16Value int16
-
-// Get returns the underlying value.
-func (v Int16Value) Get() interface{} {
- return int16(v)
-}
-
-// valueType returns the EventStream header value type value.
-func (Int16Value) valueType() valueType {
- return int16ValueType
-}
-
-func (v Int16Value) String() string {
- return fmt.Sprintf("0x%04x", int16(v))
-}
-
-// encode encodes the Int16Value into an eventstream binary value
-// representation.
-func (v Int16Value) encode(w io.Writer) error {
- raw := rawValue{
- Type: v.valueType(),
- }
- return raw.encodeScalar(w, v)
-}
-
-func (v *Int16Value) decode(r io.Reader) error {
- n, err := decodeUint16(r)
- if err != nil {
- return err
- }
-
- *v = Int16Value(n)
- return nil
-}
-
-// An Int32Value provides eventstream encoding, and representation of a Go
-// int32 value.
-type Int32Value int32
-
-// Get returns the underlying value.
-func (v Int32Value) Get() interface{} {
- return int32(v)
-}
-
-// valueType returns the EventStream header value type value.
-func (Int32Value) valueType() valueType {
- return int32ValueType
-}
-
-func (v Int32Value) String() string {
- return fmt.Sprintf("0x%08x", int32(v))
-}
-
-// encode encodes the Int32Value into an eventstream binary value
-// representation.
-func (v Int32Value) encode(w io.Writer) error {
- raw := rawValue{
- Type: v.valueType(),
- }
- return raw.encodeScalar(w, v)
-}
-
-func (v *Int32Value) decode(r io.Reader) error {
- n, err := decodeUint32(r)
- if err != nil {
- return err
- }
-
- *v = Int32Value(n)
- return nil
-}
-
-// An Int64Value provides eventstream encoding, and representation of a Go
-// int64 value.
-type Int64Value int64
-
-// Get returns the underlying value.
-func (v Int64Value) Get() interface{} {
- return int64(v)
-}
-
-// valueType returns the EventStream header value type value.
-func (Int64Value) valueType() valueType {
- return int64ValueType
-}
-
-func (v Int64Value) String() string {
- return fmt.Sprintf("0x%016x", int64(v))
-}
-
-// encode encodes the Int64Value into an eventstream binary value
-// representation.
-func (v Int64Value) encode(w io.Writer) error {
- raw := rawValue{
- Type: v.valueType(),
- }
- return raw.encodeScalar(w, v)
-}
-
-func (v *Int64Value) decode(r io.Reader) error {
- n, err := decodeUint64(r)
- if err != nil {
- return err
- }
-
- *v = Int64Value(n)
- return nil
-}
-
-// An BytesValue provides eventstream encoding, and representation of a Go
-// byte slice.
-type BytesValue []byte
-
-// Get returns the underlying value.
-func (v BytesValue) Get() interface{} {
- return []byte(v)
-}
-
-// valueType returns the EventStream header value type value.
-func (BytesValue) valueType() valueType {
- return bytesValueType
-}
-
-func (v BytesValue) String() string {
- return base64.StdEncoding.EncodeToString([]byte(v))
-}
-
-// encode encodes the BytesValue into an eventstream binary value
-// representation.
-func (v BytesValue) encode(w io.Writer) error {
- raw := rawValue{
- Type: v.valueType(),
- }
-
- return raw.encodeBytes(w, []byte(v))
-}
-
-func (v *BytesValue) decode(r io.Reader) error {
- buf, err := decodeBytesValue(r)
- if err != nil {
- return err
- }
-
- *v = BytesValue(buf)
- return nil
-}
-
-// An StringValue provides eventstream encoding, and representation of a Go
-// string.
-type StringValue string
-
-// Get returns the underlying value.
-func (v StringValue) Get() interface{} {
- return string(v)
-}
-
-// valueType returns the EventStream header value type value.
-func (StringValue) valueType() valueType {
- return stringValueType
-}
-
-func (v StringValue) String() string {
- return string(v)
-}
-
-// encode encodes the StringValue into an eventstream binary value
-// representation.
-func (v StringValue) encode(w io.Writer) error {
- raw := rawValue{
- Type: v.valueType(),
- }
-
- return raw.encodeString(w, string(v))
-}
-
-func (v *StringValue) decode(r io.Reader) error {
- s, err := decodeStringValue(r)
- if err != nil {
- return err
- }
-
- *v = StringValue(s)
- return nil
-}
-
-// An TimestampValue provides eventstream encoding, and representation of a Go
-// timestamp.
-type TimestampValue time.Time
-
-// Get returns the underlying value.
-func (v TimestampValue) Get() interface{} {
- return time.Time(v)
-}
-
-// valueType returns the EventStream header value type value.
-func (TimestampValue) valueType() valueType {
- return timestampValueType
-}
-
-func (v TimestampValue) epochMilli() int64 {
- nano := time.Time(v).UnixNano()
- msec := nano / int64(time.Millisecond)
- return msec
-}
-
-func (v TimestampValue) String() string {
- msec := v.epochMilli()
- return strconv.FormatInt(msec, 10)
-}
-
-// encode encodes the TimestampValue into an eventstream binary value
-// representation.
-func (v TimestampValue) encode(w io.Writer) error {
- raw := rawValue{
- Type: v.valueType(),
- }
-
- msec := v.epochMilli()
- return raw.encodeScalar(w, msec)
-}
-
-func (v *TimestampValue) decode(r io.Reader) error {
- n, err := decodeUint64(r)
- if err != nil {
- return err
- }
-
- *v = TimestampValue(timeFromEpochMilli(int64(n)))
- return nil
-}
-
-// MarshalJSON implements the json.Marshaler interface
-func (v TimestampValue) MarshalJSON() ([]byte, error) {
- return []byte(v.String()), nil
-}
-
-func timeFromEpochMilli(t int64) time.Time {
- secs := t / 1e3
- msec := t % 1e3
- return time.Unix(secs, msec*int64(time.Millisecond)).UTC()
-}
-
-// An UUIDValue provides eventstream encoding, and representation of a UUID
-// value.
-type UUIDValue [16]byte
-
-// Get returns the underlying value.
-func (v UUIDValue) Get() interface{} {
- return v[:]
-}
-
-// valueType returns the EventStream header value type value.
-func (UUIDValue) valueType() valueType {
- return uuidValueType
-}
-
-func (v UUIDValue) String() string {
- return fmt.Sprintf(`%X-%X-%X-%X-%X`, v[0:4], v[4:6], v[6:8], v[8:10], v[10:])
-}
-
-// encode encodes the UUIDValue into an eventstream binary value
-// representation.
-func (v UUIDValue) encode(w io.Writer) error {
- raw := rawValue{
- Type: v.valueType(),
- }
-
- return raw.encodeFixedSlice(w, v[:])
-}
-
-func (v *UUIDValue) decode(r io.Reader) error {
- tv := (*v)[:]
- return decodeFixedBytesValue(r, tv)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go
deleted file mode 100644
index f7427da03..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/eventstream/message.go
+++ /dev/null
@@ -1,117 +0,0 @@
-package eventstream
-
-import (
- "bytes"
- "encoding/binary"
- "hash/crc32"
-)
-
-const preludeLen = 8
-const preludeCRCLen = 4
-const msgCRCLen = 4
-const minMsgLen = preludeLen + preludeCRCLen + msgCRCLen
-const maxPayloadLen = 1024 * 1024 * 16 // 16MB
-const maxHeadersLen = 1024 * 128 // 128KB
-const maxMsgLen = minMsgLen + maxHeadersLen + maxPayloadLen
-
-var crc32IEEETable = crc32.MakeTable(crc32.IEEE)
-
-// A Message provides the eventstream message representation.
-type Message struct {
- Headers Headers
- Payload []byte
-}
-
-func (m *Message) rawMessage() (rawMessage, error) {
- var raw rawMessage
-
- if len(m.Headers) > 0 {
- var headers bytes.Buffer
- if err := EncodeHeaders(&headers, m.Headers); err != nil {
- return rawMessage{}, err
- }
- raw.Headers = headers.Bytes()
- raw.HeadersLen = uint32(len(raw.Headers))
- }
-
- raw.Length = raw.HeadersLen + uint32(len(m.Payload)) + minMsgLen
-
- hash := crc32.New(crc32IEEETable)
- binaryWriteFields(hash, binary.BigEndian, raw.Length, raw.HeadersLen)
- raw.PreludeCRC = hash.Sum32()
-
- binaryWriteFields(hash, binary.BigEndian, raw.PreludeCRC)
-
- if raw.HeadersLen > 0 {
- hash.Write(raw.Headers)
- }
-
- // Read payload bytes and update hash for it as well.
- if len(m.Payload) > 0 {
- raw.Payload = m.Payload
- hash.Write(raw.Payload)
- }
-
- raw.CRC = hash.Sum32()
-
- return raw, nil
-}
-
-// Clone returns a deep copy of the message.
-func (m Message) Clone() Message {
- var payload []byte
- if m.Payload != nil {
- payload = make([]byte, len(m.Payload))
- copy(payload, m.Payload)
- }
-
- return Message{
- Headers: m.Headers.Clone(),
- Payload: payload,
- }
-}
-
-type messagePrelude struct {
- Length uint32
- HeadersLen uint32
- PreludeCRC uint32
-}
-
-func (p messagePrelude) PayloadLen() uint32 {
- return p.Length - p.HeadersLen - minMsgLen
-}
-
-func (p messagePrelude) ValidateLens() error {
- if p.Length == 0 || p.Length > maxMsgLen {
- return LengthError{
- Part: "message prelude",
- Want: maxMsgLen,
- Have: int(p.Length),
- }
- }
- if p.HeadersLen > maxHeadersLen {
- return LengthError{
- Part: "message headers",
- Want: maxHeadersLen,
- Have: int(p.HeadersLen),
- }
- }
- if payloadLen := p.PayloadLen(); payloadLen > maxPayloadLen {
- return LengthError{
- Part: "message payload",
- Want: maxPayloadLen,
- Have: int(payloadLen),
- }
- }
-
- return nil
-}
-
-type rawMessage struct {
- messagePrelude
-
- Headers []byte
- Payload []byte
-
- CRC uint32
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go
deleted file mode 100644
index b1ae36487..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restxml/restxml.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Package restxml provides RESTful XML serialization of AWS
-// requests and responses.
-package restxml
-
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/rest-xml.json build_test.go
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/rest-xml.json unmarshal_test.go
-
-import (
- "bytes"
- "encoding/xml"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/query"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
-)
-
-// BuildHandler is a named request handler for building restxml protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.restxml.Build", Fn: Build}
-
-// UnmarshalHandler is a named request handler for unmarshaling restxml protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.restxml.Unmarshal", Fn: Unmarshal}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling restxml protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.restxml.UnmarshalMeta", Fn: UnmarshalMeta}
-
-// UnmarshalErrorHandler is a named request handler for unmarshaling restxml protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.restxml.UnmarshalError", Fn: UnmarshalError}
-
-// Build builds a request payload for the REST XML protocol.
-func Build(r *request.Request) {
- rest.Build(r)
-
- if t := rest.PayloadType(r.Params); t == "structure" || t == "" {
- var buf bytes.Buffer
- err := xmlutil.BuildXML(r.Params, xml.NewEncoder(&buf))
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to encode rest XML request", err),
- 0,
- r.RequestID,
- )
- return
- }
- r.SetBufferBody(buf.Bytes())
- }
-}
-
-// Unmarshal unmarshals a payload response for the REST XML protocol.
-func Unmarshal(r *request.Request) {
- if t := rest.PayloadType(r.Data); t == "structure" || t == "" {
- defer r.HTTPResponse.Body.Close()
- decoder := xml.NewDecoder(r.HTTPResponse.Body)
- err := xmlutil.UnmarshalXML(r.Data, decoder, "")
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to decode REST XML response", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
- } else {
- rest.Unmarshal(r)
- }
-}
-
-// UnmarshalMeta unmarshals response headers for the REST XML protocol.
-func UnmarshalMeta(r *request.Request) {
- rest.UnmarshalMeta(r)
-}
-
-// UnmarshalError unmarshals a response error for the REST XML protocol.
-func UnmarshalError(r *request.Request) {
- query.UnmarshalError(r)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go
deleted file mode 100644
index 8211c9299..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/api.go
+++ /dev/null
@@ -1,8398 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package cloudtrail
-
-import (
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-const opAddTags = "AddTags"
-
-// AddTagsRequest generates a "aws/request.Request" representing the
-// client's request for the AddTags operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See AddTags for more information on using the AddTags
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the AddTagsRequest method.
-// req, resp := client.AddTagsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
-func (c *CloudTrail) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) {
- op := &request.Operation{
- Name: opAddTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AddTagsInput{}
- }
-
- output = &AddTagsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// AddTags API operation for AWS CloudTrail.
-//
-// Adds one or more tags to a trail, up to a limit of 50. Overwrites an existing
-// tag's value when a new value is specified for an existing tag key. Tag key
-// names must be unique for a trail; you cannot have two keys with the same
-// name but different values. If you specify a key without a value, the tag
-// will be created with the specified key and a value of null. You can tag a
-// trail that applies to all AWS Regions only from the Region in which the trail
-// was created (also known as its home region).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation AddTags for usage and error information.
-//
-// Returned Error Types:
-// * ResourceNotFoundException
-// This exception is thrown when the specified resource is not found.
-//
-// * ARNInvalidException
-// This exception is thrown when an operation is called with an invalid trail
-// ARN. The format of a trail ARN is:
-//
-// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
-//
-// * ResourceTypeNotSupportedException
-// This exception is thrown when the specified resource type is not supported
-// by CloudTrail.
-//
-// * TagsLimitExceededException
-// The number of tags per trail has exceeded the permitted amount. Currently,
-// the limit is 50.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * InvalidTagParameterException
-// This exception is thrown when the specified tag key or values are not valid.
-// It can also occur if there are duplicate tags or too many tags on the resource.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/AddTags
-func (c *CloudTrail) AddTags(input *AddTagsInput) (*AddTagsOutput, error) {
- req, out := c.AddTagsRequest(input)
- return out, req.Send()
-}
-
-// AddTagsWithContext is the same as AddTags with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AddTags for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) {
- req, out := c.AddTagsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateTrail = "CreateTrail"
-
-// CreateTrailRequest generates a "aws/request.Request" representing the
-// client's request for the CreateTrail operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateTrail for more information on using the CreateTrail
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateTrailRequest method.
-// req, resp := client.CreateTrailRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
-func (c *CloudTrail) CreateTrailRequest(input *CreateTrailInput) (req *request.Request, output *CreateTrailOutput) {
- op := &request.Operation{
- Name: opCreateTrail,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateTrailInput{}
- }
-
- output = &CreateTrailOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateTrail API operation for AWS CloudTrail.
-//
-// Creates a trail that specifies the settings for delivery of log data to an
-// Amazon S3 bucket.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation CreateTrail for usage and error information.
-//
-// Returned Error Types:
-// * MaximumNumberOfTrailsExceededException
-// This exception is thrown when the maximum number of trails is reached.
-//
-// * TrailAlreadyExistsException
-// This exception is thrown when the specified trail already exists.
-//
-// * S3BucketDoesNotExistException
-// This exception is thrown when the specified S3 bucket does not exist.
-//
-// * InsufficientS3BucketPolicyException
-// This exception is thrown when the policy on the S3 bucket is not sufficient.
-//
-// * InsufficientSnsTopicPolicyException
-// This exception is thrown when the policy on the SNS topic is not sufficient.
-//
-// * InsufficientEncryptionPolicyException
-// This exception is thrown when the policy on the S3 bucket or KMS key is not
-// sufficient.
-//
-// * InvalidS3BucketNameException
-// This exception is thrown when the provided S3 bucket name is not valid.
-//
-// * InvalidS3PrefixException
-// This exception is thrown when the provided S3 prefix is not valid.
-//
-// * InvalidSnsTopicNameException
-// This exception is thrown when the provided SNS topic name is not valid.
-//
-// * InvalidKmsKeyIdException
-// This exception is thrown when the KMS key ARN is invalid.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * TrailNotProvidedException
-// This exception is no longer in use.
-//
-// * InvalidParameterCombinationException
-// This exception is thrown when the combination of parameters provided is not
-// valid.
-//
-// * KmsKeyNotFoundException
-// This exception is thrown when the AWS KMS key does not exist, when the S3
-// bucket and the AWS KMS key are not in the same region, or when the AWS KMS
-// key associated with the SNS topic either does not exist or is not in the
-// same region.
-//
-// * KmsKeyDisabledException
-// This exception is no longer in use.
-//
-// * KmsException
-// This exception is thrown when there is an issue with the specified KMS key
-// and the trail can’t be updated.
-//
-// * InvalidCloudWatchLogsLogGroupArnException
-// This exception is thrown when the provided CloudWatch log group is not valid.
-//
-// * InvalidCloudWatchLogsRoleArnException
-// This exception is thrown when the provided role is not valid.
-//
-// * CloudWatchLogsDeliveryUnavailableException
-// Cannot set a CloudWatch Logs delivery for this region.
-//
-// * InvalidTagParameterException
-// This exception is thrown when the specified tag key or values are not valid.
-// It can also occur if there are duplicate tags or too many tags on the resource.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * AccessNotEnabledException
-// This exception is thrown when trusted access has not been enabled between
-// AWS CloudTrail and AWS Organizations. For more information, see Enabling
-// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
-// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * InsufficientDependencyServiceAccessPermissionException
-// This exception is thrown when the IAM user or role that is used to create
-// the organization trail is lacking one or more required permissions for creating
-// an organization trail in a required service. For more information, see Prepare
-// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * OrganizationsNotInUseException
-// This exception is thrown when the request is made from an AWS account that
-// is not a member of an organization. To make this request, sign in using the
-// credentials of an account that belongs to an organization.
-//
-// * OrganizationNotInAllFeaturesModeException
-// This exception is thrown when AWS Organizations is not configured to support
-// all features. All features must be enabled in AWS Organization to support
-// creating an organization trail. For more information, see Prepare For Creating
-// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * CloudTrailInvalidClientTokenIdException
-// This exception is thrown when a call results in the InvalidClientTokenId
-// error code. This can occur when you are creating or updating a trail to send
-// notifications to an Amazon SNS topic that is in a suspended AWS account.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/CreateTrail
-func (c *CloudTrail) CreateTrail(input *CreateTrailInput) (*CreateTrailOutput, error) {
- req, out := c.CreateTrailRequest(input)
- return out, req.Send()
-}
-
-// CreateTrailWithContext is the same as CreateTrail with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateTrail for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) CreateTrailWithContext(ctx aws.Context, input *CreateTrailInput, opts ...request.Option) (*CreateTrailOutput, error) {
- req, out := c.CreateTrailRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteTrail = "DeleteTrail"
-
-// DeleteTrailRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteTrail operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteTrail for more information on using the DeleteTrail
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteTrailRequest method.
-// req, resp := client.DeleteTrailRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
-func (c *CloudTrail) DeleteTrailRequest(input *DeleteTrailInput) (req *request.Request, output *DeleteTrailOutput) {
- op := &request.Operation{
- Name: opDeleteTrail,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteTrailInput{}
- }
-
- output = &DeleteTrailOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteTrail API operation for AWS CloudTrail.
-//
-// Deletes a trail. This operation must be called from the region in which the
-// trail was created. DeleteTrail cannot be called on the shadow trails (replicated
-// trails in other regions) of a trail that is enabled in all regions.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation DeleteTrail for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * InvalidHomeRegionException
-// This exception is thrown when an operation is called on a trail from a region
-// other than the region in which the trail was created.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * InsufficientDependencyServiceAccessPermissionException
-// This exception is thrown when the IAM user or role that is used to create
-// the organization trail is lacking one or more required permissions for creating
-// an organization trail in a required service. For more information, see Prepare
-// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * ConflictException
-// This exception is thrown when the specified resource is not ready for an
-// operation. This can occur when you try to run an operation on a trail before
-// CloudTrail has time to fully load the trail. If this exception occurs, wait
-// a few minutes, and then try the operation again.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DeleteTrail
-func (c *CloudTrail) DeleteTrail(input *DeleteTrailInput) (*DeleteTrailOutput, error) {
- req, out := c.DeleteTrailRequest(input)
- return out, req.Send()
-}
-
-// DeleteTrailWithContext is the same as DeleteTrail with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteTrail for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) DeleteTrailWithContext(ctx aws.Context, input *DeleteTrailInput, opts ...request.Option) (*DeleteTrailOutput, error) {
- req, out := c.DeleteTrailRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeTrails = "DescribeTrails"
-
-// DescribeTrailsRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeTrails operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeTrails for more information on using the DescribeTrails
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeTrailsRequest method.
-// req, resp := client.DescribeTrailsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
-func (c *CloudTrail) DescribeTrailsRequest(input *DescribeTrailsInput) (req *request.Request, output *DescribeTrailsOutput) {
- op := &request.Operation{
- Name: opDescribeTrails,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeTrailsInput{}
- }
-
- output = &DescribeTrailsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeTrails API operation for AWS CloudTrail.
-//
-// Retrieves settings for one or more trails associated with the current region
-// for your account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation DescribeTrails for usage and error information.
-//
-// Returned Error Types:
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/DescribeTrails
-func (c *CloudTrail) DescribeTrails(input *DescribeTrailsInput) (*DescribeTrailsOutput, error) {
- req, out := c.DescribeTrailsRequest(input)
- return out, req.Send()
-}
-
-// DescribeTrailsWithContext is the same as DescribeTrails with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeTrails for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) DescribeTrailsWithContext(ctx aws.Context, input *DescribeTrailsInput, opts ...request.Option) (*DescribeTrailsOutput, error) {
- req, out := c.DescribeTrailsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetEventSelectors = "GetEventSelectors"
-
-// GetEventSelectorsRequest generates a "aws/request.Request" representing the
-// client's request for the GetEventSelectors operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetEventSelectors for more information on using the GetEventSelectors
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetEventSelectorsRequest method.
-// req, resp := client.GetEventSelectorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
-func (c *CloudTrail) GetEventSelectorsRequest(input *GetEventSelectorsInput) (req *request.Request, output *GetEventSelectorsOutput) {
- op := &request.Operation{
- Name: opGetEventSelectors,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetEventSelectorsInput{}
- }
-
- output = &GetEventSelectorsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetEventSelectors API operation for AWS CloudTrail.
-//
-// Describes the settings for the event selectors that you configured for your
-// trail. The information returned for your event selectors includes the following:
-//
-// * If your event selector includes read-only events, write-only events,
-// or all events. This applies to both management events and data events.
-//
-// * If your event selector includes management events.
-//
-// * If your event selector includes data events, the resources on which
-// you are logging data events.
-//
-// For more information, see Logging Data and Management Events for Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html)
-// in the AWS CloudTrail User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation GetEventSelectors for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetEventSelectors
-func (c *CloudTrail) GetEventSelectors(input *GetEventSelectorsInput) (*GetEventSelectorsOutput, error) {
- req, out := c.GetEventSelectorsRequest(input)
- return out, req.Send()
-}
-
-// GetEventSelectorsWithContext is the same as GetEventSelectors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetEventSelectors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) GetEventSelectorsWithContext(ctx aws.Context, input *GetEventSelectorsInput, opts ...request.Option) (*GetEventSelectorsOutput, error) {
- req, out := c.GetEventSelectorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetInsightSelectors = "GetInsightSelectors"
-
-// GetInsightSelectorsRequest generates a "aws/request.Request" representing the
-// client's request for the GetInsightSelectors operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetInsightSelectors for more information on using the GetInsightSelectors
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetInsightSelectorsRequest method.
-// req, resp := client.GetInsightSelectorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors
-func (c *CloudTrail) GetInsightSelectorsRequest(input *GetInsightSelectorsInput) (req *request.Request, output *GetInsightSelectorsOutput) {
- op := &request.Operation{
- Name: opGetInsightSelectors,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetInsightSelectorsInput{}
- }
-
- output = &GetInsightSelectorsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetInsightSelectors API operation for AWS CloudTrail.
-//
-// Describes the settings for the Insights event selectors that you configured
-// for your trail. GetInsightSelectors shows if CloudTrail Insights event logging
-// is enabled on the trail, and if it is, which insight types are enabled. If
-// you run GetInsightSelectors on a trail that does not have Insights events
-// enabled, the operation throws the exception InsightNotEnabledException
-//
-// For more information, see Logging CloudTrail Insights Events for Trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-insights-events-with-cloudtrail.html)
-// in the AWS CloudTrail User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation GetInsightSelectors for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * InsightNotEnabledException
-// If you run GetInsightSelectors on a trail that does not have Insights events
-// enabled, the operation throws the exception InsightNotEnabledException.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetInsightSelectors
-func (c *CloudTrail) GetInsightSelectors(input *GetInsightSelectorsInput) (*GetInsightSelectorsOutput, error) {
- req, out := c.GetInsightSelectorsRequest(input)
- return out, req.Send()
-}
-
-// GetInsightSelectorsWithContext is the same as GetInsightSelectors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetInsightSelectors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) GetInsightSelectorsWithContext(ctx aws.Context, input *GetInsightSelectorsInput, opts ...request.Option) (*GetInsightSelectorsOutput, error) {
- req, out := c.GetInsightSelectorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetTrail = "GetTrail"
-
-// GetTrailRequest generates a "aws/request.Request" representing the
-// client's request for the GetTrail operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetTrail for more information on using the GetTrail
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetTrailRequest method.
-// req, resp := client.GetTrailRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail
-func (c *CloudTrail) GetTrailRequest(input *GetTrailInput) (req *request.Request, output *GetTrailOutput) {
- op := &request.Operation{
- Name: opGetTrail,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetTrailInput{}
- }
-
- output = &GetTrailOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetTrail API operation for AWS CloudTrail.
-//
-// Returns settings information for a specified trail.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation GetTrail for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrail
-func (c *CloudTrail) GetTrail(input *GetTrailInput) (*GetTrailOutput, error) {
- req, out := c.GetTrailRequest(input)
- return out, req.Send()
-}
-
-// GetTrailWithContext is the same as GetTrail with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetTrail for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) GetTrailWithContext(ctx aws.Context, input *GetTrailInput, opts ...request.Option) (*GetTrailOutput, error) {
- req, out := c.GetTrailRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetTrailStatus = "GetTrailStatus"
-
-// GetTrailStatusRequest generates a "aws/request.Request" representing the
-// client's request for the GetTrailStatus operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetTrailStatus for more information on using the GetTrailStatus
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetTrailStatusRequest method.
-// req, resp := client.GetTrailStatusRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
-func (c *CloudTrail) GetTrailStatusRequest(input *GetTrailStatusInput) (req *request.Request, output *GetTrailStatusOutput) {
- op := &request.Operation{
- Name: opGetTrailStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetTrailStatusInput{}
- }
-
- output = &GetTrailStatusOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetTrailStatus API operation for AWS CloudTrail.
-//
-// Returns a JSON-formatted list of information about the specified trail. Fields
-// include information on delivery errors, Amazon SNS and Amazon S3 errors,
-// and start and stop logging times for each trail. This operation returns trail
-// status from a single region. To return trail status from all regions, you
-// must call the operation on each region.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation GetTrailStatus for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/GetTrailStatus
-func (c *CloudTrail) GetTrailStatus(input *GetTrailStatusInput) (*GetTrailStatusOutput, error) {
- req, out := c.GetTrailStatusRequest(input)
- return out, req.Send()
-}
-
-// GetTrailStatusWithContext is the same as GetTrailStatus with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetTrailStatus for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) GetTrailStatusWithContext(ctx aws.Context, input *GetTrailStatusInput, opts ...request.Option) (*GetTrailStatusOutput, error) {
- req, out := c.GetTrailStatusRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListPublicKeys = "ListPublicKeys"
-
-// ListPublicKeysRequest generates a "aws/request.Request" representing the
-// client's request for the ListPublicKeys operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListPublicKeys for more information on using the ListPublicKeys
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListPublicKeysRequest method.
-// req, resp := client.ListPublicKeysRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
-func (c *CloudTrail) ListPublicKeysRequest(input *ListPublicKeysInput) (req *request.Request, output *ListPublicKeysOutput) {
- op := &request.Operation{
- Name: opListPublicKeys,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListPublicKeysInput{}
- }
-
- output = &ListPublicKeysOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListPublicKeys API operation for AWS CloudTrail.
-//
-// Returns all public keys whose private keys were used to sign the digest files
-// within the specified time range. The public key is needed to validate digest
-// files that were signed with its corresponding private key.
-//
-// CloudTrail uses different private/public key pairs per region. Each digest
-// file is signed with a private key unique to its region. Therefore, when you
-// validate a digest file from a particular region, you must look in the same
-// region for its corresponding public key.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation ListPublicKeys for usage and error information.
-//
-// Returned Error Types:
-// * InvalidTimeRangeException
-// Occurs if the timestamp values are invalid. Either the start time occurs
-// after the end time or the time range is outside the range of possible values.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * InvalidTokenException
-// Reserved for future use.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListPublicKeys
-func (c *CloudTrail) ListPublicKeys(input *ListPublicKeysInput) (*ListPublicKeysOutput, error) {
- req, out := c.ListPublicKeysRequest(input)
- return out, req.Send()
-}
-
-// ListPublicKeysWithContext is the same as ListPublicKeys with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListPublicKeys for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) ListPublicKeysWithContext(ctx aws.Context, input *ListPublicKeysInput, opts ...request.Option) (*ListPublicKeysOutput, error) {
- req, out := c.ListPublicKeysRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListPublicKeysPages iterates over the pages of a ListPublicKeys operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListPublicKeys method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListPublicKeys operation.
-// pageNum := 0
-// err := client.ListPublicKeysPages(params,
-// func(page *cloudtrail.ListPublicKeysOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *CloudTrail) ListPublicKeysPages(input *ListPublicKeysInput, fn func(*ListPublicKeysOutput, bool) bool) error {
- return c.ListPublicKeysPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListPublicKeysPagesWithContext same as ListPublicKeysPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) ListPublicKeysPagesWithContext(ctx aws.Context, input *ListPublicKeysInput, fn func(*ListPublicKeysOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListPublicKeysInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListPublicKeysRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListPublicKeysOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListTags = "ListTags"
-
-// ListTagsRequest generates a "aws/request.Request" representing the
-// client's request for the ListTags operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListTags for more information on using the ListTags
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListTagsRequest method.
-// req, resp := client.ListTagsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
-func (c *CloudTrail) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
- op := &request.Operation{
- Name: opListTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListTagsInput{}
- }
-
- output = &ListTagsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListTags API operation for AWS CloudTrail.
-//
-// Lists the tags for the trail in the current region.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation ListTags for usage and error information.
-//
-// Returned Error Types:
-// * ResourceNotFoundException
-// This exception is thrown when the specified resource is not found.
-//
-// * ARNInvalidException
-// This exception is thrown when an operation is called with an invalid trail
-// ARN. The format of a trail ARN is:
-//
-// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
-//
-// * ResourceTypeNotSupportedException
-// This exception is thrown when the specified resource type is not supported
-// by CloudTrail.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * InvalidTokenException
-// Reserved for future use.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags
-func (c *CloudTrail) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
- req, out := c.ListTagsRequest(input)
- return out, req.Send()
-}
-
-// ListTagsWithContext is the same as ListTags with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListTags for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
- req, out := c.ListTagsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListTagsPages iterates over the pages of a ListTags operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListTags method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListTags operation.
-// pageNum := 0
-// err := client.ListTagsPages(params,
-// func(page *cloudtrail.ListTagsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *CloudTrail) ListTagsPages(input *ListTagsInput, fn func(*ListTagsOutput, bool) bool) error {
- return c.ListTagsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListTagsPagesWithContext same as ListTagsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) ListTagsPagesWithContext(ctx aws.Context, input *ListTagsInput, fn func(*ListTagsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListTagsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListTagsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListTagsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListTrails = "ListTrails"
-
-// ListTrailsRequest generates a "aws/request.Request" representing the
-// client's request for the ListTrails operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListTrails for more information on using the ListTrails
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListTrailsRequest method.
-// req, resp := client.ListTrailsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails
-func (c *CloudTrail) ListTrailsRequest(input *ListTrailsInput) (req *request.Request, output *ListTrailsOutput) {
- op := &request.Operation{
- Name: opListTrails,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListTrailsInput{}
- }
-
- output = &ListTrailsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListTrails API operation for AWS CloudTrail.
-//
-// Lists trails that are in the current account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation ListTrails for usage and error information.
-//
-// Returned Error Types:
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTrails
-func (c *CloudTrail) ListTrails(input *ListTrailsInput) (*ListTrailsOutput, error) {
- req, out := c.ListTrailsRequest(input)
- return out, req.Send()
-}
-
-// ListTrailsWithContext is the same as ListTrails with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListTrails for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) ListTrailsWithContext(ctx aws.Context, input *ListTrailsInput, opts ...request.Option) (*ListTrailsOutput, error) {
- req, out := c.ListTrailsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListTrailsPages iterates over the pages of a ListTrails operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListTrails method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListTrails operation.
-// pageNum := 0
-// err := client.ListTrailsPages(params,
-// func(page *cloudtrail.ListTrailsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *CloudTrail) ListTrailsPages(input *ListTrailsInput, fn func(*ListTrailsOutput, bool) bool) error {
- return c.ListTrailsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListTrailsPagesWithContext same as ListTrailsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) ListTrailsPagesWithContext(ctx aws.Context, input *ListTrailsInput, fn func(*ListTrailsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListTrailsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListTrailsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListTrailsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opLookupEvents = "LookupEvents"
-
-// LookupEventsRequest generates a "aws/request.Request" representing the
-// client's request for the LookupEvents operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See LookupEvents for more information on using the LookupEvents
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the LookupEventsRequest method.
-// req, resp := client.LookupEventsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
-func (c *CloudTrail) LookupEventsRequest(input *LookupEventsInput) (req *request.Request, output *LookupEventsOutput) {
- op := &request.Operation{
- Name: opLookupEvents,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &LookupEventsInput{}
- }
-
- output = &LookupEventsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// LookupEvents API operation for AWS CloudTrail.
-//
-// Looks up management events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-management-events)
-// or CloudTrail Insights events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-concepts.html#cloudtrail-concepts-insights-events)
-// that are captured by CloudTrail. You can look up events that occurred in
-// a region within the last 90 days. Lookup supports the following attributes
-// for management events:
-//
-// * AWS access key
-//
-// * Event ID
-//
-// * Event name
-//
-// * Event source
-//
-// * Read only
-//
-// * Resource name
-//
-// * Resource type
-//
-// * User name
-//
-// Lookup supports the following attributes for Insights events:
-//
-// * Event ID
-//
-// * Event name
-//
-// * Event source
-//
-// All attributes are optional. The default number of results returned is 50,
-// with a maximum of 50 possible. The response includes a token that you can
-// use to get the next page of results.
-//
-// The rate of lookup requests is limited to two per second, per account, per
-// region. If this limit is exceeded, a throttling error occurs.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation LookupEvents for usage and error information.
-//
-// Returned Error Types:
-// * InvalidLookupAttributesException
-// Occurs when an invalid lookup attribute is specified.
-//
-// * InvalidTimeRangeException
-// Occurs if the timestamp values are invalid. Either the start time occurs
-// after the end time or the time range is outside the range of possible values.
-//
-// * InvalidMaxResultsException
-// This exception is thrown if the limit specified is invalid.
-//
-// * InvalidNextTokenException
-// Invalid token or token that was previously used in a request with different
-// parameters. This exception is thrown if the token is invalid.
-//
-// * InvalidEventCategoryException
-// Occurs if an event category that is not valid is specified as a value of
-// EventCategory.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/LookupEvents
-func (c *CloudTrail) LookupEvents(input *LookupEventsInput) (*LookupEventsOutput, error) {
- req, out := c.LookupEventsRequest(input)
- return out, req.Send()
-}
-
-// LookupEventsWithContext is the same as LookupEvents with the addition of
-// the ability to pass a context and additional request options.
-//
-// See LookupEvents for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) LookupEventsWithContext(ctx aws.Context, input *LookupEventsInput, opts ...request.Option) (*LookupEventsOutput, error) {
- req, out := c.LookupEventsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// LookupEventsPages iterates over the pages of a LookupEvents operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See LookupEvents method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a LookupEvents operation.
-// pageNum := 0
-// err := client.LookupEventsPages(params,
-// func(page *cloudtrail.LookupEventsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *CloudTrail) LookupEventsPages(input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool) error {
- return c.LookupEventsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// LookupEventsPagesWithContext same as LookupEventsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) LookupEventsPagesWithContext(ctx aws.Context, input *LookupEventsInput, fn func(*LookupEventsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *LookupEventsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.LookupEventsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*LookupEventsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opPutEventSelectors = "PutEventSelectors"
-
-// PutEventSelectorsRequest generates a "aws/request.Request" representing the
-// client's request for the PutEventSelectors operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutEventSelectors for more information on using the PutEventSelectors
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutEventSelectorsRequest method.
-// req, resp := client.PutEventSelectorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
-func (c *CloudTrail) PutEventSelectorsRequest(input *PutEventSelectorsInput) (req *request.Request, output *PutEventSelectorsOutput) {
- op := &request.Operation{
- Name: opPutEventSelectors,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &PutEventSelectorsInput{}
- }
-
- output = &PutEventSelectorsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// PutEventSelectors API operation for AWS CloudTrail.
-//
-// Configures an event selector or advanced event selectors for your trail.
-// Use event selectors or advanced event selectors to specify management and
-// data event settings for your trail. By default, trails created without specific
-// event selectors are configured to log all read and write management events,
-// and no data events.
-//
-// When an event occurs in your account, CloudTrail evaluates the event selectors
-// or advanced event selectors in all trails. For each trail, if the event matches
-// any event selector, the trail processes and logs the event. If the event
-// doesn't match any event selector, the trail doesn't log the event.
-//
-// Example
-//
-// You create an event selector for a trail and specify that you want write-only
-// events.
-//
-// The EC2 GetConsoleOutput and RunInstances API operations occur in your account.
-//
-// CloudTrail evaluates whether the events match your event selectors.
-//
-// The RunInstances is a write-only event and it matches your event selector.
-// The trail logs the event.
-//
-// The GetConsoleOutput is a read-only event that doesn't match your event selector.
-// The trail doesn't log the event.
-//
-// The PutEventSelectors operation must be called from the region in which the
-// trail was created; otherwise, an InvalidHomeRegionException exception is
-// thrown.
-//
-// You can configure up to five event selectors for each trail. For more information,
-// see Logging data and management events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html)
-// and Quotas in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
-// in the AWS CloudTrail User Guide.
-//
-// You can add advanced event selectors, and conditions for your advanced event
-// selectors, up to a maximum of 500 values for all conditions and selectors
-// on a trail. You can use either AdvancedEventSelectors or EventSelectors,
-// but not both. If you apply AdvancedEventSelectors to a trail, any existing
-// EventSelectors are overwritten. For more information about advanced event
-// selectors, see Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
-// in the AWS CloudTrail User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation PutEventSelectors for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * InvalidHomeRegionException
-// This exception is thrown when an operation is called on a trail from a region
-// other than the region in which the trail was created.
-//
-// * InvalidEventSelectorsException
-// This exception is thrown when the PutEventSelectors operation is called with
-// a number of event selectors, advanced event selectors, or data resources
-// that is not valid. The combination of event selectors or advanced event selectors
-// and data resources is not valid. A trail can have up to 5 event selectors.
-// If a trail uses advanced event selectors, a maximum of 500 total values for
-// all conditions in all advanced event selectors is allowed. A trail is limited
-// to 250 data resources. These data resources can be distributed across event
-// selectors, but the overall total cannot exceed 250.
-//
-// You can:
-//
-// * Specify a valid number of event selectors (1 to 5) for a trail.
-//
-// * Specify a valid number of data resources (1 to 250) for an event selector.
-// The limit of number of resources on an individual event selector is configurable
-// up to 250. However, this upper limit is allowed only if the total number
-// of data resources does not exceed 250 across all event selectors for a
-// trail.
-//
-// * Specify up to 500 values for all conditions in all advanced event selectors
-// for a trail.
-//
-// * Specify a valid value for a parameter. For example, specifying the ReadWriteType
-// parameter with a value of read-only is invalid.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * InsufficientDependencyServiceAccessPermissionException
-// This exception is thrown when the IAM user or role that is used to create
-// the organization trail is lacking one or more required permissions for creating
-// an organization trail in a required service. For more information, see Prepare
-// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutEventSelectors
-func (c *CloudTrail) PutEventSelectors(input *PutEventSelectorsInput) (*PutEventSelectorsOutput, error) {
- req, out := c.PutEventSelectorsRequest(input)
- return out, req.Send()
-}
-
-// PutEventSelectorsWithContext is the same as PutEventSelectors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutEventSelectors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) PutEventSelectorsWithContext(ctx aws.Context, input *PutEventSelectorsInput, opts ...request.Option) (*PutEventSelectorsOutput, error) {
- req, out := c.PutEventSelectorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutInsightSelectors = "PutInsightSelectors"
-
-// PutInsightSelectorsRequest generates a "aws/request.Request" representing the
-// client's request for the PutInsightSelectors operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutInsightSelectors for more information on using the PutInsightSelectors
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutInsightSelectorsRequest method.
-// req, resp := client.PutInsightSelectorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors
-func (c *CloudTrail) PutInsightSelectorsRequest(input *PutInsightSelectorsInput) (req *request.Request, output *PutInsightSelectorsOutput) {
- op := &request.Operation{
- Name: opPutInsightSelectors,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &PutInsightSelectorsInput{}
- }
-
- output = &PutInsightSelectorsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// PutInsightSelectors API operation for AWS CloudTrail.
-//
-// Lets you enable Insights event logging by specifying the Insights selectors
-// that you want to enable on an existing trail. You also use PutInsightSelectors
-// to turn off Insights event logging, by passing an empty list of insight types.
-// In this release, only ApiCallRateInsight is supported as an Insights selector.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation PutInsightSelectors for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * InvalidHomeRegionException
-// This exception is thrown when an operation is called on a trail from a region
-// other than the region in which the trail was created.
-//
-// * InvalidInsightSelectorsException
-// The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
-// or GetInsightSelectors request is not valid, or the specified insight type
-// in the InsightSelectors statement is not a valid insight type.
-//
-// * InsufficientS3BucketPolicyException
-// This exception is thrown when the policy on the S3 bucket is not sufficient.
-//
-// * InsufficientEncryptionPolicyException
-// This exception is thrown when the policy on the S3 bucket or KMS key is not
-// sufficient.
-//
-// * S3BucketDoesNotExistException
-// This exception is thrown when the specified S3 bucket does not exist.
-//
-// * KmsException
-// This exception is thrown when there is an issue with the specified KMS key
-// and the trail can’t be updated.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/PutInsightSelectors
-func (c *CloudTrail) PutInsightSelectors(input *PutInsightSelectorsInput) (*PutInsightSelectorsOutput, error) {
- req, out := c.PutInsightSelectorsRequest(input)
- return out, req.Send()
-}
-
-// PutInsightSelectorsWithContext is the same as PutInsightSelectors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutInsightSelectors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) PutInsightSelectorsWithContext(ctx aws.Context, input *PutInsightSelectorsInput, opts ...request.Option) (*PutInsightSelectorsOutput, error) {
- req, out := c.PutInsightSelectorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opRemoveTags = "RemoveTags"
-
-// RemoveTagsRequest generates a "aws/request.Request" representing the
-// client's request for the RemoveTags operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See RemoveTags for more information on using the RemoveTags
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the RemoveTagsRequest method.
-// req, resp := client.RemoveTagsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
-func (c *CloudTrail) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) {
- op := &request.Operation{
- Name: opRemoveTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RemoveTagsInput{}
- }
-
- output = &RemoveTagsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// RemoveTags API operation for AWS CloudTrail.
-//
-// Removes the specified tags from a trail.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation RemoveTags for usage and error information.
-//
-// Returned Error Types:
-// * ResourceNotFoundException
-// This exception is thrown when the specified resource is not found.
-//
-// * ARNInvalidException
-// This exception is thrown when an operation is called with an invalid trail
-// ARN. The format of a trail ARN is:
-//
-// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
-//
-// * ResourceTypeNotSupportedException
-// This exception is thrown when the specified resource type is not supported
-// by CloudTrail.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * InvalidTagParameterException
-// This exception is thrown when the specified tag key or values are not valid.
-// It can also occur if there are duplicate tags or too many tags on the resource.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/RemoveTags
-func (c *CloudTrail) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) {
- req, out := c.RemoveTagsRequest(input)
- return out, req.Send()
-}
-
-// RemoveTagsWithContext is the same as RemoveTags with the addition of
-// the ability to pass a context and additional request options.
-//
-// See RemoveTags for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) {
- req, out := c.RemoveTagsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opStartLogging = "StartLogging"
-
-// StartLoggingRequest generates a "aws/request.Request" representing the
-// client's request for the StartLogging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See StartLogging for more information on using the StartLogging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the StartLoggingRequest method.
-// req, resp := client.StartLoggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
-func (c *CloudTrail) StartLoggingRequest(input *StartLoggingInput) (req *request.Request, output *StartLoggingOutput) {
- op := &request.Operation{
- Name: opStartLogging,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &StartLoggingInput{}
- }
-
- output = &StartLoggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// StartLogging API operation for AWS CloudTrail.
-//
-// Starts the recording of AWS API calls and log file delivery for a trail.
-// For a trail that is enabled in all regions, this operation must be called
-// from the region in which the trail was created. This operation cannot be
-// called on the shadow trails (replicated trails in other regions) of a trail
-// that is enabled in all regions.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation StartLogging for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * InvalidHomeRegionException
-// This exception is thrown when an operation is called on a trail from a region
-// other than the region in which the trail was created.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * InsufficientDependencyServiceAccessPermissionException
-// This exception is thrown when the IAM user or role that is used to create
-// the organization trail is lacking one or more required permissions for creating
-// an organization trail in a required service. For more information, see Prepare
-// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StartLogging
-func (c *CloudTrail) StartLogging(input *StartLoggingInput) (*StartLoggingOutput, error) {
- req, out := c.StartLoggingRequest(input)
- return out, req.Send()
-}
-
-// StartLoggingWithContext is the same as StartLogging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See StartLogging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) StartLoggingWithContext(ctx aws.Context, input *StartLoggingInput, opts ...request.Option) (*StartLoggingOutput, error) {
- req, out := c.StartLoggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opStopLogging = "StopLogging"
-
-// StopLoggingRequest generates a "aws/request.Request" representing the
-// client's request for the StopLogging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See StopLogging for more information on using the StopLogging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the StopLoggingRequest method.
-// req, resp := client.StopLoggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
-func (c *CloudTrail) StopLoggingRequest(input *StopLoggingInput) (req *request.Request, output *StopLoggingOutput) {
- op := &request.Operation{
- Name: opStopLogging,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &StopLoggingInput{}
- }
-
- output = &StopLoggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// StopLogging API operation for AWS CloudTrail.
-//
-// Suspends the recording of AWS API calls and log file delivery for the specified
-// trail. Under most circumstances, there is no need to use this action. You
-// can update a trail without stopping it first. This action is the only way
-// to stop recording. For a trail enabled in all regions, this operation must
-// be called from the region in which the trail was created, or an InvalidHomeRegionException
-// will occur. This operation cannot be called on the shadow trails (replicated
-// trails in other regions) of a trail enabled in all regions.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation StopLogging for usage and error information.
-//
-// Returned Error Types:
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * InvalidHomeRegionException
-// This exception is thrown when an operation is called on a trail from a region
-// other than the region in which the trail was created.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * InsufficientDependencyServiceAccessPermissionException
-// This exception is thrown when the IAM user or role that is used to create
-// the organization trail is lacking one or more required permissions for creating
-// an organization trail in a required service. For more information, see Prepare
-// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/StopLogging
-func (c *CloudTrail) StopLogging(input *StopLoggingInput) (*StopLoggingOutput, error) {
- req, out := c.StopLoggingRequest(input)
- return out, req.Send()
-}
-
-// StopLoggingWithContext is the same as StopLogging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See StopLogging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) StopLoggingWithContext(ctx aws.Context, input *StopLoggingInput, opts ...request.Option) (*StopLoggingOutput, error) {
- req, out := c.StopLoggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateTrail = "UpdateTrail"
-
-// UpdateTrailRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateTrail operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateTrail for more information on using the UpdateTrail
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateTrailRequest method.
-// req, resp := client.UpdateTrailRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
-func (c *CloudTrail) UpdateTrailRequest(input *UpdateTrailInput) (req *request.Request, output *UpdateTrailOutput) {
- op := &request.Operation{
- Name: opUpdateTrail,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateTrailInput{}
- }
-
- output = &UpdateTrailOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UpdateTrail API operation for AWS CloudTrail.
-//
-// Updates the settings that specify delivery of log files. Changes to a trail
-// do not require stopping the CloudTrail service. Use this action to designate
-// an existing bucket for log delivery. If the existing bucket has previously
-// been a target for CloudTrail log files, an IAM policy exists for the bucket.
-// UpdateTrail must be called from the region in which the trail was created;
-// otherwise, an InvalidHomeRegionException is thrown.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS CloudTrail's
-// API operation UpdateTrail for usage and error information.
-//
-// Returned Error Types:
-// * S3BucketDoesNotExistException
-// This exception is thrown when the specified S3 bucket does not exist.
-//
-// * InsufficientS3BucketPolicyException
-// This exception is thrown when the policy on the S3 bucket is not sufficient.
-//
-// * InsufficientSnsTopicPolicyException
-// This exception is thrown when the policy on the SNS topic is not sufficient.
-//
-// * InsufficientEncryptionPolicyException
-// This exception is thrown when the policy on the S3 bucket or KMS key is not
-// sufficient.
-//
-// * TrailNotFoundException
-// This exception is thrown when the trail with the given name is not found.
-//
-// * InvalidS3BucketNameException
-// This exception is thrown when the provided S3 bucket name is not valid.
-//
-// * InvalidS3PrefixException
-// This exception is thrown when the provided S3 prefix is not valid.
-//
-// * InvalidSnsTopicNameException
-// This exception is thrown when the provided SNS topic name is not valid.
-//
-// * InvalidKmsKeyIdException
-// This exception is thrown when the KMS key ARN is invalid.
-//
-// * InvalidTrailNameException
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-//
-// * TrailNotProvidedException
-// This exception is no longer in use.
-//
-// * InvalidEventSelectorsException
-// This exception is thrown when the PutEventSelectors operation is called with
-// a number of event selectors, advanced event selectors, or data resources
-// that is not valid. The combination of event selectors or advanced event selectors
-// and data resources is not valid. A trail can have up to 5 event selectors.
-// If a trail uses advanced event selectors, a maximum of 500 total values for
-// all conditions in all advanced event selectors is allowed. A trail is limited
-// to 250 data resources. These data resources can be distributed across event
-// selectors, but the overall total cannot exceed 250.
-//
-// You can:
-//
-// * Specify a valid number of event selectors (1 to 5) for a trail.
-//
-// * Specify a valid number of data resources (1 to 250) for an event selector.
-// The limit of number of resources on an individual event selector is configurable
-// up to 250. However, this upper limit is allowed only if the total number
-// of data resources does not exceed 250 across all event selectors for a
-// trail.
-//
-// * Specify up to 500 values for all conditions in all advanced event selectors
-// for a trail.
-//
-// * Specify a valid value for a parameter. For example, specifying the ReadWriteType
-// parameter with a value of read-only is invalid.
-//
-// * InvalidParameterCombinationException
-// This exception is thrown when the combination of parameters provided is not
-// valid.
-//
-// * InvalidHomeRegionException
-// This exception is thrown when an operation is called on a trail from a region
-// other than the region in which the trail was created.
-//
-// * KmsKeyNotFoundException
-// This exception is thrown when the AWS KMS key does not exist, when the S3
-// bucket and the AWS KMS key are not in the same region, or when the AWS KMS
-// key associated with the SNS topic either does not exist or is not in the
-// same region.
-//
-// * KmsKeyDisabledException
-// This exception is no longer in use.
-//
-// * KmsException
-// This exception is thrown when there is an issue with the specified KMS key
-// and the trail can’t be updated.
-//
-// * InvalidCloudWatchLogsLogGroupArnException
-// This exception is thrown when the provided CloudWatch log group is not valid.
-//
-// * InvalidCloudWatchLogsRoleArnException
-// This exception is thrown when the provided role is not valid.
-//
-// * CloudWatchLogsDeliveryUnavailableException
-// Cannot set a CloudWatch Logs delivery for this region.
-//
-// * UnsupportedOperationException
-// This exception is thrown when the requested operation is not supported.
-//
-// * OperationNotPermittedException
-// This exception is thrown when the requested operation is not permitted.
-//
-// * AccessNotEnabledException
-// This exception is thrown when trusted access has not been enabled between
-// AWS CloudTrail and AWS Organizations. For more information, see Enabling
-// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
-// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * InsufficientDependencyServiceAccessPermissionException
-// This exception is thrown when the IAM user or role that is used to create
-// the organization trail is lacking one or more required permissions for creating
-// an organization trail in a required service. For more information, see Prepare
-// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * OrganizationsNotInUseException
-// This exception is thrown when the request is made from an AWS account that
-// is not a member of an organization. To make this request, sign in using the
-// credentials of an account that belongs to an organization.
-//
-// * NotOrganizationMasterAccountException
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * OrganizationNotInAllFeaturesModeException
-// This exception is thrown when AWS Organizations is not configured to support
-// all features. All features must be enabled in AWS Organization to support
-// creating an organization trail. For more information, see Prepare For Creating
-// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-//
-// * CloudTrailInvalidClientTokenIdException
-// This exception is thrown when a call results in the InvalidClientTokenId
-// error code. This can occur when you are creating or updating a trail to send
-// notifications to an Amazon SNS topic that is in a suspended AWS account.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/UpdateTrail
-func (c *CloudTrail) UpdateTrail(input *UpdateTrailInput) (*UpdateTrailOutput, error) {
- req, out := c.UpdateTrailRequest(input)
- return out, req.Send()
-}
-
-// UpdateTrailWithContext is the same as UpdateTrail with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateTrail for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *CloudTrail) UpdateTrailWithContext(ctx aws.Context, input *UpdateTrailInput, opts ...request.Option) (*UpdateTrailOutput, error) {
- req, out := c.UpdateTrailRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// This exception is thrown when an operation is called with an invalid trail
-// ARN. The format of a trail ARN is:
-//
-// arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
-type ARNInvalidException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s ARNInvalidException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ARNInvalidException) GoString() string {
- return s.String()
-}
-
-func newErrorARNInvalidException(v protocol.ResponseMetadata) error {
- return &ARNInvalidException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ARNInvalidException) Code() string {
- return "CloudTrailARNInvalidException"
-}
-
-// Message returns the exception's message.
-func (s *ARNInvalidException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ARNInvalidException) OrigErr() error {
- return nil
-}
-
-func (s *ARNInvalidException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ARNInvalidException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ARNInvalidException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when trusted access has not been enabled between
-// AWS CloudTrail and AWS Organizations. For more information, see Enabling
-// Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
-// and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-type AccessNotEnabledException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s AccessNotEnabledException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccessNotEnabledException) GoString() string {
- return s.String()
-}
-
-func newErrorAccessNotEnabledException(v protocol.ResponseMetadata) error {
- return &AccessNotEnabledException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AccessNotEnabledException) Code() string {
- return "CloudTrailAccessNotEnabledException"
-}
-
-// Message returns the exception's message.
-func (s *AccessNotEnabledException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AccessNotEnabledException) OrigErr() error {
- return nil
-}
-
-func (s *AccessNotEnabledException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AccessNotEnabledException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AccessNotEnabledException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Specifies the tags to add to a trail.
-type AddTagsInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the ARN of the trail to which one or more tags will be added. The
- // format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // ResourceId is a required field
- ResourceId *string `type:"string" required:"true"`
-
- // Contains a list of CloudTrail tags, up to a limit of 50
- TagsList []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s AddTagsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AddTagsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AddTagsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"}
- if s.ResourceId == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceId"))
- }
- if s.TagsList != nil {
- for i, v := range s.TagsList {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceId sets the ResourceId field's value.
-func (s *AddTagsInput) SetResourceId(v string) *AddTagsInput {
- s.ResourceId = &v
- return s
-}
-
-// SetTagsList sets the TagsList field's value.
-func (s *AddTagsInput) SetTagsList(v []*Tag) *AddTagsInput {
- s.TagsList = v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type AddTagsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s AddTagsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AddTagsOutput) GoString() string {
- return s.String()
-}
-
-// Advanced event selectors let you create fine-grained selectors for the following
-// AWS CloudTrail event record fields. They help you control costs by logging
-// only those events that are important to you. For more information about advanced
-// event selectors, see Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
-// in the AWS CloudTrail User Guide.
-//
-// * readOnly
-//
-// * eventSource
-//
-// * eventName
-//
-// * eventCategory
-//
-// * resources.type
-//
-// * resources.ARN
-//
-// You cannot apply both event selectors and advanced event selectors to a trail.
-type AdvancedEventSelector struct {
- _ struct{} `type:"structure"`
-
- // Contains all selector statements in an advanced event selector.
- //
- // FieldSelectors is a required field
- FieldSelectors []*AdvancedFieldSelector `min:"1" type:"list" required:"true"`
-
- // An optional, descriptive name for an advanced event selector, such as "Log
- // data events for only two S3 buckets".
- Name *string `type:"string"`
-}
-
-// String returns the string representation
-func (s AdvancedEventSelector) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AdvancedEventSelector) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AdvancedEventSelector) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AdvancedEventSelector"}
- if s.FieldSelectors == nil {
- invalidParams.Add(request.NewErrParamRequired("FieldSelectors"))
- }
- if s.FieldSelectors != nil && len(s.FieldSelectors) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("FieldSelectors", 1))
- }
- if s.FieldSelectors != nil {
- for i, v := range s.FieldSelectors {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "FieldSelectors", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFieldSelectors sets the FieldSelectors field's value.
-func (s *AdvancedEventSelector) SetFieldSelectors(v []*AdvancedFieldSelector) *AdvancedEventSelector {
- s.FieldSelectors = v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *AdvancedEventSelector) SetName(v string) *AdvancedEventSelector {
- s.Name = &v
- return s
-}
-
-// A single selector statement in an advanced event selector.
-type AdvancedFieldSelector struct {
- _ struct{} `type:"structure"`
-
- // An operator that includes events that match the last few characters of the
- // event record field specified as the value of Field.
- EndsWith []*string `min:"1" type:"list"`
-
- // An operator that includes events that match the exact value of the event
- // record field specified as the value of Field. This is the only valid operator
- // that you can use with the readOnly, eventCategory, and resources.type fields.
- Equals []*string `min:"1" type:"list"`
-
- // A field in an event record on which to filter events to be logged. Supported
- // fields include readOnly, eventCategory, eventSource (for management events),
- // eventName, resources.type, and resources.ARN.
- //
- // * readOnly - Optional. Can be set to Equals a value of true or false.
- // A value of false logs both read and write events.
- //
- // * eventSource - For filtering management events only. This can be set
- // only to NotEquals kms.amazonaws.com.
- //
- // * eventName - Can use any operator. You can use it to filter in or filter
- // out any data event logged to CloudTrail, such as PutBucket. You can have
- // multiple values for this field, separated by commas.
- //
- // * eventCategory - This is required. It must be set to Equals, and the
- // value must be Management or Data.
- //
- // * resources.type - This field is required. resources.type can only use
- // the Equals operator, and the value can be one of the following: AWS::S3::Object,
- // AWS::Lambda::Function, AWS::DynamoDB::Table, AWS::S3Outposts::Object,
- // AWS::ManagedBlockchain::Node, or AWS::S3ObjectLambda::AccessPoint. You
- // can have only one resources.type field per selector. To log data events
- // on more than one resource type, add another selector.
- //
- // * resources.ARN - You can use any operator with resources.ARN, but if
- // you use Equals or NotEquals, the value must exactly match the ARN of a
- // valid resource of the type you've specified in the template as the value
- // of resources.type. For example, if resources.type equals AWS::S3::Object,
- // the ARN must be in one of the following formats. To log all data events
- // for all objects in a specific S3 bucket, use the StartsWith operator,
- // and include only the bucket ARN as the matching value. The trailing slash
- // is intentional; do not exclude it. arn:partition:s3:::bucket_name/ arn:partition:s3:::bucket_name/object_or_file_name/
- // When resources.type equals AWS::Lambda::Function, and the operator is
- // set to Equals or NotEquals, the ARN must be in the following format: arn:partition:lambda:region:account_ID:function:function_name
- // When resources.type equals AWS::DynamoDB::Table, and the operator is set
- // to Equals or NotEquals, the ARN must be in the following format: arn:partition:dynamodb:region:account_ID:table:table_name
- // When resources.type equals AWS::S3Outposts::Object, and the operator is
- // set to Equals or NotEquals, the ARN must be in the following format: arn:partition:s3-outposts:region:>account_ID:object_path
- // When resources.type equals AWS::ManagedBlockchain::Node, and the operator
- // is set to Equals or NotEquals, the ARN must be in the following format:
- // arn:partition:managedblockchain:region:account_ID:nodes/node_ID When resources.type
- // equals AWS::S3ObjectLambda::AccessPoint, and the operator is set to Equals
- // or NotEquals, the ARN must be in the following format: arn:partition:s3-object-lambda:region:account_ID:accesspoint/access_point_name
- //
- // Field is a required field
- Field *string `min:"1" type:"string" required:"true"`
-
- // An operator that excludes events that match the last few characters of the
- // event record field specified as the value of Field.
- NotEndsWith []*string `min:"1" type:"list"`
-
- // An operator that excludes events that match the exact value of the event
- // record field specified as the value of Field.
- NotEquals []*string `min:"1" type:"list"`
-
- // An operator that excludes events that match the first few characters of the
- // event record field specified as the value of Field.
- NotStartsWith []*string `min:"1" type:"list"`
-
- // An operator that includes events that match the first few characters of the
- // event record field specified as the value of Field.
- StartsWith []*string `min:"1" type:"list"`
-}
-
-// String returns the string representation
-func (s AdvancedFieldSelector) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AdvancedFieldSelector) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AdvancedFieldSelector) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AdvancedFieldSelector"}
- if s.EndsWith != nil && len(s.EndsWith) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("EndsWith", 1))
- }
- if s.Equals != nil && len(s.Equals) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Equals", 1))
- }
- if s.Field == nil {
- invalidParams.Add(request.NewErrParamRequired("Field"))
- }
- if s.Field != nil && len(*s.Field) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Field", 1))
- }
- if s.NotEndsWith != nil && len(s.NotEndsWith) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NotEndsWith", 1))
- }
- if s.NotEquals != nil && len(s.NotEquals) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NotEquals", 1))
- }
- if s.NotStartsWith != nil && len(s.NotStartsWith) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NotStartsWith", 1))
- }
- if s.StartsWith != nil && len(s.StartsWith) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("StartsWith", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEndsWith sets the EndsWith field's value.
-func (s *AdvancedFieldSelector) SetEndsWith(v []*string) *AdvancedFieldSelector {
- s.EndsWith = v
- return s
-}
-
-// SetEquals sets the Equals field's value.
-func (s *AdvancedFieldSelector) SetEquals(v []*string) *AdvancedFieldSelector {
- s.Equals = v
- return s
-}
-
-// SetField sets the Field field's value.
-func (s *AdvancedFieldSelector) SetField(v string) *AdvancedFieldSelector {
- s.Field = &v
- return s
-}
-
-// SetNotEndsWith sets the NotEndsWith field's value.
-func (s *AdvancedFieldSelector) SetNotEndsWith(v []*string) *AdvancedFieldSelector {
- s.NotEndsWith = v
- return s
-}
-
-// SetNotEquals sets the NotEquals field's value.
-func (s *AdvancedFieldSelector) SetNotEquals(v []*string) *AdvancedFieldSelector {
- s.NotEquals = v
- return s
-}
-
-// SetNotStartsWith sets the NotStartsWith field's value.
-func (s *AdvancedFieldSelector) SetNotStartsWith(v []*string) *AdvancedFieldSelector {
- s.NotStartsWith = v
- return s
-}
-
-// SetStartsWith sets the StartsWith field's value.
-func (s *AdvancedFieldSelector) SetStartsWith(v []*string) *AdvancedFieldSelector {
- s.StartsWith = v
- return s
-}
-
-// This exception is thrown when a call results in the InvalidClientTokenId
-// error code. This can occur when you are creating or updating a trail to send
-// notifications to an Amazon SNS topic that is in a suspended AWS account.
-type CloudTrailInvalidClientTokenIdException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s CloudTrailInvalidClientTokenIdException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CloudTrailInvalidClientTokenIdException) GoString() string {
- return s.String()
-}
-
-func newErrorCloudTrailInvalidClientTokenIdException(v protocol.ResponseMetadata) error {
- return &CloudTrailInvalidClientTokenIdException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CloudTrailInvalidClientTokenIdException) Code() string {
- return "CloudTrailInvalidClientTokenIdException"
-}
-
-// Message returns the exception's message.
-func (s *CloudTrailInvalidClientTokenIdException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CloudTrailInvalidClientTokenIdException) OrigErr() error {
- return nil
-}
-
-func (s *CloudTrailInvalidClientTokenIdException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CloudTrailInvalidClientTokenIdException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CloudTrailInvalidClientTokenIdException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Cannot set a CloudWatch Logs delivery for this region.
-type CloudWatchLogsDeliveryUnavailableException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s CloudWatchLogsDeliveryUnavailableException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CloudWatchLogsDeliveryUnavailableException) GoString() string {
- return s.String()
-}
-
-func newErrorCloudWatchLogsDeliveryUnavailableException(v protocol.ResponseMetadata) error {
- return &CloudWatchLogsDeliveryUnavailableException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CloudWatchLogsDeliveryUnavailableException) Code() string {
- return "CloudWatchLogsDeliveryUnavailableException"
-}
-
-// Message returns the exception's message.
-func (s *CloudWatchLogsDeliveryUnavailableException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CloudWatchLogsDeliveryUnavailableException) OrigErr() error {
- return nil
-}
-
-func (s *CloudWatchLogsDeliveryUnavailableException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CloudWatchLogsDeliveryUnavailableException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CloudWatchLogsDeliveryUnavailableException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the specified resource is not ready for an
-// operation. This can occur when you try to run an operation on a trail before
-// CloudTrail has time to fully load the trail. If this exception occurs, wait
-// a few minutes, and then try the operation again.
-type ConflictException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s ConflictException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ConflictException) GoString() string {
- return s.String()
-}
-
-func newErrorConflictException(v protocol.ResponseMetadata) error {
- return &ConflictException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ConflictException) Code() string {
- return "ConflictException"
-}
-
-// Message returns the exception's message.
-func (s *ConflictException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ConflictException) OrigErr() error {
- return nil
-}
-
-func (s *ConflictException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ConflictException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ConflictException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Specifies the settings for each trail.
-type CreateTrailInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies a log group name using an Amazon Resource Name (ARN), a unique
- // identifier that represents the log group to which CloudTrail logs will be
- // delivered. Not required unless you specify CloudWatchLogsRoleArn.
- CloudWatchLogsLogGroupArn *string `type:"string"`
-
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
-
- // Specifies whether log file integrity validation is enabled. The default is
- // false.
- //
- // When you disable log file integrity validation, the chain of digest files
- // is broken after one hour. CloudTrail will not create digest files for log
- // files that were delivered during a period in which log file integrity validation
- // was disabled. For example, if you enable log file integrity validation at
- // noon on January 1, disable it at noon on January 2, and re-enable it at noon
- // on January 10, digest files will not be created for the log files delivered
- // from noon on January 2 to noon on January 10. The same applies whenever you
- // stop CloudTrail logging or delete a trail.
- EnableLogFileValidation *bool `type:"boolean"`
-
- // Specifies whether the trail is publishing events from global services such
- // as IAM to the log files.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
-
- // Specifies whether the trail is created in the current region or in all regions.
- // The default is false, which creates a trail only in the region where you
- // are signed in. As a best practice, consider creating trails that log events
- // in all regions.
- IsMultiRegionTrail *bool `type:"boolean"`
-
- // Specifies whether the trail is created for all accounts in an organization
- // in AWS Organizations, or only for the current AWS account. The default is
- // false, and cannot be true unless the call is made on behalf of an AWS account
- // that is the master account for an organization in AWS Organizations.
- IsOrganizationTrail *bool `type:"boolean"`
-
- // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
- // The value can be an alias name prefixed by "alias/", a fully specified ARN
- // to an alias, a fully specified ARN to a key, or a globally unique identifier.
- //
- // Examples:
- //
- // * alias/MyAliasName
- //
- // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
- //
- // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- //
- // * 12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
-
- // Specifies the name of the trail. The name must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
-
- // Specifies the name of the Amazon S3 bucket designated for publishing log
- // files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
- //
- // S3BucketName is a required field
- S3BucketName *string `type:"string" required:"true"`
-
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
- // The maximum length is 200 characters.
- S3KeyPrefix *string `type:"string"`
-
- // Specifies the name of the Amazon SNS topic defined for notification of log
- // file delivery. The maximum length is 256 characters.
- SnsTopicName *string `type:"string"`
-
- // A list of tags.
- TagsList []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s CreateTrailInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateTrailInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateTrailInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateTrailInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.S3BucketName == nil {
- invalidParams.Add(request.NewErrParamRequired("S3BucketName"))
- }
- if s.TagsList != nil {
- for i, v := range s.TagsList {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
-func (s *CreateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailInput {
- s.CloudWatchLogsLogGroupArn = &v
- return s
-}
-
-// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
-func (s *CreateTrailInput) SetCloudWatchLogsRoleArn(v string) *CreateTrailInput {
- s.CloudWatchLogsRoleArn = &v
- return s
-}
-
-// SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
-func (s *CreateTrailInput) SetEnableLogFileValidation(v bool) *CreateTrailInput {
- s.EnableLogFileValidation = &v
- return s
-}
-
-// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
-func (s *CreateTrailInput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailInput {
- s.IncludeGlobalServiceEvents = &v
- return s
-}
-
-// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
-func (s *CreateTrailInput) SetIsMultiRegionTrail(v bool) *CreateTrailInput {
- s.IsMultiRegionTrail = &v
- return s
-}
-
-// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
-func (s *CreateTrailInput) SetIsOrganizationTrail(v bool) *CreateTrailInput {
- s.IsOrganizationTrail = &v
- return s
-}
-
-// SetKmsKeyId sets the KmsKeyId field's value.
-func (s *CreateTrailInput) SetKmsKeyId(v string) *CreateTrailInput {
- s.KmsKeyId = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *CreateTrailInput) SetName(v string) *CreateTrailInput {
- s.Name = &v
- return s
-}
-
-// SetS3BucketName sets the S3BucketName field's value.
-func (s *CreateTrailInput) SetS3BucketName(v string) *CreateTrailInput {
- s.S3BucketName = &v
- return s
-}
-
-// SetS3KeyPrefix sets the S3KeyPrefix field's value.
-func (s *CreateTrailInput) SetS3KeyPrefix(v string) *CreateTrailInput {
- s.S3KeyPrefix = &v
- return s
-}
-
-// SetSnsTopicName sets the SnsTopicName field's value.
-func (s *CreateTrailInput) SetSnsTopicName(v string) *CreateTrailInput {
- s.SnsTopicName = &v
- return s
-}
-
-// SetTagsList sets the TagsList field's value.
-func (s *CreateTrailInput) SetTagsList(v []*Tag) *CreateTrailInput {
- s.TagsList = v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type CreateTrailOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
- // logs will be delivered.
- CloudWatchLogsLogGroupArn *string `type:"string"`
-
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
-
- // Specifies whether the trail is publishing events from global services such
- // as IAM to the log files.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
-
- // Specifies whether the trail exists in one region or in all regions.
- IsMultiRegionTrail *bool `type:"boolean"`
-
- // Specifies whether the trail is an organization trail.
- IsOrganizationTrail *bool `type:"boolean"`
-
- // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
- // The value is a fully specified ARN to a KMS key in the format:
- //
- // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
-
- // Specifies whether log file integrity validation is enabled.
- LogFileValidationEnabled *bool `type:"boolean"`
-
- // Specifies the name of the trail.
- Name *string `type:"string"`
-
- // Specifies the name of the Amazon S3 bucket designated for publishing log
- // files.
- S3BucketName *string `type:"string"`
-
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
- S3KeyPrefix *string `type:"string"`
-
- // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
- // when log files are delivered. The format of a topic ARN is:
- //
- // arn:aws:sns:us-east-2:123456789012:MyTopic
- SnsTopicARN *string `type:"string"`
-
- // This field is no longer in use. Use SnsTopicARN.
- //
- // Deprecated: SnsTopicName has been deprecated
- SnsTopicName *string `deprecated:"true" type:"string"`
-
- // Specifies the ARN of the trail that was created. The format of a trail ARN
- // is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- TrailARN *string `type:"string"`
-}
-
-// String returns the string representation
-func (s CreateTrailOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateTrailOutput) GoString() string {
- return s.String()
-}
-
-// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
-func (s *CreateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *CreateTrailOutput {
- s.CloudWatchLogsLogGroupArn = &v
- return s
-}
-
-// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
-func (s *CreateTrailOutput) SetCloudWatchLogsRoleArn(v string) *CreateTrailOutput {
- s.CloudWatchLogsRoleArn = &v
- return s
-}
-
-// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
-func (s *CreateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *CreateTrailOutput {
- s.IncludeGlobalServiceEvents = &v
- return s
-}
-
-// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
-func (s *CreateTrailOutput) SetIsMultiRegionTrail(v bool) *CreateTrailOutput {
- s.IsMultiRegionTrail = &v
- return s
-}
-
-// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
-func (s *CreateTrailOutput) SetIsOrganizationTrail(v bool) *CreateTrailOutput {
- s.IsOrganizationTrail = &v
- return s
-}
-
-// SetKmsKeyId sets the KmsKeyId field's value.
-func (s *CreateTrailOutput) SetKmsKeyId(v string) *CreateTrailOutput {
- s.KmsKeyId = &v
- return s
-}
-
-// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
-func (s *CreateTrailOutput) SetLogFileValidationEnabled(v bool) *CreateTrailOutput {
- s.LogFileValidationEnabled = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *CreateTrailOutput) SetName(v string) *CreateTrailOutput {
- s.Name = &v
- return s
-}
-
-// SetS3BucketName sets the S3BucketName field's value.
-func (s *CreateTrailOutput) SetS3BucketName(v string) *CreateTrailOutput {
- s.S3BucketName = &v
- return s
-}
-
-// SetS3KeyPrefix sets the S3KeyPrefix field's value.
-func (s *CreateTrailOutput) SetS3KeyPrefix(v string) *CreateTrailOutput {
- s.S3KeyPrefix = &v
- return s
-}
-
-// SetSnsTopicARN sets the SnsTopicARN field's value.
-func (s *CreateTrailOutput) SetSnsTopicARN(v string) *CreateTrailOutput {
- s.SnsTopicARN = &v
- return s
-}
-
-// SetSnsTopicName sets the SnsTopicName field's value.
-func (s *CreateTrailOutput) SetSnsTopicName(v string) *CreateTrailOutput {
- s.SnsTopicName = &v
- return s
-}
-
-// SetTrailARN sets the TrailARN field's value.
-func (s *CreateTrailOutput) SetTrailARN(v string) *CreateTrailOutput {
- s.TrailARN = &v
- return s
-}
-
-// The Amazon S3 buckets, AWS Lambda functions, or Amazon DynamoDB tables that
-// you specify in your event selectors for your trail to log data events. Data
-// events provide information about the resource operations performed on or
-// within a resource itself. These are also known as data plane operations.
-// You can specify up to 250 data resources for a trail.
-//
-// The total number of allowed data resources is 250. This number can be distributed
-// between 1 and 5 event selectors, but the total cannot exceed 250 across all
-// selectors.
-//
-// If you are using advanced event selectors, the maximum total number of values
-// for all conditions, across all advanced event selectors for the trail, is
-// 500.
-//
-// The following example demonstrates how logging works when you configure logging
-// of all data events for an S3 bucket named bucket-1. In this example, the
-// CloudTrail user specified an empty prefix, and the option to log both Read
-// and Write data events.
-//
-// A user uploads an image file to bucket-1.
-//
-// The PutObject API operation is an Amazon S3 object-level API. It is recorded
-// as a data event in CloudTrail. Because the CloudTrail user specified an S3
-// bucket with an empty prefix, events that occur on any object in that bucket
-// are logged. The trail processes and logs the event.
-//
-// A user uploads an object to an Amazon S3 bucket named arn:aws:s3:::bucket-2.
-//
-// The PutObject API operation occurred for an object in an S3 bucket that the
-// CloudTrail user didn't specify for the trail. The trail doesn’t log the
-// event.
-//
-// The following example demonstrates how logging works when you configure logging
-// of AWS Lambda data events for a Lambda function named MyLambdaFunction, but
-// not for all AWS Lambda functions.
-//
-// A user runs a script that includes a call to the MyLambdaFunction function
-// and the MyOtherLambdaFunction function.
-//
-// The Invoke API operation on MyLambdaFunction is an AWS Lambda API. It is
-// recorded as a data event in CloudTrail. Because the CloudTrail user specified
-// logging data events for MyLambdaFunction, any invocations of that function
-// are logged. The trail processes and logs the event.
-//
-// The Invoke API operation on MyOtherLambdaFunction is an AWS Lambda API. Because
-// the CloudTrail user did not specify logging data events for all Lambda functions,
-// the Invoke operation for MyOtherLambdaFunction does not match the function
-// specified for the trail. The trail doesn’t log the event.
-type DataResource struct {
- _ struct{} `type:"structure"`
-
- // The resource type in which you want to log data events. You can specify AWS::S3::Object,
- // AWS::Lambda::Function, or AWS::DynamoDB::Table resources.
- //
- // The AWS::S3Outposts::Object, AWS::ManagedBlockchain::Node, and AWS::S3ObjectLambda::AccessPoint
- // resource types are not valid in basic event selectors. To log data events
- // on these resource types, use advanced event selectors.
- Type *string `type:"string"`
-
- // An array of Amazon Resource Name (ARN) strings or partial ARN strings for
- // the specified objects.
- //
- // * To log data events for all objects in all S3 buckets in your AWS account,
- // specify the prefix as arn:aws:s3:::. This will also enable logging of
- // data event activity performed by any user or role in your AWS account,
- // even if that activity is performed on a bucket that belongs to another
- // AWS account.
- //
- // * To log data events for all objects in an S3 bucket, specify the bucket
- // and an empty object prefix such as arn:aws:s3:::bucket-1/. The trail logs
- // data events for all objects in this S3 bucket.
- //
- // * To log data events for specific objects, specify the S3 bucket and object
- // prefix such as arn:aws:s3:::bucket-1/example-images. The trail logs data
- // events for objects in this S3 bucket that match the prefix.
- //
- // * To log data events for all Lambda functions in your AWS account, specify
- // the prefix as arn:aws:lambda. This will also enable logging of Invoke
- // activity performed by any user or role in your AWS account, even if that
- // activity is performed on a function that belongs to another AWS account.
- //
- // * To log data events for a specific Lambda function, specify the function
- // ARN. Lambda function ARNs are exact. For example, if you specify a function
- // ARN arn:aws:lambda:us-west-2:111111111111:function:helloworld, data events
- // will only be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld.
- // They will not be logged for arn:aws:lambda:us-west-2:111111111111:function:helloworld2.
- //
- // * To log data events for all DynamoDB tables in your AWS account, specify
- // the prefix as arn:aws:dynamodb.
- Values []*string `type:"list"`
-}
-
-// String returns the string representation
-func (s DataResource) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DataResource) GoString() string {
- return s.String()
-}
-
-// SetType sets the Type field's value.
-func (s *DataResource) SetType(v string) *DataResource {
- s.Type = &v
- return s
-}
-
-// SetValues sets the Values field's value.
-func (s *DataResource) SetValues(v []*string) *DataResource {
- s.Values = v
- return s
-}
-
-// The request that specifies the name of a trail to delete.
-type DeleteTrailInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the name or the CloudTrail ARN of the trail to be deleted. The
- // format of a trail ARN is: arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeleteTrailInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteTrailInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteTrailInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteTrailInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *DeleteTrailInput) SetName(v string) *DeleteTrailInput {
- s.Name = &v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type DeleteTrailOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteTrailOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteTrailOutput) GoString() string {
- return s.String()
-}
-
-// Returns information about the trail.
-type DescribeTrailsInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether to include shadow trails in the response. A shadow trail
- // is the replication in a region of a trail that was created in a different
- // region, or in the case of an organization trail, the replication of an organization
- // trail in member accounts. If you do not include shadow trails, organization
- // trails in a member account and region replication trails will not be returned.
- // The default is true.
- IncludeShadowTrails *bool `locationName:"includeShadowTrails" type:"boolean"`
-
- // Specifies a list of trail names, trail ARNs, or both, of the trails to describe.
- // The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // If an empty list is specified, information for the trail in the current region
- // is returned.
- //
- // * If an empty list is specified and IncludeShadowTrails is false, then
- // information for all trails in the current region is returned.
- //
- // * If an empty list is specified and IncludeShadowTrails is null or true,
- // then information for all trails in the current region and any associated
- // shadow trails in other regions is returned.
- //
- // If one or more trail names are specified, information is returned only if
- // the names match the names of trails belonging only to the current region.
- // To return information about a trail in another region, you must specify its
- // trail ARN.
- TrailNameList []*string `locationName:"trailNameList" type:"list"`
-}
-
-// String returns the string representation
-func (s DescribeTrailsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeTrailsInput) GoString() string {
- return s.String()
-}
-
-// SetIncludeShadowTrails sets the IncludeShadowTrails field's value.
-func (s *DescribeTrailsInput) SetIncludeShadowTrails(v bool) *DescribeTrailsInput {
- s.IncludeShadowTrails = &v
- return s
-}
-
-// SetTrailNameList sets the TrailNameList field's value.
-func (s *DescribeTrailsInput) SetTrailNameList(v []*string) *DescribeTrailsInput {
- s.TrailNameList = v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type DescribeTrailsOutput struct {
- _ struct{} `type:"structure"`
-
- // The list of trail objects. Trail objects with string values are only returned
- // if values for the objects exist in a trail's configuration. For example,
- // SNSTopicName and SNSTopicARN are only returned in results if a trail is configured
- // to send SNS notifications. Similarly, KMSKeyId only appears in results if
- // a trail's log files are encrypted with AWS KMS-managed keys.
- TrailList []*Trail `locationName:"trailList" type:"list"`
-}
-
-// String returns the string representation
-func (s DescribeTrailsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeTrailsOutput) GoString() string {
- return s.String()
-}
-
-// SetTrailList sets the TrailList field's value.
-func (s *DescribeTrailsOutput) SetTrailList(v []*Trail) *DescribeTrailsOutput {
- s.TrailList = v
- return s
-}
-
-// Contains information about an event that was returned by a lookup request.
-// The result includes a representation of a CloudTrail event.
-type Event struct {
- _ struct{} `type:"structure"`
-
- // The AWS access key ID that was used to sign the request. If the request was
- // made with temporary security credentials, this is the access key ID of the
- // temporary credentials.
- AccessKeyId *string `type:"string"`
-
- // A JSON string that contains a representation of the event returned.
- CloudTrailEvent *string `type:"string"`
-
- // The CloudTrail ID of the event returned.
- EventId *string `type:"string"`
-
- // The name of the event returned.
- EventName *string `type:"string"`
-
- // The AWS service that the request was made to.
- EventSource *string `type:"string"`
-
- // The date and time of the event returned.
- EventTime *time.Time `type:"timestamp"`
-
- // Information about whether the event is a write event or a read event.
- ReadOnly *string `type:"string"`
-
- // A list of resources referenced by the event returned.
- Resources []*Resource `type:"list"`
-
- // A user name or role name of the requester that called the API in the event
- // returned.
- Username *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Event) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Event) GoString() string {
- return s.String()
-}
-
-// SetAccessKeyId sets the AccessKeyId field's value.
-func (s *Event) SetAccessKeyId(v string) *Event {
- s.AccessKeyId = &v
- return s
-}
-
-// SetCloudTrailEvent sets the CloudTrailEvent field's value.
-func (s *Event) SetCloudTrailEvent(v string) *Event {
- s.CloudTrailEvent = &v
- return s
-}
-
-// SetEventId sets the EventId field's value.
-func (s *Event) SetEventId(v string) *Event {
- s.EventId = &v
- return s
-}
-
-// SetEventName sets the EventName field's value.
-func (s *Event) SetEventName(v string) *Event {
- s.EventName = &v
- return s
-}
-
-// SetEventSource sets the EventSource field's value.
-func (s *Event) SetEventSource(v string) *Event {
- s.EventSource = &v
- return s
-}
-
-// SetEventTime sets the EventTime field's value.
-func (s *Event) SetEventTime(v time.Time) *Event {
- s.EventTime = &v
- return s
-}
-
-// SetReadOnly sets the ReadOnly field's value.
-func (s *Event) SetReadOnly(v string) *Event {
- s.ReadOnly = &v
- return s
-}
-
-// SetResources sets the Resources field's value.
-func (s *Event) SetResources(v []*Resource) *Event {
- s.Resources = v
- return s
-}
-
-// SetUsername sets the Username field's value.
-func (s *Event) SetUsername(v string) *Event {
- s.Username = &v
- return s
-}
-
-// Use event selectors to further specify the management and data event settings
-// for your trail. By default, trails created without specific event selectors
-// will be configured to log all read and write management events, and no data
-// events. When an event occurs in your account, CloudTrail evaluates the event
-// selector for all trails. For each trail, if the event matches any event selector,
-// the trail processes and logs the event. If the event doesn't match any event
-// selector, the trail doesn't log the event.
-//
-// You can configure up to five event selectors for a trail.
-//
-// You cannot apply both event selectors and advanced event selectors to a trail.
-type EventSelector struct {
- _ struct{} `type:"structure"`
-
- // CloudTrail supports data event logging for Amazon S3 objects and AWS Lambda
- // functions with basic event selectors. You can specify up to 250 resources
- // for an individual event selector, but the total number of data resources
- // cannot exceed 250 across all event selectors in a trail. This limit does
- // not apply if you configure resource logging for all data events.
- //
- // For more information, see Data Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-data-events)
- // and Limits in AWS CloudTrail (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/WhatIsCloudTrail-Limits.html)
- // in the AWS CloudTrail User Guide.
- DataResources []*DataResource `type:"list"`
-
- // An optional list of service event sources from which you do not want management
- // events to be logged on your trail. In this release, the list can be empty
- // (disables the filter), or it can filter out AWS Key Management Service events
- // by containing "kms.amazonaws.com". By default, ExcludeManagementEventSources
- // is empty, and AWS KMS events are included in events that are logged to your
- // trail.
- ExcludeManagementEventSources []*string `type:"list"`
-
- // Specify if you want your event selector to include management events for
- // your trail.
- //
- // For more information, see Management Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-management-and-data-events-with-cloudtrail.html#logging-management-events)
- // in the AWS CloudTrail User Guide.
- //
- // By default, the value is true.
- //
- // The first copy of management events is free. You are charged for additional
- // copies of management events that you are logging on any subsequent trail
- // in the same region. For more information about CloudTrail pricing, see AWS
- // CloudTrail Pricing (http://aws.amazon.com/cloudtrail/pricing/).
- IncludeManagementEvents *bool `type:"boolean"`
-
- // Specify if you want your trail to log read-only events, write-only events,
- // or all. For example, the EC2 GetConsoleOutput is a read-only API operation
- // and RunInstances is a write-only API operation.
- //
- // By default, the value is All.
- ReadWriteType *string `type:"string" enum:"ReadWriteType"`
-}
-
-// String returns the string representation
-func (s EventSelector) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EventSelector) GoString() string {
- return s.String()
-}
-
-// SetDataResources sets the DataResources field's value.
-func (s *EventSelector) SetDataResources(v []*DataResource) *EventSelector {
- s.DataResources = v
- return s
-}
-
-// SetExcludeManagementEventSources sets the ExcludeManagementEventSources field's value.
-func (s *EventSelector) SetExcludeManagementEventSources(v []*string) *EventSelector {
- s.ExcludeManagementEventSources = v
- return s
-}
-
-// SetIncludeManagementEvents sets the IncludeManagementEvents field's value.
-func (s *EventSelector) SetIncludeManagementEvents(v bool) *EventSelector {
- s.IncludeManagementEvents = &v
- return s
-}
-
-// SetReadWriteType sets the ReadWriteType field's value.
-func (s *EventSelector) SetReadWriteType(v string) *EventSelector {
- s.ReadWriteType = &v
- return s
-}
-
-type GetEventSelectorsInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the name of the trail or trail ARN. If you specify a trail name,
- // the string must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are not valid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // If you specify a trail ARN, it must be in the format:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // TrailName is a required field
- TrailName *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s GetEventSelectorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetEventSelectorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetEventSelectorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetEventSelectorsInput"}
- if s.TrailName == nil {
- invalidParams.Add(request.NewErrParamRequired("TrailName"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTrailName sets the TrailName field's value.
-func (s *GetEventSelectorsInput) SetTrailName(v string) *GetEventSelectorsInput {
- s.TrailName = &v
- return s
-}
-
-type GetEventSelectorsOutput struct {
- _ struct{} `type:"structure"`
-
- // The advanced event selectors that are configured for the trail.
- AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
-
- // The event selectors that are configured for the trail.
- EventSelectors []*EventSelector `type:"list"`
-
- // The specified trail ARN that has the event selectors.
- TrailARN *string `type:"string"`
-}
-
-// String returns the string representation
-func (s GetEventSelectorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetEventSelectorsOutput) GoString() string {
- return s.String()
-}
-
-// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
-func (s *GetEventSelectorsOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *GetEventSelectorsOutput {
- s.AdvancedEventSelectors = v
- return s
-}
-
-// SetEventSelectors sets the EventSelectors field's value.
-func (s *GetEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *GetEventSelectorsOutput {
- s.EventSelectors = v
- return s
-}
-
-// SetTrailARN sets the TrailARN field's value.
-func (s *GetEventSelectorsOutput) SetTrailARN(v string) *GetEventSelectorsOutput {
- s.TrailARN = &v
- return s
-}
-
-type GetInsightSelectorsInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the name of the trail or trail ARN. If you specify a trail name,
- // the string must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are not valid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // If you specify a trail ARN, it must be in the format:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // TrailName is a required field
- TrailName *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s GetInsightSelectorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetInsightSelectorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetInsightSelectorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetInsightSelectorsInput"}
- if s.TrailName == nil {
- invalidParams.Add(request.NewErrParamRequired("TrailName"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTrailName sets the TrailName field's value.
-func (s *GetInsightSelectorsInput) SetTrailName(v string) *GetInsightSelectorsInput {
- s.TrailName = &v
- return s
-}
-
-type GetInsightSelectorsOutput struct {
- _ struct{} `type:"structure"`
-
- // A JSON string that contains the insight types you want to log on a trail.
- // In this release, only ApiCallRateInsight is supported as an insight type.
- InsightSelectors []*InsightSelector `type:"list"`
-
- // The Amazon Resource Name (ARN) of a trail for which you want to get Insights
- // selectors.
- TrailARN *string `type:"string"`
-}
-
-// String returns the string representation
-func (s GetInsightSelectorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetInsightSelectorsOutput) GoString() string {
- return s.String()
-}
-
-// SetInsightSelectors sets the InsightSelectors field's value.
-func (s *GetInsightSelectorsOutput) SetInsightSelectors(v []*InsightSelector) *GetInsightSelectorsOutput {
- s.InsightSelectors = v
- return s
-}
-
-// SetTrailARN sets the TrailARN field's value.
-func (s *GetInsightSelectorsOutput) SetTrailARN(v string) *GetInsightSelectorsOutput {
- s.TrailARN = &v
- return s
-}
-
-type GetTrailInput struct {
- _ struct{} `type:"structure"`
-
- // The name or the Amazon Resource Name (ARN) of the trail for which you want
- // to retrieve settings information.
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s GetTrailInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetTrailInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetTrailInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetTrailInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *GetTrailInput) SetName(v string) *GetTrailInput {
- s.Name = &v
- return s
-}
-
-type GetTrailOutput struct {
- _ struct{} `type:"structure"`
-
- // The settings for a trail.
- Trail *Trail `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetTrailOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetTrailOutput) GoString() string {
- return s.String()
-}
-
-// SetTrail sets the Trail field's value.
-func (s *GetTrailOutput) SetTrail(v *Trail) *GetTrailOutput {
- s.Trail = v
- return s
-}
-
-// The name of a trail about which you want the current status.
-type GetTrailStatusInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the name or the CloudTrail ARN of the trail for which you are requesting
- // status. To get the status of a shadow trail (a replication of the trail in
- // another region), you must specify its ARN. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s GetTrailStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetTrailStatusInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetTrailStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetTrailStatusInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *GetTrailStatusInput) SetName(v string) *GetTrailStatusInput {
- s.Name = &v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type GetTrailStatusOutput struct {
- _ struct{} `type:"structure"`
-
- // Whether the CloudTrail is currently logging AWS API calls.
- IsLogging *bool `type:"boolean"`
-
- // Displays any CloudWatch Logs error that CloudTrail encountered when attempting
- // to deliver logs to CloudWatch Logs.
- LatestCloudWatchLogsDeliveryError *string `type:"string"`
-
- // Displays the most recent date and time when CloudTrail delivered logs to
- // CloudWatch Logs.
- LatestCloudWatchLogsDeliveryTime *time.Time `type:"timestamp"`
-
- // This field is no longer in use.
- LatestDeliveryAttemptSucceeded *string `type:"string"`
-
- // This field is no longer in use.
- LatestDeliveryAttemptTime *string `type:"string"`
-
- // Displays any Amazon S3 error that CloudTrail encountered when attempting
- // to deliver log files to the designated bucket. For more information see the
- // topic Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
- // in the Amazon S3 API Reference.
- //
- // This error occurs only when there is a problem with the destination S3 bucket
- // and will not occur for timeouts. To resolve the issue, create a new bucket
- // and call UpdateTrail to specify the new bucket, or fix the existing objects
- // so that CloudTrail can again write to the bucket.
- LatestDeliveryError *string `type:"string"`
-
- // Specifies the date and time that CloudTrail last delivered log files to an
- // account's Amazon S3 bucket.
- LatestDeliveryTime *time.Time `type:"timestamp"`
-
- // Displays any Amazon S3 error that CloudTrail encountered when attempting
- // to deliver a digest file to the designated bucket. For more information see
- // the topic Error Responses (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html)
- // in the Amazon S3 API Reference.
- //
- // This error occurs only when there is a problem with the destination S3 bucket
- // and will not occur for timeouts. To resolve the issue, create a new bucket
- // and call UpdateTrail to specify the new bucket, or fix the existing objects
- // so that CloudTrail can again write to the bucket.
- LatestDigestDeliveryError *string `type:"string"`
-
- // Specifies the date and time that CloudTrail last delivered a digest file
- // to an account's Amazon S3 bucket.
- LatestDigestDeliveryTime *time.Time `type:"timestamp"`
-
- // This field is no longer in use.
- LatestNotificationAttemptSucceeded *string `type:"string"`
-
- // This field is no longer in use.
- LatestNotificationAttemptTime *string `type:"string"`
-
- // Displays any Amazon SNS error that CloudTrail encountered when attempting
- // to send a notification. For more information about Amazon SNS errors, see
- // the Amazon SNS Developer Guide (https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
- LatestNotificationError *string `type:"string"`
-
- // Specifies the date and time of the most recent Amazon SNS notification that
- // CloudTrail has written a new log file to an account's Amazon S3 bucket.
- LatestNotificationTime *time.Time `type:"timestamp"`
-
- // Specifies the most recent date and time when CloudTrail started recording
- // API calls for an AWS account.
- StartLoggingTime *time.Time `type:"timestamp"`
-
- // Specifies the most recent date and time when CloudTrail stopped recording
- // API calls for an AWS account.
- StopLoggingTime *time.Time `type:"timestamp"`
-
- // This field is no longer in use.
- TimeLoggingStarted *string `type:"string"`
-
- // This field is no longer in use.
- TimeLoggingStopped *string `type:"string"`
-}
-
-// String returns the string representation
-func (s GetTrailStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetTrailStatusOutput) GoString() string {
- return s.String()
-}
-
-// SetIsLogging sets the IsLogging field's value.
-func (s *GetTrailStatusOutput) SetIsLogging(v bool) *GetTrailStatusOutput {
- s.IsLogging = &v
- return s
-}
-
-// SetLatestCloudWatchLogsDeliveryError sets the LatestCloudWatchLogsDeliveryError field's value.
-func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryError(v string) *GetTrailStatusOutput {
- s.LatestCloudWatchLogsDeliveryError = &v
- return s
-}
-
-// SetLatestCloudWatchLogsDeliveryTime sets the LatestCloudWatchLogsDeliveryTime field's value.
-func (s *GetTrailStatusOutput) SetLatestCloudWatchLogsDeliveryTime(v time.Time) *GetTrailStatusOutput {
- s.LatestCloudWatchLogsDeliveryTime = &v
- return s
-}
-
-// SetLatestDeliveryAttemptSucceeded sets the LatestDeliveryAttemptSucceeded field's value.
-func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptSucceeded(v string) *GetTrailStatusOutput {
- s.LatestDeliveryAttemptSucceeded = &v
- return s
-}
-
-// SetLatestDeliveryAttemptTime sets the LatestDeliveryAttemptTime field's value.
-func (s *GetTrailStatusOutput) SetLatestDeliveryAttemptTime(v string) *GetTrailStatusOutput {
- s.LatestDeliveryAttemptTime = &v
- return s
-}
-
-// SetLatestDeliveryError sets the LatestDeliveryError field's value.
-func (s *GetTrailStatusOutput) SetLatestDeliveryError(v string) *GetTrailStatusOutput {
- s.LatestDeliveryError = &v
- return s
-}
-
-// SetLatestDeliveryTime sets the LatestDeliveryTime field's value.
-func (s *GetTrailStatusOutput) SetLatestDeliveryTime(v time.Time) *GetTrailStatusOutput {
- s.LatestDeliveryTime = &v
- return s
-}
-
-// SetLatestDigestDeliveryError sets the LatestDigestDeliveryError field's value.
-func (s *GetTrailStatusOutput) SetLatestDigestDeliveryError(v string) *GetTrailStatusOutput {
- s.LatestDigestDeliveryError = &v
- return s
-}
-
-// SetLatestDigestDeliveryTime sets the LatestDigestDeliveryTime field's value.
-func (s *GetTrailStatusOutput) SetLatestDigestDeliveryTime(v time.Time) *GetTrailStatusOutput {
- s.LatestDigestDeliveryTime = &v
- return s
-}
-
-// SetLatestNotificationAttemptSucceeded sets the LatestNotificationAttemptSucceeded field's value.
-func (s *GetTrailStatusOutput) SetLatestNotificationAttemptSucceeded(v string) *GetTrailStatusOutput {
- s.LatestNotificationAttemptSucceeded = &v
- return s
-}
-
-// SetLatestNotificationAttemptTime sets the LatestNotificationAttemptTime field's value.
-func (s *GetTrailStatusOutput) SetLatestNotificationAttemptTime(v string) *GetTrailStatusOutput {
- s.LatestNotificationAttemptTime = &v
- return s
-}
-
-// SetLatestNotificationError sets the LatestNotificationError field's value.
-func (s *GetTrailStatusOutput) SetLatestNotificationError(v string) *GetTrailStatusOutput {
- s.LatestNotificationError = &v
- return s
-}
-
-// SetLatestNotificationTime sets the LatestNotificationTime field's value.
-func (s *GetTrailStatusOutput) SetLatestNotificationTime(v time.Time) *GetTrailStatusOutput {
- s.LatestNotificationTime = &v
- return s
-}
-
-// SetStartLoggingTime sets the StartLoggingTime field's value.
-func (s *GetTrailStatusOutput) SetStartLoggingTime(v time.Time) *GetTrailStatusOutput {
- s.StartLoggingTime = &v
- return s
-}
-
-// SetStopLoggingTime sets the StopLoggingTime field's value.
-func (s *GetTrailStatusOutput) SetStopLoggingTime(v time.Time) *GetTrailStatusOutput {
- s.StopLoggingTime = &v
- return s
-}
-
-// SetTimeLoggingStarted sets the TimeLoggingStarted field's value.
-func (s *GetTrailStatusOutput) SetTimeLoggingStarted(v string) *GetTrailStatusOutput {
- s.TimeLoggingStarted = &v
- return s
-}
-
-// SetTimeLoggingStopped sets the TimeLoggingStopped field's value.
-func (s *GetTrailStatusOutput) SetTimeLoggingStopped(v string) *GetTrailStatusOutput {
- s.TimeLoggingStopped = &v
- return s
-}
-
-// If you run GetInsightSelectors on a trail that does not have Insights events
-// enabled, the operation throws the exception InsightNotEnabledException.
-type InsightNotEnabledException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InsightNotEnabledException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InsightNotEnabledException) GoString() string {
- return s.String()
-}
-
-func newErrorInsightNotEnabledException(v protocol.ResponseMetadata) error {
- return &InsightNotEnabledException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InsightNotEnabledException) Code() string {
- return "InsightNotEnabledException"
-}
-
-// Message returns the exception's message.
-func (s *InsightNotEnabledException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InsightNotEnabledException) OrigErr() error {
- return nil
-}
-
-func (s *InsightNotEnabledException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InsightNotEnabledException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InsightNotEnabledException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// A JSON string that contains a list of insight types that are logged on a
-// trail.
-type InsightSelector struct {
- _ struct{} `type:"structure"`
-
- // The type of insights to log on a trail. In this release, only ApiCallRateInsight
- // is supported as an insight type.
- InsightType *string `type:"string" enum:"InsightType"`
-}
-
-// String returns the string representation
-func (s InsightSelector) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InsightSelector) GoString() string {
- return s.String()
-}
-
-// SetInsightType sets the InsightType field's value.
-func (s *InsightSelector) SetInsightType(v string) *InsightSelector {
- s.InsightType = &v
- return s
-}
-
-// This exception is thrown when the IAM user or role that is used to create
-// the organization trail is lacking one or more required permissions for creating
-// an organization trail in a required service. For more information, see Prepare
-// For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-type InsufficientDependencyServiceAccessPermissionException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InsufficientDependencyServiceAccessPermissionException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InsufficientDependencyServiceAccessPermissionException) GoString() string {
- return s.String()
-}
-
-func newErrorInsufficientDependencyServiceAccessPermissionException(v protocol.ResponseMetadata) error {
- return &InsufficientDependencyServiceAccessPermissionException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InsufficientDependencyServiceAccessPermissionException) Code() string {
- return "InsufficientDependencyServiceAccessPermissionException"
-}
-
-// Message returns the exception's message.
-func (s *InsufficientDependencyServiceAccessPermissionException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InsufficientDependencyServiceAccessPermissionException) OrigErr() error {
- return nil
-}
-
-func (s *InsufficientDependencyServiceAccessPermissionException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InsufficientDependencyServiceAccessPermissionException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InsufficientDependencyServiceAccessPermissionException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the policy on the S3 bucket or KMS key is not
-// sufficient.
-type InsufficientEncryptionPolicyException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InsufficientEncryptionPolicyException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InsufficientEncryptionPolicyException) GoString() string {
- return s.String()
-}
-
-func newErrorInsufficientEncryptionPolicyException(v protocol.ResponseMetadata) error {
- return &InsufficientEncryptionPolicyException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InsufficientEncryptionPolicyException) Code() string {
- return "InsufficientEncryptionPolicyException"
-}
-
-// Message returns the exception's message.
-func (s *InsufficientEncryptionPolicyException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InsufficientEncryptionPolicyException) OrigErr() error {
- return nil
-}
-
-func (s *InsufficientEncryptionPolicyException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InsufficientEncryptionPolicyException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InsufficientEncryptionPolicyException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the policy on the S3 bucket is not sufficient.
-type InsufficientS3BucketPolicyException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InsufficientS3BucketPolicyException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InsufficientS3BucketPolicyException) GoString() string {
- return s.String()
-}
-
-func newErrorInsufficientS3BucketPolicyException(v protocol.ResponseMetadata) error {
- return &InsufficientS3BucketPolicyException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InsufficientS3BucketPolicyException) Code() string {
- return "InsufficientS3BucketPolicyException"
-}
-
-// Message returns the exception's message.
-func (s *InsufficientS3BucketPolicyException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InsufficientS3BucketPolicyException) OrigErr() error {
- return nil
-}
-
-func (s *InsufficientS3BucketPolicyException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InsufficientS3BucketPolicyException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InsufficientS3BucketPolicyException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the policy on the SNS topic is not sufficient.
-type InsufficientSnsTopicPolicyException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InsufficientSnsTopicPolicyException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InsufficientSnsTopicPolicyException) GoString() string {
- return s.String()
-}
-
-func newErrorInsufficientSnsTopicPolicyException(v protocol.ResponseMetadata) error {
- return &InsufficientSnsTopicPolicyException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InsufficientSnsTopicPolicyException) Code() string {
- return "InsufficientSnsTopicPolicyException"
-}
-
-// Message returns the exception's message.
-func (s *InsufficientSnsTopicPolicyException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InsufficientSnsTopicPolicyException) OrigErr() error {
- return nil
-}
-
-func (s *InsufficientSnsTopicPolicyException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InsufficientSnsTopicPolicyException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InsufficientSnsTopicPolicyException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the provided CloudWatch log group is not valid.
-type InvalidCloudWatchLogsLogGroupArnException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidCloudWatchLogsLogGroupArnException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidCloudWatchLogsLogGroupArnException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidCloudWatchLogsLogGroupArnException(v protocol.ResponseMetadata) error {
- return &InvalidCloudWatchLogsLogGroupArnException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidCloudWatchLogsLogGroupArnException) Code() string {
- return "InvalidCloudWatchLogsLogGroupArnException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidCloudWatchLogsLogGroupArnException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidCloudWatchLogsLogGroupArnException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidCloudWatchLogsLogGroupArnException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidCloudWatchLogsLogGroupArnException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidCloudWatchLogsLogGroupArnException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the provided role is not valid.
-type InvalidCloudWatchLogsRoleArnException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidCloudWatchLogsRoleArnException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidCloudWatchLogsRoleArnException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidCloudWatchLogsRoleArnException(v protocol.ResponseMetadata) error {
- return &InvalidCloudWatchLogsRoleArnException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidCloudWatchLogsRoleArnException) Code() string {
- return "InvalidCloudWatchLogsRoleArnException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidCloudWatchLogsRoleArnException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidCloudWatchLogsRoleArnException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidCloudWatchLogsRoleArnException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidCloudWatchLogsRoleArnException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidCloudWatchLogsRoleArnException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Occurs if an event category that is not valid is specified as a value of
-// EventCategory.
-type InvalidEventCategoryException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidEventCategoryException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidEventCategoryException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidEventCategoryException(v protocol.ResponseMetadata) error {
- return &InvalidEventCategoryException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidEventCategoryException) Code() string {
- return "InvalidEventCategoryException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidEventCategoryException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidEventCategoryException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidEventCategoryException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidEventCategoryException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidEventCategoryException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the PutEventSelectors operation is called with
-// a number of event selectors, advanced event selectors, or data resources
-// that is not valid. The combination of event selectors or advanced event selectors
-// and data resources is not valid. A trail can have up to 5 event selectors.
-// If a trail uses advanced event selectors, a maximum of 500 total values for
-// all conditions in all advanced event selectors is allowed. A trail is limited
-// to 250 data resources. These data resources can be distributed across event
-// selectors, but the overall total cannot exceed 250.
-//
-// You can:
-//
-// * Specify a valid number of event selectors (1 to 5) for a trail.
-//
-// * Specify a valid number of data resources (1 to 250) for an event selector.
-// The limit of number of resources on an individual event selector is configurable
-// up to 250. However, this upper limit is allowed only if the total number
-// of data resources does not exceed 250 across all event selectors for a
-// trail.
-//
-// * Specify up to 500 values for all conditions in all advanced event selectors
-// for a trail.
-//
-// * Specify a valid value for a parameter. For example, specifying the ReadWriteType
-// parameter with a value of read-only is invalid.
-type InvalidEventSelectorsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidEventSelectorsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidEventSelectorsException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidEventSelectorsException(v protocol.ResponseMetadata) error {
- return &InvalidEventSelectorsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidEventSelectorsException) Code() string {
- return "InvalidEventSelectorsException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidEventSelectorsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidEventSelectorsException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidEventSelectorsException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidEventSelectorsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidEventSelectorsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when an operation is called on a trail from a region
-// other than the region in which the trail was created.
-type InvalidHomeRegionException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidHomeRegionException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidHomeRegionException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidHomeRegionException(v protocol.ResponseMetadata) error {
- return &InvalidHomeRegionException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidHomeRegionException) Code() string {
- return "InvalidHomeRegionException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidHomeRegionException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidHomeRegionException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidHomeRegionException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidHomeRegionException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidHomeRegionException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
-// or GetInsightSelectors request is not valid, or the specified insight type
-// in the InsightSelectors statement is not a valid insight type.
-type InvalidInsightSelectorsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidInsightSelectorsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidInsightSelectorsException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidInsightSelectorsException(v protocol.ResponseMetadata) error {
- return &InvalidInsightSelectorsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidInsightSelectorsException) Code() string {
- return "InvalidInsightSelectorsException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidInsightSelectorsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidInsightSelectorsException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidInsightSelectorsException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidInsightSelectorsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidInsightSelectorsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the KMS key ARN is invalid.
-type InvalidKmsKeyIdException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidKmsKeyIdException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidKmsKeyIdException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidKmsKeyIdException(v protocol.ResponseMetadata) error {
- return &InvalidKmsKeyIdException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidKmsKeyIdException) Code() string {
- return "InvalidKmsKeyIdException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidKmsKeyIdException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidKmsKeyIdException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidKmsKeyIdException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidKmsKeyIdException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidKmsKeyIdException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Occurs when an invalid lookup attribute is specified.
-type InvalidLookupAttributesException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidLookupAttributesException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidLookupAttributesException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidLookupAttributesException(v protocol.ResponseMetadata) error {
- return &InvalidLookupAttributesException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidLookupAttributesException) Code() string {
- return "InvalidLookupAttributesException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidLookupAttributesException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidLookupAttributesException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidLookupAttributesException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidLookupAttributesException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidLookupAttributesException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown if the limit specified is invalid.
-type InvalidMaxResultsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidMaxResultsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidMaxResultsException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidMaxResultsException(v protocol.ResponseMetadata) error {
- return &InvalidMaxResultsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidMaxResultsException) Code() string {
- return "InvalidMaxResultsException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidMaxResultsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidMaxResultsException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidMaxResultsException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidMaxResultsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidMaxResultsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Invalid token or token that was previously used in a request with different
-// parameters. This exception is thrown if the token is invalid.
-type InvalidNextTokenException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidNextTokenException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidNextTokenException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error {
- return &InvalidNextTokenException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidNextTokenException) Code() string {
- return "InvalidNextTokenException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidNextTokenException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidNextTokenException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidNextTokenException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidNextTokenException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidNextTokenException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the combination of parameters provided is not
-// valid.
-type InvalidParameterCombinationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidParameterCombinationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidParameterCombinationException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidParameterCombinationException(v protocol.ResponseMetadata) error {
- return &InvalidParameterCombinationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidParameterCombinationException) Code() string {
- return "InvalidParameterCombinationException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidParameterCombinationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidParameterCombinationException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidParameterCombinationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidParameterCombinationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidParameterCombinationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the provided S3 bucket name is not valid.
-type InvalidS3BucketNameException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidS3BucketNameException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidS3BucketNameException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidS3BucketNameException(v protocol.ResponseMetadata) error {
- return &InvalidS3BucketNameException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidS3BucketNameException) Code() string {
- return "InvalidS3BucketNameException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidS3BucketNameException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidS3BucketNameException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidS3BucketNameException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidS3BucketNameException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidS3BucketNameException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the provided S3 prefix is not valid.
-type InvalidS3PrefixException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidS3PrefixException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidS3PrefixException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidS3PrefixException(v protocol.ResponseMetadata) error {
- return &InvalidS3PrefixException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidS3PrefixException) Code() string {
- return "InvalidS3PrefixException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidS3PrefixException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidS3PrefixException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidS3PrefixException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidS3PrefixException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidS3PrefixException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the provided SNS topic name is not valid.
-type InvalidSnsTopicNameException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidSnsTopicNameException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidSnsTopicNameException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidSnsTopicNameException(v protocol.ResponseMetadata) error {
- return &InvalidSnsTopicNameException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidSnsTopicNameException) Code() string {
- return "InvalidSnsTopicNameException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidSnsTopicNameException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidSnsTopicNameException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidSnsTopicNameException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidSnsTopicNameException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidSnsTopicNameException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the specified tag key or values are not valid.
-// It can also occur if there are duplicate tags or too many tags on the resource.
-type InvalidTagParameterException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidTagParameterException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidTagParameterException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidTagParameterException(v protocol.ResponseMetadata) error {
- return &InvalidTagParameterException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidTagParameterException) Code() string {
- return "InvalidTagParameterException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidTagParameterException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidTagParameterException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidTagParameterException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidTagParameterException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidTagParameterException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Occurs if the timestamp values are invalid. Either the start time occurs
-// after the end time or the time range is outside the range of possible values.
-type InvalidTimeRangeException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidTimeRangeException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidTimeRangeException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidTimeRangeException(v protocol.ResponseMetadata) error {
- return &InvalidTimeRangeException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidTimeRangeException) Code() string {
- return "InvalidTimeRangeException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidTimeRangeException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidTimeRangeException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidTimeRangeException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidTimeRangeException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidTimeRangeException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Reserved for future use.
-type InvalidTokenException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidTokenException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidTokenException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidTokenException(v protocol.ResponseMetadata) error {
- return &InvalidTokenException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidTokenException) Code() string {
- return "InvalidTokenException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidTokenException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidTokenException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidTokenException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidTokenException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidTokenException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the provided trail name is not valid. Trail
-// names must meet the following requirements:
-//
-// * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
-// (_), or dashes (-)
-//
-// * Start with a letter or number, and end with a letter or number
-//
-// * Be between 3 and 128 characters
-//
-// * Have no adjacent periods, underscores or dashes. Names like my-_namespace
-// and my--namespace are invalid.
-//
-// * Not be in IP address format (for example, 192.168.5.4)
-type InvalidTrailNameException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidTrailNameException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidTrailNameException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidTrailNameException(v protocol.ResponseMetadata) error {
- return &InvalidTrailNameException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidTrailNameException) Code() string {
- return "InvalidTrailNameException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidTrailNameException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidTrailNameException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidTrailNameException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidTrailNameException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidTrailNameException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when there is an issue with the specified KMS key
-// and the trail can’t be updated.
-type KmsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s KmsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s KmsException) GoString() string {
- return s.String()
-}
-
-func newErrorKmsException(v protocol.ResponseMetadata) error {
- return &KmsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *KmsException) Code() string {
- return "KmsException"
-}
-
-// Message returns the exception's message.
-func (s *KmsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *KmsException) OrigErr() error {
- return nil
-}
-
-func (s *KmsException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *KmsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *KmsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is no longer in use.
-//
-// Deprecated: KmsKeyDisabledException has been deprecated
-type KmsKeyDisabledException struct {
- _ struct{} `deprecated:"true" type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s KmsKeyDisabledException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s KmsKeyDisabledException) GoString() string {
- return s.String()
-}
-
-func newErrorKmsKeyDisabledException(v protocol.ResponseMetadata) error {
- return &KmsKeyDisabledException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *KmsKeyDisabledException) Code() string {
- return "KmsKeyDisabledException"
-}
-
-// Message returns the exception's message.
-func (s *KmsKeyDisabledException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *KmsKeyDisabledException) OrigErr() error {
- return nil
-}
-
-func (s *KmsKeyDisabledException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *KmsKeyDisabledException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *KmsKeyDisabledException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the AWS KMS key does not exist, when the S3
-// bucket and the AWS KMS key are not in the same region, or when the AWS KMS
-// key associated with the SNS topic either does not exist or is not in the
-// same region.
-type KmsKeyNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s KmsKeyNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s KmsKeyNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorKmsKeyNotFoundException(v protocol.ResponseMetadata) error {
- return &KmsKeyNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *KmsKeyNotFoundException) Code() string {
- return "KmsKeyNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *KmsKeyNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *KmsKeyNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *KmsKeyNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *KmsKeyNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *KmsKeyNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Requests the public keys for a specified time range.
-type ListPublicKeysInput struct {
- _ struct{} `type:"structure"`
-
- // Optionally specifies, in UTC, the end of the time range to look up public
- // keys for CloudTrail digest files. If not specified, the current time is used.
- EndTime *time.Time `type:"timestamp"`
-
- // Reserved for future use.
- NextToken *string `type:"string"`
-
- // Optionally specifies, in UTC, the start of the time range to look up public
- // keys for CloudTrail digest files. If not specified, the current time is used,
- // and the current public key is returned.
- StartTime *time.Time `type:"timestamp"`
-}
-
-// String returns the string representation
-func (s ListPublicKeysInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListPublicKeysInput) GoString() string {
- return s.String()
-}
-
-// SetEndTime sets the EndTime field's value.
-func (s *ListPublicKeysInput) SetEndTime(v time.Time) *ListPublicKeysInput {
- s.EndTime = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListPublicKeysInput) SetNextToken(v string) *ListPublicKeysInput {
- s.NextToken = &v
- return s
-}
-
-// SetStartTime sets the StartTime field's value.
-func (s *ListPublicKeysInput) SetStartTime(v time.Time) *ListPublicKeysInput {
- s.StartTime = &v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type ListPublicKeysOutput struct {
- _ struct{} `type:"structure"`
-
- // Reserved for future use.
- NextToken *string `type:"string"`
-
- // Contains an array of PublicKey objects.
- //
- // The returned public keys may have validity time ranges that overlap.
- PublicKeyList []*PublicKey `type:"list"`
-}
-
-// String returns the string representation
-func (s ListPublicKeysOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListPublicKeysOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListPublicKeysOutput) SetNextToken(v string) *ListPublicKeysOutput {
- s.NextToken = &v
- return s
-}
-
-// SetPublicKeyList sets the PublicKeyList field's value.
-func (s *ListPublicKeysOutput) SetPublicKeyList(v []*PublicKey) *ListPublicKeysOutput {
- s.PublicKeyList = v
- return s
-}
-
-// Specifies a list of trail tags to return.
-type ListTagsInput struct {
- _ struct{} `type:"structure"`
-
- // Reserved for future use.
- NextToken *string `type:"string"`
-
- // Specifies a list of trail ARNs whose tags will be listed. The list has a
- // limit of 20 ARNs. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // ResourceIdList is a required field
- ResourceIdList []*string `type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s ListTagsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListTagsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListTagsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
- if s.ResourceIdList == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceIdList"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
- s.NextToken = &v
- return s
-}
-
-// SetResourceIdList sets the ResourceIdList field's value.
-func (s *ListTagsInput) SetResourceIdList(v []*string) *ListTagsInput {
- s.ResourceIdList = v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type ListTagsOutput struct {
- _ struct{} `type:"structure"`
-
- // Reserved for future use.
- NextToken *string `type:"string"`
-
- // A list of resource tags.
- ResourceTagList []*ResourceTag `type:"list"`
-}
-
-// String returns the string representation
-func (s ListTagsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListTagsOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
- s.NextToken = &v
- return s
-}
-
-// SetResourceTagList sets the ResourceTagList field's value.
-func (s *ListTagsOutput) SetResourceTagList(v []*ResourceTag) *ListTagsOutput {
- s.ResourceTagList = v
- return s
-}
-
-type ListTrailsInput struct {
- _ struct{} `type:"structure"`
-
- // The token to use to get the next page of results after a previous API call.
- // This token must be passed in with the same parameters that were specified
- // in the the original call. For example, if the original call specified an
- // AttributeKey of 'Username' with a value of 'root', the call with NextToken
- // should include those same parameters.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListTrailsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListTrailsInput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListTrailsInput) SetNextToken(v string) *ListTrailsInput {
- s.NextToken = &v
- return s
-}
-
-type ListTrailsOutput struct {
- _ struct{} `type:"structure"`
-
- // The token to use to get the next page of results after a previous API call.
- // If the token does not appear, there are no more results to return. The token
- // must be passed in with the same parameters as the previous call. For example,
- // if the original call specified an AttributeKey of 'Username' with a value
- // of 'root', the call with NextToken should include those same parameters.
- NextToken *string `type:"string"`
-
- // Returns the name, ARN, and home region of trails in the current account.
- Trails []*TrailInfo `type:"list"`
-}
-
-// String returns the string representation
-func (s ListTrailsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListTrailsOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListTrailsOutput) SetNextToken(v string) *ListTrailsOutput {
- s.NextToken = &v
- return s
-}
-
-// SetTrails sets the Trails field's value.
-func (s *ListTrailsOutput) SetTrails(v []*TrailInfo) *ListTrailsOutput {
- s.Trails = v
- return s
-}
-
-// Specifies an attribute and value that filter the events returned.
-type LookupAttribute struct {
- _ struct{} `type:"structure"`
-
- // Specifies an attribute on which to filter the events returned.
- //
- // AttributeKey is a required field
- AttributeKey *string `type:"string" required:"true" enum:"LookupAttributeKey"`
-
- // Specifies a value for the specified AttributeKey.
- //
- // AttributeValue is a required field
- AttributeValue *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s LookupAttribute) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LookupAttribute) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LookupAttribute) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LookupAttribute"}
- if s.AttributeKey == nil {
- invalidParams.Add(request.NewErrParamRequired("AttributeKey"))
- }
- if s.AttributeValue == nil {
- invalidParams.Add(request.NewErrParamRequired("AttributeValue"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAttributeKey sets the AttributeKey field's value.
-func (s *LookupAttribute) SetAttributeKey(v string) *LookupAttribute {
- s.AttributeKey = &v
- return s
-}
-
-// SetAttributeValue sets the AttributeValue field's value.
-func (s *LookupAttribute) SetAttributeValue(v string) *LookupAttribute {
- s.AttributeValue = &v
- return s
-}
-
-// Contains a request for LookupEvents.
-type LookupEventsInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies that only events that occur before or at the specified time are
- // returned. If the specified end time is before the specified start time, an
- // error is returned.
- EndTime *time.Time `type:"timestamp"`
-
- // Specifies the event category. If you do not specify an event category, events
- // of the category are not returned in the response. For example, if you do
- // not specify insight as the value of EventCategory, no Insights events are
- // returned.
- EventCategory *string `type:"string" enum:"EventCategory"`
-
- // Contains a list of lookup attributes. Currently the list can contain only
- // one item.
- LookupAttributes []*LookupAttribute `type:"list"`
-
- // The number of events to return. Possible values are 1 through 50. The default
- // is 50.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The token to use to get the next page of results after a previous API call.
- // This token must be passed in with the same parameters that were specified
- // in the the original call. For example, if the original call specified an
- // AttributeKey of 'Username' with a value of 'root', the call with NextToken
- // should include those same parameters.
- NextToken *string `type:"string"`
-
- // Specifies that only events that occur after or at the specified time are
- // returned. If the specified start time is after the specified end time, an
- // error is returned.
- StartTime *time.Time `type:"timestamp"`
-}
-
-// String returns the string representation
-func (s LookupEventsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LookupEventsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LookupEventsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LookupEventsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.LookupAttributes != nil {
- for i, v := range s.LookupAttributes {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LookupAttributes", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEndTime sets the EndTime field's value.
-func (s *LookupEventsInput) SetEndTime(v time.Time) *LookupEventsInput {
- s.EndTime = &v
- return s
-}
-
-// SetEventCategory sets the EventCategory field's value.
-func (s *LookupEventsInput) SetEventCategory(v string) *LookupEventsInput {
- s.EventCategory = &v
- return s
-}
-
-// SetLookupAttributes sets the LookupAttributes field's value.
-func (s *LookupEventsInput) SetLookupAttributes(v []*LookupAttribute) *LookupEventsInput {
- s.LookupAttributes = v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *LookupEventsInput) SetMaxResults(v int64) *LookupEventsInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *LookupEventsInput) SetNextToken(v string) *LookupEventsInput {
- s.NextToken = &v
- return s
-}
-
-// SetStartTime sets the StartTime field's value.
-func (s *LookupEventsInput) SetStartTime(v time.Time) *LookupEventsInput {
- s.StartTime = &v
- return s
-}
-
-// Contains a response to a LookupEvents action.
-type LookupEventsOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of events returned based on the lookup attributes specified and the
- // CloudTrail event. The events list is sorted by time. The most recent event
- // is listed first.
- Events []*Event `type:"list"`
-
- // The token to use to get the next page of results after a previous API call.
- // If the token does not appear, there are no more results to return. The token
- // must be passed in with the same parameters as the previous call. For example,
- // if the original call specified an AttributeKey of 'Username' with a value
- // of 'root', the call with NextToken should include those same parameters.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s LookupEventsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LookupEventsOutput) GoString() string {
- return s.String()
-}
-
-// SetEvents sets the Events field's value.
-func (s *LookupEventsOutput) SetEvents(v []*Event) *LookupEventsOutput {
- s.Events = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *LookupEventsOutput) SetNextToken(v string) *LookupEventsOutput {
- s.NextToken = &v
- return s
-}
-
-// This exception is thrown when the maximum number of trails is reached.
-type MaximumNumberOfTrailsExceededException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s MaximumNumberOfTrailsExceededException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MaximumNumberOfTrailsExceededException) GoString() string {
- return s.String()
-}
-
-func newErrorMaximumNumberOfTrailsExceededException(v protocol.ResponseMetadata) error {
- return &MaximumNumberOfTrailsExceededException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *MaximumNumberOfTrailsExceededException) Code() string {
- return "MaximumNumberOfTrailsExceededException"
-}
-
-// Message returns the exception's message.
-func (s *MaximumNumberOfTrailsExceededException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *MaximumNumberOfTrailsExceededException) OrigErr() error {
- return nil
-}
-
-func (s *MaximumNumberOfTrailsExceededException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *MaximumNumberOfTrailsExceededException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *MaximumNumberOfTrailsExceededException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the AWS account making the request to create
-// or update an organization trail is not the master account for an organization
-// in AWS Organizations. For more information, see Prepare For Creating a Trail
-// For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-type NotOrganizationMasterAccountException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s NotOrganizationMasterAccountException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NotOrganizationMasterAccountException) GoString() string {
- return s.String()
-}
-
-func newErrorNotOrganizationMasterAccountException(v protocol.ResponseMetadata) error {
- return &NotOrganizationMasterAccountException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *NotOrganizationMasterAccountException) Code() string {
- return "NotOrganizationMasterAccountException"
-}
-
-// Message returns the exception's message.
-func (s *NotOrganizationMasterAccountException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *NotOrganizationMasterAccountException) OrigErr() error {
- return nil
-}
-
-func (s *NotOrganizationMasterAccountException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *NotOrganizationMasterAccountException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *NotOrganizationMasterAccountException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the requested operation is not permitted.
-type OperationNotPermittedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s OperationNotPermittedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OperationNotPermittedException) GoString() string {
- return s.String()
-}
-
-func newErrorOperationNotPermittedException(v protocol.ResponseMetadata) error {
- return &OperationNotPermittedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *OperationNotPermittedException) Code() string {
- return "OperationNotPermittedException"
-}
-
-// Message returns the exception's message.
-func (s *OperationNotPermittedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *OperationNotPermittedException) OrigErr() error {
- return nil
-}
-
-func (s *OperationNotPermittedException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *OperationNotPermittedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *OperationNotPermittedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when AWS Organizations is not configured to support
-// all features. All features must be enabled in AWS Organization to support
-// creating an organization trail. For more information, see Prepare For Creating
-// a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
-type OrganizationNotInAllFeaturesModeException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s OrganizationNotInAllFeaturesModeException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OrganizationNotInAllFeaturesModeException) GoString() string {
- return s.String()
-}
-
-func newErrorOrganizationNotInAllFeaturesModeException(v protocol.ResponseMetadata) error {
- return &OrganizationNotInAllFeaturesModeException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *OrganizationNotInAllFeaturesModeException) Code() string {
- return "OrganizationNotInAllFeaturesModeException"
-}
-
-// Message returns the exception's message.
-func (s *OrganizationNotInAllFeaturesModeException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *OrganizationNotInAllFeaturesModeException) OrigErr() error {
- return nil
-}
-
-func (s *OrganizationNotInAllFeaturesModeException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *OrganizationNotInAllFeaturesModeException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *OrganizationNotInAllFeaturesModeException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the request is made from an AWS account that
-// is not a member of an organization. To make this request, sign in using the
-// credentials of an account that belongs to an organization.
-type OrganizationsNotInUseException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s OrganizationsNotInUseException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OrganizationsNotInUseException) GoString() string {
- return s.String()
-}
-
-func newErrorOrganizationsNotInUseException(v protocol.ResponseMetadata) error {
- return &OrganizationsNotInUseException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *OrganizationsNotInUseException) Code() string {
- return "OrganizationsNotInUseException"
-}
-
-// Message returns the exception's message.
-func (s *OrganizationsNotInUseException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *OrganizationsNotInUseException) OrigErr() error {
- return nil
-}
-
-func (s *OrganizationsNotInUseException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *OrganizationsNotInUseException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *OrganizationsNotInUseException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains information about a returned public key.
-type PublicKey struct {
- _ struct{} `type:"structure"`
-
- // The fingerprint of the public key.
- Fingerprint *string `type:"string"`
-
- // The ending time of validity of the public key.
- ValidityEndTime *time.Time `type:"timestamp"`
-
- // The starting time of validity of the public key.
- ValidityStartTime *time.Time `type:"timestamp"`
-
- // The DER encoded public key value in PKCS#1 format.
- //
- // Value is automatically base64 encoded/decoded by the SDK.
- Value []byte `type:"blob"`
-}
-
-// String returns the string representation
-func (s PublicKey) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PublicKey) GoString() string {
- return s.String()
-}
-
-// SetFingerprint sets the Fingerprint field's value.
-func (s *PublicKey) SetFingerprint(v string) *PublicKey {
- s.Fingerprint = &v
- return s
-}
-
-// SetValidityEndTime sets the ValidityEndTime field's value.
-func (s *PublicKey) SetValidityEndTime(v time.Time) *PublicKey {
- s.ValidityEndTime = &v
- return s
-}
-
-// SetValidityStartTime sets the ValidityStartTime field's value.
-func (s *PublicKey) SetValidityStartTime(v time.Time) *PublicKey {
- s.ValidityStartTime = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *PublicKey) SetValue(v []byte) *PublicKey {
- s.Value = v
- return s
-}
-
-type PutEventSelectorsInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the settings for advanced event selectors. You can add advanced
- // event selectors, and conditions for your advanced event selectors, up to
- // a maximum of 500 values for all conditions and selectors on a trail. You
- // can use either AdvancedEventSelectors or EventSelectors, but not both. If
- // you apply AdvancedEventSelectors to a trail, any existing EventSelectors
- // are overwritten. For more information about advanced event selectors, see
- // Logging data events for trails (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/logging-data-events-with-cloudtrail.html)
- // in the AWS CloudTrail User Guide.
- AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
-
- // Specifies the settings for your event selectors. You can configure up to
- // five event selectors for a trail. You can use either EventSelectors or AdvancedEventSelectors
- // in a PutEventSelectors request, but not both. If you apply EventSelectors
- // to a trail, any existing AdvancedEventSelectors are overwritten.
- EventSelectors []*EventSelector `type:"list"`
-
- // Specifies the name of the trail or trail ARN. If you specify a trail name,
- // the string must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // If you specify a trail ARN, it must be in the format:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // TrailName is a required field
- TrailName *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s PutEventSelectorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutEventSelectorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutEventSelectorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutEventSelectorsInput"}
- if s.TrailName == nil {
- invalidParams.Add(request.NewErrParamRequired("TrailName"))
- }
- if s.AdvancedEventSelectors != nil {
- for i, v := range s.AdvancedEventSelectors {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AdvancedEventSelectors", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
-func (s *PutEventSelectorsInput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *PutEventSelectorsInput {
- s.AdvancedEventSelectors = v
- return s
-}
-
-// SetEventSelectors sets the EventSelectors field's value.
-func (s *PutEventSelectorsInput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsInput {
- s.EventSelectors = v
- return s
-}
-
-// SetTrailName sets the TrailName field's value.
-func (s *PutEventSelectorsInput) SetTrailName(v string) *PutEventSelectorsInput {
- s.TrailName = &v
- return s
-}
-
-type PutEventSelectorsOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the advanced event selectors configured for your trail.
- AdvancedEventSelectors []*AdvancedEventSelector `type:"list"`
-
- // Specifies the event selectors configured for your trail.
- EventSelectors []*EventSelector `type:"list"`
-
- // Specifies the ARN of the trail that was updated with event selectors. The
- // format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- TrailARN *string `type:"string"`
-}
-
-// String returns the string representation
-func (s PutEventSelectorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutEventSelectorsOutput) GoString() string {
- return s.String()
-}
-
-// SetAdvancedEventSelectors sets the AdvancedEventSelectors field's value.
-func (s *PutEventSelectorsOutput) SetAdvancedEventSelectors(v []*AdvancedEventSelector) *PutEventSelectorsOutput {
- s.AdvancedEventSelectors = v
- return s
-}
-
-// SetEventSelectors sets the EventSelectors field's value.
-func (s *PutEventSelectorsOutput) SetEventSelectors(v []*EventSelector) *PutEventSelectorsOutput {
- s.EventSelectors = v
- return s
-}
-
-// SetTrailARN sets the TrailARN field's value.
-func (s *PutEventSelectorsOutput) SetTrailARN(v string) *PutEventSelectorsOutput {
- s.TrailARN = &v
- return s
-}
-
-type PutInsightSelectorsInput struct {
- _ struct{} `type:"structure"`
-
- // A JSON string that contains the insight types you want to log on a trail.
- // In this release, only ApiCallRateInsight is supported as an insight type.
- //
- // InsightSelectors is a required field
- InsightSelectors []*InsightSelector `type:"list" required:"true"`
-
- // The name of the CloudTrail trail for which you want to change or add Insights
- // selectors.
- //
- // TrailName is a required field
- TrailName *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s PutInsightSelectorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutInsightSelectorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutInsightSelectorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutInsightSelectorsInput"}
- if s.InsightSelectors == nil {
- invalidParams.Add(request.NewErrParamRequired("InsightSelectors"))
- }
- if s.TrailName == nil {
- invalidParams.Add(request.NewErrParamRequired("TrailName"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetInsightSelectors sets the InsightSelectors field's value.
-func (s *PutInsightSelectorsInput) SetInsightSelectors(v []*InsightSelector) *PutInsightSelectorsInput {
- s.InsightSelectors = v
- return s
-}
-
-// SetTrailName sets the TrailName field's value.
-func (s *PutInsightSelectorsInput) SetTrailName(v string) *PutInsightSelectorsInput {
- s.TrailName = &v
- return s
-}
-
-type PutInsightSelectorsOutput struct {
- _ struct{} `type:"structure"`
-
- // A JSON string that contains the insight types you want to log on a trail.
- // In this release, only ApiCallRateInsight is supported as an insight type.
- InsightSelectors []*InsightSelector `type:"list"`
-
- // The Amazon Resource Name (ARN) of a trail for which you want to change or
- // add Insights selectors.
- TrailARN *string `type:"string"`
-}
-
-// String returns the string representation
-func (s PutInsightSelectorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutInsightSelectorsOutput) GoString() string {
- return s.String()
-}
-
-// SetInsightSelectors sets the InsightSelectors field's value.
-func (s *PutInsightSelectorsOutput) SetInsightSelectors(v []*InsightSelector) *PutInsightSelectorsOutput {
- s.InsightSelectors = v
- return s
-}
-
-// SetTrailARN sets the TrailARN field's value.
-func (s *PutInsightSelectorsOutput) SetTrailARN(v string) *PutInsightSelectorsOutput {
- s.TrailARN = &v
- return s
-}
-
-// Specifies the tags to remove from a trail.
-type RemoveTagsInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the ARN of the trail from which tags should be removed. The format
- // of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // ResourceId is a required field
- ResourceId *string `type:"string" required:"true"`
-
- // Specifies a list of tags to be removed.
- TagsList []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s RemoveTagsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RemoveTagsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RemoveTagsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"}
- if s.ResourceId == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceId"))
- }
- if s.TagsList != nil {
- for i, v := range s.TagsList {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagsList", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceId sets the ResourceId field's value.
-func (s *RemoveTagsInput) SetResourceId(v string) *RemoveTagsInput {
- s.ResourceId = &v
- return s
-}
-
-// SetTagsList sets the TagsList field's value.
-func (s *RemoveTagsInput) SetTagsList(v []*Tag) *RemoveTagsInput {
- s.TagsList = v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type RemoveTagsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s RemoveTagsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RemoveTagsOutput) GoString() string {
- return s.String()
-}
-
-// Specifies the type and name of a resource referenced by an event.
-type Resource struct {
- _ struct{} `type:"structure"`
-
- // The name of the resource referenced by the event returned. These are user-created
- // names whose values will depend on the environment. For example, the resource
- // name might be "auto-scaling-test-group" for an Auto Scaling Group or "i-1234567"
- // for an EC2 Instance.
- ResourceName *string `type:"string"`
-
- // The type of a resource referenced by the event returned. When the resource
- // type cannot be determined, null is returned. Some examples of resource types
- // are: Instance for EC2, Trail for CloudTrail, DBInstance for RDS, and AccessKey
- // for IAM. To learn more about how to look up and filter events by the resource
- // types supported for a service, see Filtering CloudTrail Events (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events-console.html#filtering-cloudtrail-events).
- ResourceType *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Resource) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Resource) GoString() string {
- return s.String()
-}
-
-// SetResourceName sets the ResourceName field's value.
-func (s *Resource) SetResourceName(v string) *Resource {
- s.ResourceName = &v
- return s
-}
-
-// SetResourceType sets the ResourceType field's value.
-func (s *Resource) SetResourceType(v string) *Resource {
- s.ResourceType = &v
- return s
-}
-
-// This exception is thrown when the specified resource is not found.
-type ResourceNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s ResourceNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResourceNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
- return &ResourceNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ResourceNotFoundException) Code() string {
- return "ResourceNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *ResourceNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ResourceNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *ResourceNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ResourceNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ResourceNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// A resource tag.
-type ResourceTag struct {
- _ struct{} `type:"structure"`
-
- // Specifies the ARN of the resource.
- ResourceId *string `type:"string"`
-
- // A list of tags.
- TagsList []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s ResourceTag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResourceTag) GoString() string {
- return s.String()
-}
-
-// SetResourceId sets the ResourceId field's value.
-func (s *ResourceTag) SetResourceId(v string) *ResourceTag {
- s.ResourceId = &v
- return s
-}
-
-// SetTagsList sets the TagsList field's value.
-func (s *ResourceTag) SetTagsList(v []*Tag) *ResourceTag {
- s.TagsList = v
- return s
-}
-
-// This exception is thrown when the specified resource type is not supported
-// by CloudTrail.
-type ResourceTypeNotSupportedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s ResourceTypeNotSupportedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResourceTypeNotSupportedException) GoString() string {
- return s.String()
-}
-
-func newErrorResourceTypeNotSupportedException(v protocol.ResponseMetadata) error {
- return &ResourceTypeNotSupportedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ResourceTypeNotSupportedException) Code() string {
- return "ResourceTypeNotSupportedException"
-}
-
-// Message returns the exception's message.
-func (s *ResourceTypeNotSupportedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ResourceTypeNotSupportedException) OrigErr() error {
- return nil
-}
-
-func (s *ResourceTypeNotSupportedException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ResourceTypeNotSupportedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ResourceTypeNotSupportedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the specified S3 bucket does not exist.
-type S3BucketDoesNotExistException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s S3BucketDoesNotExistException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s S3BucketDoesNotExistException) GoString() string {
- return s.String()
-}
-
-func newErrorS3BucketDoesNotExistException(v protocol.ResponseMetadata) error {
- return &S3BucketDoesNotExistException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *S3BucketDoesNotExistException) Code() string {
- return "S3BucketDoesNotExistException"
-}
-
-// Message returns the exception's message.
-func (s *S3BucketDoesNotExistException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *S3BucketDoesNotExistException) OrigErr() error {
- return nil
-}
-
-func (s *S3BucketDoesNotExistException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *S3BucketDoesNotExistException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *S3BucketDoesNotExistException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request to CloudTrail to start logging AWS API calls for an account.
-type StartLoggingInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
- // logs AWS API calls. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s StartLoggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StartLoggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *StartLoggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartLoggingInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *StartLoggingInput) SetName(v string) *StartLoggingInput {
- s.Name = &v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type StartLoggingOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s StartLoggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StartLoggingOutput) GoString() string {
- return s.String()
-}
-
-// Passes the request to CloudTrail to stop logging AWS API calls for the specified
-// account.
-type StopLoggingInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the name or the CloudTrail ARN of the trail for which CloudTrail
- // will stop logging AWS API calls. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s StopLoggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StopLoggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *StopLoggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StopLoggingInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *StopLoggingInput) SetName(v string) *StopLoggingInput {
- s.Name = &v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type StopLoggingOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s StopLoggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StopLoggingOutput) GoString() string {
- return s.String()
-}
-
-// A custom key-value pair associated with a resource such as a CloudTrail trail.
-type Tag struct {
- _ struct{} `type:"structure"`
-
- // The key in a key-value pair. The key must be must be no longer than 128 Unicode
- // characters. The key must be unique for the resource to which it applies.
- //
- // Key is a required field
- Key *string `type:"string" required:"true"`
-
- // The value in a key-value pair of a tag. The value must be no longer than
- // 256 Unicode characters.
- Value *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Tag) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tag) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tag"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKey sets the Key field's value.
-func (s *Tag) SetKey(v string) *Tag {
- s.Key = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *Tag) SetValue(v string) *Tag {
- s.Value = &v
- return s
-}
-
-// The number of tags per trail has exceeded the permitted amount. Currently,
-// the limit is 50.
-type TagsLimitExceededException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s TagsLimitExceededException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TagsLimitExceededException) GoString() string {
- return s.String()
-}
-
-func newErrorTagsLimitExceededException(v protocol.ResponseMetadata) error {
- return &TagsLimitExceededException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TagsLimitExceededException) Code() string {
- return "TagsLimitExceededException"
-}
-
-// Message returns the exception's message.
-func (s *TagsLimitExceededException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TagsLimitExceededException) OrigErr() error {
- return nil
-}
-
-func (s *TagsLimitExceededException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *TagsLimitExceededException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TagsLimitExceededException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The settings for a trail.
-type Trail struct {
- _ struct{} `type:"structure"`
-
- // Specifies an Amazon Resource Name (ARN), a unique identifier that represents
- // the log group to which CloudTrail logs will be delivered.
- CloudWatchLogsLogGroupArn *string `type:"string"`
-
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
-
- // Specifies if the trail has custom event selectors.
- HasCustomEventSelectors *bool `type:"boolean"`
-
- // Specifies whether a trail has insight types specified in an InsightSelector
- // list.
- HasInsightSelectors *bool `type:"boolean"`
-
- // The region in which the trail was created.
- HomeRegion *string `type:"string"`
-
- // Set to True to include AWS API calls from AWS global services such as IAM.
- // Otherwise, False.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
-
- // Specifies whether the trail exists only in one region or exists in all regions.
- IsMultiRegionTrail *bool `type:"boolean"`
-
- // Specifies whether the trail is an organization trail.
- IsOrganizationTrail *bool `type:"boolean"`
-
- // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
- // The value is a fully specified ARN to a KMS key in the format:
- //
- // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
-
- // Specifies whether log file validation is enabled.
- LogFileValidationEnabled *bool `type:"boolean"`
-
- // Name of the trail set by calling CreateTrail. The maximum length is 128 characters.
- Name *string `type:"string"`
-
- // Name of the Amazon S3 bucket into which CloudTrail delivers your trail files.
- // See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
- S3BucketName *string `type:"string"`
-
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).The
- // maximum length is 200 characters.
- S3KeyPrefix *string `type:"string"`
-
- // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
- // when log files are delivered. The format of a topic ARN is:
- //
- // arn:aws:sns:us-east-2:123456789012:MyTopic
- SnsTopicARN *string `type:"string"`
-
- // This field is no longer in use. Use SnsTopicARN.
- //
- // Deprecated: SnsTopicName has been deprecated
- SnsTopicName *string `deprecated:"true" type:"string"`
-
- // Specifies the ARN of the trail. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- TrailARN *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Trail) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Trail) GoString() string {
- return s.String()
-}
-
-// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
-func (s *Trail) SetCloudWatchLogsLogGroupArn(v string) *Trail {
- s.CloudWatchLogsLogGroupArn = &v
- return s
-}
-
-// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
-func (s *Trail) SetCloudWatchLogsRoleArn(v string) *Trail {
- s.CloudWatchLogsRoleArn = &v
- return s
-}
-
-// SetHasCustomEventSelectors sets the HasCustomEventSelectors field's value.
-func (s *Trail) SetHasCustomEventSelectors(v bool) *Trail {
- s.HasCustomEventSelectors = &v
- return s
-}
-
-// SetHasInsightSelectors sets the HasInsightSelectors field's value.
-func (s *Trail) SetHasInsightSelectors(v bool) *Trail {
- s.HasInsightSelectors = &v
- return s
-}
-
-// SetHomeRegion sets the HomeRegion field's value.
-func (s *Trail) SetHomeRegion(v string) *Trail {
- s.HomeRegion = &v
- return s
-}
-
-// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
-func (s *Trail) SetIncludeGlobalServiceEvents(v bool) *Trail {
- s.IncludeGlobalServiceEvents = &v
- return s
-}
-
-// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
-func (s *Trail) SetIsMultiRegionTrail(v bool) *Trail {
- s.IsMultiRegionTrail = &v
- return s
-}
-
-// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
-func (s *Trail) SetIsOrganizationTrail(v bool) *Trail {
- s.IsOrganizationTrail = &v
- return s
-}
-
-// SetKmsKeyId sets the KmsKeyId field's value.
-func (s *Trail) SetKmsKeyId(v string) *Trail {
- s.KmsKeyId = &v
- return s
-}
-
-// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
-func (s *Trail) SetLogFileValidationEnabled(v bool) *Trail {
- s.LogFileValidationEnabled = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *Trail) SetName(v string) *Trail {
- s.Name = &v
- return s
-}
-
-// SetS3BucketName sets the S3BucketName field's value.
-func (s *Trail) SetS3BucketName(v string) *Trail {
- s.S3BucketName = &v
- return s
-}
-
-// SetS3KeyPrefix sets the S3KeyPrefix field's value.
-func (s *Trail) SetS3KeyPrefix(v string) *Trail {
- s.S3KeyPrefix = &v
- return s
-}
-
-// SetSnsTopicARN sets the SnsTopicARN field's value.
-func (s *Trail) SetSnsTopicARN(v string) *Trail {
- s.SnsTopicARN = &v
- return s
-}
-
-// SetSnsTopicName sets the SnsTopicName field's value.
-func (s *Trail) SetSnsTopicName(v string) *Trail {
- s.SnsTopicName = &v
- return s
-}
-
-// SetTrailARN sets the TrailARN field's value.
-func (s *Trail) SetTrailARN(v string) *Trail {
- s.TrailARN = &v
- return s
-}
-
-// This exception is thrown when the specified trail already exists.
-type TrailAlreadyExistsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s TrailAlreadyExistsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TrailAlreadyExistsException) GoString() string {
- return s.String()
-}
-
-func newErrorTrailAlreadyExistsException(v protocol.ResponseMetadata) error {
- return &TrailAlreadyExistsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TrailAlreadyExistsException) Code() string {
- return "TrailAlreadyExistsException"
-}
-
-// Message returns the exception's message.
-func (s *TrailAlreadyExistsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TrailAlreadyExistsException) OrigErr() error {
- return nil
-}
-
-func (s *TrailAlreadyExistsException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *TrailAlreadyExistsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TrailAlreadyExistsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Information about a CloudTrail trail, including the trail's name, home region,
-// and Amazon Resource Name (ARN).
-type TrailInfo struct {
- _ struct{} `type:"structure"`
-
- // The AWS region in which a trail was created.
- HomeRegion *string `type:"string"`
-
- // The name of a trail.
- Name *string `type:"string"`
-
- // The ARN of a trail.
- TrailARN *string `type:"string"`
-}
-
-// String returns the string representation
-func (s TrailInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TrailInfo) GoString() string {
- return s.String()
-}
-
-// SetHomeRegion sets the HomeRegion field's value.
-func (s *TrailInfo) SetHomeRegion(v string) *TrailInfo {
- s.HomeRegion = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *TrailInfo) SetName(v string) *TrailInfo {
- s.Name = &v
- return s
-}
-
-// SetTrailARN sets the TrailARN field's value.
-func (s *TrailInfo) SetTrailARN(v string) *TrailInfo {
- s.TrailARN = &v
- return s
-}
-
-// This exception is thrown when the trail with the given name is not found.
-type TrailNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s TrailNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TrailNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorTrailNotFoundException(v protocol.ResponseMetadata) error {
- return &TrailNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TrailNotFoundException) Code() string {
- return "TrailNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *TrailNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TrailNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *TrailNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *TrailNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TrailNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is no longer in use.
-type TrailNotProvidedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s TrailNotProvidedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TrailNotProvidedException) GoString() string {
- return s.String()
-}
-
-func newErrorTrailNotProvidedException(v protocol.ResponseMetadata) error {
- return &TrailNotProvidedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TrailNotProvidedException) Code() string {
- return "TrailNotProvidedException"
-}
-
-// Message returns the exception's message.
-func (s *TrailNotProvidedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TrailNotProvidedException) OrigErr() error {
- return nil
-}
-
-func (s *TrailNotProvidedException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *TrailNotProvidedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TrailNotProvidedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This exception is thrown when the requested operation is not supported.
-type UnsupportedOperationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation
-func (s UnsupportedOperationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UnsupportedOperationException) GoString() string {
- return s.String()
-}
-
-func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error {
- return &UnsupportedOperationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *UnsupportedOperationException) Code() string {
- return "UnsupportedOperationException"
-}
-
-// Message returns the exception's message.
-func (s *UnsupportedOperationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *UnsupportedOperationException) OrigErr() error {
- return nil
-}
-
-func (s *UnsupportedOperationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *UnsupportedOperationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *UnsupportedOperationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Specifies settings to update for the trail.
-type UpdateTrailInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies a log group name using an Amazon Resource Name (ARN), a unique
- // identifier that represents the log group to which CloudTrail logs will be
- // delivered. Not required unless you specify CloudWatchLogsRoleArn.
- CloudWatchLogsLogGroupArn *string `type:"string"`
-
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
-
- // Specifies whether log file validation is enabled. The default is false.
- //
- // When you disable log file integrity validation, the chain of digest files
- // is broken after one hour. CloudTrail will not create digest files for log
- // files that were delivered during a period in which log file integrity validation
- // was disabled. For example, if you enable log file integrity validation at
- // noon on January 1, disable it at noon on January 2, and re-enable it at noon
- // on January 10, digest files will not be created for the log files delivered
- // from noon on January 2 to noon on January 10. The same applies whenever you
- // stop CloudTrail logging or delete a trail.
- EnableLogFileValidation *bool `type:"boolean"`
-
- // Specifies whether the trail is publishing events from global services such
- // as IAM to the log files.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
-
- // Specifies whether the trail applies only to the current region or to all
- // regions. The default is false. If the trail exists only in the current region
- // and this value is set to true, shadow trails (replications of the trail)
- // will be created in the other regions. If the trail exists in all regions
- // and this value is set to false, the trail will remain in the region where
- // it was created, and its shadow trails in other regions will be deleted. As
- // a best practice, consider using trails that log events in all regions.
- IsMultiRegionTrail *bool `type:"boolean"`
-
- // Specifies whether the trail is applied to all accounts in an organization
- // in AWS Organizations, or only for the current AWS account. The default is
- // false, and cannot be true unless the call is made on behalf of an AWS account
- // that is the master account for an organization in AWS Organizations. If the
- // trail is not an organization trail and this is set to true, the trail will
- // be created in all AWS accounts that belong to the organization. If the trail
- // is an organization trail and this is set to false, the trail will remain
- // in the current AWS account but be deleted from all member accounts in the
- // organization.
- IsOrganizationTrail *bool `type:"boolean"`
-
- // Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail.
- // The value can be an alias name prefixed by "alias/", a fully specified ARN
- // to an alias, a fully specified ARN to a key, or a globally unique identifier.
- //
- // Examples:
- //
- // * alias/MyAliasName
- //
- // * arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
- //
- // * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- //
- // * 12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
-
- // Specifies the name of the trail or trail ARN. If Name is a trail name, the
- // string must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- //
- // If Name is a trail ARN, it must be in the format:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- //
- // Name is a required field
- Name *string `type:"string" required:"true"`
-
- // Specifies the name of the Amazon S3 bucket designated for publishing log
- // files. See Amazon S3 Bucket Naming Requirements (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html).
- S3BucketName *string `type:"string"`
-
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
- // The maximum length is 200 characters.
- S3KeyPrefix *string `type:"string"`
-
- // Specifies the name of the Amazon SNS topic defined for notification of log
- // file delivery. The maximum length is 256 characters.
- SnsTopicName *string `type:"string"`
-}
-
-// String returns the string representation
-func (s UpdateTrailInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UpdateTrailInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UpdateTrailInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateTrailInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
-func (s *UpdateTrailInput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailInput {
- s.CloudWatchLogsLogGroupArn = &v
- return s
-}
-
-// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
-func (s *UpdateTrailInput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailInput {
- s.CloudWatchLogsRoleArn = &v
- return s
-}
-
-// SetEnableLogFileValidation sets the EnableLogFileValidation field's value.
-func (s *UpdateTrailInput) SetEnableLogFileValidation(v bool) *UpdateTrailInput {
- s.EnableLogFileValidation = &v
- return s
-}
-
-// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
-func (s *UpdateTrailInput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailInput {
- s.IncludeGlobalServiceEvents = &v
- return s
-}
-
-// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
-func (s *UpdateTrailInput) SetIsMultiRegionTrail(v bool) *UpdateTrailInput {
- s.IsMultiRegionTrail = &v
- return s
-}
-
-// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
-func (s *UpdateTrailInput) SetIsOrganizationTrail(v bool) *UpdateTrailInput {
- s.IsOrganizationTrail = &v
- return s
-}
-
-// SetKmsKeyId sets the KmsKeyId field's value.
-func (s *UpdateTrailInput) SetKmsKeyId(v string) *UpdateTrailInput {
- s.KmsKeyId = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *UpdateTrailInput) SetName(v string) *UpdateTrailInput {
- s.Name = &v
- return s
-}
-
-// SetS3BucketName sets the S3BucketName field's value.
-func (s *UpdateTrailInput) SetS3BucketName(v string) *UpdateTrailInput {
- s.S3BucketName = &v
- return s
-}
-
-// SetS3KeyPrefix sets the S3KeyPrefix field's value.
-func (s *UpdateTrailInput) SetS3KeyPrefix(v string) *UpdateTrailInput {
- s.S3KeyPrefix = &v
- return s
-}
-
-// SetSnsTopicName sets the SnsTopicName field's value.
-func (s *UpdateTrailInput) SetSnsTopicName(v string) *UpdateTrailInput {
- s.SnsTopicName = &v
- return s
-}
-
-// Returns the objects or data listed below if successful. Otherwise, returns
-// an error.
-type UpdateTrailOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail
- // logs will be delivered.
- CloudWatchLogsLogGroupArn *string `type:"string"`
-
- // Specifies the role for the CloudWatch Logs endpoint to assume to write to
- // a user's log group.
- CloudWatchLogsRoleArn *string `type:"string"`
-
- // Specifies whether the trail is publishing events from global services such
- // as IAM to the log files.
- IncludeGlobalServiceEvents *bool `type:"boolean"`
-
- // Specifies whether the trail exists in one region or in all regions.
- IsMultiRegionTrail *bool `type:"boolean"`
-
- // Specifies whether the trail is an organization trail.
- IsOrganizationTrail *bool `type:"boolean"`
-
- // Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
- // The value is a fully specified ARN to a KMS key in the format:
- //
- // arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- KmsKeyId *string `type:"string"`
-
- // Specifies whether log file integrity validation is enabled.
- LogFileValidationEnabled *bool `type:"boolean"`
-
- // Specifies the name of the trail.
- Name *string `type:"string"`
-
- // Specifies the name of the Amazon S3 bucket designated for publishing log
- // files.
- S3BucketName *string `type:"string"`
-
- // Specifies the Amazon S3 key prefix that comes after the name of the bucket
- // you have designated for log file delivery. For more information, see Finding
- // Your CloudTrail Log Files (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html).
- S3KeyPrefix *string `type:"string"`
-
- // Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications
- // when log files are delivered. The format of a topic ARN is:
- //
- // arn:aws:sns:us-east-2:123456789012:MyTopic
- SnsTopicARN *string `type:"string"`
-
- // This field is no longer in use. Use SnsTopicARN.
- //
- // Deprecated: SnsTopicName has been deprecated
- SnsTopicName *string `deprecated:"true" type:"string"`
-
- // Specifies the ARN of the trail that was updated. The format of a trail ARN
- // is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- TrailARN *string `type:"string"`
-}
-
-// String returns the string representation
-func (s UpdateTrailOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UpdateTrailOutput) GoString() string {
- return s.String()
-}
-
-// SetCloudWatchLogsLogGroupArn sets the CloudWatchLogsLogGroupArn field's value.
-func (s *UpdateTrailOutput) SetCloudWatchLogsLogGroupArn(v string) *UpdateTrailOutput {
- s.CloudWatchLogsLogGroupArn = &v
- return s
-}
-
-// SetCloudWatchLogsRoleArn sets the CloudWatchLogsRoleArn field's value.
-func (s *UpdateTrailOutput) SetCloudWatchLogsRoleArn(v string) *UpdateTrailOutput {
- s.CloudWatchLogsRoleArn = &v
- return s
-}
-
-// SetIncludeGlobalServiceEvents sets the IncludeGlobalServiceEvents field's value.
-func (s *UpdateTrailOutput) SetIncludeGlobalServiceEvents(v bool) *UpdateTrailOutput {
- s.IncludeGlobalServiceEvents = &v
- return s
-}
-
-// SetIsMultiRegionTrail sets the IsMultiRegionTrail field's value.
-func (s *UpdateTrailOutput) SetIsMultiRegionTrail(v bool) *UpdateTrailOutput {
- s.IsMultiRegionTrail = &v
- return s
-}
-
-// SetIsOrganizationTrail sets the IsOrganizationTrail field's value.
-func (s *UpdateTrailOutput) SetIsOrganizationTrail(v bool) *UpdateTrailOutput {
- s.IsOrganizationTrail = &v
- return s
-}
-
-// SetKmsKeyId sets the KmsKeyId field's value.
-func (s *UpdateTrailOutput) SetKmsKeyId(v string) *UpdateTrailOutput {
- s.KmsKeyId = &v
- return s
-}
-
-// SetLogFileValidationEnabled sets the LogFileValidationEnabled field's value.
-func (s *UpdateTrailOutput) SetLogFileValidationEnabled(v bool) *UpdateTrailOutput {
- s.LogFileValidationEnabled = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *UpdateTrailOutput) SetName(v string) *UpdateTrailOutput {
- s.Name = &v
- return s
-}
-
-// SetS3BucketName sets the S3BucketName field's value.
-func (s *UpdateTrailOutput) SetS3BucketName(v string) *UpdateTrailOutput {
- s.S3BucketName = &v
- return s
-}
-
-// SetS3KeyPrefix sets the S3KeyPrefix field's value.
-func (s *UpdateTrailOutput) SetS3KeyPrefix(v string) *UpdateTrailOutput {
- s.S3KeyPrefix = &v
- return s
-}
-
-// SetSnsTopicARN sets the SnsTopicARN field's value.
-func (s *UpdateTrailOutput) SetSnsTopicARN(v string) *UpdateTrailOutput {
- s.SnsTopicARN = &v
- return s
-}
-
-// SetSnsTopicName sets the SnsTopicName field's value.
-func (s *UpdateTrailOutput) SetSnsTopicName(v string) *UpdateTrailOutput {
- s.SnsTopicName = &v
- return s
-}
-
-// SetTrailARN sets the TrailARN field's value.
-func (s *UpdateTrailOutput) SetTrailARN(v string) *UpdateTrailOutput {
- s.TrailARN = &v
- return s
-}
-
-const (
- // EventCategoryInsight is a EventCategory enum value
- EventCategoryInsight = "insight"
-)
-
-// EventCategory_Values returns all elements of the EventCategory enum
-func EventCategory_Values() []string {
- return []string{
- EventCategoryInsight,
- }
-}
-
-const (
- // InsightTypeApiCallRateInsight is a InsightType enum value
- InsightTypeApiCallRateInsight = "ApiCallRateInsight"
-)
-
-// InsightType_Values returns all elements of the InsightType enum
-func InsightType_Values() []string {
- return []string{
- InsightTypeApiCallRateInsight,
- }
-}
-
-const (
- // LookupAttributeKeyEventId is a LookupAttributeKey enum value
- LookupAttributeKeyEventId = "EventId"
-
- // LookupAttributeKeyEventName is a LookupAttributeKey enum value
- LookupAttributeKeyEventName = "EventName"
-
- // LookupAttributeKeyReadOnly is a LookupAttributeKey enum value
- LookupAttributeKeyReadOnly = "ReadOnly"
-
- // LookupAttributeKeyUsername is a LookupAttributeKey enum value
- LookupAttributeKeyUsername = "Username"
-
- // LookupAttributeKeyResourceType is a LookupAttributeKey enum value
- LookupAttributeKeyResourceType = "ResourceType"
-
- // LookupAttributeKeyResourceName is a LookupAttributeKey enum value
- LookupAttributeKeyResourceName = "ResourceName"
-
- // LookupAttributeKeyEventSource is a LookupAttributeKey enum value
- LookupAttributeKeyEventSource = "EventSource"
-
- // LookupAttributeKeyAccessKeyId is a LookupAttributeKey enum value
- LookupAttributeKeyAccessKeyId = "AccessKeyId"
-)
-
-// LookupAttributeKey_Values returns all elements of the LookupAttributeKey enum
-func LookupAttributeKey_Values() []string {
- return []string{
- LookupAttributeKeyEventId,
- LookupAttributeKeyEventName,
- LookupAttributeKeyReadOnly,
- LookupAttributeKeyUsername,
- LookupAttributeKeyResourceType,
- LookupAttributeKeyResourceName,
- LookupAttributeKeyEventSource,
- LookupAttributeKeyAccessKeyId,
- }
-}
-
-const (
- // ReadWriteTypeReadOnly is a ReadWriteType enum value
- ReadWriteTypeReadOnly = "ReadOnly"
-
- // ReadWriteTypeWriteOnly is a ReadWriteType enum value
- ReadWriteTypeWriteOnly = "WriteOnly"
-
- // ReadWriteTypeAll is a ReadWriteType enum value
- ReadWriteTypeAll = "All"
-)
-
-// ReadWriteType_Values returns all elements of the ReadWriteType enum
-func ReadWriteType_Values() []string {
- return []string{
- ReadWriteTypeReadOnly,
- ReadWriteTypeWriteOnly,
- ReadWriteTypeAll,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go
deleted file mode 100644
index d2b23643d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/doc.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package cloudtrail provides the client and types for making API
-// requests to AWS CloudTrail.
-//
-// This is the CloudTrail API Reference. It provides descriptions of actions,
-// data types, common parameters, and common errors for CloudTrail.
-//
-// CloudTrail is a web service that records AWS API calls for your AWS account
-// and delivers log files to an Amazon S3 bucket. The recorded information includes
-// the identity of the user, the start time of the AWS API call, the source
-// IP address, the request parameters, and the response elements returned by
-// the service.
-//
-// As an alternative to the API, you can use one of the AWS SDKs, which consist
-// of libraries and sample code for various programming languages and platforms
-// (Java, Ruby, .NET, iOS, Android, etc.). The SDKs provide a convenient way
-// to create programmatic access to AWSCloudTrail. For example, the SDKs take
-// care of cryptographically signing requests, managing errors, and retrying
-// requests automatically. For information about the AWS SDKs, including how
-// to download and install them, see the Tools for Amazon Web Services page
-// (http://aws.amazon.com/tools/).
-//
-// See the AWS CloudTrail User Guide (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-user-guide.html)
-// for information about the data that is included with each AWS API call listed
-// in the log files.
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01 for more information on this service.
-//
-// See cloudtrail package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/
-//
-// Using the Client
-//
-// To contact AWS CloudTrail with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the AWS CloudTrail client CloudTrail for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/cloudtrail/#New
-package cloudtrail
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go
deleted file mode 100644
index 49f5585ff..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/errors.go
+++ /dev/null
@@ -1,395 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package cloudtrail
-
-import (
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-const (
-
- // ErrCodeARNInvalidException for service response error code
- // "CloudTrailARNInvalidException".
- //
- // This exception is thrown when an operation is called with an invalid trail
- // ARN. The format of a trail ARN is:
- //
- // arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- ErrCodeARNInvalidException = "CloudTrailARNInvalidException"
-
- // ErrCodeAccessNotEnabledException for service response error code
- // "CloudTrailAccessNotEnabledException".
- //
- // This exception is thrown when trusted access has not been enabled between
- // AWS CloudTrail and AWS Organizations. For more information, see Enabling
- // Trusted Access with Other AWS Services (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
- // and Prepare For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- ErrCodeAccessNotEnabledException = "CloudTrailAccessNotEnabledException"
-
- // ErrCodeCloudTrailInvalidClientTokenIdException for service response error code
- // "CloudTrailInvalidClientTokenIdException".
- //
- // This exception is thrown when a call results in the InvalidClientTokenId
- // error code. This can occur when you are creating or updating a trail to send
- // notifications to an Amazon SNS topic that is in a suspended AWS account.
- ErrCodeCloudTrailInvalidClientTokenIdException = "CloudTrailInvalidClientTokenIdException"
-
- // ErrCodeCloudWatchLogsDeliveryUnavailableException for service response error code
- // "CloudWatchLogsDeliveryUnavailableException".
- //
- // Cannot set a CloudWatch Logs delivery for this region.
- ErrCodeCloudWatchLogsDeliveryUnavailableException = "CloudWatchLogsDeliveryUnavailableException"
-
- // ErrCodeConflictException for service response error code
- // "ConflictException".
- //
- // This exception is thrown when the specified resource is not ready for an
- // operation. This can occur when you try to run an operation on a trail before
- // CloudTrail has time to fully load the trail. If this exception occurs, wait
- // a few minutes, and then try the operation again.
- ErrCodeConflictException = "ConflictException"
-
- // ErrCodeInsightNotEnabledException for service response error code
- // "InsightNotEnabledException".
- //
- // If you run GetInsightSelectors on a trail that does not have Insights events
- // enabled, the operation throws the exception InsightNotEnabledException.
- ErrCodeInsightNotEnabledException = "InsightNotEnabledException"
-
- // ErrCodeInsufficientDependencyServiceAccessPermissionException for service response error code
- // "InsufficientDependencyServiceAccessPermissionException".
- //
- // This exception is thrown when the IAM user or role that is used to create
- // the organization trail is lacking one or more required permissions for creating
- // an organization trail in a required service. For more information, see Prepare
- // For Creating a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- ErrCodeInsufficientDependencyServiceAccessPermissionException = "InsufficientDependencyServiceAccessPermissionException"
-
- // ErrCodeInsufficientEncryptionPolicyException for service response error code
- // "InsufficientEncryptionPolicyException".
- //
- // This exception is thrown when the policy on the S3 bucket or KMS key is not
- // sufficient.
- ErrCodeInsufficientEncryptionPolicyException = "InsufficientEncryptionPolicyException"
-
- // ErrCodeInsufficientS3BucketPolicyException for service response error code
- // "InsufficientS3BucketPolicyException".
- //
- // This exception is thrown when the policy on the S3 bucket is not sufficient.
- ErrCodeInsufficientS3BucketPolicyException = "InsufficientS3BucketPolicyException"
-
- // ErrCodeInsufficientSnsTopicPolicyException for service response error code
- // "InsufficientSnsTopicPolicyException".
- //
- // This exception is thrown when the policy on the SNS topic is not sufficient.
- ErrCodeInsufficientSnsTopicPolicyException = "InsufficientSnsTopicPolicyException"
-
- // ErrCodeInvalidCloudWatchLogsLogGroupArnException for service response error code
- // "InvalidCloudWatchLogsLogGroupArnException".
- //
- // This exception is thrown when the provided CloudWatch log group is not valid.
- ErrCodeInvalidCloudWatchLogsLogGroupArnException = "InvalidCloudWatchLogsLogGroupArnException"
-
- // ErrCodeInvalidCloudWatchLogsRoleArnException for service response error code
- // "InvalidCloudWatchLogsRoleArnException".
- //
- // This exception is thrown when the provided role is not valid.
- ErrCodeInvalidCloudWatchLogsRoleArnException = "InvalidCloudWatchLogsRoleArnException"
-
- // ErrCodeInvalidEventCategoryException for service response error code
- // "InvalidEventCategoryException".
- //
- // Occurs if an event category that is not valid is specified as a value of
- // EventCategory.
- ErrCodeInvalidEventCategoryException = "InvalidEventCategoryException"
-
- // ErrCodeInvalidEventSelectorsException for service response error code
- // "InvalidEventSelectorsException".
- //
- // This exception is thrown when the PutEventSelectors operation is called with
- // a number of event selectors, advanced event selectors, or data resources
- // that is not valid. The combination of event selectors or advanced event selectors
- // and data resources is not valid. A trail can have up to 5 event selectors.
- // If a trail uses advanced event selectors, a maximum of 500 total values for
- // all conditions in all advanced event selectors is allowed. A trail is limited
- // to 250 data resources. These data resources can be distributed across event
- // selectors, but the overall total cannot exceed 250.
- //
- // You can:
- //
- // * Specify a valid number of event selectors (1 to 5) for a trail.
- //
- // * Specify a valid number of data resources (1 to 250) for an event selector.
- // The limit of number of resources on an individual event selector is configurable
- // up to 250. However, this upper limit is allowed only if the total number
- // of data resources does not exceed 250 across all event selectors for a
- // trail.
- //
- // * Specify up to 500 values for all conditions in all advanced event selectors
- // for a trail.
- //
- // * Specify a valid value for a parameter. For example, specifying the ReadWriteType
- // parameter with a value of read-only is invalid.
- ErrCodeInvalidEventSelectorsException = "InvalidEventSelectorsException"
-
- // ErrCodeInvalidHomeRegionException for service response error code
- // "InvalidHomeRegionException".
- //
- // This exception is thrown when an operation is called on a trail from a region
- // other than the region in which the trail was created.
- ErrCodeInvalidHomeRegionException = "InvalidHomeRegionException"
-
- // ErrCodeInvalidInsightSelectorsException for service response error code
- // "InvalidInsightSelectorsException".
- //
- // The formatting or syntax of the InsightSelectors JSON statement in your PutInsightSelectors
- // or GetInsightSelectors request is not valid, or the specified insight type
- // in the InsightSelectors statement is not a valid insight type.
- ErrCodeInvalidInsightSelectorsException = "InvalidInsightSelectorsException"
-
- // ErrCodeInvalidKmsKeyIdException for service response error code
- // "InvalidKmsKeyIdException".
- //
- // This exception is thrown when the KMS key ARN is invalid.
- ErrCodeInvalidKmsKeyIdException = "InvalidKmsKeyIdException"
-
- // ErrCodeInvalidLookupAttributesException for service response error code
- // "InvalidLookupAttributesException".
- //
- // Occurs when an invalid lookup attribute is specified.
- ErrCodeInvalidLookupAttributesException = "InvalidLookupAttributesException"
-
- // ErrCodeInvalidMaxResultsException for service response error code
- // "InvalidMaxResultsException".
- //
- // This exception is thrown if the limit specified is invalid.
- ErrCodeInvalidMaxResultsException = "InvalidMaxResultsException"
-
- // ErrCodeInvalidNextTokenException for service response error code
- // "InvalidNextTokenException".
- //
- // Invalid token or token that was previously used in a request with different
- // parameters. This exception is thrown if the token is invalid.
- ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
-
- // ErrCodeInvalidParameterCombinationException for service response error code
- // "InvalidParameterCombinationException".
- //
- // This exception is thrown when the combination of parameters provided is not
- // valid.
- ErrCodeInvalidParameterCombinationException = "InvalidParameterCombinationException"
-
- // ErrCodeInvalidS3BucketNameException for service response error code
- // "InvalidS3BucketNameException".
- //
- // This exception is thrown when the provided S3 bucket name is not valid.
- ErrCodeInvalidS3BucketNameException = "InvalidS3BucketNameException"
-
- // ErrCodeInvalidS3PrefixException for service response error code
- // "InvalidS3PrefixException".
- //
- // This exception is thrown when the provided S3 prefix is not valid.
- ErrCodeInvalidS3PrefixException = "InvalidS3PrefixException"
-
- // ErrCodeInvalidSnsTopicNameException for service response error code
- // "InvalidSnsTopicNameException".
- //
- // This exception is thrown when the provided SNS topic name is not valid.
- ErrCodeInvalidSnsTopicNameException = "InvalidSnsTopicNameException"
-
- // ErrCodeInvalidTagParameterException for service response error code
- // "InvalidTagParameterException".
- //
- // This exception is thrown when the specified tag key or values are not valid.
- // It can also occur if there are duplicate tags or too many tags on the resource.
- ErrCodeInvalidTagParameterException = "InvalidTagParameterException"
-
- // ErrCodeInvalidTimeRangeException for service response error code
- // "InvalidTimeRangeException".
- //
- // Occurs if the timestamp values are invalid. Either the start time occurs
- // after the end time or the time range is outside the range of possible values.
- ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException"
-
- // ErrCodeInvalidTokenException for service response error code
- // "InvalidTokenException".
- //
- // Reserved for future use.
- ErrCodeInvalidTokenException = "InvalidTokenException"
-
- // ErrCodeInvalidTrailNameException for service response error code
- // "InvalidTrailNameException".
- //
- // This exception is thrown when the provided trail name is not valid. Trail
- // names must meet the following requirements:
- //
- // * Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores
- // (_), or dashes (-)
- //
- // * Start with a letter or number, and end with a letter or number
- //
- // * Be between 3 and 128 characters
- //
- // * Have no adjacent periods, underscores or dashes. Names like my-_namespace
- // and my--namespace are invalid.
- //
- // * Not be in IP address format (for example, 192.168.5.4)
- ErrCodeInvalidTrailNameException = "InvalidTrailNameException"
-
- // ErrCodeKmsException for service response error code
- // "KmsException".
- //
- // This exception is thrown when there is an issue with the specified KMS key
- // and the trail can’t be updated.
- ErrCodeKmsException = "KmsException"
-
- // ErrCodeKmsKeyDisabledException for service response error code
- // "KmsKeyDisabledException".
- //
- // This exception is no longer in use.
- ErrCodeKmsKeyDisabledException = "KmsKeyDisabledException"
-
- // ErrCodeKmsKeyNotFoundException for service response error code
- // "KmsKeyNotFoundException".
- //
- // This exception is thrown when the AWS KMS key does not exist, when the S3
- // bucket and the AWS KMS key are not in the same region, or when the AWS KMS
- // key associated with the SNS topic either does not exist or is not in the
- // same region.
- ErrCodeKmsKeyNotFoundException = "KmsKeyNotFoundException"
-
- // ErrCodeMaximumNumberOfTrailsExceededException for service response error code
- // "MaximumNumberOfTrailsExceededException".
- //
- // This exception is thrown when the maximum number of trails is reached.
- ErrCodeMaximumNumberOfTrailsExceededException = "MaximumNumberOfTrailsExceededException"
-
- // ErrCodeNotOrganizationMasterAccountException for service response error code
- // "NotOrganizationMasterAccountException".
- //
- // This exception is thrown when the AWS account making the request to create
- // or update an organization trail is not the master account for an organization
- // in AWS Organizations. For more information, see Prepare For Creating a Trail
- // For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- ErrCodeNotOrganizationMasterAccountException = "NotOrganizationMasterAccountException"
-
- // ErrCodeOperationNotPermittedException for service response error code
- // "OperationNotPermittedException".
- //
- // This exception is thrown when the requested operation is not permitted.
- ErrCodeOperationNotPermittedException = "OperationNotPermittedException"
-
- // ErrCodeOrganizationNotInAllFeaturesModeException for service response error code
- // "OrganizationNotInAllFeaturesModeException".
- //
- // This exception is thrown when AWS Organizations is not configured to support
- // all features. All features must be enabled in AWS Organization to support
- // creating an organization trail. For more information, see Prepare For Creating
- // a Trail For Your Organization (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html).
- ErrCodeOrganizationNotInAllFeaturesModeException = "OrganizationNotInAllFeaturesModeException"
-
- // ErrCodeOrganizationsNotInUseException for service response error code
- // "OrganizationsNotInUseException".
- //
- // This exception is thrown when the request is made from an AWS account that
- // is not a member of an organization. To make this request, sign in using the
- // credentials of an account that belongs to an organization.
- ErrCodeOrganizationsNotInUseException = "OrganizationsNotInUseException"
-
- // ErrCodeResourceNotFoundException for service response error code
- // "ResourceNotFoundException".
- //
- // This exception is thrown when the specified resource is not found.
- ErrCodeResourceNotFoundException = "ResourceNotFoundException"
-
- // ErrCodeResourceTypeNotSupportedException for service response error code
- // "ResourceTypeNotSupportedException".
- //
- // This exception is thrown when the specified resource type is not supported
- // by CloudTrail.
- ErrCodeResourceTypeNotSupportedException = "ResourceTypeNotSupportedException"
-
- // ErrCodeS3BucketDoesNotExistException for service response error code
- // "S3BucketDoesNotExistException".
- //
- // This exception is thrown when the specified S3 bucket does not exist.
- ErrCodeS3BucketDoesNotExistException = "S3BucketDoesNotExistException"
-
- // ErrCodeTagsLimitExceededException for service response error code
- // "TagsLimitExceededException".
- //
- // The number of tags per trail has exceeded the permitted amount. Currently,
- // the limit is 50.
- ErrCodeTagsLimitExceededException = "TagsLimitExceededException"
-
- // ErrCodeTrailAlreadyExistsException for service response error code
- // "TrailAlreadyExistsException".
- //
- // This exception is thrown when the specified trail already exists.
- ErrCodeTrailAlreadyExistsException = "TrailAlreadyExistsException"
-
- // ErrCodeTrailNotFoundException for service response error code
- // "TrailNotFoundException".
- //
- // This exception is thrown when the trail with the given name is not found.
- ErrCodeTrailNotFoundException = "TrailNotFoundException"
-
- // ErrCodeTrailNotProvidedException for service response error code
- // "TrailNotProvidedException".
- //
- // This exception is no longer in use.
- ErrCodeTrailNotProvidedException = "TrailNotProvidedException"
-
- // ErrCodeUnsupportedOperationException for service response error code
- // "UnsupportedOperationException".
- //
- // This exception is thrown when the requested operation is not supported.
- ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
-)
-
-var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
- "CloudTrailARNInvalidException": newErrorARNInvalidException,
- "CloudTrailAccessNotEnabledException": newErrorAccessNotEnabledException,
- "CloudTrailInvalidClientTokenIdException": newErrorCloudTrailInvalidClientTokenIdException,
- "CloudWatchLogsDeliveryUnavailableException": newErrorCloudWatchLogsDeliveryUnavailableException,
- "ConflictException": newErrorConflictException,
- "InsightNotEnabledException": newErrorInsightNotEnabledException,
- "InsufficientDependencyServiceAccessPermissionException": newErrorInsufficientDependencyServiceAccessPermissionException,
- "InsufficientEncryptionPolicyException": newErrorInsufficientEncryptionPolicyException,
- "InsufficientS3BucketPolicyException": newErrorInsufficientS3BucketPolicyException,
- "InsufficientSnsTopicPolicyException": newErrorInsufficientSnsTopicPolicyException,
- "InvalidCloudWatchLogsLogGroupArnException": newErrorInvalidCloudWatchLogsLogGroupArnException,
- "InvalidCloudWatchLogsRoleArnException": newErrorInvalidCloudWatchLogsRoleArnException,
- "InvalidEventCategoryException": newErrorInvalidEventCategoryException,
- "InvalidEventSelectorsException": newErrorInvalidEventSelectorsException,
- "InvalidHomeRegionException": newErrorInvalidHomeRegionException,
- "InvalidInsightSelectorsException": newErrorInvalidInsightSelectorsException,
- "InvalidKmsKeyIdException": newErrorInvalidKmsKeyIdException,
- "InvalidLookupAttributesException": newErrorInvalidLookupAttributesException,
- "InvalidMaxResultsException": newErrorInvalidMaxResultsException,
- "InvalidNextTokenException": newErrorInvalidNextTokenException,
- "InvalidParameterCombinationException": newErrorInvalidParameterCombinationException,
- "InvalidS3BucketNameException": newErrorInvalidS3BucketNameException,
- "InvalidS3PrefixException": newErrorInvalidS3PrefixException,
- "InvalidSnsTopicNameException": newErrorInvalidSnsTopicNameException,
- "InvalidTagParameterException": newErrorInvalidTagParameterException,
- "InvalidTimeRangeException": newErrorInvalidTimeRangeException,
- "InvalidTokenException": newErrorInvalidTokenException,
- "InvalidTrailNameException": newErrorInvalidTrailNameException,
- "KmsException": newErrorKmsException,
- "KmsKeyDisabledException": newErrorKmsKeyDisabledException,
- "KmsKeyNotFoundException": newErrorKmsKeyNotFoundException,
- "MaximumNumberOfTrailsExceededException": newErrorMaximumNumberOfTrailsExceededException,
- "NotOrganizationMasterAccountException": newErrorNotOrganizationMasterAccountException,
- "OperationNotPermittedException": newErrorOperationNotPermittedException,
- "OrganizationNotInAllFeaturesModeException": newErrorOrganizationNotInAllFeaturesModeException,
- "OrganizationsNotInUseException": newErrorOrganizationsNotInUseException,
- "ResourceNotFoundException": newErrorResourceNotFoundException,
- "ResourceTypeNotSupportedException": newErrorResourceTypeNotSupportedException,
- "S3BucketDoesNotExistException": newErrorS3BucketDoesNotExistException,
- "TagsLimitExceededException": newErrorTagsLimitExceededException,
- "TrailAlreadyExistsException": newErrorTrailAlreadyExistsException,
- "TrailNotFoundException": newErrorTrailNotFoundException,
- "TrailNotProvidedException": newErrorTrailNotProvidedException,
- "UnsupportedOperationException": newErrorUnsupportedOperationException,
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go b/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go
deleted file mode 100644
index fece8a618..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/cloudtrail/service.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package cloudtrail
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-// CloudTrail provides the API operation methods for making requests to
-// AWS CloudTrail. See this package's package overview docs
-// for details on the service.
-//
-// CloudTrail methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type CloudTrail struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "cloudtrail" // Name of service.
- EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "CloudTrail" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the CloudTrail client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// mySession := session.Must(session.NewSession())
-//
-// // Create a CloudTrail client from just a session.
-// svc := cloudtrail.New(mySession)
-//
-// // Create a CloudTrail client with additional configuration
-// svc := cloudtrail.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *CloudTrail {
- c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *CloudTrail {
- svc := &CloudTrail{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2013-11-01",
- JSONVersion: "1.1",
- TargetPrefix: "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(
- protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
- )
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a CloudTrail operation and runs any
-// custom request initialization.
-func (c *CloudTrail) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go
deleted file mode 100644
index c7497d4f8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/organizations/api.go
+++ /dev/null
@@ -1,23846 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package organizations
-
-import (
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-const opAcceptHandshake = "AcceptHandshake"
-
-// AcceptHandshakeRequest generates a "aws/request.Request" representing the
-// client's request for the AcceptHandshake operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See AcceptHandshake for more information on using the AcceptHandshake
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the AcceptHandshakeRequest method.
-// req, resp := client.AcceptHandshakeRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AcceptHandshake
-func (c *Organizations) AcceptHandshakeRequest(input *AcceptHandshakeInput) (req *request.Request, output *AcceptHandshakeOutput) {
- op := &request.Operation{
- Name: opAcceptHandshake,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AcceptHandshakeInput{}
- }
-
- output = &AcceptHandshakeOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// AcceptHandshake API operation for AWS Organizations.
-//
-// Sends a response to the originator of a handshake agreeing to the action
-// proposed by the handshake request.
-//
-// This operation can be called only by the following principals when they also
-// have the relevant IAM permissions:
-//
-// * Invitation to join or Approve all features request handshakes: only
-// a principal from the member account. The user who calls the API for an
-// invitation to join must have the organizations:AcceptHandshake permission.
-// If you enabled all features in the organization, the user must also have
-// the iam:CreateServiceLinkedRole permission so that AWS Organizations can
-// create the required service-linked role named AWSServiceRoleForOrganizations.
-// For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integration_services.html#orgs_integration_service-linked-roles)
-// in the AWS Organizations User Guide.
-//
-// * Enable all features final confirmation handshake: only a principal from
-// the management account. For more information about invitations, see Inviting
-// an AWS Account to Join Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_invites.html)
-// in the AWS Organizations User Guide. For more information about requests
-// to enable all features in the organization, see Enabling All Features
-// in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
-// in the AWS Organizations User Guide.
-//
-// After you accept a handshake, it continues to appear in the results of relevant
-// APIs for only 30 days. After that, it's deleted.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation AcceptHandshake for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * HandshakeConstraintViolationException
-// The requested operation would violate the constraint identified in the reason
-// code.
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation:
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. Note that deleted and closed
-// accounts still count toward your limit. If you get this exception immediately
-// after creating the organization, wait one hour and try again. If after
-// an hour it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
-// the invited account is already a member of an organization.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
-// to join an organization while it's in the process of enabling all features.
-// You can resume inviting accounts after you finalize the process when all
-// accounts have agreed to the change.
-//
-// * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
-// because the organization has already enabled all features.
-//
-// * ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
-// request is invalid because the organization has already started the process
-// to enable all features.
-//
-// * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
-// the account is from a different marketplace than the accounts in the organization.
-// For example, accounts with India addresses must be associated with the
-// AISPL marketplace. All accounts in an organization must be from the same
-// marketplace.
-//
-// * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
-// change the membership of an account too quickly after its previous change.
-//
-// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
-// account that doesn't have a payment instrument, such as a credit card,
-// associated with it.
-//
-// * HandshakeNotFoundException
-// We can't find a handshake with the HandshakeId that you specified.
-//
-// * InvalidHandshakeTransitionException
-// You can't perform the operation on the handshake in its current state. For
-// example, you can't cancel a handshake that was already accepted or accept
-// a handshake that was already declined.
-//
-// * HandshakeAlreadyInStateException
-// The specified handshake is already in the requested state. For example, you
-// can't accept a handshake that was already accepted.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * AccessDeniedForDependencyException
-// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole
-// for organizations.amazonaws.com permission so that AWS Organizations can
-// create the required service-linked role. You don't have that permission.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AcceptHandshake
-func (c *Organizations) AcceptHandshake(input *AcceptHandshakeInput) (*AcceptHandshakeOutput, error) {
- req, out := c.AcceptHandshakeRequest(input)
- return out, req.Send()
-}
-
-// AcceptHandshakeWithContext is the same as AcceptHandshake with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AcceptHandshake for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) AcceptHandshakeWithContext(ctx aws.Context, input *AcceptHandshakeInput, opts ...request.Option) (*AcceptHandshakeOutput, error) {
- req, out := c.AcceptHandshakeRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opAttachPolicy = "AttachPolicy"
-
-// AttachPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the AttachPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See AttachPolicy for more information on using the AttachPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the AttachPolicyRequest method.
-// req, resp := client.AttachPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AttachPolicy
-func (c *Organizations) AttachPolicyRequest(input *AttachPolicyInput) (req *request.Request, output *AttachPolicyOutput) {
- op := &request.Operation{
- Name: opAttachPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AttachPolicyInput{}
- }
-
- output = &AttachPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// AttachPolicy API operation for AWS Organizations.
-//
-// Attaches a policy to a root, an organizational unit (OU), or an individual
-// account. How the policy affects accounts depends on the type of policy. Refer
-// to the AWS Organizations User Guide for information about each policy type:
-//
-// * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
-//
-// * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
-//
-// * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
-//
-// * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation AttachPolicy for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * DuplicatePolicyAttachmentException
-// The selected policy is already attached to the specified target.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * PolicyNotFoundException
-// We can't find a policy with the PolicyId that you specified.
-//
-// * PolicyTypeNotEnabledException
-// The specified policy type isn't currently enabled in this root. You can't
-// attach policies of the specified type to entities in a root until you enable
-// that type in the root. For more information, see Enabling All Features in
-// Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
-// in the AWS Organizations User Guide.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TargetNotFoundException
-// We can't find a root, OU, account, or policy with the TargetId that you specified.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// * PolicyChangesInProgressException
-// Changes to the effective policy are in progress, and its contents can't be
-// returned. Try the operation again later.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/AttachPolicy
-func (c *Organizations) AttachPolicy(input *AttachPolicyInput) (*AttachPolicyOutput, error) {
- req, out := c.AttachPolicyRequest(input)
- return out, req.Send()
-}
-
-// AttachPolicyWithContext is the same as AttachPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AttachPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) AttachPolicyWithContext(ctx aws.Context, input *AttachPolicyInput, opts ...request.Option) (*AttachPolicyOutput, error) {
- req, out := c.AttachPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCancelHandshake = "CancelHandshake"
-
-// CancelHandshakeRequest generates a "aws/request.Request" representing the
-// client's request for the CancelHandshake operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CancelHandshake for more information on using the CancelHandshake
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CancelHandshakeRequest method.
-// req, resp := client.CancelHandshakeRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CancelHandshake
-func (c *Organizations) CancelHandshakeRequest(input *CancelHandshakeInput) (req *request.Request, output *CancelHandshakeOutput) {
- op := &request.Operation{
- Name: opCancelHandshake,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelHandshakeInput{}
- }
-
- output = &CancelHandshakeOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CancelHandshake API operation for AWS Organizations.
-//
-// Cancels a handshake. Canceling a handshake sets the handshake state to CANCELED.
-//
-// This operation can be called only from the account that originated the handshake.
-// The recipient of the handshake can't cancel it, but can use DeclineHandshake
-// instead. After a handshake is canceled, the recipient can no longer respond
-// to that handshake.
-//
-// After you cancel a handshake, it continues to appear in the results of relevant
-// APIs for only 30 days. After that, it's deleted.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation CancelHandshake for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * HandshakeNotFoundException
-// We can't find a handshake with the HandshakeId that you specified.
-//
-// * InvalidHandshakeTransitionException
-// You can't perform the operation on the handshake in its current state. For
-// example, you can't cancel a handshake that was already accepted or accept
-// a handshake that was already declined.
-//
-// * HandshakeAlreadyInStateException
-// The specified handshake is already in the requested state. For example, you
-// can't accept a handshake that was already accepted.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CancelHandshake
-func (c *Organizations) CancelHandshake(input *CancelHandshakeInput) (*CancelHandshakeOutput, error) {
- req, out := c.CancelHandshakeRequest(input)
- return out, req.Send()
-}
-
-// CancelHandshakeWithContext is the same as CancelHandshake with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CancelHandshake for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) CancelHandshakeWithContext(ctx aws.Context, input *CancelHandshakeInput, opts ...request.Option) (*CancelHandshakeOutput, error) {
- req, out := c.CancelHandshakeRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateAccount = "CreateAccount"
-
-// CreateAccountRequest generates a "aws/request.Request" representing the
-// client's request for the CreateAccount operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateAccount for more information on using the CreateAccount
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateAccountRequest method.
-// req, resp := client.CreateAccountRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateAccount
-func (c *Organizations) CreateAccountRequest(input *CreateAccountInput) (req *request.Request, output *CreateAccountOutput) {
- op := &request.Operation{
- Name: opCreateAccount,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateAccountInput{}
- }
-
- output = &CreateAccountOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateAccount API operation for AWS Organizations.
-//
-// Creates an AWS account that is automatically a member of the organization
-// whose credentials made the request. This is an asynchronous request that
-// AWS performs in the background. Because CreateAccount operates asynchronously,
-// it can return a successful completion message even though account initialization
-// might still be in progress. You might need to wait a few minutes before you
-// can successfully access the account. To check the status of the request,
-// do one of the following:
-//
-// * Use the Id member of the CreateAccountStatus response element from this
-// operation to provide as a parameter to the DescribeCreateAccountStatus
-// operation.
-//
-// * Check the AWS CloudTrail log for the CreateAccountResult event. For
-// information on using AWS CloudTrail with AWS Organizations, see Logging
-// and monitoring in AWS Organizations (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_security_incident-response.html#orgs_cloudtrail-integration)
-// in the AWS Organizations User Guide.
-//
-// The user who calls the API to create an account must have the organizations:CreateAccount
-// permission. If you enabled all features in the organization, AWS Organizations
-// creates the required service-linked role named AWSServiceRoleForOrganizations.
-// For more information, see AWS Organizations and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs)
-// in the AWS Organizations User Guide.
-//
-// If the request includes tags, then the requester must have the organizations:TagResource
-// permission.
-//
-// AWS Organizations preconfigures the new member account with a role (named
-// OrganizationAccountAccessRole by default) that grants users in the management
-// account administrator permissions in the new member account. Principals in
-// the management account can assume the role. AWS Organizations clones the
-// company name and address information for the new account from the organization's
-// management account.
-//
-// This operation can be called only from the organization's management account.
-//
-// For more information about creating accounts, see Creating an AWS Account
-// in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html)
-// in the AWS Organizations User Guide.
-//
-// * When you create an account in an organization using the AWS Organizations
-// console, API, or CLI commands, the information required for the account
-// to operate as a standalone account, such as a payment method and signing
-// the end user license agreement (EULA) is not automatically collected.
-// If you must remove an account from your organization later, you can do
-// so only after you provide the missing information. Follow the steps at
-// To leave an organization as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * If you get an exception that indicates that you exceeded your account
-// limits for the organization, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * If you get an exception that indicates that the operation failed because
-// your organization is still initializing, wait one hour and then try again.
-// If the error persists, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * Using CreateAccount to create multiple temporary accounts isn't recommended.
-// You can only close an account from the Billing and Cost Management Console,
-// and you must be signed in as the root user. For information on the requirements
-// and process for closing an account, see Closing an AWS Account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html)
-// in the AWS Organizations User Guide.
-//
-// When you create a member account with this operation, you can choose whether
-// to create the account with the IAM User and Role Access to Billing Information
-// switch enabled. If you enable it, IAM users and roles that have appropriate
-// permissions can view billing information for the account. If you disable
-// it, only the account root user can access billing information. For information
-// about how to disable this switch for an account, see Granting Access to Your
-// Billing Information and Tools (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation CreateAccount for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * FinalizingOrganizationException
-// AWS Organizations couldn't perform the operation because your organization
-// hasn't finished initializing. This can take up to an hour. Try again later.
-// If after one hour you continue to receive this error, contact AWS Support
-// (https://console.aws.amazon.com/support/home#/).
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateAccount
-func (c *Organizations) CreateAccount(input *CreateAccountInput) (*CreateAccountOutput, error) {
- req, out := c.CreateAccountRequest(input)
- return out, req.Send()
-}
-
-// CreateAccountWithContext is the same as CreateAccount with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateAccount for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) CreateAccountWithContext(ctx aws.Context, input *CreateAccountInput, opts ...request.Option) (*CreateAccountOutput, error) {
- req, out := c.CreateAccountRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateGovCloudAccount = "CreateGovCloudAccount"
-
-// CreateGovCloudAccountRequest generates a "aws/request.Request" representing the
-// client's request for the CreateGovCloudAccount operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateGovCloudAccount for more information on using the CreateGovCloudAccount
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateGovCloudAccountRequest method.
-// req, resp := client.CreateGovCloudAccountRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateGovCloudAccount
-func (c *Organizations) CreateGovCloudAccountRequest(input *CreateGovCloudAccountInput) (req *request.Request, output *CreateGovCloudAccountOutput) {
- op := &request.Operation{
- Name: opCreateGovCloudAccount,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateGovCloudAccountInput{}
- }
-
- output = &CreateGovCloudAccountOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateGovCloudAccount API operation for AWS Organizations.
-//
-// This action is available if all of the following are true:
-//
-// * You're authorized to create accounts in the AWS GovCloud (US) Region.
-// For more information on the AWS GovCloud (US) Region, see the AWS GovCloud
-// User Guide. (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/welcome.html)
-//
-// * You already have an account in the AWS GovCloud (US) Region that is
-// paired with a management account of an organization in the commercial
-// Region.
-//
-// * You call this action from the management account of your organization
-// in the commercial Region.
-//
-// * You have the organizations:CreateGovCloudAccount permission.
-//
-// AWS Organizations automatically creates the required service-linked role
-// named AWSServiceRoleForOrganizations. For more information, see AWS Organizations
-// and Service-Linked Roles (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html#orgs_integrate_services-using_slrs)
-// in the AWS Organizations User Guide.
-//
-// AWS automatically enables AWS CloudTrail for AWS GovCloud (US) accounts,
-// but you should also do the following:
-//
-// * Verify that AWS CloudTrail is enabled to store logs.
-//
-// * Create an S3 bucket for AWS CloudTrail log storage. For more information,
-// see Verifying AWS CloudTrail Is Enabled (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/verifying-cloudtrail.html)
-// in the AWS GovCloud User Guide.
-//
-// If the request includes tags, then the requester must have the organizations:TagResource
-// permission. The tags are attached to the commercial account associated with
-// the GovCloud account, rather than the GovCloud account itself. To add tags
-// to the GovCloud account, call the TagResource operation in the GovCloud Region
-// after the new GovCloud account exists.
-//
-// You call this action from the management account of your organization in
-// the commercial Region to create a standalone AWS account in the AWS GovCloud
-// (US) Region. After the account is created, the management account of an organization
-// in the AWS GovCloud (US) Region can invite it to that organization. For more
-// information on inviting standalone accounts in the AWS GovCloud (US) to join
-// an organization, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// Calling CreateGovCloudAccount is an asynchronous request that AWS performs
-// in the background. Because CreateGovCloudAccount operates asynchronously,
-// it can return a successful completion message even though account initialization
-// might still be in progress. You might need to wait a few minutes before you
-// can successfully access the account. To check the status of the request,
-// do one of the following:
-//
-// * Use the OperationId response element from this operation to provide
-// as a parameter to the DescribeCreateAccountStatus operation.
-//
-// * Check the AWS CloudTrail log for the CreateAccountResult event. For
-// information on using AWS CloudTrail with Organizations, see Monitoring
-// the Activity in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html)
-// in the AWS Organizations User Guide.
-//
-// When you call the CreateGovCloudAccount action, you create two accounts:
-// a standalone account in the AWS GovCloud (US) Region and an associated account
-// in the commercial Region for billing and support purposes. The account in
-// the commercial Region is automatically a member of the organization whose
-// credentials made the request. Both accounts are associated with the same
-// email address.
-//
-// A role is created in the new account in the commercial Region that allows
-// the management account in the organization in the commercial Region to assume
-// it. An AWS GovCloud (US) account is then created and associated with the
-// commercial account that you just created. A role is also created in the new
-// AWS GovCloud (US) account that can be assumed by the AWS GovCloud (US) account
-// that is associated with the management account of the commercial organization.
-// For more information and to view a diagram that explains how account access
-// works, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// For more information about creating accounts, see Creating an AWS Account
-// in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_create.html)
-// in the AWS Organizations User Guide.
-//
-// * When you create an account in an organization using the AWS Organizations
-// console, API, or CLI commands, the information required for the account
-// to operate as a standalone account is not automatically collected. This
-// includes a payment method and signing the end user license agreement (EULA).
-// If you must remove an account from your organization later, you can do
-// so only after you provide the missing information. Follow the steps at
-// To leave an organization as a member account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * If you get an exception that indicates that you exceeded your account
-// limits for the organization, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * If you get an exception that indicates that the operation failed because
-// your organization is still initializing, wait one hour and then try again.
-// If the error persists, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * Using CreateGovCloudAccount to create multiple temporary accounts isn't
-// recommended. You can only close an account from the AWS Billing and Cost
-// Management console, and you must be signed in as the root user. For information
-// on the requirements and process for closing an account, see Closing an
-// AWS Account (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_close.html)
-// in the AWS Organizations User Guide.
-//
-// When you create a member account with this operation, you can choose whether
-// to create the account with the IAM User and Role Access to Billing Information
-// switch enabled. If you enable it, IAM users and roles that have appropriate
-// permissions can view billing information for the account. If you disable
-// it, only the account root user can access billing information. For information
-// about how to disable this switch for an account, see Granting Access to Your
-// Billing Information and Tools (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation CreateGovCloudAccount for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * FinalizingOrganizationException
-// AWS Organizations couldn't perform the operation because your organization
-// hasn't finished initializing. This can take up to an hour. Try again later.
-// If after one hour you continue to receive this error, contact AWS Support
-// (https://console.aws.amazon.com/support/home#/).
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateGovCloudAccount
-func (c *Organizations) CreateGovCloudAccount(input *CreateGovCloudAccountInput) (*CreateGovCloudAccountOutput, error) {
- req, out := c.CreateGovCloudAccountRequest(input)
- return out, req.Send()
-}
-
-// CreateGovCloudAccountWithContext is the same as CreateGovCloudAccount with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateGovCloudAccount for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) CreateGovCloudAccountWithContext(ctx aws.Context, input *CreateGovCloudAccountInput, opts ...request.Option) (*CreateGovCloudAccountOutput, error) {
- req, out := c.CreateGovCloudAccountRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateOrganization = "CreateOrganization"
-
-// CreateOrganizationRequest generates a "aws/request.Request" representing the
-// client's request for the CreateOrganization operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateOrganization for more information on using the CreateOrganization
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateOrganizationRequest method.
-// req, resp := client.CreateOrganizationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganization
-func (c *Organizations) CreateOrganizationRequest(input *CreateOrganizationInput) (req *request.Request, output *CreateOrganizationOutput) {
- op := &request.Operation{
- Name: opCreateOrganization,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateOrganizationInput{}
- }
-
- output = &CreateOrganizationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateOrganization API operation for AWS Organizations.
-//
-// Creates an AWS organization. The account whose user is calling the CreateOrganization
-// operation automatically becomes the management account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account)
-// of the new organization.
-//
-// This operation must be called using credentials from the account that is
-// to become the new organization's management account. The principal must also
-// have the relevant IAM permissions.
-//
-// By default (or if you set the FeatureSet parameter to ALL), the new organization
-// is created with all features enabled and service control policies automatically
-// enabled in the root. If you instead choose to create the organization supporting
-// only the consolidated billing features by setting the FeatureSet parameter
-// to CONSOLIDATED_BILLING", no policy types are enabled by default, and you
-// can't use organization policies
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation CreateOrganization for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AlreadyInOrganizationException
-// This account is already a member of an organization. An account can belong
-// to only one organization at a time.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * AccessDeniedForDependencyException
-// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole
-// for organizations.amazonaws.com permission so that AWS Organizations can
-// create the required service-linked role. You don't have that permission.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganization
-func (c *Organizations) CreateOrganization(input *CreateOrganizationInput) (*CreateOrganizationOutput, error) {
- req, out := c.CreateOrganizationRequest(input)
- return out, req.Send()
-}
-
-// CreateOrganizationWithContext is the same as CreateOrganization with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateOrganization for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) CreateOrganizationWithContext(ctx aws.Context, input *CreateOrganizationInput, opts ...request.Option) (*CreateOrganizationOutput, error) {
- req, out := c.CreateOrganizationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateOrganizationalUnit = "CreateOrganizationalUnit"
-
-// CreateOrganizationalUnitRequest generates a "aws/request.Request" representing the
-// client's request for the CreateOrganizationalUnit operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateOrganizationalUnit for more information on using the CreateOrganizationalUnit
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateOrganizationalUnitRequest method.
-// req, resp := client.CreateOrganizationalUnitRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganizationalUnit
-func (c *Organizations) CreateOrganizationalUnitRequest(input *CreateOrganizationalUnitInput) (req *request.Request, output *CreateOrganizationalUnitOutput) {
- op := &request.Operation{
- Name: opCreateOrganizationalUnit,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateOrganizationalUnitInput{}
- }
-
- output = &CreateOrganizationalUnitOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateOrganizationalUnit API operation for AWS Organizations.
-//
-// Creates an organizational unit (OU) within a root or parent OU. An OU is
-// a container for accounts that enables you to organize your accounts to apply
-// policies according to your business requirements. The number of levels deep
-// that you can nest OUs is dependent upon the policy types enabled for that
-// root. For service control policies, the limit is five.
-//
-// For more information about OUs, see Managing Organizational Units (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_ous.html)
-// in the AWS Organizations User Guide.
-//
-// If the request includes tags, then the requester must have the organizations:TagResource
-// permission.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation CreateOrganizationalUnit for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * DuplicateOrganizationalUnitException
-// An OU with the same name already exists.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ParentNotFoundException
-// We can't find a root or OU with the ParentId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreateOrganizationalUnit
-func (c *Organizations) CreateOrganizationalUnit(input *CreateOrganizationalUnitInput) (*CreateOrganizationalUnitOutput, error) {
- req, out := c.CreateOrganizationalUnitRequest(input)
- return out, req.Send()
-}
-
-// CreateOrganizationalUnitWithContext is the same as CreateOrganizationalUnit with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateOrganizationalUnit for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) CreateOrganizationalUnitWithContext(ctx aws.Context, input *CreateOrganizationalUnitInput, opts ...request.Option) (*CreateOrganizationalUnitOutput, error) {
- req, out := c.CreateOrganizationalUnitRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreatePolicy = "CreatePolicy"
-
-// CreatePolicyRequest generates a "aws/request.Request" representing the
-// client's request for the CreatePolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreatePolicy for more information on using the CreatePolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreatePolicyRequest method.
-// req, resp := client.CreatePolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreatePolicy
-func (c *Organizations) CreatePolicyRequest(input *CreatePolicyInput) (req *request.Request, output *CreatePolicyOutput) {
- op := &request.Operation{
- Name: opCreatePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreatePolicyInput{}
- }
-
- output = &CreatePolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreatePolicy API operation for AWS Organizations.
-//
-// Creates a policy of a specified type that you can attach to a root, an organizational
-// unit (OU), or an individual AWS account.
-//
-// For more information about policies and their use, see Managing Organization
-// Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html).
-//
-// If the request includes tags, then the requester must have the organizations:TagResource
-// permission.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation CreatePolicy for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * DuplicatePolicyException
-// A policy with the same name already exists.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * MalformedPolicyDocumentException
-// The provided policy document doesn't meet the requirements of the specified
-// policy type. For example, the syntax might be incorrect. For details about
-// service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
-// in the AWS Organizations User Guide.
-//
-// * PolicyTypeNotAvailableForOrganizationException
-// You can't use the specified policy type with the feature set currently enabled
-// for this organization. For example, you can enable SCPs only after you enable
-// all features in the organization. For more information, see Managing AWS
-// Organizations Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in
-// the AWS Organizations User Guide.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/CreatePolicy
-func (c *Organizations) CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error) {
- req, out := c.CreatePolicyRequest(input)
- return out, req.Send()
-}
-
-// CreatePolicyWithContext is the same as CreatePolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreatePolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) CreatePolicyWithContext(ctx aws.Context, input *CreatePolicyInput, opts ...request.Option) (*CreatePolicyOutput, error) {
- req, out := c.CreatePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeclineHandshake = "DeclineHandshake"
-
-// DeclineHandshakeRequest generates a "aws/request.Request" representing the
-// client's request for the DeclineHandshake operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeclineHandshake for more information on using the DeclineHandshake
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeclineHandshakeRequest method.
-// req, resp := client.DeclineHandshakeRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeclineHandshake
-func (c *Organizations) DeclineHandshakeRequest(input *DeclineHandshakeInput) (req *request.Request, output *DeclineHandshakeOutput) {
- op := &request.Operation{
- Name: opDeclineHandshake,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeclineHandshakeInput{}
- }
-
- output = &DeclineHandshakeOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DeclineHandshake API operation for AWS Organizations.
-//
-// Declines a handshake request. This sets the handshake state to DECLINED and
-// effectively deactivates the request.
-//
-// This operation can be called only from the account that received the handshake.
-// The originator of the handshake can use CancelHandshake instead. The originator
-// can't reactivate a declined request, but can reinitiate the process with
-// a new handshake request.
-//
-// After you decline a handshake, it continues to appear in the results of relevant
-// APIs for only 30 days. After that, it's deleted.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DeclineHandshake for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * HandshakeNotFoundException
-// We can't find a handshake with the HandshakeId that you specified.
-//
-// * InvalidHandshakeTransitionException
-// You can't perform the operation on the handshake in its current state. For
-// example, you can't cancel a handshake that was already accepted or accept
-// a handshake that was already declined.
-//
-// * HandshakeAlreadyInStateException
-// The specified handshake is already in the requested state. For example, you
-// can't accept a handshake that was already accepted.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeclineHandshake
-func (c *Organizations) DeclineHandshake(input *DeclineHandshakeInput) (*DeclineHandshakeOutput, error) {
- req, out := c.DeclineHandshakeRequest(input)
- return out, req.Send()
-}
-
-// DeclineHandshakeWithContext is the same as DeclineHandshake with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeclineHandshake for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DeclineHandshakeWithContext(ctx aws.Context, input *DeclineHandshakeInput, opts ...request.Option) (*DeclineHandshakeOutput, error) {
- req, out := c.DeclineHandshakeRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteOrganization = "DeleteOrganization"
-
-// DeleteOrganizationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteOrganization operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteOrganization for more information on using the DeleteOrganization
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteOrganizationRequest method.
-// req, resp := client.DeleteOrganizationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganization
-func (c *Organizations) DeleteOrganizationRequest(input *DeleteOrganizationInput) (req *request.Request, output *DeleteOrganizationOutput) {
- op := &request.Operation{
- Name: opDeleteOrganization,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteOrganizationInput{}
- }
-
- output = &DeleteOrganizationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteOrganization API operation for AWS Organizations.
-//
-// Deletes the organization. You can delete an organization only by using credentials
-// from the management account. The organization must be empty of member accounts.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DeleteOrganization for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * OrganizationNotEmptyException
-// The organization isn't empty. To delete an organization, you must first remove
-// all accounts except the management account, delete all OUs, and delete all
-// policies.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganization
-func (c *Organizations) DeleteOrganization(input *DeleteOrganizationInput) (*DeleteOrganizationOutput, error) {
- req, out := c.DeleteOrganizationRequest(input)
- return out, req.Send()
-}
-
-// DeleteOrganizationWithContext is the same as DeleteOrganization with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteOrganization for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DeleteOrganizationWithContext(ctx aws.Context, input *DeleteOrganizationInput, opts ...request.Option) (*DeleteOrganizationOutput, error) {
- req, out := c.DeleteOrganizationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteOrganizationalUnit = "DeleteOrganizationalUnit"
-
-// DeleteOrganizationalUnitRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteOrganizationalUnit operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteOrganizationalUnit for more information on using the DeleteOrganizationalUnit
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteOrganizationalUnitRequest method.
-// req, resp := client.DeleteOrganizationalUnitRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganizationalUnit
-func (c *Organizations) DeleteOrganizationalUnitRequest(input *DeleteOrganizationalUnitInput) (req *request.Request, output *DeleteOrganizationalUnitOutput) {
- op := &request.Operation{
- Name: opDeleteOrganizationalUnit,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteOrganizationalUnitInput{}
- }
-
- output = &DeleteOrganizationalUnitOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteOrganizationalUnit API operation for AWS Organizations.
-//
-// Deletes an organizational unit (OU) from a root or another OU. You must first
-// remove all accounts and child OUs from the OU that you want to delete.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DeleteOrganizationalUnit for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * OrganizationalUnitNotEmptyException
-// The specified OU is not empty. Move all accounts to another root or to other
-// OUs, remove all child OUs, and try the operation again.
-//
-// * OrganizationalUnitNotFoundException
-// We can't find an OU with the OrganizationalUnitId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeleteOrganizationalUnit
-func (c *Organizations) DeleteOrganizationalUnit(input *DeleteOrganizationalUnitInput) (*DeleteOrganizationalUnitOutput, error) {
- req, out := c.DeleteOrganizationalUnitRequest(input)
- return out, req.Send()
-}
-
-// DeleteOrganizationalUnitWithContext is the same as DeleteOrganizationalUnit with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteOrganizationalUnit for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DeleteOrganizationalUnitWithContext(ctx aws.Context, input *DeleteOrganizationalUnitInput, opts ...request.Option) (*DeleteOrganizationalUnitOutput, error) {
- req, out := c.DeleteOrganizationalUnitRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeletePolicy = "DeletePolicy"
-
-// DeletePolicyRequest generates a "aws/request.Request" representing the
-// client's request for the DeletePolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeletePolicy for more information on using the DeletePolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeletePolicyRequest method.
-// req, resp := client.DeletePolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeletePolicy
-func (c *Organizations) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) {
- op := &request.Operation{
- Name: opDeletePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeletePolicyInput{}
- }
-
- output = &DeletePolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeletePolicy API operation for AWS Organizations.
-//
-// Deletes the specified policy from your organization. Before you perform this
-// operation, you must first detach the policy from all organizational units
-// (OUs), roots, and accounts.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DeletePolicy for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * PolicyInUseException
-// The policy is attached to one or more entities. You must detach it from all
-// roots, OUs, and accounts before performing this operation.
-//
-// * PolicyNotFoundException
-// We can't find a policy with the PolicyId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeletePolicy
-func (c *Organizations) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) {
- req, out := c.DeletePolicyRequest(input)
- return out, req.Send()
-}
-
-// DeletePolicyWithContext is the same as DeletePolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeletePolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) {
- req, out := c.DeletePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeregisterDelegatedAdministrator = "DeregisterDelegatedAdministrator"
-
-// DeregisterDelegatedAdministratorRequest generates a "aws/request.Request" representing the
-// client's request for the DeregisterDelegatedAdministrator operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeregisterDelegatedAdministrator for more information on using the DeregisterDelegatedAdministrator
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeregisterDelegatedAdministratorRequest method.
-// req, resp := client.DeregisterDelegatedAdministratorRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeregisterDelegatedAdministrator
-func (c *Organizations) DeregisterDelegatedAdministratorRequest(input *DeregisterDelegatedAdministratorInput) (req *request.Request, output *DeregisterDelegatedAdministratorOutput) {
- op := &request.Operation{
- Name: opDeregisterDelegatedAdministrator,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeregisterDelegatedAdministratorInput{}
- }
-
- output = &DeregisterDelegatedAdministratorOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeregisterDelegatedAdministrator API operation for AWS Organizations.
-//
-// Removes the specified member AWS account as a delegated administrator for
-// the specified AWS service.
-//
-// Deregistering a delegated administrator can have unintended impacts on the
-// functionality of the enabled AWS service. See the documentation for the enabled
-// service before you deregister a delegated administrator so that you understand
-// any potential impacts.
-//
-// You can run this action only for AWS services that support this feature.
-// For a current list of services that support it, see the column Supports Delegated
-// Administrator in the table at AWS Services that you can use with AWS Organizations
-// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html)
-// in the AWS Organizations User Guide.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DeregisterDelegatedAdministrator for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AccountNotFoundException
-// We can't find an AWS account with the AccountId that you specified, or the
-// account whose credentials you used to make this request isn't a member of
-// an organization.
-//
-// * AccountNotRegisteredException
-// The specified account is not a delegated administrator for this AWS service.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DeregisterDelegatedAdministrator
-func (c *Organizations) DeregisterDelegatedAdministrator(input *DeregisterDelegatedAdministratorInput) (*DeregisterDelegatedAdministratorOutput, error) {
- req, out := c.DeregisterDelegatedAdministratorRequest(input)
- return out, req.Send()
-}
-
-// DeregisterDelegatedAdministratorWithContext is the same as DeregisterDelegatedAdministrator with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeregisterDelegatedAdministrator for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DeregisterDelegatedAdministratorWithContext(ctx aws.Context, input *DeregisterDelegatedAdministratorInput, opts ...request.Option) (*DeregisterDelegatedAdministratorOutput, error) {
- req, out := c.DeregisterDelegatedAdministratorRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeAccount = "DescribeAccount"
-
-// DescribeAccountRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeAccount operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeAccount for more information on using the DescribeAccount
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeAccountRequest method.
-// req, resp := client.DescribeAccountRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount
-func (c *Organizations) DescribeAccountRequest(input *DescribeAccountInput) (req *request.Request, output *DescribeAccountOutput) {
- op := &request.Operation{
- Name: opDescribeAccount,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeAccountInput{}
- }
-
- output = &DescribeAccountOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeAccount API operation for AWS Organizations.
-//
-// Retrieves AWS Organizations-related information about the specified account.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DescribeAccount for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AccountNotFoundException
-// We can't find an AWS account with the AccountId that you specified, or the
-// account whose credentials you used to make this request isn't a member of
-// an organization.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeAccount
-func (c *Organizations) DescribeAccount(input *DescribeAccountInput) (*DescribeAccountOutput, error) {
- req, out := c.DescribeAccountRequest(input)
- return out, req.Send()
-}
-
-// DescribeAccountWithContext is the same as DescribeAccount with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeAccount for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DescribeAccountWithContext(ctx aws.Context, input *DescribeAccountInput, opts ...request.Option) (*DescribeAccountOutput, error) {
- req, out := c.DescribeAccountRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeCreateAccountStatus = "DescribeCreateAccountStatus"
-
-// DescribeCreateAccountStatusRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeCreateAccountStatus operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeCreateAccountStatus for more information on using the DescribeCreateAccountStatus
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeCreateAccountStatusRequest method.
-// req, resp := client.DescribeCreateAccountStatusRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus
-func (c *Organizations) DescribeCreateAccountStatusRequest(input *DescribeCreateAccountStatusInput) (req *request.Request, output *DescribeCreateAccountStatusOutput) {
- op := &request.Operation{
- Name: opDescribeCreateAccountStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeCreateAccountStatusInput{}
- }
-
- output = &DescribeCreateAccountStatusOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeCreateAccountStatus API operation for AWS Organizations.
-//
-// Retrieves the current status of an asynchronous request to create an account.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DescribeCreateAccountStatus for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * CreateAccountStatusNotFoundException
-// We can't find an create account request with the CreateAccountRequestId that
-// you specified.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeCreateAccountStatus
-func (c *Organizations) DescribeCreateAccountStatus(input *DescribeCreateAccountStatusInput) (*DescribeCreateAccountStatusOutput, error) {
- req, out := c.DescribeCreateAccountStatusRequest(input)
- return out, req.Send()
-}
-
-// DescribeCreateAccountStatusWithContext is the same as DescribeCreateAccountStatus with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeCreateAccountStatus for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DescribeCreateAccountStatusWithContext(ctx aws.Context, input *DescribeCreateAccountStatusInput, opts ...request.Option) (*DescribeCreateAccountStatusOutput, error) {
- req, out := c.DescribeCreateAccountStatusRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeEffectivePolicy = "DescribeEffectivePolicy"
-
-// DescribeEffectivePolicyRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeEffectivePolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeEffectivePolicy for more information on using the DescribeEffectivePolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeEffectivePolicyRequest method.
-// req, resp := client.DescribeEffectivePolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeEffectivePolicy
-func (c *Organizations) DescribeEffectivePolicyRequest(input *DescribeEffectivePolicyInput) (req *request.Request, output *DescribeEffectivePolicyOutput) {
- op := &request.Operation{
- Name: opDescribeEffectivePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeEffectivePolicyInput{}
- }
-
- output = &DescribeEffectivePolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeEffectivePolicy API operation for AWS Organizations.
-//
-// Returns the contents of the effective policy for specified policy type and
-// account. The effective policy is the aggregation of any policies of the specified
-// type that the account inherits, plus any policy of that type that is directly
-// attached to the account.
-//
-// This operation applies only to policy types other than service control policies
-// (SCPs).
-//
-// For more information about policy inheritance, see How Policy Inheritance
-// Works (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies-inheritance.html)
-// in the AWS Organizations User Guide.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DescribeEffectivePolicy for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * TargetNotFoundException
-// We can't find a root, OU, account, or policy with the TargetId that you specified.
-//
-// * EffectivePolicyNotFoundException
-// If you ran this action on the management account, this policy type is not
-// enabled. If you ran the action on a member account, the account doesn't have
-// an effective policy of this type. Contact the administrator of your organization
-// about attaching a policy of this type to the account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeEffectivePolicy
-func (c *Organizations) DescribeEffectivePolicy(input *DescribeEffectivePolicyInput) (*DescribeEffectivePolicyOutput, error) {
- req, out := c.DescribeEffectivePolicyRequest(input)
- return out, req.Send()
-}
-
-// DescribeEffectivePolicyWithContext is the same as DescribeEffectivePolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeEffectivePolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DescribeEffectivePolicyWithContext(ctx aws.Context, input *DescribeEffectivePolicyInput, opts ...request.Option) (*DescribeEffectivePolicyOutput, error) {
- req, out := c.DescribeEffectivePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeHandshake = "DescribeHandshake"
-
-// DescribeHandshakeRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeHandshake operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeHandshake for more information on using the DescribeHandshake
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeHandshakeRequest method.
-// req, resp := client.DescribeHandshakeRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeHandshake
-func (c *Organizations) DescribeHandshakeRequest(input *DescribeHandshakeInput) (req *request.Request, output *DescribeHandshakeOutput) {
- op := &request.Operation{
- Name: opDescribeHandshake,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeHandshakeInput{}
- }
-
- output = &DescribeHandshakeOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeHandshake API operation for AWS Organizations.
-//
-// Retrieves information about a previously requested handshake. The handshake
-// ID comes from the response to the original InviteAccountToOrganization operation
-// that generated the handshake.
-//
-// You can access handshakes that are ACCEPTED, DECLINED, or CANCELED for only
-// 30 days after they change to that state. They're then deleted and no longer
-// accessible.
-//
-// This operation can be called from any account in the organization.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DescribeHandshake for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * HandshakeNotFoundException
-// We can't find a handshake with the HandshakeId that you specified.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeHandshake
-func (c *Organizations) DescribeHandshake(input *DescribeHandshakeInput) (*DescribeHandshakeOutput, error) {
- req, out := c.DescribeHandshakeRequest(input)
- return out, req.Send()
-}
-
-// DescribeHandshakeWithContext is the same as DescribeHandshake with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeHandshake for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DescribeHandshakeWithContext(ctx aws.Context, input *DescribeHandshakeInput, opts ...request.Option) (*DescribeHandshakeOutput, error) {
- req, out := c.DescribeHandshakeRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeOrganization = "DescribeOrganization"
-
-// DescribeOrganizationRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeOrganization operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeOrganization for more information on using the DescribeOrganization
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeOrganizationRequest method.
-// req, resp := client.DescribeOrganizationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganization
-func (c *Organizations) DescribeOrganizationRequest(input *DescribeOrganizationInput) (req *request.Request, output *DescribeOrganizationOutput) {
- op := &request.Operation{
- Name: opDescribeOrganization,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeOrganizationInput{}
- }
-
- output = &DescribeOrganizationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeOrganization API operation for AWS Organizations.
-//
-// Retrieves information about the organization that the user's account belongs
-// to.
-//
-// This operation can be called from any account in the organization.
-//
-// Even if a policy type is shown as available in the organization, you can
-// disable it separately at the root level with DisablePolicyType. Use ListRoots
-// to see the status of policy types for a specified root.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DescribeOrganization for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganization
-func (c *Organizations) DescribeOrganization(input *DescribeOrganizationInput) (*DescribeOrganizationOutput, error) {
- req, out := c.DescribeOrganizationRequest(input)
- return out, req.Send()
-}
-
-// DescribeOrganizationWithContext is the same as DescribeOrganization with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeOrganization for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DescribeOrganizationWithContext(ctx aws.Context, input *DescribeOrganizationInput, opts ...request.Option) (*DescribeOrganizationOutput, error) {
- req, out := c.DescribeOrganizationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeOrganizationalUnit = "DescribeOrganizationalUnit"
-
-// DescribeOrganizationalUnitRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeOrganizationalUnit operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeOrganizationalUnit for more information on using the DescribeOrganizationalUnit
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeOrganizationalUnitRequest method.
-// req, resp := client.DescribeOrganizationalUnitRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganizationalUnit
-func (c *Organizations) DescribeOrganizationalUnitRequest(input *DescribeOrganizationalUnitInput) (req *request.Request, output *DescribeOrganizationalUnitOutput) {
- op := &request.Operation{
- Name: opDescribeOrganizationalUnit,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeOrganizationalUnitInput{}
- }
-
- output = &DescribeOrganizationalUnitOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeOrganizationalUnit API operation for AWS Organizations.
-//
-// Retrieves information about an organizational unit (OU).
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DescribeOrganizationalUnit for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * OrganizationalUnitNotFoundException
-// We can't find an OU with the OrganizationalUnitId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribeOrganizationalUnit
-func (c *Organizations) DescribeOrganizationalUnit(input *DescribeOrganizationalUnitInput) (*DescribeOrganizationalUnitOutput, error) {
- req, out := c.DescribeOrganizationalUnitRequest(input)
- return out, req.Send()
-}
-
-// DescribeOrganizationalUnitWithContext is the same as DescribeOrganizationalUnit with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeOrganizationalUnit for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DescribeOrganizationalUnitWithContext(ctx aws.Context, input *DescribeOrganizationalUnitInput, opts ...request.Option) (*DescribeOrganizationalUnitOutput, error) {
- req, out := c.DescribeOrganizationalUnitRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribePolicy = "DescribePolicy"
-
-// DescribePolicyRequest generates a "aws/request.Request" representing the
-// client's request for the DescribePolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribePolicy for more information on using the DescribePolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribePolicyRequest method.
-// req, resp := client.DescribePolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribePolicy
-func (c *Organizations) DescribePolicyRequest(input *DescribePolicyInput) (req *request.Request, output *DescribePolicyOutput) {
- op := &request.Operation{
- Name: opDescribePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribePolicyInput{}
- }
-
- output = &DescribePolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribePolicy API operation for AWS Organizations.
-//
-// Retrieves information about a policy.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DescribePolicy for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * PolicyNotFoundException
-// We can't find a policy with the PolicyId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DescribePolicy
-func (c *Organizations) DescribePolicy(input *DescribePolicyInput) (*DescribePolicyOutput, error) {
- req, out := c.DescribePolicyRequest(input)
- return out, req.Send()
-}
-
-// DescribePolicyWithContext is the same as DescribePolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribePolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DescribePolicyWithContext(ctx aws.Context, input *DescribePolicyInput, opts ...request.Option) (*DescribePolicyOutput, error) {
- req, out := c.DescribePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDetachPolicy = "DetachPolicy"
-
-// DetachPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the DetachPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DetachPolicy for more information on using the DetachPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DetachPolicyRequest method.
-// req, resp := client.DetachPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DetachPolicy
-func (c *Organizations) DetachPolicyRequest(input *DetachPolicyInput) (req *request.Request, output *DetachPolicyOutput) {
- op := &request.Operation{
- Name: opDetachPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DetachPolicyInput{}
- }
-
- output = &DetachPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DetachPolicy API operation for AWS Organizations.
-//
-// Detaches a policy from a target root, organizational unit (OU), or account.
-//
-// If the policy being detached is a service control policy (SCP), the changes
-// to permissions for AWS Identity and Access Management (IAM) users and roles
-// in affected accounts are immediate.
-//
-// Every root, OU, and account must have at least one SCP attached. If you want
-// to replace the default FullAWSAccess policy with an SCP that limits the permissions
-// that can be delegated, you must attach the replacement SCP before you can
-// remove the default SCP. This is the authorization strategy of an "allow list
-// (https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_allowlist)".
-// If you instead attach a second SCP and leave the FullAWSAccess SCP still
-// attached, and specify "Effect": "Deny" in the second SCP to override the
-// "Effect": "Allow" in the FullAWSAccess policy (or any other attached SCP),
-// you're using the authorization strategy of a "deny list (https://docs.aws.amazon.com/organizations/latest/userguide/SCP_strategies.html#orgs_policies_denylist)".
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DetachPolicy for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * PolicyNotAttachedException
-// The policy isn't attached to the specified target in the specified root.
-//
-// * PolicyNotFoundException
-// We can't find a policy with the PolicyId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TargetNotFoundException
-// We can't find a root, OU, account, or policy with the TargetId that you specified.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// * PolicyChangesInProgressException
-// Changes to the effective policy are in progress, and its contents can't be
-// returned. Try the operation again later.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DetachPolicy
-func (c *Organizations) DetachPolicy(input *DetachPolicyInput) (*DetachPolicyOutput, error) {
- req, out := c.DetachPolicyRequest(input)
- return out, req.Send()
-}
-
-// DetachPolicyWithContext is the same as DetachPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DetachPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DetachPolicyWithContext(ctx aws.Context, input *DetachPolicyInput, opts ...request.Option) (*DetachPolicyOutput, error) {
- req, out := c.DetachPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDisableAWSServiceAccess = "DisableAWSServiceAccess"
-
-// DisableAWSServiceAccessRequest generates a "aws/request.Request" representing the
-// client's request for the DisableAWSServiceAccess operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DisableAWSServiceAccess for more information on using the DisableAWSServiceAccess
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DisableAWSServiceAccessRequest method.
-// req, resp := client.DisableAWSServiceAccessRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisableAWSServiceAccess
-func (c *Organizations) DisableAWSServiceAccessRequest(input *DisableAWSServiceAccessInput) (req *request.Request, output *DisableAWSServiceAccessOutput) {
- op := &request.Operation{
- Name: opDisableAWSServiceAccess,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisableAWSServiceAccessInput{}
- }
-
- output = &DisableAWSServiceAccessOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DisableAWSServiceAccess API operation for AWS Organizations.
-//
-// Disables the integration of an AWS service (the service that is specified
-// by ServicePrincipal) with AWS Organizations. When you disable integration,
-// the specified service no longer can create a service-linked role (http://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html)
-// in new accounts in your organization. This means the service can't perform
-// operations on your behalf on any new accounts in your organization. The service
-// can still perform operations in older accounts until the service completes
-// its clean-up from AWS Organizations.
-//
-// We strongly recommend that you don't use this command to disable integration
-// between AWS Organizations and the specified AWS service. Instead, use the
-// console or commands that are provided by the specified service. This lets
-// the trusted service perform any required initialization when enabling trusted
-// access, such as creating any required resources and any required clean up
-// of resources when disabling trusted access.
-//
-// For information about how to disable trusted service access to your organization
-// using the trusted service, see the Learn more link under the Supports Trusted
-// Access column at AWS services that you can use with AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html).
-// on this page.
-//
-// If you disable access by using this command, it causes the following actions
-// to occur:
-//
-// * The service can no longer create a service-linked role in the accounts
-// in your organization. This means that the service can't perform operations
-// on your behalf on any new accounts in your organization. The service can
-// still perform operations in older accounts until the service completes
-// its clean-up from AWS Organizations.
-//
-// * The service can no longer perform tasks in the member accounts in the
-// organization, unless those operations are explicitly permitted by the
-// IAM policies that are attached to your roles. This includes any data aggregation
-// from the member accounts to the management account, or to a delegated
-// administrator account, where relevant.
-//
-// * Some services detect this and clean up any remaining data or resources
-// related to the integration, while other services stop accessing the organization
-// but leave any historical data and configuration in place to support a
-// possible re-enabling of the integration.
-//
-// Using the other service's console or commands to disable the integration
-// ensures that the other service is aware that it can clean up any resources
-// that are required only for the integration. How the service cleans up its
-// resources in the organization's accounts depends on that service. For more
-// information, see the documentation for the other AWS service.
-//
-// After you perform the DisableAWSServiceAccess operation, the specified service
-// can no longer perform operations in your organization's accounts
-//
-// For more information about integrating other services with AWS Organizations,
-// including the list of services that work with Organizations, see Integrating
-// AWS Organizations with Other AWS Services (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
-// in the AWS Organizations User Guide.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DisableAWSServiceAccess for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisableAWSServiceAccess
-func (c *Organizations) DisableAWSServiceAccess(input *DisableAWSServiceAccessInput) (*DisableAWSServiceAccessOutput, error) {
- req, out := c.DisableAWSServiceAccessRequest(input)
- return out, req.Send()
-}
-
-// DisableAWSServiceAccessWithContext is the same as DisableAWSServiceAccess with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DisableAWSServiceAccess for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DisableAWSServiceAccessWithContext(ctx aws.Context, input *DisableAWSServiceAccessInput, opts ...request.Option) (*DisableAWSServiceAccessOutput, error) {
- req, out := c.DisableAWSServiceAccessRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDisablePolicyType = "DisablePolicyType"
-
-// DisablePolicyTypeRequest generates a "aws/request.Request" representing the
-// client's request for the DisablePolicyType operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DisablePolicyType for more information on using the DisablePolicyType
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DisablePolicyTypeRequest method.
-// req, resp := client.DisablePolicyTypeRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisablePolicyType
-func (c *Organizations) DisablePolicyTypeRequest(input *DisablePolicyTypeInput) (req *request.Request, output *DisablePolicyTypeOutput) {
- op := &request.Operation{
- Name: opDisablePolicyType,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisablePolicyTypeInput{}
- }
-
- output = &DisablePolicyTypeOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DisablePolicyType API operation for AWS Organizations.
-//
-// Disables an organizational policy type in a root. A policy of a certain type
-// can be attached to entities in a root only if that type is enabled in the
-// root. After you perform this operation, you no longer can attach policies
-// of the specified type to that root or to any organizational unit (OU) or
-// account in that root. You can undo this by using the EnablePolicyType operation.
-//
-// This is an asynchronous request that AWS performs in the background. If you
-// disable a policy type for a root, it still appears enabled for the organization
-// if all features (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
-// are enabled for the organization. AWS recommends that you first use ListRoots
-// to see the status of policy types for a specified root, and then use this
-// operation.
-//
-// This operation can be called only from the organization's management account.
-//
-// To view the status of available policy types in the organization, use DescribeOrganization.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation DisablePolicyType for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * PolicyTypeNotEnabledException
-// The specified policy type isn't currently enabled in this root. You can't
-// attach policies of the specified type to entities in a root until you enable
-// that type in the root. For more information, see Enabling All Features in
-// Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
-// in the AWS Organizations User Guide.
-//
-// * RootNotFoundException
-// We can't find a root with the RootId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// * PolicyChangesInProgressException
-// Changes to the effective policy are in progress, and its contents can't be
-// returned. Try the operation again later.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/DisablePolicyType
-func (c *Organizations) DisablePolicyType(input *DisablePolicyTypeInput) (*DisablePolicyTypeOutput, error) {
- req, out := c.DisablePolicyTypeRequest(input)
- return out, req.Send()
-}
-
-// DisablePolicyTypeWithContext is the same as DisablePolicyType with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DisablePolicyType for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) DisablePolicyTypeWithContext(ctx aws.Context, input *DisablePolicyTypeInput, opts ...request.Option) (*DisablePolicyTypeOutput, error) {
- req, out := c.DisablePolicyTypeRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opEnableAWSServiceAccess = "EnableAWSServiceAccess"
-
-// EnableAWSServiceAccessRequest generates a "aws/request.Request" representing the
-// client's request for the EnableAWSServiceAccess operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See EnableAWSServiceAccess for more information on using the EnableAWSServiceAccess
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the EnableAWSServiceAccessRequest method.
-// req, resp := client.EnableAWSServiceAccessRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAWSServiceAccess
-func (c *Organizations) EnableAWSServiceAccessRequest(input *EnableAWSServiceAccessInput) (req *request.Request, output *EnableAWSServiceAccessOutput) {
- op := &request.Operation{
- Name: opEnableAWSServiceAccess,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnableAWSServiceAccessInput{}
- }
-
- output = &EnableAWSServiceAccessOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// EnableAWSServiceAccess API operation for AWS Organizations.
-//
-// Enables the integration of an AWS service (the service that is specified
-// by ServicePrincipal) with AWS Organizations. When you enable integration,
-// you allow the specified service to create a service-linked role (http://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html)
-// in all the accounts in your organization. This allows the service to perform
-// operations on your behalf in your organization and its accounts.
-//
-// We recommend that you enable integration between AWS Organizations and the
-// specified AWS service by using the console or commands that are provided
-// by the specified service. Doing so ensures that the service is aware that
-// it can create the resources that are required for the integration. How the
-// service creates those resources in the organization's accounts depends on
-// that service. For more information, see the documentation for the other AWS
-// service.
-//
-// For more information about enabling services to integrate with AWS Organizations,
-// see Integrating AWS Organizations with Other AWS Services (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
-// in the AWS Organizations User Guide.
-//
-// This operation can be called only from the organization's management account
-// and only if the organization has enabled all features (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation EnableAWSServiceAccess for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAWSServiceAccess
-func (c *Organizations) EnableAWSServiceAccess(input *EnableAWSServiceAccessInput) (*EnableAWSServiceAccessOutput, error) {
- req, out := c.EnableAWSServiceAccessRequest(input)
- return out, req.Send()
-}
-
-// EnableAWSServiceAccessWithContext is the same as EnableAWSServiceAccess with the addition of
-// the ability to pass a context and additional request options.
-//
-// See EnableAWSServiceAccess for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) EnableAWSServiceAccessWithContext(ctx aws.Context, input *EnableAWSServiceAccessInput, opts ...request.Option) (*EnableAWSServiceAccessOutput, error) {
- req, out := c.EnableAWSServiceAccessRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opEnableAllFeatures = "EnableAllFeatures"
-
-// EnableAllFeaturesRequest generates a "aws/request.Request" representing the
-// client's request for the EnableAllFeatures operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See EnableAllFeatures for more information on using the EnableAllFeatures
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the EnableAllFeaturesRequest method.
-// req, resp := client.EnableAllFeaturesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAllFeatures
-func (c *Organizations) EnableAllFeaturesRequest(input *EnableAllFeaturesInput) (req *request.Request, output *EnableAllFeaturesOutput) {
- op := &request.Operation{
- Name: opEnableAllFeatures,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnableAllFeaturesInput{}
- }
-
- output = &EnableAllFeaturesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// EnableAllFeatures API operation for AWS Organizations.
-//
-// Enables all features in an organization. This enables the use of organization
-// policies that can restrict the services and actions that can be called in
-// each account. Until you enable all features, you have access only to consolidated
-// billing, and you can't use any of the advanced account administration features
-// that AWS Organizations supports. For more information, see Enabling All Features
-// in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
-// in the AWS Organizations User Guide.
-//
-// This operation is required only for organizations that were created explicitly
-// with only the consolidated billing features enabled. Calling this operation
-// sends a handshake to every invited account in the organization. The feature
-// set change can be finalized and the additional features enabled only after
-// all administrators in the invited accounts approve the change by accepting
-// the handshake.
-//
-// After you enable all features, you can separately enable or disable individual
-// policy types in a root using EnablePolicyType and DisablePolicyType. To see
-// the status of policy types in a root, use ListRoots.
-//
-// After all invited member accounts accept the handshake, you finalize the
-// feature set change by accepting the handshake that contains "Action": "ENABLE_ALL_FEATURES".
-// This completes the change.
-//
-// After you enable all features in your organization, the management account
-// in the organization can apply policies on all member accounts. These policies
-// can restrict what users and even administrators in those accounts can do.
-// The management account can apply policies that prevent accounts from leaving
-// the organization. Ensure that your account administrators are aware of this.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation EnableAllFeatures for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * HandshakeConstraintViolationException
-// The requested operation would violate the constraint identified in the reason
-// code.
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation:
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. Note that deleted and closed
-// accounts still count toward your limit. If you get this exception immediately
-// after creating the organization, wait one hour and try again. If after
-// an hour it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
-// the invited account is already a member of an organization.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
-// to join an organization while it's in the process of enabling all features.
-// You can resume inviting accounts after you finalize the process when all
-// accounts have agreed to the change.
-//
-// * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
-// because the organization has already enabled all features.
-//
-// * ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
-// request is invalid because the organization has already started the process
-// to enable all features.
-//
-// * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
-// the account is from a different marketplace than the accounts in the organization.
-// For example, accounts with India addresses must be associated with the
-// AISPL marketplace. All accounts in an organization must be from the same
-// marketplace.
-//
-// * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
-// change the membership of an account too quickly after its previous change.
-//
-// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
-// account that doesn't have a payment instrument, such as a credit card,
-// associated with it.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnableAllFeatures
-func (c *Organizations) EnableAllFeatures(input *EnableAllFeaturesInput) (*EnableAllFeaturesOutput, error) {
- req, out := c.EnableAllFeaturesRequest(input)
- return out, req.Send()
-}
-
-// EnableAllFeaturesWithContext is the same as EnableAllFeatures with the addition of
-// the ability to pass a context and additional request options.
-//
-// See EnableAllFeatures for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) EnableAllFeaturesWithContext(ctx aws.Context, input *EnableAllFeaturesInput, opts ...request.Option) (*EnableAllFeaturesOutput, error) {
- req, out := c.EnableAllFeaturesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opEnablePolicyType = "EnablePolicyType"
-
-// EnablePolicyTypeRequest generates a "aws/request.Request" representing the
-// client's request for the EnablePolicyType operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See EnablePolicyType for more information on using the EnablePolicyType
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the EnablePolicyTypeRequest method.
-// req, resp := client.EnablePolicyTypeRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnablePolicyType
-func (c *Organizations) EnablePolicyTypeRequest(input *EnablePolicyTypeInput) (req *request.Request, output *EnablePolicyTypeOutput) {
- op := &request.Operation{
- Name: opEnablePolicyType,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnablePolicyTypeInput{}
- }
-
- output = &EnablePolicyTypeOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// EnablePolicyType API operation for AWS Organizations.
-//
-// Enables a policy type in a root. After you enable a policy type in a root,
-// you can attach policies of that type to the root, any organizational unit
-// (OU), or account in that root. You can undo this by using the DisablePolicyType
-// operation.
-//
-// This is an asynchronous request that AWS performs in the background. AWS
-// recommends that you first use ListRoots to see the status of policy types
-// for a specified root, and then use this operation.
-//
-// This operation can be called only from the organization's management account.
-//
-// You can enable a policy type in a root only if that policy type is available
-// in the organization. To view the status of available policy types in the
-// organization, use DescribeOrganization.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation EnablePolicyType for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * PolicyTypeAlreadyEnabledException
-// The specified policy type is already enabled in the specified root.
-//
-// * RootNotFoundException
-// We can't find a root with the RootId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * PolicyTypeNotAvailableForOrganizationException
-// You can't use the specified policy type with the feature set currently enabled
-// for this organization. For example, you can enable SCPs only after you enable
-// all features in the organization. For more information, see Managing AWS
-// Organizations Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// * PolicyChangesInProgressException
-// Changes to the effective policy are in progress, and its contents can't be
-// returned. Try the operation again later.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/EnablePolicyType
-func (c *Organizations) EnablePolicyType(input *EnablePolicyTypeInput) (*EnablePolicyTypeOutput, error) {
- req, out := c.EnablePolicyTypeRequest(input)
- return out, req.Send()
-}
-
-// EnablePolicyTypeWithContext is the same as EnablePolicyType with the addition of
-// the ability to pass a context and additional request options.
-//
-// See EnablePolicyType for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) EnablePolicyTypeWithContext(ctx aws.Context, input *EnablePolicyTypeInput, opts ...request.Option) (*EnablePolicyTypeOutput, error) {
- req, out := c.EnablePolicyTypeRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opInviteAccountToOrganization = "InviteAccountToOrganization"
-
-// InviteAccountToOrganizationRequest generates a "aws/request.Request" representing the
-// client's request for the InviteAccountToOrganization operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See InviteAccountToOrganization for more information on using the InviteAccountToOrganization
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the InviteAccountToOrganizationRequest method.
-// req, resp := client.InviteAccountToOrganizationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/InviteAccountToOrganization
-func (c *Organizations) InviteAccountToOrganizationRequest(input *InviteAccountToOrganizationInput) (req *request.Request, output *InviteAccountToOrganizationOutput) {
- op := &request.Operation{
- Name: opInviteAccountToOrganization,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &InviteAccountToOrganizationInput{}
- }
-
- output = &InviteAccountToOrganizationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// InviteAccountToOrganization API operation for AWS Organizations.
-//
-// Sends an invitation to another account to join your organization as a member
-// account. AWS Organizations sends email on your behalf to the email address
-// that is associated with the other account's owner. The invitation is implemented
-// as a Handshake whose details are in the response.
-//
-// * You can invite AWS accounts only from the same seller as the management
-// account. For example, if your organization's management account was created
-// by Amazon Internet Services Pvt. Ltd (AISPL), an AWS seller in India,
-// you can invite only other AISPL accounts to your organization. You can't
-// combine accounts from AISPL and AWS or from any other AWS seller. For
-// more information, see Consolidated Billing in India (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/useconsolidatedbilliing-India.html).
-//
-// * If you receive an exception that indicates that you exceeded your account
-// limits for the organization or that the operation failed because your
-// organization is still initializing, wait one hour and then try again.
-// If the error persists after an hour, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// If the request includes tags, then the requester must have the organizations:TagResource
-// permission.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation InviteAccountToOrganization for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * AccountOwnerNotVerifiedException
-// You can't invite an existing account to your organization until you verify
-// that you own the email address associated with the management account. For
-// more information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification)
-// in the AWS Organizations User Guide.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * HandshakeConstraintViolationException
-// The requested operation would violate the constraint identified in the reason
-// code.
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation:
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. Note that deleted and closed
-// accounts still count toward your limit. If you get this exception immediately
-// after creating the organization, wait one hour and try again. If after
-// an hour it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
-// the invited account is already a member of an organization.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
-// to join an organization while it's in the process of enabling all features.
-// You can resume inviting accounts after you finalize the process when all
-// accounts have agreed to the change.
-//
-// * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
-// because the organization has already enabled all features.
-//
-// * ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
-// request is invalid because the organization has already started the process
-// to enable all features.
-//
-// * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
-// the account is from a different marketplace than the accounts in the organization.
-// For example, accounts with India addresses must be associated with the
-// AISPL marketplace. All accounts in an organization must be from the same
-// marketplace.
-//
-// * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
-// change the membership of an account too quickly after its previous change.
-//
-// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
-// account that doesn't have a payment instrument, such as a credit card,
-// associated with it.
-//
-// * DuplicateHandshakeException
-// A handshake with the same action and target already exists. For example,
-// if you invited an account to join your organization, the invited account
-// might already have a pending invitation from this organization. If you intend
-// to resend an invitation to an account, ensure that existing handshakes that
-// might be considered duplicates are canceled or declined.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * FinalizingOrganizationException
-// AWS Organizations couldn't perform the operation because your organization
-// hasn't finished initializing. This can take up to an hour. Try again later.
-// If after one hour you continue to receive this error, contact AWS Support
-// (https://console.aws.amazon.com/support/home#/).
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/InviteAccountToOrganization
-func (c *Organizations) InviteAccountToOrganization(input *InviteAccountToOrganizationInput) (*InviteAccountToOrganizationOutput, error) {
- req, out := c.InviteAccountToOrganizationRequest(input)
- return out, req.Send()
-}
-
-// InviteAccountToOrganizationWithContext is the same as InviteAccountToOrganization with the addition of
-// the ability to pass a context and additional request options.
-//
-// See InviteAccountToOrganization for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) InviteAccountToOrganizationWithContext(ctx aws.Context, input *InviteAccountToOrganizationInput, opts ...request.Option) (*InviteAccountToOrganizationOutput, error) {
- req, out := c.InviteAccountToOrganizationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opLeaveOrganization = "LeaveOrganization"
-
-// LeaveOrganizationRequest generates a "aws/request.Request" representing the
-// client's request for the LeaveOrganization operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See LeaveOrganization for more information on using the LeaveOrganization
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the LeaveOrganizationRequest method.
-// req, resp := client.LeaveOrganizationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/LeaveOrganization
-func (c *Organizations) LeaveOrganizationRequest(input *LeaveOrganizationInput) (req *request.Request, output *LeaveOrganizationOutput) {
- op := &request.Operation{
- Name: opLeaveOrganization,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &LeaveOrganizationInput{}
- }
-
- output = &LeaveOrganizationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// LeaveOrganization API operation for AWS Organizations.
-//
-// Removes a member account from its parent organization. This version of the
-// operation is performed by the account that wants to leave. To remove a member
-// account as a user in the management account, use RemoveAccountFromOrganization
-// instead.
-//
-// This operation can be called only from a member account in the organization.
-//
-// * The management account in an organization with all features enabled
-// can set service control policies (SCPs) that can restrict what administrators
-// of member accounts can do. This includes preventing them from successfully
-// calling LeaveOrganization and leaving the organization.
-//
-// * You can leave an organization as a member account only if the account
-// is configured with the information required to operate as a standalone
-// account. When you create an account in an organization using the AWS Organizations
-// console, API, or CLI commands, the information required of standalone
-// accounts is not automatically collected. For each account that you want
-// to make standalone, you must perform the following steps. If any of the
-// steps are already completed for this account, that step doesn't appear.
-// Choose a support plan Provide and verify the required contact information
-// Provide a current payment method AWS uses the payment method to charge
-// for any billable (not free tier) AWS activity that occurs while the account
-// isn't attached to an organization. Follow the steps at To leave an organization
-// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * The account that you want to leave must not be a delegated administrator
-// account for any AWS service enabled for your organization. If the account
-// is a delegated administrator, you must first change the delegated administrator
-// account to another account that is remaining in the organization.
-//
-// * You can leave an organization only after you enable IAM user access
-// to billing in your account. For more information, see Activating Access
-// to the Billing and Cost Management Console (http://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate)
-// in the AWS Billing and Cost Management User Guide.
-//
-// * After the account leaves the organization, all tags that were attached
-// to the account object in the organization are deleted. AWS accounts outside
-// of an organization do not support tags.
-//
-// * A newly created account has a waiting period before it can be removed
-// from its organization. If you get an error that indicates that a wait
-// period is required, then try again in a few days.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation LeaveOrganization for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AccountNotFoundException
-// We can't find an AWS account with the AccountId that you specified, or the
-// account whose credentials you used to make this request isn't a member of
-// an organization.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * MasterCannotLeaveOrganizationException
-// You can't remove a management account from an organization. If you want the
-// management account to become a member account in another organization, you
-// must first delete the current organization of the management account.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/LeaveOrganization
-func (c *Organizations) LeaveOrganization(input *LeaveOrganizationInput) (*LeaveOrganizationOutput, error) {
- req, out := c.LeaveOrganizationRequest(input)
- return out, req.Send()
-}
-
-// LeaveOrganizationWithContext is the same as LeaveOrganization with the addition of
-// the ability to pass a context and additional request options.
-//
-// See LeaveOrganization for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) LeaveOrganizationWithContext(ctx aws.Context, input *LeaveOrganizationInput, opts ...request.Option) (*LeaveOrganizationOutput, error) {
- req, out := c.LeaveOrganizationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListAWSServiceAccessForOrganization = "ListAWSServiceAccessForOrganization"
-
-// ListAWSServiceAccessForOrganizationRequest generates a "aws/request.Request" representing the
-// client's request for the ListAWSServiceAccessForOrganization operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListAWSServiceAccessForOrganization for more information on using the ListAWSServiceAccessForOrganization
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListAWSServiceAccessForOrganizationRequest method.
-// req, resp := client.ListAWSServiceAccessForOrganizationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAWSServiceAccessForOrganization
-func (c *Organizations) ListAWSServiceAccessForOrganizationRequest(input *ListAWSServiceAccessForOrganizationInput) (req *request.Request, output *ListAWSServiceAccessForOrganizationOutput) {
- op := &request.Operation{
- Name: opListAWSServiceAccessForOrganization,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListAWSServiceAccessForOrganizationInput{}
- }
-
- output = &ListAWSServiceAccessForOrganizationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListAWSServiceAccessForOrganization API operation for AWS Organizations.
-//
-// Returns a list of the AWS services that you enabled to integrate with your
-// organization. After a service on this list creates the resources that it
-// requires for the integration, it can perform operations on your organization
-// and its accounts.
-//
-// For more information about integrating other services with AWS Organizations,
-// including the list of services that currently work with Organizations, see
-// Integrating AWS Organizations with Other AWS Services (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html)
-// in the AWS Organizations User Guide.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListAWSServiceAccessForOrganization for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAWSServiceAccessForOrganization
-func (c *Organizations) ListAWSServiceAccessForOrganization(input *ListAWSServiceAccessForOrganizationInput) (*ListAWSServiceAccessForOrganizationOutput, error) {
- req, out := c.ListAWSServiceAccessForOrganizationRequest(input)
- return out, req.Send()
-}
-
-// ListAWSServiceAccessForOrganizationWithContext is the same as ListAWSServiceAccessForOrganization with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAWSServiceAccessForOrganization for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListAWSServiceAccessForOrganizationWithContext(ctx aws.Context, input *ListAWSServiceAccessForOrganizationInput, opts ...request.Option) (*ListAWSServiceAccessForOrganizationOutput, error) {
- req, out := c.ListAWSServiceAccessForOrganizationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListAWSServiceAccessForOrganizationPages iterates over the pages of a ListAWSServiceAccessForOrganization operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListAWSServiceAccessForOrganization method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListAWSServiceAccessForOrganization operation.
-// pageNum := 0
-// err := client.ListAWSServiceAccessForOrganizationPages(params,
-// func(page *organizations.ListAWSServiceAccessForOrganizationOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListAWSServiceAccessForOrganizationPages(input *ListAWSServiceAccessForOrganizationInput, fn func(*ListAWSServiceAccessForOrganizationOutput, bool) bool) error {
- return c.ListAWSServiceAccessForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListAWSServiceAccessForOrganizationPagesWithContext same as ListAWSServiceAccessForOrganizationPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListAWSServiceAccessForOrganizationPagesWithContext(ctx aws.Context, input *ListAWSServiceAccessForOrganizationInput, fn func(*ListAWSServiceAccessForOrganizationOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListAWSServiceAccessForOrganizationInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListAWSServiceAccessForOrganizationRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListAWSServiceAccessForOrganizationOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListAccounts = "ListAccounts"
-
-// ListAccountsRequest generates a "aws/request.Request" representing the
-// client's request for the ListAccounts operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListAccounts for more information on using the ListAccounts
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListAccountsRequest method.
-// req, resp := client.ListAccountsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccounts
-func (c *Organizations) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) {
- op := &request.Operation{
- Name: opListAccounts,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListAccountsInput{}
- }
-
- output = &ListAccountsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListAccounts API operation for AWS Organizations.
-//
-// Lists all the accounts in the organization. To request only the accounts
-// in a specified root or organizational unit (OU), use the ListAccountsForParent
-// operation instead.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListAccounts for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccounts
-func (c *Organizations) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) {
- req, out := c.ListAccountsRequest(input)
- return out, req.Send()
-}
-
-// ListAccountsWithContext is the same as ListAccounts with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAccounts for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error) {
- req, out := c.ListAccountsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListAccountsPages iterates over the pages of a ListAccounts operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListAccounts method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListAccounts operation.
-// pageNum := 0
-// err := client.ListAccountsPages(params,
-// func(page *organizations.ListAccountsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error {
- return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListAccountsPagesWithContext same as ListAccountsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListAccountsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListAccountsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListAccountsForParent = "ListAccountsForParent"
-
-// ListAccountsForParentRequest generates a "aws/request.Request" representing the
-// client's request for the ListAccountsForParent operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListAccountsForParent for more information on using the ListAccountsForParent
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListAccountsForParentRequest method.
-// req, resp := client.ListAccountsForParentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccountsForParent
-func (c *Organizations) ListAccountsForParentRequest(input *ListAccountsForParentInput) (req *request.Request, output *ListAccountsForParentOutput) {
- op := &request.Operation{
- Name: opListAccountsForParent,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListAccountsForParentInput{}
- }
-
- output = &ListAccountsForParentOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListAccountsForParent API operation for AWS Organizations.
-//
-// Lists the accounts in an organization that are contained by the specified
-// target root or organizational unit (OU). If you specify the root, you get
-// a list of all the accounts that aren't in any OU. If you specify an OU, you
-// get a list of all the accounts in only that OU and not in any child OUs.
-// To get a list of all accounts in the organization, use the ListAccounts operation.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListAccountsForParent for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ParentNotFoundException
-// We can't find a root or OU with the ParentId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListAccountsForParent
-func (c *Organizations) ListAccountsForParent(input *ListAccountsForParentInput) (*ListAccountsForParentOutput, error) {
- req, out := c.ListAccountsForParentRequest(input)
- return out, req.Send()
-}
-
-// ListAccountsForParentWithContext is the same as ListAccountsForParent with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAccountsForParent for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListAccountsForParentWithContext(ctx aws.Context, input *ListAccountsForParentInput, opts ...request.Option) (*ListAccountsForParentOutput, error) {
- req, out := c.ListAccountsForParentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListAccountsForParentPages iterates over the pages of a ListAccountsForParent operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListAccountsForParent method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListAccountsForParent operation.
-// pageNum := 0
-// err := client.ListAccountsForParentPages(params,
-// func(page *organizations.ListAccountsForParentOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListAccountsForParentPages(input *ListAccountsForParentInput, fn func(*ListAccountsForParentOutput, bool) bool) error {
- return c.ListAccountsForParentPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListAccountsForParentPagesWithContext same as ListAccountsForParentPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListAccountsForParentPagesWithContext(ctx aws.Context, input *ListAccountsForParentInput, fn func(*ListAccountsForParentOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListAccountsForParentInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListAccountsForParentRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListAccountsForParentOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListChildren = "ListChildren"
-
-// ListChildrenRequest generates a "aws/request.Request" representing the
-// client's request for the ListChildren operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListChildren for more information on using the ListChildren
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListChildrenRequest method.
-// req, resp := client.ListChildrenRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListChildren
-func (c *Organizations) ListChildrenRequest(input *ListChildrenInput) (req *request.Request, output *ListChildrenOutput) {
- op := &request.Operation{
- Name: opListChildren,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListChildrenInput{}
- }
-
- output = &ListChildrenOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListChildren API operation for AWS Organizations.
-//
-// Lists all of the organizational units (OUs) or accounts that are contained
-// in the specified parent OU or root. This operation, along with ListParents
-// enables you to traverse the tree structure that makes up this root.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListChildren for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ParentNotFoundException
-// We can't find a root or OU with the ParentId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListChildren
-func (c *Organizations) ListChildren(input *ListChildrenInput) (*ListChildrenOutput, error) {
- req, out := c.ListChildrenRequest(input)
- return out, req.Send()
-}
-
-// ListChildrenWithContext is the same as ListChildren with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListChildren for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListChildrenWithContext(ctx aws.Context, input *ListChildrenInput, opts ...request.Option) (*ListChildrenOutput, error) {
- req, out := c.ListChildrenRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListChildrenPages iterates over the pages of a ListChildren operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListChildren method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListChildren operation.
-// pageNum := 0
-// err := client.ListChildrenPages(params,
-// func(page *organizations.ListChildrenOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListChildrenPages(input *ListChildrenInput, fn func(*ListChildrenOutput, bool) bool) error {
- return c.ListChildrenPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListChildrenPagesWithContext same as ListChildrenPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListChildrenPagesWithContext(ctx aws.Context, input *ListChildrenInput, fn func(*ListChildrenOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListChildrenInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListChildrenRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListChildrenOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListCreateAccountStatus = "ListCreateAccountStatus"
-
-// ListCreateAccountStatusRequest generates a "aws/request.Request" representing the
-// client's request for the ListCreateAccountStatus operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListCreateAccountStatus for more information on using the ListCreateAccountStatus
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListCreateAccountStatusRequest method.
-// req, resp := client.ListCreateAccountStatusRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListCreateAccountStatus
-func (c *Organizations) ListCreateAccountStatusRequest(input *ListCreateAccountStatusInput) (req *request.Request, output *ListCreateAccountStatusOutput) {
- op := &request.Operation{
- Name: opListCreateAccountStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListCreateAccountStatusInput{}
- }
-
- output = &ListCreateAccountStatusOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListCreateAccountStatus API operation for AWS Organizations.
-//
-// Lists the account creation requests that match the specified status that
-// is currently being tracked for the organization.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListCreateAccountStatus for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListCreateAccountStatus
-func (c *Organizations) ListCreateAccountStatus(input *ListCreateAccountStatusInput) (*ListCreateAccountStatusOutput, error) {
- req, out := c.ListCreateAccountStatusRequest(input)
- return out, req.Send()
-}
-
-// ListCreateAccountStatusWithContext is the same as ListCreateAccountStatus with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListCreateAccountStatus for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListCreateAccountStatusWithContext(ctx aws.Context, input *ListCreateAccountStatusInput, opts ...request.Option) (*ListCreateAccountStatusOutput, error) {
- req, out := c.ListCreateAccountStatusRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListCreateAccountStatusPages iterates over the pages of a ListCreateAccountStatus operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListCreateAccountStatus method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListCreateAccountStatus operation.
-// pageNum := 0
-// err := client.ListCreateAccountStatusPages(params,
-// func(page *organizations.ListCreateAccountStatusOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListCreateAccountStatusPages(input *ListCreateAccountStatusInput, fn func(*ListCreateAccountStatusOutput, bool) bool) error {
- return c.ListCreateAccountStatusPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListCreateAccountStatusPagesWithContext same as ListCreateAccountStatusPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListCreateAccountStatusPagesWithContext(ctx aws.Context, input *ListCreateAccountStatusInput, fn func(*ListCreateAccountStatusOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListCreateAccountStatusInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListCreateAccountStatusRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListCreateAccountStatusOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListDelegatedAdministrators = "ListDelegatedAdministrators"
-
-// ListDelegatedAdministratorsRequest generates a "aws/request.Request" representing the
-// client's request for the ListDelegatedAdministrators operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListDelegatedAdministrators for more information on using the ListDelegatedAdministrators
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListDelegatedAdministratorsRequest method.
-// req, resp := client.ListDelegatedAdministratorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedAdministrators
-func (c *Organizations) ListDelegatedAdministratorsRequest(input *ListDelegatedAdministratorsInput) (req *request.Request, output *ListDelegatedAdministratorsOutput) {
- op := &request.Operation{
- Name: opListDelegatedAdministrators,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListDelegatedAdministratorsInput{}
- }
-
- output = &ListDelegatedAdministratorsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListDelegatedAdministrators API operation for AWS Organizations.
-//
-// Lists the AWS accounts that are designated as delegated administrators in
-// this organization.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListDelegatedAdministrators for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedAdministrators
-func (c *Organizations) ListDelegatedAdministrators(input *ListDelegatedAdministratorsInput) (*ListDelegatedAdministratorsOutput, error) {
- req, out := c.ListDelegatedAdministratorsRequest(input)
- return out, req.Send()
-}
-
-// ListDelegatedAdministratorsWithContext is the same as ListDelegatedAdministrators with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListDelegatedAdministrators for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListDelegatedAdministratorsWithContext(ctx aws.Context, input *ListDelegatedAdministratorsInput, opts ...request.Option) (*ListDelegatedAdministratorsOutput, error) {
- req, out := c.ListDelegatedAdministratorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListDelegatedAdministratorsPages iterates over the pages of a ListDelegatedAdministrators operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListDelegatedAdministrators method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListDelegatedAdministrators operation.
-// pageNum := 0
-// err := client.ListDelegatedAdministratorsPages(params,
-// func(page *organizations.ListDelegatedAdministratorsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListDelegatedAdministratorsPages(input *ListDelegatedAdministratorsInput, fn func(*ListDelegatedAdministratorsOutput, bool) bool) error {
- return c.ListDelegatedAdministratorsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListDelegatedAdministratorsPagesWithContext same as ListDelegatedAdministratorsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListDelegatedAdministratorsPagesWithContext(ctx aws.Context, input *ListDelegatedAdministratorsInput, fn func(*ListDelegatedAdministratorsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListDelegatedAdministratorsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListDelegatedAdministratorsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListDelegatedAdministratorsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListDelegatedServicesForAccount = "ListDelegatedServicesForAccount"
-
-// ListDelegatedServicesForAccountRequest generates a "aws/request.Request" representing the
-// client's request for the ListDelegatedServicesForAccount operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListDelegatedServicesForAccount for more information on using the ListDelegatedServicesForAccount
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListDelegatedServicesForAccountRequest method.
-// req, resp := client.ListDelegatedServicesForAccountRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedServicesForAccount
-func (c *Organizations) ListDelegatedServicesForAccountRequest(input *ListDelegatedServicesForAccountInput) (req *request.Request, output *ListDelegatedServicesForAccountOutput) {
- op := &request.Operation{
- Name: opListDelegatedServicesForAccount,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListDelegatedServicesForAccountInput{}
- }
-
- output = &ListDelegatedServicesForAccountOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListDelegatedServicesForAccount API operation for AWS Organizations.
-//
-// List the AWS services for which the specified account is a delegated administrator.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListDelegatedServicesForAccount for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AccountNotFoundException
-// We can't find an AWS account with the AccountId that you specified, or the
-// account whose credentials you used to make this request isn't a member of
-// an organization.
-//
-// * AccountNotRegisteredException
-// The specified account is not a delegated administrator for this AWS service.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListDelegatedServicesForAccount
-func (c *Organizations) ListDelegatedServicesForAccount(input *ListDelegatedServicesForAccountInput) (*ListDelegatedServicesForAccountOutput, error) {
- req, out := c.ListDelegatedServicesForAccountRequest(input)
- return out, req.Send()
-}
-
-// ListDelegatedServicesForAccountWithContext is the same as ListDelegatedServicesForAccount with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListDelegatedServicesForAccount for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListDelegatedServicesForAccountWithContext(ctx aws.Context, input *ListDelegatedServicesForAccountInput, opts ...request.Option) (*ListDelegatedServicesForAccountOutput, error) {
- req, out := c.ListDelegatedServicesForAccountRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListDelegatedServicesForAccountPages iterates over the pages of a ListDelegatedServicesForAccount operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListDelegatedServicesForAccount method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListDelegatedServicesForAccount operation.
-// pageNum := 0
-// err := client.ListDelegatedServicesForAccountPages(params,
-// func(page *organizations.ListDelegatedServicesForAccountOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListDelegatedServicesForAccountPages(input *ListDelegatedServicesForAccountInput, fn func(*ListDelegatedServicesForAccountOutput, bool) bool) error {
- return c.ListDelegatedServicesForAccountPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListDelegatedServicesForAccountPagesWithContext same as ListDelegatedServicesForAccountPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListDelegatedServicesForAccountPagesWithContext(ctx aws.Context, input *ListDelegatedServicesForAccountInput, fn func(*ListDelegatedServicesForAccountOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListDelegatedServicesForAccountInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListDelegatedServicesForAccountRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListDelegatedServicesForAccountOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListHandshakesForAccount = "ListHandshakesForAccount"
-
-// ListHandshakesForAccountRequest generates a "aws/request.Request" representing the
-// client's request for the ListHandshakesForAccount operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListHandshakesForAccount for more information on using the ListHandshakesForAccount
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListHandshakesForAccountRequest method.
-// req, resp := client.ListHandshakesForAccountRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForAccount
-func (c *Organizations) ListHandshakesForAccountRequest(input *ListHandshakesForAccountInput) (req *request.Request, output *ListHandshakesForAccountOutput) {
- op := &request.Operation{
- Name: opListHandshakesForAccount,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListHandshakesForAccountInput{}
- }
-
- output = &ListHandshakesForAccountOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListHandshakesForAccount API operation for AWS Organizations.
-//
-// Lists the current handshakes that are associated with the account of the
-// requesting user.
-//
-// Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results
-// of this API for only 30 days after changing to that state. After that, they're
-// deleted and no longer accessible.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called from any account in the organization.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListHandshakesForAccount for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForAccount
-func (c *Organizations) ListHandshakesForAccount(input *ListHandshakesForAccountInput) (*ListHandshakesForAccountOutput, error) {
- req, out := c.ListHandshakesForAccountRequest(input)
- return out, req.Send()
-}
-
-// ListHandshakesForAccountWithContext is the same as ListHandshakesForAccount with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListHandshakesForAccount for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListHandshakesForAccountWithContext(ctx aws.Context, input *ListHandshakesForAccountInput, opts ...request.Option) (*ListHandshakesForAccountOutput, error) {
- req, out := c.ListHandshakesForAccountRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListHandshakesForAccountPages iterates over the pages of a ListHandshakesForAccount operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListHandshakesForAccount method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListHandshakesForAccount operation.
-// pageNum := 0
-// err := client.ListHandshakesForAccountPages(params,
-// func(page *organizations.ListHandshakesForAccountOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListHandshakesForAccountPages(input *ListHandshakesForAccountInput, fn func(*ListHandshakesForAccountOutput, bool) bool) error {
- return c.ListHandshakesForAccountPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListHandshakesForAccountPagesWithContext same as ListHandshakesForAccountPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListHandshakesForAccountPagesWithContext(ctx aws.Context, input *ListHandshakesForAccountInput, fn func(*ListHandshakesForAccountOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListHandshakesForAccountInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListHandshakesForAccountRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListHandshakesForAccountOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListHandshakesForOrganization = "ListHandshakesForOrganization"
-
-// ListHandshakesForOrganizationRequest generates a "aws/request.Request" representing the
-// client's request for the ListHandshakesForOrganization operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListHandshakesForOrganization for more information on using the ListHandshakesForOrganization
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListHandshakesForOrganizationRequest method.
-// req, resp := client.ListHandshakesForOrganizationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForOrganization
-func (c *Organizations) ListHandshakesForOrganizationRequest(input *ListHandshakesForOrganizationInput) (req *request.Request, output *ListHandshakesForOrganizationOutput) {
- op := &request.Operation{
- Name: opListHandshakesForOrganization,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListHandshakesForOrganizationInput{}
- }
-
- output = &ListHandshakesForOrganizationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListHandshakesForOrganization API operation for AWS Organizations.
-//
-// Lists the handshakes that are associated with the organization that the requesting
-// user is part of. The ListHandshakesForOrganization operation returns a list
-// of handshake structures. Each structure contains details and status about
-// a handshake.
-//
-// Handshakes that are ACCEPTED, DECLINED, or CANCELED appear in the results
-// of this API for only 30 days after changing to that state. After that, they're
-// deleted and no longer accessible.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListHandshakesForOrganization for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListHandshakesForOrganization
-func (c *Organizations) ListHandshakesForOrganization(input *ListHandshakesForOrganizationInput) (*ListHandshakesForOrganizationOutput, error) {
- req, out := c.ListHandshakesForOrganizationRequest(input)
- return out, req.Send()
-}
-
-// ListHandshakesForOrganizationWithContext is the same as ListHandshakesForOrganization with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListHandshakesForOrganization for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListHandshakesForOrganizationWithContext(ctx aws.Context, input *ListHandshakesForOrganizationInput, opts ...request.Option) (*ListHandshakesForOrganizationOutput, error) {
- req, out := c.ListHandshakesForOrganizationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListHandshakesForOrganizationPages iterates over the pages of a ListHandshakesForOrganization operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListHandshakesForOrganization method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListHandshakesForOrganization operation.
-// pageNum := 0
-// err := client.ListHandshakesForOrganizationPages(params,
-// func(page *organizations.ListHandshakesForOrganizationOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListHandshakesForOrganizationPages(input *ListHandshakesForOrganizationInput, fn func(*ListHandshakesForOrganizationOutput, bool) bool) error {
- return c.ListHandshakesForOrganizationPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListHandshakesForOrganizationPagesWithContext same as ListHandshakesForOrganizationPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListHandshakesForOrganizationPagesWithContext(ctx aws.Context, input *ListHandshakesForOrganizationInput, fn func(*ListHandshakesForOrganizationOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListHandshakesForOrganizationInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListHandshakesForOrganizationRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListHandshakesForOrganizationOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListOrganizationalUnitsForParent = "ListOrganizationalUnitsForParent"
-
-// ListOrganizationalUnitsForParentRequest generates a "aws/request.Request" representing the
-// client's request for the ListOrganizationalUnitsForParent operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListOrganizationalUnitsForParent for more information on using the ListOrganizationalUnitsForParent
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListOrganizationalUnitsForParentRequest method.
-// req, resp := client.ListOrganizationalUnitsForParentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListOrganizationalUnitsForParent
-func (c *Organizations) ListOrganizationalUnitsForParentRequest(input *ListOrganizationalUnitsForParentInput) (req *request.Request, output *ListOrganizationalUnitsForParentOutput) {
- op := &request.Operation{
- Name: opListOrganizationalUnitsForParent,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListOrganizationalUnitsForParentInput{}
- }
-
- output = &ListOrganizationalUnitsForParentOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListOrganizationalUnitsForParent API operation for AWS Organizations.
-//
-// Lists the organizational units (OUs) in a parent organizational unit or root.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListOrganizationalUnitsForParent for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ParentNotFoundException
-// We can't find a root or OU with the ParentId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListOrganizationalUnitsForParent
-func (c *Organizations) ListOrganizationalUnitsForParent(input *ListOrganizationalUnitsForParentInput) (*ListOrganizationalUnitsForParentOutput, error) {
- req, out := c.ListOrganizationalUnitsForParentRequest(input)
- return out, req.Send()
-}
-
-// ListOrganizationalUnitsForParentWithContext is the same as ListOrganizationalUnitsForParent with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListOrganizationalUnitsForParent for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListOrganizationalUnitsForParentWithContext(ctx aws.Context, input *ListOrganizationalUnitsForParentInput, opts ...request.Option) (*ListOrganizationalUnitsForParentOutput, error) {
- req, out := c.ListOrganizationalUnitsForParentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListOrganizationalUnitsForParentPages iterates over the pages of a ListOrganizationalUnitsForParent operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListOrganizationalUnitsForParent method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListOrganizationalUnitsForParent operation.
-// pageNum := 0
-// err := client.ListOrganizationalUnitsForParentPages(params,
-// func(page *organizations.ListOrganizationalUnitsForParentOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListOrganizationalUnitsForParentPages(input *ListOrganizationalUnitsForParentInput, fn func(*ListOrganizationalUnitsForParentOutput, bool) bool) error {
- return c.ListOrganizationalUnitsForParentPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListOrganizationalUnitsForParentPagesWithContext same as ListOrganizationalUnitsForParentPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListOrganizationalUnitsForParentPagesWithContext(ctx aws.Context, input *ListOrganizationalUnitsForParentInput, fn func(*ListOrganizationalUnitsForParentOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListOrganizationalUnitsForParentInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListOrganizationalUnitsForParentRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListOrganizationalUnitsForParentOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListParents = "ListParents"
-
-// ListParentsRequest generates a "aws/request.Request" representing the
-// client's request for the ListParents operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListParents for more information on using the ListParents
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListParentsRequest method.
-// req, resp := client.ListParentsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListParents
-func (c *Organizations) ListParentsRequest(input *ListParentsInput) (req *request.Request, output *ListParentsOutput) {
- op := &request.Operation{
- Name: opListParents,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListParentsInput{}
- }
-
- output = &ListParentsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListParents API operation for AWS Organizations.
-//
-// Lists the root or organizational units (OUs) that serve as the immediate
-// parent of the specified child OU or account. This operation, along with ListChildren
-// enables you to traverse the tree structure that makes up this root.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// In the current release, a child can have only a single parent.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListParents for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ChildNotFoundException
-// We can't find an organizational unit (OU) or AWS account with the ChildId
-// that you specified.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListParents
-func (c *Organizations) ListParents(input *ListParentsInput) (*ListParentsOutput, error) {
- req, out := c.ListParentsRequest(input)
- return out, req.Send()
-}
-
-// ListParentsWithContext is the same as ListParents with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListParents for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListParentsWithContext(ctx aws.Context, input *ListParentsInput, opts ...request.Option) (*ListParentsOutput, error) {
- req, out := c.ListParentsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListParentsPages iterates over the pages of a ListParents operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListParents method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListParents operation.
-// pageNum := 0
-// err := client.ListParentsPages(params,
-// func(page *organizations.ListParentsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListParentsPages(input *ListParentsInput, fn func(*ListParentsOutput, bool) bool) error {
- return c.ListParentsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListParentsPagesWithContext same as ListParentsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListParentsPagesWithContext(ctx aws.Context, input *ListParentsInput, fn func(*ListParentsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListParentsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListParentsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListParentsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListPolicies = "ListPolicies"
-
-// ListPoliciesRequest generates a "aws/request.Request" representing the
-// client's request for the ListPolicies operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListPolicies for more information on using the ListPolicies
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListPoliciesRequest method.
-// req, resp := client.ListPoliciesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPolicies
-func (c *Organizations) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) {
- op := &request.Operation{
- Name: opListPolicies,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListPoliciesInput{}
- }
-
- output = &ListPoliciesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListPolicies API operation for AWS Organizations.
-//
-// Retrieves the list of all policies in an organization of a specified type.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListPolicies for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPolicies
-func (c *Organizations) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) {
- req, out := c.ListPoliciesRequest(input)
- return out, req.Send()
-}
-
-// ListPoliciesWithContext is the same as ListPolicies with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListPolicies for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) {
- req, out := c.ListPoliciesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListPoliciesPages iterates over the pages of a ListPolicies operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListPolicies method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListPolicies operation.
-// pageNum := 0
-// err := client.ListPoliciesPages(params,
-// func(page *organizations.ListPoliciesOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListPoliciesPages(input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool) error {
- return c.ListPoliciesPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListPoliciesPagesWithContext same as ListPoliciesPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListPoliciesPagesWithContext(ctx aws.Context, input *ListPoliciesInput, fn func(*ListPoliciesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListPoliciesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListPoliciesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListPoliciesOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListPoliciesForTarget = "ListPoliciesForTarget"
-
-// ListPoliciesForTargetRequest generates a "aws/request.Request" representing the
-// client's request for the ListPoliciesForTarget operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListPoliciesForTarget for more information on using the ListPoliciesForTarget
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListPoliciesForTargetRequest method.
-// req, resp := client.ListPoliciesForTargetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPoliciesForTarget
-func (c *Organizations) ListPoliciesForTargetRequest(input *ListPoliciesForTargetInput) (req *request.Request, output *ListPoliciesForTargetOutput) {
- op := &request.Operation{
- Name: opListPoliciesForTarget,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListPoliciesForTargetInput{}
- }
-
- output = &ListPoliciesForTargetOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListPoliciesForTarget API operation for AWS Organizations.
-//
-// Lists the policies that are directly attached to the specified target root,
-// organizational unit (OU), or account. You must specify the policy type that
-// you want included in the returned list.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListPoliciesForTarget for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TargetNotFoundException
-// We can't find a root, OU, account, or policy with the TargetId that you specified.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListPoliciesForTarget
-func (c *Organizations) ListPoliciesForTarget(input *ListPoliciesForTargetInput) (*ListPoliciesForTargetOutput, error) {
- req, out := c.ListPoliciesForTargetRequest(input)
- return out, req.Send()
-}
-
-// ListPoliciesForTargetWithContext is the same as ListPoliciesForTarget with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListPoliciesForTarget for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListPoliciesForTargetWithContext(ctx aws.Context, input *ListPoliciesForTargetInput, opts ...request.Option) (*ListPoliciesForTargetOutput, error) {
- req, out := c.ListPoliciesForTargetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListPoliciesForTargetPages iterates over the pages of a ListPoliciesForTarget operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListPoliciesForTarget method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListPoliciesForTarget operation.
-// pageNum := 0
-// err := client.ListPoliciesForTargetPages(params,
-// func(page *organizations.ListPoliciesForTargetOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListPoliciesForTargetPages(input *ListPoliciesForTargetInput, fn func(*ListPoliciesForTargetOutput, bool) bool) error {
- return c.ListPoliciesForTargetPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListPoliciesForTargetPagesWithContext same as ListPoliciesForTargetPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListPoliciesForTargetPagesWithContext(ctx aws.Context, input *ListPoliciesForTargetInput, fn func(*ListPoliciesForTargetOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListPoliciesForTargetInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListPoliciesForTargetRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListPoliciesForTargetOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListRoots = "ListRoots"
-
-// ListRootsRequest generates a "aws/request.Request" representing the
-// client's request for the ListRoots operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListRoots for more information on using the ListRoots
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListRootsRequest method.
-// req, resp := client.ListRootsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListRoots
-func (c *Organizations) ListRootsRequest(input *ListRootsInput) (req *request.Request, output *ListRootsOutput) {
- op := &request.Operation{
- Name: opListRoots,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListRootsInput{}
- }
-
- output = &ListRootsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListRoots API operation for AWS Organizations.
-//
-// Lists the roots that are defined in the current organization.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Policy types can be enabled and disabled in roots. This is distinct from
-// whether they're available in the organization. When you enable all features,
-// you make policy types available for use in that organization. Individual
-// policy types can then be enabled and disabled in a root. To see the availability
-// of a policy type in an organization, use DescribeOrganization.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListRoots for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListRoots
-func (c *Organizations) ListRoots(input *ListRootsInput) (*ListRootsOutput, error) {
- req, out := c.ListRootsRequest(input)
- return out, req.Send()
-}
-
-// ListRootsWithContext is the same as ListRoots with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListRoots for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListRootsWithContext(ctx aws.Context, input *ListRootsInput, opts ...request.Option) (*ListRootsOutput, error) {
- req, out := c.ListRootsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListRootsPages iterates over the pages of a ListRoots operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListRoots method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListRoots operation.
-// pageNum := 0
-// err := client.ListRootsPages(params,
-// func(page *organizations.ListRootsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListRootsPages(input *ListRootsInput, fn func(*ListRootsOutput, bool) bool) error {
- return c.ListRootsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListRootsPagesWithContext same as ListRootsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListRootsPagesWithContext(ctx aws.Context, input *ListRootsInput, fn func(*ListRootsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListRootsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListRootsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListRootsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListTagsForResource = "ListTagsForResource"
-
-// ListTagsForResourceRequest generates a "aws/request.Request" representing the
-// client's request for the ListTagsForResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListTagsForResource for more information on using the ListTagsForResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListTagsForResourceRequest method.
-// req, resp := client.ListTagsForResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTagsForResource
-func (c *Organizations) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
- op := &request.Operation{
- Name: opListTagsForResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListTagsForResourceInput{}
- }
-
- output = &ListTagsForResourceOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListTagsForResource API operation for AWS Organizations.
-//
-// Lists tags that are attached to the specified resource.
-//
-// You can attach tags to the following resources in AWS Organizations.
-//
-// * AWS account
-//
-// * Organization root
-//
-// * Organizational unit (OU)
-//
-// * Policy (any type)
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListTagsForResource for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * TargetNotFoundException
-// We can't find a root, OU, account, or policy with the TargetId that you specified.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTagsForResource
-func (c *Organizations) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
- req, out := c.ListTagsForResourceRequest(input)
- return out, req.Send()
-}
-
-// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListTagsForResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
- req, out := c.ListTagsForResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListTagsForResource method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListTagsForResource operation.
-// pageNum := 0
-// err := client.ListTagsForResourcePages(params,
-// func(page *organizations.ListTagsForResourceOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error {
- return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListTagsForResourceInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListTagsForResourceRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListTargetsForPolicy = "ListTargetsForPolicy"
-
-// ListTargetsForPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the ListTargetsForPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListTargetsForPolicy for more information on using the ListTargetsForPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListTargetsForPolicyRequest method.
-// req, resp := client.ListTargetsForPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTargetsForPolicy
-func (c *Organizations) ListTargetsForPolicyRequest(input *ListTargetsForPolicyInput) (req *request.Request, output *ListTargetsForPolicyOutput) {
- op := &request.Operation{
- Name: opListTargetsForPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"NextToken"},
- OutputTokens: []string{"NextToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListTargetsForPolicyInput{}
- }
-
- output = &ListTargetsForPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListTargetsForPolicy API operation for AWS Organizations.
-//
-// Lists all the roots, organizational units (OUs), and accounts that the specified
-// policy is attached to.
-//
-// Always check the NextToken response parameter for a null value when calling
-// a List* operation. These operations can occasionally return an empty set
-// of results even when there are more results available. The NextToken response
-// parameter value is null only when there are no more results to display.
-//
-// This operation can be called only from the organization's management account
-// or by a member account that is a delegated administrator for an AWS service.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation ListTargetsForPolicy for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * PolicyNotFoundException
-// We can't find a policy with the PolicyId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/ListTargetsForPolicy
-func (c *Organizations) ListTargetsForPolicy(input *ListTargetsForPolicyInput) (*ListTargetsForPolicyOutput, error) {
- req, out := c.ListTargetsForPolicyRequest(input)
- return out, req.Send()
-}
-
-// ListTargetsForPolicyWithContext is the same as ListTargetsForPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListTargetsForPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListTargetsForPolicyWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, opts ...request.Option) (*ListTargetsForPolicyOutput, error) {
- req, out := c.ListTargetsForPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListTargetsForPolicyPages iterates over the pages of a ListTargetsForPolicy operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListTargetsForPolicy method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListTargetsForPolicy operation.
-// pageNum := 0
-// err := client.ListTargetsForPolicyPages(params,
-// func(page *organizations.ListTargetsForPolicyOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *Organizations) ListTargetsForPolicyPages(input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool) error {
- return c.ListTargetsForPolicyPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListTargetsForPolicyPagesWithContext same as ListTargetsForPolicyPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) ListTargetsForPolicyPagesWithContext(ctx aws.Context, input *ListTargetsForPolicyInput, fn func(*ListTargetsForPolicyOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListTargetsForPolicyInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListTargetsForPolicyRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListTargetsForPolicyOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opMoveAccount = "MoveAccount"
-
-// MoveAccountRequest generates a "aws/request.Request" representing the
-// client's request for the MoveAccount operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See MoveAccount for more information on using the MoveAccount
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the MoveAccountRequest method.
-// req, resp := client.MoveAccountRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount
-func (c *Organizations) MoveAccountRequest(input *MoveAccountInput) (req *request.Request, output *MoveAccountOutput) {
- op := &request.Operation{
- Name: opMoveAccount,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &MoveAccountInput{}
- }
-
- output = &MoveAccountOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// MoveAccount API operation for AWS Organizations.
-//
-// Moves an account from its current source parent root or organizational unit
-// (OU) to the specified destination parent root or OU.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation MoveAccount for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * SourceParentNotFoundException
-// We can't find a source root or OU with the ParentId that you specified.
-//
-// * DestinationParentNotFoundException
-// We can't find the destination container (a root or OU) with the ParentId
-// that you specified.
-//
-// * DuplicateAccountException
-// That account is already present in the specified destination.
-//
-// * AccountNotFoundException
-// We can't find an AWS account with the AccountId that you specified, or the
-// account whose credentials you used to make this request isn't a member of
-// an organization.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/MoveAccount
-func (c *Organizations) MoveAccount(input *MoveAccountInput) (*MoveAccountOutput, error) {
- req, out := c.MoveAccountRequest(input)
- return out, req.Send()
-}
-
-// MoveAccountWithContext is the same as MoveAccount with the addition of
-// the ability to pass a context and additional request options.
-//
-// See MoveAccount for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) MoveAccountWithContext(ctx aws.Context, input *MoveAccountInput, opts ...request.Option) (*MoveAccountOutput, error) {
- req, out := c.MoveAccountRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opRegisterDelegatedAdministrator = "RegisterDelegatedAdministrator"
-
-// RegisterDelegatedAdministratorRequest generates a "aws/request.Request" representing the
-// client's request for the RegisterDelegatedAdministrator operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See RegisterDelegatedAdministrator for more information on using the RegisterDelegatedAdministrator
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the RegisterDelegatedAdministratorRequest method.
-// req, resp := client.RegisterDelegatedAdministratorRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RegisterDelegatedAdministrator
-func (c *Organizations) RegisterDelegatedAdministratorRequest(input *RegisterDelegatedAdministratorInput) (req *request.Request, output *RegisterDelegatedAdministratorOutput) {
- op := &request.Operation{
- Name: opRegisterDelegatedAdministrator,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RegisterDelegatedAdministratorInput{}
- }
-
- output = &RegisterDelegatedAdministratorOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// RegisterDelegatedAdministrator API operation for AWS Organizations.
-//
-// Enables the specified member account to administer the Organizations features
-// of the specified AWS service. It grants read-only access to AWS Organizations
-// service data. The account still requires IAM permissions to access and administer
-// the AWS service.
-//
-// You can run this action only for AWS services that support this feature.
-// For a current list of services that support it, see the column Supports Delegated
-// Administrator in the table at AWS Services that you can use with AWS Organizations
-// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html)
-// in the AWS Organizations User Guide.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation RegisterDelegatedAdministrator for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AccountAlreadyRegisteredException
-// The specified account is already a delegated administrator for this AWS service.
-//
-// * AccountNotFoundException
-// We can't find an AWS account with the AccountId that you specified, or the
-// account whose credentials you used to make this request isn't a member of
-// an organization.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RegisterDelegatedAdministrator
-func (c *Organizations) RegisterDelegatedAdministrator(input *RegisterDelegatedAdministratorInput) (*RegisterDelegatedAdministratorOutput, error) {
- req, out := c.RegisterDelegatedAdministratorRequest(input)
- return out, req.Send()
-}
-
-// RegisterDelegatedAdministratorWithContext is the same as RegisterDelegatedAdministrator with the addition of
-// the ability to pass a context and additional request options.
-//
-// See RegisterDelegatedAdministrator for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) RegisterDelegatedAdministratorWithContext(ctx aws.Context, input *RegisterDelegatedAdministratorInput, opts ...request.Option) (*RegisterDelegatedAdministratorOutput, error) {
- req, out := c.RegisterDelegatedAdministratorRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opRemoveAccountFromOrganization = "RemoveAccountFromOrganization"
-
-// RemoveAccountFromOrganizationRequest generates a "aws/request.Request" representing the
-// client's request for the RemoveAccountFromOrganization operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See RemoveAccountFromOrganization for more information on using the RemoveAccountFromOrganization
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the RemoveAccountFromOrganizationRequest method.
-// req, resp := client.RemoveAccountFromOrganizationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RemoveAccountFromOrganization
-func (c *Organizations) RemoveAccountFromOrganizationRequest(input *RemoveAccountFromOrganizationInput) (req *request.Request, output *RemoveAccountFromOrganizationOutput) {
- op := &request.Operation{
- Name: opRemoveAccountFromOrganization,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RemoveAccountFromOrganizationInput{}
- }
-
- output = &RemoveAccountFromOrganizationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// RemoveAccountFromOrganization API operation for AWS Organizations.
-//
-// Removes the specified account from the organization.
-//
-// The removed account becomes a standalone account that isn't a member of any
-// organization. It's no longer subject to any policies and is responsible for
-// its own bill payments. The organization's management account is no longer
-// charged for any expenses accrued by the member account after it's removed
-// from the organization.
-//
-// This operation can be called only from the organization's management account.
-// Member accounts can remove themselves with LeaveOrganization instead.
-//
-// * You can remove an account from your organization only if the account
-// is configured with the information required to operate as a standalone
-// account. When you create an account in an organization using the AWS Organizations
-// console, API, or CLI commands, the information required of standalone
-// accounts is not automatically collected. For an account that you want
-// to make standalone, you must choose a support plan, provide and verify
-// the required contact information, and provide a current payment method.
-// AWS uses the payment method to charge for any billable (not free tier)
-// AWS activity that occurs while the account isn't attached to an organization.
-// To remove an account that doesn't yet have this information, you must
-// sign in as the member account and follow the steps at To leave an organization
-// when all required account information has not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * The account that you want to leave must not be a delegated administrator
-// account for any AWS service enabled for your organization. If the account
-// is a delegated administrator, you must first change the delegated administrator
-// account to another account that is remaining in the organization.
-//
-// * After the account leaves the organization, all tags that were attached
-// to the account object in the organization are deleted. AWS accounts outside
-// of an organization do not support tags.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation RemoveAccountFromOrganization for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AccountNotFoundException
-// We can't find an AWS account with the AccountId that you specified, or the
-// account whose credentials you used to make this request isn't a member of
-// an organization.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * MasterCannotLeaveOrganizationException
-// You can't remove a management account from an organization. If you want the
-// management account to become a member account in another organization, you
-// must first delete the current organization of the management account.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/RemoveAccountFromOrganization
-func (c *Organizations) RemoveAccountFromOrganization(input *RemoveAccountFromOrganizationInput) (*RemoveAccountFromOrganizationOutput, error) {
- req, out := c.RemoveAccountFromOrganizationRequest(input)
- return out, req.Send()
-}
-
-// RemoveAccountFromOrganizationWithContext is the same as RemoveAccountFromOrganization with the addition of
-// the ability to pass a context and additional request options.
-//
-// See RemoveAccountFromOrganization for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) RemoveAccountFromOrganizationWithContext(ctx aws.Context, input *RemoveAccountFromOrganizationInput, opts ...request.Option) (*RemoveAccountFromOrganizationOutput, error) {
- req, out := c.RemoveAccountFromOrganizationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opTagResource = "TagResource"
-
-// TagResourceRequest generates a "aws/request.Request" representing the
-// client's request for the TagResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See TagResource for more information on using the TagResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the TagResourceRequest method.
-// req, resp := client.TagResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/TagResource
-func (c *Organizations) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
- op := &request.Operation{
- Name: opTagResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &TagResourceInput{}
- }
-
- output = &TagResourceOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// TagResource API operation for AWS Organizations.
-//
-// Adds one or more tags to the specified resource.
-//
-// Currently, you can attach tags to the following resources in AWS Organizations.
-//
-// * AWS account
-//
-// * Organization root
-//
-// * Organizational unit (OU)
-//
-// * Policy (any type)
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation TagResource for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * TargetNotFoundException
-// We can't find a root, OU, account, or policy with the TargetId that you specified.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/TagResource
-func (c *Organizations) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
- req, out := c.TagResourceRequest(input)
- return out, req.Send()
-}
-
-// TagResourceWithContext is the same as TagResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See TagResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
- req, out := c.TagResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUntagResource = "UntagResource"
-
-// UntagResourceRequest generates a "aws/request.Request" representing the
-// client's request for the UntagResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UntagResource for more information on using the UntagResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UntagResourceRequest method.
-// req, resp := client.UntagResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UntagResource
-func (c *Organizations) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
- op := &request.Operation{
- Name: opUntagResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UntagResourceInput{}
- }
-
- output = &UntagResourceOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// UntagResource API operation for AWS Organizations.
-//
-// Removes any tags with the specified keys from the specified resource.
-//
-// You can attach tags to the following resources in AWS Organizations.
-//
-// * AWS account
-//
-// * Organization root
-//
-// * Organizational unit (OU)
-//
-// * Policy (any type)
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation UntagResource for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * TargetNotFoundException
-// We can't find a root, OU, account, or policy with the TargetId that you specified.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UntagResource
-func (c *Organizations) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
- req, out := c.UntagResourceRequest(input)
- return out, req.Send()
-}
-
-// UntagResourceWithContext is the same as UntagResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UntagResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
- req, out := c.UntagResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateOrganizationalUnit = "UpdateOrganizationalUnit"
-
-// UpdateOrganizationalUnitRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateOrganizationalUnit operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateOrganizationalUnit for more information on using the UpdateOrganizationalUnit
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateOrganizationalUnitRequest method.
-// req, resp := client.UpdateOrganizationalUnitRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdateOrganizationalUnit
-func (c *Organizations) UpdateOrganizationalUnitRequest(input *UpdateOrganizationalUnitInput) (req *request.Request, output *UpdateOrganizationalUnitOutput) {
- op := &request.Operation{
- Name: opUpdateOrganizationalUnit,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateOrganizationalUnitInput{}
- }
-
- output = &UpdateOrganizationalUnitOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UpdateOrganizationalUnit API operation for AWS Organizations.
-//
-// Renames the specified organizational unit (OU). The ID and ARN don't change.
-// The child OUs and accounts remain in place, and any attached policies of
-// the OU remain attached.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation UpdateOrganizationalUnit for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * DuplicateOrganizationalUnitException
-// An OU with the same name already exists.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * OrganizationalUnitNotFoundException
-// We can't find an OU with the OrganizationalUnitId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdateOrganizationalUnit
-func (c *Organizations) UpdateOrganizationalUnit(input *UpdateOrganizationalUnitInput) (*UpdateOrganizationalUnitOutput, error) {
- req, out := c.UpdateOrganizationalUnitRequest(input)
- return out, req.Send()
-}
-
-// UpdateOrganizationalUnitWithContext is the same as UpdateOrganizationalUnit with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateOrganizationalUnit for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) UpdateOrganizationalUnitWithContext(ctx aws.Context, input *UpdateOrganizationalUnitInput, opts ...request.Option) (*UpdateOrganizationalUnitOutput, error) {
- req, out := c.UpdateOrganizationalUnitRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdatePolicy = "UpdatePolicy"
-
-// UpdatePolicyRequest generates a "aws/request.Request" representing the
-// client's request for the UpdatePolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdatePolicy for more information on using the UpdatePolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdatePolicyRequest method.
-// req, resp := client.UpdatePolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdatePolicy
-func (c *Organizations) UpdatePolicyRequest(input *UpdatePolicyInput) (req *request.Request, output *UpdatePolicyOutput) {
- op := &request.Operation{
- Name: opUpdatePolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdatePolicyInput{}
- }
-
- output = &UpdatePolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UpdatePolicy API operation for AWS Organizations.
-//
-// Updates an existing policy with a new name, description, or content. If you
-// don't supply any parameter, that value remains unchanged. You can't change
-// a policy's type.
-//
-// This operation can be called only from the organization's management account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Organizations's
-// API operation UpdatePolicy for usage and error information.
-//
-// Returned Error Types:
-// * AccessDeniedException
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-//
-// * AWSOrganizationsNotInUseException
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-//
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-//
-// * DuplicatePolicyException
-// A policy with the same name already exists.
-//
-// * InvalidInputException
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-//
-// * MalformedPolicyDocumentException
-// The provided policy document doesn't meet the requirements of the specified
-// policy type. For example, the syntax might be incorrect. For details about
-// service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
-// in the AWS Organizations User Guide.
-//
-// * PolicyNotFoundException
-// We can't find a policy with the PolicyId that you specified.
-//
-// * ServiceException
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-//
-// * TooManyRequestsException
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-//
-// * UnsupportedAPIEndpointException
-// This action isn't available in the current AWS Region.
-//
-// * PolicyChangesInProgressException
-// Changes to the effective policy are in progress, and its contents can't be
-// returned. Try the operation again later.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/UpdatePolicy
-func (c *Organizations) UpdatePolicy(input *UpdatePolicyInput) (*UpdatePolicyOutput, error) {
- req, out := c.UpdatePolicyRequest(input)
- return out, req.Send()
-}
-
-// UpdatePolicyWithContext is the same as UpdatePolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdatePolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *Organizations) UpdatePolicyWithContext(ctx aws.Context, input *UpdatePolicyInput, opts ...request.Option) (*UpdatePolicyOutput, error) {
- req, out := c.UpdatePolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// Your account isn't a member of an organization. To make this request, you
-// must use the credentials of an account that belongs to an organization.
-type AWSOrganizationsNotInUseException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s AWSOrganizationsNotInUseException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AWSOrganizationsNotInUseException) GoString() string {
- return s.String()
-}
-
-func newErrorAWSOrganizationsNotInUseException(v protocol.ResponseMetadata) error {
- return &AWSOrganizationsNotInUseException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AWSOrganizationsNotInUseException) Code() string {
- return "AWSOrganizationsNotInUseException"
-}
-
-// Message returns the exception's message.
-func (s *AWSOrganizationsNotInUseException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AWSOrganizationsNotInUseException) OrigErr() error {
- return nil
-}
-
-func (s *AWSOrganizationsNotInUseException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AWSOrganizationsNotInUseException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AWSOrganizationsNotInUseException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type AcceptHandshakeInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the handshake that you want to accept.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
- // requires "h-" followed by from 8 to 32 lowercase letters or digits.
- //
- // HandshakeId is a required field
- HandshakeId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s AcceptHandshakeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AcceptHandshakeInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AcceptHandshakeInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AcceptHandshakeInput"}
- if s.HandshakeId == nil {
- invalidParams.Add(request.NewErrParamRequired("HandshakeId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetHandshakeId sets the HandshakeId field's value.
-func (s *AcceptHandshakeInput) SetHandshakeId(v string) *AcceptHandshakeInput {
- s.HandshakeId = &v
- return s
-}
-
-type AcceptHandshakeOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the accepted handshake.
- Handshake *Handshake `type:"structure"`
-}
-
-// String returns the string representation
-func (s AcceptHandshakeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AcceptHandshakeOutput) GoString() string {
- return s.String()
-}
-
-// SetHandshake sets the Handshake field's value.
-func (s *AcceptHandshakeOutput) SetHandshake(v *Handshake) *AcceptHandshakeOutput {
- s.Handshake = v
- return s
-}
-
-// You don't have permissions to perform the requested operation. The user or
-// role that is making the request must have at least one IAM permissions policy
-// attached that grants the required permissions. For more information, see
-// Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
-// in the IAM User Guide.
-type AccessDeniedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s AccessDeniedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccessDeniedException) GoString() string {
- return s.String()
-}
-
-func newErrorAccessDeniedException(v protocol.ResponseMetadata) error {
- return &AccessDeniedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AccessDeniedException) Code() string {
- return "AccessDeniedException"
-}
-
-// Message returns the exception's message.
-func (s *AccessDeniedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AccessDeniedException) OrigErr() error {
- return nil
-}
-
-func (s *AccessDeniedException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AccessDeniedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AccessDeniedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The operation that you attempted requires you to have the iam:CreateServiceLinkedRole
-// for organizations.amazonaws.com permission so that AWS Organizations can
-// create the required service-linked role. You don't have that permission.
-type AccessDeniedForDependencyException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-
- Reason *string `type:"string" enum:"AccessDeniedForDependencyExceptionReason"`
-}
-
-// String returns the string representation
-func (s AccessDeniedForDependencyException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccessDeniedForDependencyException) GoString() string {
- return s.String()
-}
-
-func newErrorAccessDeniedForDependencyException(v protocol.ResponseMetadata) error {
- return &AccessDeniedForDependencyException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AccessDeniedForDependencyException) Code() string {
- return "AccessDeniedForDependencyException"
-}
-
-// Message returns the exception's message.
-func (s *AccessDeniedForDependencyException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AccessDeniedForDependencyException) OrigErr() error {
- return nil
-}
-
-func (s *AccessDeniedForDependencyException) Error() string {
- return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AccessDeniedForDependencyException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AccessDeniedForDependencyException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains information about an AWS account that is a member of an organization.
-type Account struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the account.
- //
- // For more information about ARNs in Organizations, see ARN Formats Supported
- // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
- // in the AWS Service Authorization Reference.
- Arn *string `type:"string"`
-
- // The email address associated with the AWS account.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for this parameter is
- // a string of characters that represents a standard internet email address.
- Email *string `min:"6" type:"string" sensitive:"true"`
-
- // The unique identifier (ID) of the account.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
- // requires exactly 12 digits.
- Id *string `type:"string"`
-
- // The method by which the account joined the organization.
- JoinedMethod *string `type:"string" enum:"AccountJoinedMethod"`
-
- // The date the account became a part of the organization.
- JoinedTimestamp *time.Time `type:"timestamp"`
-
- // The friendly name of the account.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter is a string of any of the characters in the ASCII character
- // range.
- Name *string `min:"1" type:"string" sensitive:"true"`
-
- // The status of the account in the organization.
- Status *string `type:"string" enum:"AccountStatus"`
-}
-
-// String returns the string representation
-func (s Account) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Account) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *Account) SetArn(v string) *Account {
- s.Arn = &v
- return s
-}
-
-// SetEmail sets the Email field's value.
-func (s *Account) SetEmail(v string) *Account {
- s.Email = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *Account) SetId(v string) *Account {
- s.Id = &v
- return s
-}
-
-// SetJoinedMethod sets the JoinedMethod field's value.
-func (s *Account) SetJoinedMethod(v string) *Account {
- s.JoinedMethod = &v
- return s
-}
-
-// SetJoinedTimestamp sets the JoinedTimestamp field's value.
-func (s *Account) SetJoinedTimestamp(v time.Time) *Account {
- s.JoinedTimestamp = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *Account) SetName(v string) *Account {
- s.Name = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *Account) SetStatus(v string) *Account {
- s.Status = &v
- return s
-}
-
-// The specified account is already a delegated administrator for this AWS service.
-type AccountAlreadyRegisteredException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s AccountAlreadyRegisteredException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccountAlreadyRegisteredException) GoString() string {
- return s.String()
-}
-
-func newErrorAccountAlreadyRegisteredException(v protocol.ResponseMetadata) error {
- return &AccountAlreadyRegisteredException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AccountAlreadyRegisteredException) Code() string {
- return "AccountAlreadyRegisteredException"
-}
-
-// Message returns the exception's message.
-func (s *AccountAlreadyRegisteredException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AccountAlreadyRegisteredException) OrigErr() error {
- return nil
-}
-
-func (s *AccountAlreadyRegisteredException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AccountAlreadyRegisteredException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AccountAlreadyRegisteredException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// We can't find an AWS account with the AccountId that you specified, or the
-// account whose credentials you used to make this request isn't a member of
-// an organization.
-type AccountNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s AccountNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccountNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorAccountNotFoundException(v protocol.ResponseMetadata) error {
- return &AccountNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AccountNotFoundException) Code() string {
- return "AccountNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *AccountNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AccountNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *AccountNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AccountNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AccountNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The specified account is not a delegated administrator for this AWS service.
-type AccountNotRegisteredException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s AccountNotRegisteredException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccountNotRegisteredException) GoString() string {
- return s.String()
-}
-
-func newErrorAccountNotRegisteredException(v protocol.ResponseMetadata) error {
- return &AccountNotRegisteredException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AccountNotRegisteredException) Code() string {
- return "AccountNotRegisteredException"
-}
-
-// Message returns the exception's message.
-func (s *AccountNotRegisteredException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AccountNotRegisteredException) OrigErr() error {
- return nil
-}
-
-func (s *AccountNotRegisteredException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AccountNotRegisteredException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AccountNotRegisteredException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// You can't invite an existing account to your organization until you verify
-// that you own the email address associated with the management account. For
-// more information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification)
-// in the AWS Organizations User Guide.
-type AccountOwnerNotVerifiedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s AccountOwnerNotVerifiedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccountOwnerNotVerifiedException) GoString() string {
- return s.String()
-}
-
-func newErrorAccountOwnerNotVerifiedException(v protocol.ResponseMetadata) error {
- return &AccountOwnerNotVerifiedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AccountOwnerNotVerifiedException) Code() string {
- return "AccountOwnerNotVerifiedException"
-}
-
-// Message returns the exception's message.
-func (s *AccountOwnerNotVerifiedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AccountOwnerNotVerifiedException) OrigErr() error {
- return nil
-}
-
-func (s *AccountOwnerNotVerifiedException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AccountOwnerNotVerifiedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AccountOwnerNotVerifiedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This account is already a member of an organization. An account can belong
-// to only one organization at a time.
-type AlreadyInOrganizationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s AlreadyInOrganizationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AlreadyInOrganizationException) GoString() string {
- return s.String()
-}
-
-func newErrorAlreadyInOrganizationException(v protocol.ResponseMetadata) error {
- return &AlreadyInOrganizationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AlreadyInOrganizationException) Code() string {
- return "AlreadyInOrganizationException"
-}
-
-// Message returns the exception's message.
-func (s *AlreadyInOrganizationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AlreadyInOrganizationException) OrigErr() error {
- return nil
-}
-
-func (s *AlreadyInOrganizationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AlreadyInOrganizationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AlreadyInOrganizationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type AttachPolicyInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the policy that you want to attach to the target.
- // You can get the ID for the policy by calling the ListPolicies operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
- // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
- // or the underscore character (_).
- //
- // PolicyId is a required field
- PolicyId *string `type:"string" required:"true"`
-
- // The unique identifier (ID) of the root, OU, or account that you want to attach
- // the policy to. You can get the ID by calling the ListRoots, ListOrganizationalUnitsForParent,
- // or ListAccounts operations.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Account - A string that consists of exactly 12 digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- //
- // TargetId is a required field
- TargetId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s AttachPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AttachPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AttachPolicyInput"}
- if s.PolicyId == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyId"))
- }
- if s.TargetId == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPolicyId sets the PolicyId field's value.
-func (s *AttachPolicyInput) SetPolicyId(v string) *AttachPolicyInput {
- s.PolicyId = &v
- return s
-}
-
-// SetTargetId sets the TargetId field's value.
-func (s *AttachPolicyInput) SetTargetId(v string) *AttachPolicyInput {
- s.TargetId = &v
- return s
-}
-
-type AttachPolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s AttachPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AttachPolicyOutput) GoString() string {
- return s.String()
-}
-
-type CancelHandshakeInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the handshake that you want to cancel. You
- // can get the ID from the ListHandshakesForOrganization operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
- // requires "h-" followed by from 8 to 32 lowercase letters or digits.
- //
- // HandshakeId is a required field
- HandshakeId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s CancelHandshakeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelHandshakeInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CancelHandshakeInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CancelHandshakeInput"}
- if s.HandshakeId == nil {
- invalidParams.Add(request.NewErrParamRequired("HandshakeId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetHandshakeId sets the HandshakeId field's value.
-func (s *CancelHandshakeInput) SetHandshakeId(v string) *CancelHandshakeInput {
- s.HandshakeId = &v
- return s
-}
-
-type CancelHandshakeOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the handshake that you canceled.
- Handshake *Handshake `type:"structure"`
-}
-
-// String returns the string representation
-func (s CancelHandshakeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CancelHandshakeOutput) GoString() string {
- return s.String()
-}
-
-// SetHandshake sets the Handshake field's value.
-func (s *CancelHandshakeOutput) SetHandshake(v *Handshake) *CancelHandshakeOutput {
- s.Handshake = v
- return s
-}
-
-// Contains a list of child entities, either OUs or accounts.
-type Child struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of this child entity.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a child ID string
- // requires one of the following:
- //
- // * Account - A string that consists of exactly 12 digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that contains
- // the OU). This string is followed by a second "-" dash and from 8 to 32
- // additional lowercase letters or digits.
- Id *string `type:"string"`
-
- // The type of this child entity.
- Type *string `type:"string" enum:"ChildType"`
-}
-
-// String returns the string representation
-func (s Child) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Child) GoString() string {
- return s.String()
-}
-
-// SetId sets the Id field's value.
-func (s *Child) SetId(v string) *Child {
- s.Id = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *Child) SetType(v string) *Child {
- s.Type = &v
- return s
-}
-
-// We can't find an organizational unit (OU) or AWS account with the ChildId
-// that you specified.
-type ChildNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s ChildNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ChildNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorChildNotFoundException(v protocol.ResponseMetadata) error {
- return &ChildNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ChildNotFoundException) Code() string {
- return "ChildNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *ChildNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ChildNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *ChildNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ChildNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ChildNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-type ConcurrentModificationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s ConcurrentModificationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ConcurrentModificationException) GoString() string {
- return s.String()
-}
-
-func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error {
- return &ConcurrentModificationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ConcurrentModificationException) Code() string {
- return "ConcurrentModificationException"
-}
-
-// Message returns the exception's message.
-func (s *ConcurrentModificationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ConcurrentModificationException) OrigErr() error {
- return nil
-}
-
-func (s *ConcurrentModificationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ConcurrentModificationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ConcurrentModificationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Performing this operation violates a minimum or maximum value limit. For
-// example, attempting to remove the last service control policy (SCP) from
-// an OU or root, inviting or creating too many accounts to the organization,
-// or attaching too many policies to an account, OU, or root. This exception
-// includes a reason that contains additional information about the violated
-// limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
-// account from the organization. You can't remove the management account.
-// Instead, after you remove all member accounts, delete the organization
-// itself.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
-// from the organization that doesn't yet have enough information to exist
-// as a standalone account. This account requires you to first agree to the
-// AWS Customer Agreement. Follow the steps at Removing a member account
-// from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
-// the AWS Organizations User Guide.
-//
-// * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
-// an account from the organization that doesn't yet have enough information
-// to exist as a standalone account. This account requires you to first complete
-// phone verification. Follow the steps at Removing a member account from
-// your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
-// in the AWS Organizations User Guide.
-//
-// * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
-// of accounts that you can create in one day.
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. If you need more accounts,
-// contact AWS Support (https://console.aws.amazon.com/support/home#/) to
-// request an increase in your limit. Or the number of invitations that you
-// tried to send would cause you to exceed the limit of accounts in your
-// organization. Send fewer invitations or contact AWS Support to request
-// an increase in the number of accounts. Deleted and closed accounts still
-// count toward your limit. If you get this exception when running a command
-// immediately after creating the organization, wait one hour and try again.
-// After an hour, if the command continues to fail with this error, contact
-// AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
-// register the management account of the organization as a delegated administrator
-// for an AWS service integrated with Organizations. You can designate only
-// a member account as a delegated administrator.
-//
-// * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
-// an account that is registered as a delegated administrator for a service
-// integrated with your organization. To complete this operation, you must
-// first deregister this account as a delegated administrator.
-//
-// * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
-// organization in the specified region, you must enable all features mode.
-//
-// * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
-// an AWS account as a delegated administrator for an AWS service that already
-// has a delegated administrator. To complete this operation, you must first
-// deregister any existing delegated administrators for this service.
-//
-// * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
-// valid for a limited period of time. You must resubmit the request and
-// generate a new verfication code.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
-// in this organization, you first must migrate the organization's management
-// account to the marketplace that corresponds to the management account's
-// address. For example, accounts with India addresses must be associated
-// with the AISPL marketplace. All accounts in an organization must be associated
-// with the same marketplace.
-//
-// * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
-// in China. To create an organization, the master must have a valid business
-// license. For more information, contact customer support.
-//
-// * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
-// must first provide a valid contact address and phone number for the management
-// account. Then try the operation again.
-//
-// * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
-// management account must have an associated account in the AWS GovCloud
-// (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
-// in the AWS GovCloud User Guide.
-//
-// * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
-// with this management account, you first must associate a valid payment
-// instrument, such as a credit card, with the account. Follow the steps
-// at To leave an organization when all required account information has
-// not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
-// to register more delegated administrators than allowed for the service
-// principal.
-//
-// * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
-// number of policies of a certain type that can be attached to an entity
-// at one time.
-//
-// * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
-// on this resource.
-//
-// * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
-// with this member account, you first must associate a valid payment instrument,
-// such as a credit card, with the account. Follow the steps at To leave
-// an organization when all required account information has not yet been
-// provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
-// in the AWS Organizations User Guide.
-//
-// * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
-// policy from an entity that would cause the entity to have fewer than the
-// minimum number of policies of a certain type required.
-//
-// * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
-// that requires the organization to be configured to support all features.
-// An organization that supports only consolidated billing features can't
-// perform this operation.
-//
-// * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
-// too many levels deep.
-//
-// * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
-// that you can have in an organization.
-//
-// * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
-// is larger than the maximum size.
-//
-// * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
-// policies that you can have in an organization.
-//
-// * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
-// tags that are not compliant with the tag policy requirements for this
-// account.
-type ConstraintViolationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-
- Reason *string `type:"string" enum:"ConstraintViolationExceptionReason"`
-}
-
-// String returns the string representation
-func (s ConstraintViolationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ConstraintViolationException) GoString() string {
- return s.String()
-}
-
-func newErrorConstraintViolationException(v protocol.ResponseMetadata) error {
- return &ConstraintViolationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ConstraintViolationException) Code() string {
- return "ConstraintViolationException"
-}
-
-// Message returns the exception's message.
-func (s *ConstraintViolationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ConstraintViolationException) OrigErr() error {
- return nil
-}
-
-func (s *ConstraintViolationException) Error() string {
- return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ConstraintViolationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ConstraintViolationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type CreateAccountInput struct {
- _ struct{} `type:"structure"`
-
- // The friendly name of the member account.
- //
- // AccountName is a required field
- AccountName *string `min:"1" type:"string" required:"true" sensitive:"true"`
-
- // The email address of the owner to assign to the new member account. This
- // email address must not already be associated with another AWS account. You
- // must use a valid email address to complete account creation. You can't access
- // the root user of the account or remove an account that was created with an
- // invalid email address.
- //
- // Email is a required field
- Email *string `min:"6" type:"string" required:"true" sensitive:"true"`
-
- // If set to ALLOW, the new account enables IAM users to access account billing
- // information if they have the required permissions. If set to DENY, only the
- // root user of the new account can access account billing information. For
- // more information, see Activating Access to the Billing and Cost Management
- // Console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate)
- // in the AWS Billing and Cost Management User Guide.
- //
- // If you don't specify this parameter, the value defaults to ALLOW, and IAM
- // users and roles with the required permissions can access billing information
- // for the new account.
- IamUserAccessToBilling *string `type:"string" enum:"IAMUserAccessToBilling"`
-
- // (Optional)
- //
- // The name of an IAM role that AWS Organizations automatically preconfigures
- // in the new member account. This role trusts the management account, allowing
- // users in the management account to assume the role, as permitted by the management
- // account administrator. The role has administrator permissions in the new
- // member account.
- //
- // If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole.
- //
- // For more information about how to use this role to access the member account,
- // see the following links:
- //
- // * Accessing and Administering the Member Accounts in Your Organization
- // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role)
- // in the AWS Organizations User Guide
- //
- // * Steps 2 and 3 in Tutorial: Delegate Access Across AWS Accounts Using
- // IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html)
- // in the IAM User Guide
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter. The pattern can include uppercase letters, lowercase letters,
- // digits with no spaces, and any of the following characters: =,.@-
- RoleName *string `type:"string"`
-
- // A list of tags that you want to attach to the newly created account. For
- // each tag in the list, you must specify both a tag key and a value. You can
- // set the value to an empty string, but you can't set it to null. For more
- // information about tagging, see Tagging AWS Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
- // in the AWS Organizations User Guide.
- //
- // If any one of the tags is invalid or if you exceed the allowed number of
- // tags for an account, then the entire request fails and the account is not
- // created.
- Tags []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s CreateAccountInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateAccountInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateAccountInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateAccountInput"}
- if s.AccountName == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountName"))
- }
- if s.AccountName != nil && len(*s.AccountName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AccountName", 1))
- }
- if s.Email == nil {
- invalidParams.Add(request.NewErrParamRequired("Email"))
- }
- if s.Email != nil && len(*s.Email) < 6 {
- invalidParams.Add(request.NewErrParamMinLen("Email", 6))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountName sets the AccountName field's value.
-func (s *CreateAccountInput) SetAccountName(v string) *CreateAccountInput {
- s.AccountName = &v
- return s
-}
-
-// SetEmail sets the Email field's value.
-func (s *CreateAccountInput) SetEmail(v string) *CreateAccountInput {
- s.Email = &v
- return s
-}
-
-// SetIamUserAccessToBilling sets the IamUserAccessToBilling field's value.
-func (s *CreateAccountInput) SetIamUserAccessToBilling(v string) *CreateAccountInput {
- s.IamUserAccessToBilling = &v
- return s
-}
-
-// SetRoleName sets the RoleName field's value.
-func (s *CreateAccountInput) SetRoleName(v string) *CreateAccountInput {
- s.RoleName = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreateAccountInput) SetTags(v []*Tag) *CreateAccountInput {
- s.Tags = v
- return s
-}
-
-type CreateAccountOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the request to create an account.
- // This response structure might not be fully populated when you first receive
- // it because account creation is an asynchronous process. You can pass the
- // returned CreateAccountStatus ID as a parameter to DescribeCreateAccountStatus
- // to get status about the progress of the request at later times. You can also
- // check the AWS CloudTrail log for the CreateAccountResult event. For more
- // information, see Monitoring the Activity in Your Organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_monitoring.html)
- // in the AWS Organizations User Guide.
- CreateAccountStatus *CreateAccountStatus `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateAccountOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateAccountOutput) GoString() string {
- return s.String()
-}
-
-// SetCreateAccountStatus sets the CreateAccountStatus field's value.
-func (s *CreateAccountOutput) SetCreateAccountStatus(v *CreateAccountStatus) *CreateAccountOutput {
- s.CreateAccountStatus = v
- return s
-}
-
-// Contains the status about a CreateAccount or CreateGovCloudAccount request
-// to create an AWS account or an AWS GovCloud (US) account in an organization.
-type CreateAccountStatus struct {
- _ struct{} `type:"structure"`
-
- // If the account was created successfully, the unique identifier (ID) of the
- // new account.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
- // requires exactly 12 digits.
- AccountId *string `type:"string"`
-
- // The account name given to the account when it was created.
- AccountName *string `min:"1" type:"string" sensitive:"true"`
-
- // The date and time that the account was created and the request completed.
- CompletedTimestamp *time.Time `type:"timestamp"`
-
- // If the request failed, a description of the reason for the failure.
- //
- // * ACCOUNT_LIMIT_EXCEEDED: The account couldn't be created because you
- // reached the limit on the number of accounts in your organization.
- //
- // * CONCURRENT_ACCOUNT_MODIFICATION: You already submitted a request with
- // the same information.
- //
- // * EMAIL_ALREADY_EXISTS: The account could not be created because another
- // AWS account with that email address already exists.
- //
- // * FAILED_BUSINESS_VALIDATION: The AWS account that owns your organization
- // failed to receive business license validation.
- //
- // * GOVCLOUD_ACCOUNT_ALREADY_EXISTS: The account in the AWS GovCloud (US)
- // Region could not be created because this Region already includes an account
- // with that email address.
- //
- // * IDENTITY_INVALID_BUSINESS_VALIDATION: The AWS account that owns your
- // organization can't complete business license validation because it doesn't
- // have valid identity data.
- //
- // * INVALID_ADDRESS: The account could not be created because the address
- // you provided is not valid.
- //
- // * INVALID_EMAIL: The account could not be created because the email address
- // you provided is not valid.
- //
- // * INTERNAL_FAILURE: The account could not be created because of an internal
- // failure. Try again later. If the problem persists, contact AWS Customer
- // Support.
- //
- // * MISSING_BUSINESS_VALIDATION: The AWS account that owns your organization
- // has not received Business Validation.
- //
- // * MISSING_PAYMENT_INSTRUMENT: You must configure the management account
- // with a valid payment method, such as a credit card.
- //
- // * PENDING_BUSINESS_VALIDATION: The AWS account that owns your organization
- // is still in the process of completing business license validation.
- //
- // * UNKNOWN_BUSINESS_VALIDATION: The AWS account that owns your organization
- // has an unknown issue with business license validation.
- FailureReason *string `type:"string" enum:"CreateAccountFailureReason"`
-
- // If the account was created successfully, the unique identifier (ID) of the
- // new account in the AWS GovCloud (US) Region.
- GovCloudAccountId *string `type:"string"`
-
- // The unique identifier (ID) that references this request. You get this value
- // from the response of the initial CreateAccount request to create the account.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a create account
- // request ID string requires "car-" followed by from 8 to 32 lowercase letters
- // or digits.
- Id *string `type:"string"`
-
- // The date and time that the request was made for the account creation.
- RequestedTimestamp *time.Time `type:"timestamp"`
-
- // The status of the asynchronous request to create an AWS account.
- State *string `type:"string" enum:"CreateAccountState"`
-}
-
-// String returns the string representation
-func (s CreateAccountStatus) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateAccountStatus) GoString() string {
- return s.String()
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *CreateAccountStatus) SetAccountId(v string) *CreateAccountStatus {
- s.AccountId = &v
- return s
-}
-
-// SetAccountName sets the AccountName field's value.
-func (s *CreateAccountStatus) SetAccountName(v string) *CreateAccountStatus {
- s.AccountName = &v
- return s
-}
-
-// SetCompletedTimestamp sets the CompletedTimestamp field's value.
-func (s *CreateAccountStatus) SetCompletedTimestamp(v time.Time) *CreateAccountStatus {
- s.CompletedTimestamp = &v
- return s
-}
-
-// SetFailureReason sets the FailureReason field's value.
-func (s *CreateAccountStatus) SetFailureReason(v string) *CreateAccountStatus {
- s.FailureReason = &v
- return s
-}
-
-// SetGovCloudAccountId sets the GovCloudAccountId field's value.
-func (s *CreateAccountStatus) SetGovCloudAccountId(v string) *CreateAccountStatus {
- s.GovCloudAccountId = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *CreateAccountStatus) SetId(v string) *CreateAccountStatus {
- s.Id = &v
- return s
-}
-
-// SetRequestedTimestamp sets the RequestedTimestamp field's value.
-func (s *CreateAccountStatus) SetRequestedTimestamp(v time.Time) *CreateAccountStatus {
- s.RequestedTimestamp = &v
- return s
-}
-
-// SetState sets the State field's value.
-func (s *CreateAccountStatus) SetState(v string) *CreateAccountStatus {
- s.State = &v
- return s
-}
-
-// We can't find an create account request with the CreateAccountRequestId that
-// you specified.
-type CreateAccountStatusNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s CreateAccountStatusNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateAccountStatusNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorCreateAccountStatusNotFoundException(v protocol.ResponseMetadata) error {
- return &CreateAccountStatusNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CreateAccountStatusNotFoundException) Code() string {
- return "CreateAccountStatusNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *CreateAccountStatusNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CreateAccountStatusNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *CreateAccountStatusNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CreateAccountStatusNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CreateAccountStatusNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type CreateGovCloudAccountInput struct {
- _ struct{} `type:"structure"`
-
- // The friendly name of the member account.
- //
- // AccountName is a required field
- AccountName *string `min:"1" type:"string" required:"true" sensitive:"true"`
-
- // The email address of the owner to assign to the new member account in the
- // commercial Region. This email address must not already be associated with
- // another AWS account. You must use a valid email address to complete account
- // creation. You can't access the root user of the account or remove an account
- // that was created with an invalid email address. Like all request parameters
- // for CreateGovCloudAccount, the request for the email address for the AWS
- // GovCloud (US) account originates from the commercial Region, not from the
- // AWS GovCloud (US) Region.
- //
- // Email is a required field
- Email *string `min:"6" type:"string" required:"true" sensitive:"true"`
-
- // If set to ALLOW, the new linked account in the commercial Region enables
- // IAM users to access account billing information if they have the required
- // permissions. If set to DENY, only the root user of the new account can access
- // account billing information. For more information, see Activating Access
- // to the Billing and Cost Management Console (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/grantaccess.html#ControllingAccessWebsite-Activate)
- // in the AWS Billing and Cost Management User Guide.
- //
- // If you don't specify this parameter, the value defaults to ALLOW, and IAM
- // users and roles with the required permissions can access billing information
- // for the new account.
- IamUserAccessToBilling *string `type:"string" enum:"IAMUserAccessToBilling"`
-
- // (Optional)
- //
- // The name of an IAM role that AWS Organizations automatically preconfigures
- // in the new member accounts in both the AWS GovCloud (US) Region and in the
- // commercial Region. This role trusts the management account, allowing users
- // in the management account to assume the role, as permitted by the management
- // account administrator. The role has administrator permissions in the new
- // member account.
- //
- // If you don't specify this parameter, the role name defaults to OrganizationAccountAccessRole.
- //
- // For more information about how to use this role to access the member account,
- // see Accessing and Administering the Member Accounts in Your Organization
- // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_access.html#orgs_manage_accounts_create-cross-account-role)
- // in the AWS Organizations User Guide and steps 2 and 3 in Tutorial: Delegate
- // Access Across AWS Accounts Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html)
- // in the IAM User Guide.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter. The pattern can include uppercase letters, lowercase letters,
- // digits with no spaces, and any of the following characters: =,.@-
- RoleName *string `type:"string"`
-
- // A list of tags that you want to attach to the newly created account. These
- // tags are attached to the commercial account associated with the GovCloud
- // account, and not to the GovCloud account itself. To add tags to the actual
- // GovCloud account, call the TagResource operation in the GovCloud region after
- // the new GovCloud account exists.
- //
- // For each tag in the list, you must specify both a tag key and a value. You
- // can set the value to an empty string, but you can't set it to null. For more
- // information about tagging, see Tagging AWS Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
- // in the AWS Organizations User Guide.
- //
- // If any one of the tags is invalid or if you exceed the allowed number of
- // tags for an account, then the entire request fails and the account is not
- // created.
- Tags []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s CreateGovCloudAccountInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateGovCloudAccountInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateGovCloudAccountInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateGovCloudAccountInput"}
- if s.AccountName == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountName"))
- }
- if s.AccountName != nil && len(*s.AccountName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AccountName", 1))
- }
- if s.Email == nil {
- invalidParams.Add(request.NewErrParamRequired("Email"))
- }
- if s.Email != nil && len(*s.Email) < 6 {
- invalidParams.Add(request.NewErrParamMinLen("Email", 6))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountName sets the AccountName field's value.
-func (s *CreateGovCloudAccountInput) SetAccountName(v string) *CreateGovCloudAccountInput {
- s.AccountName = &v
- return s
-}
-
-// SetEmail sets the Email field's value.
-func (s *CreateGovCloudAccountInput) SetEmail(v string) *CreateGovCloudAccountInput {
- s.Email = &v
- return s
-}
-
-// SetIamUserAccessToBilling sets the IamUserAccessToBilling field's value.
-func (s *CreateGovCloudAccountInput) SetIamUserAccessToBilling(v string) *CreateGovCloudAccountInput {
- s.IamUserAccessToBilling = &v
- return s
-}
-
-// SetRoleName sets the RoleName field's value.
-func (s *CreateGovCloudAccountInput) SetRoleName(v string) *CreateGovCloudAccountInput {
- s.RoleName = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreateGovCloudAccountInput) SetTags(v []*Tag) *CreateGovCloudAccountInput {
- s.Tags = v
- return s
-}
-
-type CreateGovCloudAccountOutput struct {
- _ struct{} `type:"structure"`
-
- // Contains the status about a CreateAccount or CreateGovCloudAccount request
- // to create an AWS account or an AWS GovCloud (US) account in an organization.
- CreateAccountStatus *CreateAccountStatus `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateGovCloudAccountOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateGovCloudAccountOutput) GoString() string {
- return s.String()
-}
-
-// SetCreateAccountStatus sets the CreateAccountStatus field's value.
-func (s *CreateGovCloudAccountOutput) SetCreateAccountStatus(v *CreateAccountStatus) *CreateGovCloudAccountOutput {
- s.CreateAccountStatus = v
- return s
-}
-
-type CreateOrganizationInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the feature set supported by the new organization. Each feature
- // set supports different levels of functionality.
- //
- // * CONSOLIDATED_BILLING: All member accounts have their bills consolidated
- // to and paid by the management account. For more information, see Consolidated
- // billing (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-cb-only)
- // in the AWS Organizations User Guide. The consolidated billing feature
- // subset isn't available for organizations in the AWS GovCloud (US) Region.
- //
- // * ALL: In addition to all the features supported by the consolidated billing
- // feature set, the management account can also apply any policy type to
- // any member account in the organization. For more information, see All
- // features (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#feature-set-all)
- // in the AWS Organizations User Guide.
- FeatureSet *string `type:"string" enum:"OrganizationFeatureSet"`
-}
-
-// String returns the string representation
-func (s CreateOrganizationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateOrganizationInput) GoString() string {
- return s.String()
-}
-
-// SetFeatureSet sets the FeatureSet field's value.
-func (s *CreateOrganizationInput) SetFeatureSet(v string) *CreateOrganizationInput {
- s.FeatureSet = &v
- return s
-}
-
-type CreateOrganizationOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the newly created organization.
- Organization *Organization `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateOrganizationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateOrganizationOutput) GoString() string {
- return s.String()
-}
-
-// SetOrganization sets the Organization field's value.
-func (s *CreateOrganizationOutput) SetOrganization(v *Organization) *CreateOrganizationOutput {
- s.Organization = v
- return s
-}
-
-type CreateOrganizationalUnitInput struct {
- _ struct{} `type:"structure"`
-
- // The friendly name to assign to the new OU.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // The unique identifier (ID) of the parent root or OU that you want to create
- // the new OU in.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- //
- // ParentId is a required field
- ParentId *string `type:"string" required:"true"`
-
- // A list of tags that you want to attach to the newly created OU. For each
- // tag in the list, you must specify both a tag key and a value. You can set
- // the value to an empty string, but you can't set it to null. For more information
- // about tagging, see Tagging AWS Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
- // in the AWS Organizations User Guide.
- //
- // If any one of the tags is invalid or if you exceed the allowed number of
- // tags for an OU, then the entire request fails and the OU is not created.
- Tags []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s CreateOrganizationalUnitInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateOrganizationalUnitInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateOrganizationalUnitInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateOrganizationalUnitInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.ParentId == nil {
- invalidParams.Add(request.NewErrParamRequired("ParentId"))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *CreateOrganizationalUnitInput) SetName(v string) *CreateOrganizationalUnitInput {
- s.Name = &v
- return s
-}
-
-// SetParentId sets the ParentId field's value.
-func (s *CreateOrganizationalUnitInput) SetParentId(v string) *CreateOrganizationalUnitInput {
- s.ParentId = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreateOrganizationalUnitInput) SetTags(v []*Tag) *CreateOrganizationalUnitInput {
- s.Tags = v
- return s
-}
-
-type CreateOrganizationalUnitOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the newly created OU.
- OrganizationalUnit *OrganizationalUnit `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateOrganizationalUnitOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateOrganizationalUnitOutput) GoString() string {
- return s.String()
-}
-
-// SetOrganizationalUnit sets the OrganizationalUnit field's value.
-func (s *CreateOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *CreateOrganizationalUnitOutput {
- s.OrganizationalUnit = v
- return s
-}
-
-type CreatePolicyInput struct {
- _ struct{} `type:"structure"`
-
- // The policy text content to add to the new policy. The text that you supply
- // must adhere to the rules of the policy type you specify in the Type parameter.
- //
- // Content is a required field
- Content *string `min:"1" type:"string" required:"true"`
-
- // An optional description to assign to the policy.
- //
- // Description is a required field
- Description *string `type:"string" required:"true"`
-
- // The friendly name to assign to the policy.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter is a string of any of the characters in the ASCII character
- // range.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // A list of tags that you want to attach to the newly created policy. For each
- // tag in the list, you must specify both a tag key and a value. You can set
- // the value to an empty string, but you can't set it to null. For more information
- // about tagging, see Tagging AWS Organizations resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
- // in the AWS Organizations User Guide.
- //
- // If any one of the tags is invalid or if you exceed the allowed number of
- // tags for a policy, then the entire request fails and the policy is not created.
- Tags []*Tag `type:"list"`
-
- // The type of policy to create. You can specify one of the following values:
- //
- // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
- //
- // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
- //
- // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
- //
- // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
- //
- // Type is a required field
- Type *string `type:"string" required:"true" enum:"PolicyType"`
-}
-
-// String returns the string representation
-func (s CreatePolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreatePolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreatePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreatePolicyInput"}
- if s.Content == nil {
- invalidParams.Add(request.NewErrParamRequired("Content"))
- }
- if s.Content != nil && len(*s.Content) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Content", 1))
- }
- if s.Description == nil {
- invalidParams.Add(request.NewErrParamRequired("Description"))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetContent sets the Content field's value.
-func (s *CreatePolicyInput) SetContent(v string) *CreatePolicyInput {
- s.Content = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *CreatePolicyInput) SetDescription(v string) *CreatePolicyInput {
- s.Description = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *CreatePolicyInput) SetName(v string) *CreatePolicyInput {
- s.Name = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreatePolicyInput) SetTags(v []*Tag) *CreatePolicyInput {
- s.Tags = v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *CreatePolicyInput) SetType(v string) *CreatePolicyInput {
- s.Type = &v
- return s
-}
-
-type CreatePolicyOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the newly created policy.
- Policy *Policy `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreatePolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreatePolicyOutput) GoString() string {
- return s.String()
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *CreatePolicyOutput) SetPolicy(v *Policy) *CreatePolicyOutput {
- s.Policy = v
- return s
-}
-
-type DeclineHandshakeInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the handshake that you want to decline. You
- // can get the ID from the ListHandshakesForAccount operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
- // requires "h-" followed by from 8 to 32 lowercase letters or digits.
- //
- // HandshakeId is a required field
- HandshakeId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeclineHandshakeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeclineHandshakeInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeclineHandshakeInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeclineHandshakeInput"}
- if s.HandshakeId == nil {
- invalidParams.Add(request.NewErrParamRequired("HandshakeId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetHandshakeId sets the HandshakeId field's value.
-func (s *DeclineHandshakeInput) SetHandshakeId(v string) *DeclineHandshakeInput {
- s.HandshakeId = &v
- return s
-}
-
-type DeclineHandshakeOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the declined handshake. The state
- // is updated to show the value DECLINED.
- Handshake *Handshake `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeclineHandshakeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeclineHandshakeOutput) GoString() string {
- return s.String()
-}
-
-// SetHandshake sets the Handshake field's value.
-func (s *DeclineHandshakeOutput) SetHandshake(v *Handshake) *DeclineHandshakeOutput {
- s.Handshake = v
- return s
-}
-
-// Contains information about the delegated administrator.
-type DelegatedAdministrator struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the delegated administrator's account.
- Arn *string `type:"string"`
-
- // The date when the account was made a delegated administrator.
- DelegationEnabledDate *time.Time `type:"timestamp"`
-
- // The email address that is associated with the delegated administrator's AWS
- // account.
- Email *string `min:"6" type:"string" sensitive:"true"`
-
- // The unique identifier (ID) of the delegated administrator's account.
- Id *string `type:"string"`
-
- // The method by which the delegated administrator's account joined the organization.
- JoinedMethod *string `type:"string" enum:"AccountJoinedMethod"`
-
- // The date when the delegated administrator's account became a part of the
- // organization.
- JoinedTimestamp *time.Time `type:"timestamp"`
-
- // The friendly name of the delegated administrator's account.
- Name *string `min:"1" type:"string" sensitive:"true"`
-
- // The status of the delegated administrator's account in the organization.
- Status *string `type:"string" enum:"AccountStatus"`
-}
-
-// String returns the string representation
-func (s DelegatedAdministrator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DelegatedAdministrator) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *DelegatedAdministrator) SetArn(v string) *DelegatedAdministrator {
- s.Arn = &v
- return s
-}
-
-// SetDelegationEnabledDate sets the DelegationEnabledDate field's value.
-func (s *DelegatedAdministrator) SetDelegationEnabledDate(v time.Time) *DelegatedAdministrator {
- s.DelegationEnabledDate = &v
- return s
-}
-
-// SetEmail sets the Email field's value.
-func (s *DelegatedAdministrator) SetEmail(v string) *DelegatedAdministrator {
- s.Email = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *DelegatedAdministrator) SetId(v string) *DelegatedAdministrator {
- s.Id = &v
- return s
-}
-
-// SetJoinedMethod sets the JoinedMethod field's value.
-func (s *DelegatedAdministrator) SetJoinedMethod(v string) *DelegatedAdministrator {
- s.JoinedMethod = &v
- return s
-}
-
-// SetJoinedTimestamp sets the JoinedTimestamp field's value.
-func (s *DelegatedAdministrator) SetJoinedTimestamp(v time.Time) *DelegatedAdministrator {
- s.JoinedTimestamp = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *DelegatedAdministrator) SetName(v string) *DelegatedAdministrator {
- s.Name = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *DelegatedAdministrator) SetStatus(v string) *DelegatedAdministrator {
- s.Status = &v
- return s
-}
-
-// Contains information about the AWS service for which the account is a delegated
-// administrator.
-type DelegatedService struct {
- _ struct{} `type:"structure"`
-
- // The date that the account became a delegated administrator for this service.
- DelegationEnabledDate *time.Time `type:"timestamp"`
-
- // The name of an AWS service that can request an operation for the specified
- // service. This is typically in the form of a URL, such as: servicename.amazonaws.com.
- ServicePrincipal *string `min:"1" type:"string"`
-}
-
-// String returns the string representation
-func (s DelegatedService) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DelegatedService) GoString() string {
- return s.String()
-}
-
-// SetDelegationEnabledDate sets the DelegationEnabledDate field's value.
-func (s *DelegatedService) SetDelegationEnabledDate(v time.Time) *DelegatedService {
- s.DelegationEnabledDate = &v
- return s
-}
-
-// SetServicePrincipal sets the ServicePrincipal field's value.
-func (s *DelegatedService) SetServicePrincipal(v string) *DelegatedService {
- s.ServicePrincipal = &v
- return s
-}
-
-type DeleteOrganizationInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteOrganizationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteOrganizationInput) GoString() string {
- return s.String()
-}
-
-type DeleteOrganizationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteOrganizationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteOrganizationOutput) GoString() string {
- return s.String()
-}
-
-type DeleteOrganizationalUnitInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the organizational unit that you want to delete.
- // You can get the ID from the ListOrganizationalUnitsForParent operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational
- // unit ID string requires "ou-" followed by from 4 to 32 lowercase letters
- // or digits (the ID of the root that contains the OU). This string is followed
- // by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
- //
- // OrganizationalUnitId is a required field
- OrganizationalUnitId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeleteOrganizationalUnitInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteOrganizationalUnitInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteOrganizationalUnitInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteOrganizationalUnitInput"}
- if s.OrganizationalUnitId == nil {
- invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
-func (s *DeleteOrganizationalUnitInput) SetOrganizationalUnitId(v string) *DeleteOrganizationalUnitInput {
- s.OrganizationalUnitId = &v
- return s
-}
-
-type DeleteOrganizationalUnitOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteOrganizationalUnitOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteOrganizationalUnitOutput) GoString() string {
- return s.String()
-}
-
-type DeletePolicyInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the policy that you want to delete. You can
- // get the ID from the ListPolicies or ListPoliciesForTarget operations.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
- // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
- // or the underscore character (_).
- //
- // PolicyId is a required field
- PolicyId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeletePolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletePolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeletePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"}
- if s.PolicyId == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPolicyId sets the PolicyId field's value.
-func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput {
- s.PolicyId = &v
- return s
-}
-
-type DeletePolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeletePolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletePolicyOutput) GoString() string {
- return s.String()
-}
-
-type DeregisterDelegatedAdministratorInput struct {
- _ struct{} `type:"structure"`
-
- // The account ID number of the member account in the organization that you
- // want to deregister as a delegated administrator.
- //
- // AccountId is a required field
- AccountId *string `type:"string" required:"true"`
-
- // The service principal name of an AWS service for which the account is a delegated
- // administrator.
- //
- // Delegated administrator privileges are revoked for only the specified AWS
- // service from the member account. If the specified service is the only service
- // for which the member account is a delegated administrator, the operation
- // also revokes Organizations read action permissions.
- //
- // ServicePrincipal is a required field
- ServicePrincipal *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeregisterDelegatedAdministratorInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeregisterDelegatedAdministratorInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeregisterDelegatedAdministratorInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeregisterDelegatedAdministratorInput"}
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
- if s.ServicePrincipal == nil {
- invalidParams.Add(request.NewErrParamRequired("ServicePrincipal"))
- }
- if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *DeregisterDelegatedAdministratorInput) SetAccountId(v string) *DeregisterDelegatedAdministratorInput {
- s.AccountId = &v
- return s
-}
-
-// SetServicePrincipal sets the ServicePrincipal field's value.
-func (s *DeregisterDelegatedAdministratorInput) SetServicePrincipal(v string) *DeregisterDelegatedAdministratorInput {
- s.ServicePrincipal = &v
- return s
-}
-
-type DeregisterDelegatedAdministratorOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeregisterDelegatedAdministratorOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeregisterDelegatedAdministratorOutput) GoString() string {
- return s.String()
-}
-
-type DescribeAccountInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the AWS account that you want information about.
- // You can get the ID from the ListAccounts or ListAccountsForParent operations.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
- // requires exactly 12 digits.
- //
- // AccountId is a required field
- AccountId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DescribeAccountInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAccountInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeAccountInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeAccountInput"}
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *DescribeAccountInput) SetAccountId(v string) *DescribeAccountInput {
- s.AccountId = &v
- return s
-}
-
-type DescribeAccountOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains information about the requested account.
- Account *Account `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeAccountOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeAccountOutput) GoString() string {
- return s.String()
-}
-
-// SetAccount sets the Account field's value.
-func (s *DescribeAccountOutput) SetAccount(v *Account) *DescribeAccountOutput {
- s.Account = v
- return s
-}
-
-type DescribeCreateAccountStatusInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the Id value that uniquely identifies the CreateAccount request.
- // You can get the value from the CreateAccountStatus.Id response in an earlier
- // CreateAccount request, or from the ListCreateAccountStatus operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a create account
- // request ID string requires "car-" followed by from 8 to 32 lowercase letters
- // or digits.
- //
- // CreateAccountRequestId is a required field
- CreateAccountRequestId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DescribeCreateAccountStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeCreateAccountStatusInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeCreateAccountStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeCreateAccountStatusInput"}
- if s.CreateAccountRequestId == nil {
- invalidParams.Add(request.NewErrParamRequired("CreateAccountRequestId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCreateAccountRequestId sets the CreateAccountRequestId field's value.
-func (s *DescribeCreateAccountStatusInput) SetCreateAccountRequestId(v string) *DescribeCreateAccountStatusInput {
- s.CreateAccountRequestId = &v
- return s
-}
-
-type DescribeCreateAccountStatusOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains the current status of an account creation request.
- CreateAccountStatus *CreateAccountStatus `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeCreateAccountStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeCreateAccountStatusOutput) GoString() string {
- return s.String()
-}
-
-// SetCreateAccountStatus sets the CreateAccountStatus field's value.
-func (s *DescribeCreateAccountStatusOutput) SetCreateAccountStatus(v *CreateAccountStatus) *DescribeCreateAccountStatusOutput {
- s.CreateAccountStatus = v
- return s
-}
-
-type DescribeEffectivePolicyInput struct {
- _ struct{} `type:"structure"`
-
- // The type of policy that you want information about. You can specify one of
- // the following values:
- //
- // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
- //
- // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
- //
- // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
- //
- // PolicyType is a required field
- PolicyType *string `type:"string" required:"true" enum:"EffectivePolicyType"`
-
- // When you're signed in as the management account, specify the ID of the account
- // that you want details about. Specifying an organization root or organizational
- // unit (OU) as the target is not supported.
- TargetId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s DescribeEffectivePolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeEffectivePolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeEffectivePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeEffectivePolicyInput"}
- if s.PolicyType == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyType"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPolicyType sets the PolicyType field's value.
-func (s *DescribeEffectivePolicyInput) SetPolicyType(v string) *DescribeEffectivePolicyInput {
- s.PolicyType = &v
- return s
-}
-
-// SetTargetId sets the TargetId field's value.
-func (s *DescribeEffectivePolicyInput) SetTargetId(v string) *DescribeEffectivePolicyInput {
- s.TargetId = &v
- return s
-}
-
-type DescribeEffectivePolicyOutput struct {
- _ struct{} `type:"structure"`
-
- // The contents of the effective policy.
- EffectivePolicy *EffectivePolicy `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeEffectivePolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeEffectivePolicyOutput) GoString() string {
- return s.String()
-}
-
-// SetEffectivePolicy sets the EffectivePolicy field's value.
-func (s *DescribeEffectivePolicyOutput) SetEffectivePolicy(v *EffectivePolicy) *DescribeEffectivePolicyOutput {
- s.EffectivePolicy = v
- return s
-}
-
-type DescribeHandshakeInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the handshake that you want information about.
- // You can get the ID from the original call to InviteAccountToOrganization,
- // or from a call to ListHandshakesForAccount or ListHandshakesForOrganization.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
- // requires "h-" followed by from 8 to 32 lowercase letters or digits.
- //
- // HandshakeId is a required field
- HandshakeId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DescribeHandshakeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeHandshakeInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeHandshakeInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeHandshakeInput"}
- if s.HandshakeId == nil {
- invalidParams.Add(request.NewErrParamRequired("HandshakeId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetHandshakeId sets the HandshakeId field's value.
-func (s *DescribeHandshakeInput) SetHandshakeId(v string) *DescribeHandshakeInput {
- s.HandshakeId = &v
- return s
-}
-
-type DescribeHandshakeOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains information about the specified handshake.
- Handshake *Handshake `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeHandshakeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeHandshakeOutput) GoString() string {
- return s.String()
-}
-
-// SetHandshake sets the Handshake field's value.
-func (s *DescribeHandshakeOutput) SetHandshake(v *Handshake) *DescribeHandshakeOutput {
- s.Handshake = v
- return s
-}
-
-type DescribeOrganizationInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeOrganizationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeOrganizationInput) GoString() string {
- return s.String()
-}
-
-type DescribeOrganizationOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains information about the organization.
- //
- // The AvailablePolicyTypes part of the response is deprecated, and you shouldn't
- // use it in your apps. It doesn't include any policy type supported by Organizations
- // other than SCPs. To determine which policy types are enabled in your organization,
- // use the ListRoots operation.
- Organization *Organization `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeOrganizationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeOrganizationOutput) GoString() string {
- return s.String()
-}
-
-// SetOrganization sets the Organization field's value.
-func (s *DescribeOrganizationOutput) SetOrganization(v *Organization) *DescribeOrganizationOutput {
- s.Organization = v
- return s
-}
-
-type DescribeOrganizationalUnitInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the organizational unit that you want details
- // about. You can get the ID from the ListOrganizationalUnitsForParent operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational
- // unit ID string requires "ou-" followed by from 4 to 32 lowercase letters
- // or digits (the ID of the root that contains the OU). This string is followed
- // by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
- //
- // OrganizationalUnitId is a required field
- OrganizationalUnitId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DescribeOrganizationalUnitInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeOrganizationalUnitInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeOrganizationalUnitInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeOrganizationalUnitInput"}
- if s.OrganizationalUnitId == nil {
- invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
-func (s *DescribeOrganizationalUnitInput) SetOrganizationalUnitId(v string) *DescribeOrganizationalUnitInput {
- s.OrganizationalUnitId = &v
- return s
-}
-
-type DescribeOrganizationalUnitOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the specified OU.
- OrganizationalUnit *OrganizationalUnit `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeOrganizationalUnitOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeOrganizationalUnitOutput) GoString() string {
- return s.String()
-}
-
-// SetOrganizationalUnit sets the OrganizationalUnit field's value.
-func (s *DescribeOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *DescribeOrganizationalUnitOutput {
- s.OrganizationalUnit = v
- return s
-}
-
-type DescribePolicyInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the policy that you want details about. You
- // can get the ID from the ListPolicies or ListPoliciesForTarget operations.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
- // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
- // or the underscore character (_).
- //
- // PolicyId is a required field
- PolicyId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DescribePolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribePolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribePolicyInput"}
- if s.PolicyId == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPolicyId sets the PolicyId field's value.
-func (s *DescribePolicyInput) SetPolicyId(v string) *DescribePolicyInput {
- s.PolicyId = &v
- return s
-}
-
-type DescribePolicyOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the specified policy.
- Policy *Policy `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribePolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribePolicyOutput) GoString() string {
- return s.String()
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *DescribePolicyOutput) SetPolicy(v *Policy) *DescribePolicyOutput {
- s.Policy = v
- return s
-}
-
-// We can't find the destination container (a root or OU) with the ParentId
-// that you specified.
-type DestinationParentNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s DestinationParentNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DestinationParentNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorDestinationParentNotFoundException(v protocol.ResponseMetadata) error {
- return &DestinationParentNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *DestinationParentNotFoundException) Code() string {
- return "DestinationParentNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *DestinationParentNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *DestinationParentNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *DestinationParentNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *DestinationParentNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *DestinationParentNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type DetachPolicyInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the policy you want to detach. You can get
- // the ID from the ListPolicies or ListPoliciesForTarget operations.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
- // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
- // or the underscore character (_).
- //
- // PolicyId is a required field
- PolicyId *string `type:"string" required:"true"`
-
- // The unique identifier (ID) of the root, OU, or account that you want to detach
- // the policy from. You can get the ID from the ListRoots, ListOrganizationalUnitsForParent,
- // or ListAccounts operations.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Account - A string that consists of exactly 12 digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- //
- // TargetId is a required field
- TargetId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DetachPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DetachPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DetachPolicyInput"}
- if s.PolicyId == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyId"))
- }
- if s.TargetId == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPolicyId sets the PolicyId field's value.
-func (s *DetachPolicyInput) SetPolicyId(v string) *DetachPolicyInput {
- s.PolicyId = &v
- return s
-}
-
-// SetTargetId sets the TargetId field's value.
-func (s *DetachPolicyInput) SetTargetId(v string) *DetachPolicyInput {
- s.TargetId = &v
- return s
-}
-
-type DetachPolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DetachPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DetachPolicyOutput) GoString() string {
- return s.String()
-}
-
-type DisableAWSServiceAccessInput struct {
- _ struct{} `type:"structure"`
-
- // The service principal name of the AWS service for which you want to disable
- // integration with your organization. This is typically in the form of a URL,
- // such as service-abbreviation.amazonaws.com.
- //
- // ServicePrincipal is a required field
- ServicePrincipal *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DisableAWSServiceAccessInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisableAWSServiceAccessInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DisableAWSServiceAccessInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DisableAWSServiceAccessInput"}
- if s.ServicePrincipal == nil {
- invalidParams.Add(request.NewErrParamRequired("ServicePrincipal"))
- }
- if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetServicePrincipal sets the ServicePrincipal field's value.
-func (s *DisableAWSServiceAccessInput) SetServicePrincipal(v string) *DisableAWSServiceAccessInput {
- s.ServicePrincipal = &v
- return s
-}
-
-type DisableAWSServiceAccessOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisableAWSServiceAccessOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisableAWSServiceAccessOutput) GoString() string {
- return s.String()
-}
-
-type DisablePolicyTypeInput struct {
- _ struct{} `type:"structure"`
-
- // The policy type that you want to disable in this root. You can specify one
- // of the following values:
- //
- // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
- //
- // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
- //
- // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
- //
- // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
- //
- // PolicyType is a required field
- PolicyType *string `type:"string" required:"true" enum:"PolicyType"`
-
- // The unique identifier (ID) of the root in which you want to disable a policy
- // type. You can get the ID from the ListRoots operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string
- // requires "r-" followed by from 4 to 32 lowercase letters or digits.
- //
- // RootId is a required field
- RootId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DisablePolicyTypeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisablePolicyTypeInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DisablePolicyTypeInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DisablePolicyTypeInput"}
- if s.PolicyType == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyType"))
- }
- if s.RootId == nil {
- invalidParams.Add(request.NewErrParamRequired("RootId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPolicyType sets the PolicyType field's value.
-func (s *DisablePolicyTypeInput) SetPolicyType(v string) *DisablePolicyTypeInput {
- s.PolicyType = &v
- return s
-}
-
-// SetRootId sets the RootId field's value.
-func (s *DisablePolicyTypeInput) SetRootId(v string) *DisablePolicyTypeInput {
- s.RootId = &v
- return s
-}
-
-type DisablePolicyTypeOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that shows the root with the updated list of enabled policy types.
- Root *Root `type:"structure"`
-}
-
-// String returns the string representation
-func (s DisablePolicyTypeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DisablePolicyTypeOutput) GoString() string {
- return s.String()
-}
-
-// SetRoot sets the Root field's value.
-func (s *DisablePolicyTypeOutput) SetRoot(v *Root) *DisablePolicyTypeOutput {
- s.Root = v
- return s
-}
-
-// That account is already present in the specified destination.
-type DuplicateAccountException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s DuplicateAccountException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DuplicateAccountException) GoString() string {
- return s.String()
-}
-
-func newErrorDuplicateAccountException(v protocol.ResponseMetadata) error {
- return &DuplicateAccountException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *DuplicateAccountException) Code() string {
- return "DuplicateAccountException"
-}
-
-// Message returns the exception's message.
-func (s *DuplicateAccountException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *DuplicateAccountException) OrigErr() error {
- return nil
-}
-
-func (s *DuplicateAccountException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *DuplicateAccountException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *DuplicateAccountException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// A handshake with the same action and target already exists. For example,
-// if you invited an account to join your organization, the invited account
-// might already have a pending invitation from this organization. If you intend
-// to resend an invitation to an account, ensure that existing handshakes that
-// might be considered duplicates are canceled or declined.
-type DuplicateHandshakeException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s DuplicateHandshakeException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DuplicateHandshakeException) GoString() string {
- return s.String()
-}
-
-func newErrorDuplicateHandshakeException(v protocol.ResponseMetadata) error {
- return &DuplicateHandshakeException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *DuplicateHandshakeException) Code() string {
- return "DuplicateHandshakeException"
-}
-
-// Message returns the exception's message.
-func (s *DuplicateHandshakeException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *DuplicateHandshakeException) OrigErr() error {
- return nil
-}
-
-func (s *DuplicateHandshakeException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *DuplicateHandshakeException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *DuplicateHandshakeException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// An OU with the same name already exists.
-type DuplicateOrganizationalUnitException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s DuplicateOrganizationalUnitException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DuplicateOrganizationalUnitException) GoString() string {
- return s.String()
-}
-
-func newErrorDuplicateOrganizationalUnitException(v protocol.ResponseMetadata) error {
- return &DuplicateOrganizationalUnitException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *DuplicateOrganizationalUnitException) Code() string {
- return "DuplicateOrganizationalUnitException"
-}
-
-// Message returns the exception's message.
-func (s *DuplicateOrganizationalUnitException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *DuplicateOrganizationalUnitException) OrigErr() error {
- return nil
-}
-
-func (s *DuplicateOrganizationalUnitException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *DuplicateOrganizationalUnitException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *DuplicateOrganizationalUnitException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The selected policy is already attached to the specified target.
-type DuplicatePolicyAttachmentException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s DuplicatePolicyAttachmentException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DuplicatePolicyAttachmentException) GoString() string {
- return s.String()
-}
-
-func newErrorDuplicatePolicyAttachmentException(v protocol.ResponseMetadata) error {
- return &DuplicatePolicyAttachmentException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *DuplicatePolicyAttachmentException) Code() string {
- return "DuplicatePolicyAttachmentException"
-}
-
-// Message returns the exception's message.
-func (s *DuplicatePolicyAttachmentException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *DuplicatePolicyAttachmentException) OrigErr() error {
- return nil
-}
-
-func (s *DuplicatePolicyAttachmentException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *DuplicatePolicyAttachmentException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *DuplicatePolicyAttachmentException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// A policy with the same name already exists.
-type DuplicatePolicyException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s DuplicatePolicyException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DuplicatePolicyException) GoString() string {
- return s.String()
-}
-
-func newErrorDuplicatePolicyException(v protocol.ResponseMetadata) error {
- return &DuplicatePolicyException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *DuplicatePolicyException) Code() string {
- return "DuplicatePolicyException"
-}
-
-// Message returns the exception's message.
-func (s *DuplicatePolicyException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *DuplicatePolicyException) OrigErr() error {
- return nil
-}
-
-func (s *DuplicatePolicyException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *DuplicatePolicyException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *DuplicatePolicyException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains rules to be applied to the affected accounts. The effective policy
-// is the aggregation of any policies the account inherits, plus any policy
-// directly attached to the account.
-type EffectivePolicy struct {
- _ struct{} `type:"structure"`
-
- // The time of the last update to this policy.
- LastUpdatedTimestamp *time.Time `type:"timestamp"`
-
- // The text content of the policy.
- PolicyContent *string `min:"1" type:"string"`
-
- // The policy type.
- PolicyType *string `type:"string" enum:"EffectivePolicyType"`
-
- // The account ID of the policy target.
- TargetId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s EffectivePolicy) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EffectivePolicy) GoString() string {
- return s.String()
-}
-
-// SetLastUpdatedTimestamp sets the LastUpdatedTimestamp field's value.
-func (s *EffectivePolicy) SetLastUpdatedTimestamp(v time.Time) *EffectivePolicy {
- s.LastUpdatedTimestamp = &v
- return s
-}
-
-// SetPolicyContent sets the PolicyContent field's value.
-func (s *EffectivePolicy) SetPolicyContent(v string) *EffectivePolicy {
- s.PolicyContent = &v
- return s
-}
-
-// SetPolicyType sets the PolicyType field's value.
-func (s *EffectivePolicy) SetPolicyType(v string) *EffectivePolicy {
- s.PolicyType = &v
- return s
-}
-
-// SetTargetId sets the TargetId field's value.
-func (s *EffectivePolicy) SetTargetId(v string) *EffectivePolicy {
- s.TargetId = &v
- return s
-}
-
-// If you ran this action on the management account, this policy type is not
-// enabled. If you ran the action on a member account, the account doesn't have
-// an effective policy of this type. Contact the administrator of your organization
-// about attaching a policy of this type to the account.
-type EffectivePolicyNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s EffectivePolicyNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EffectivePolicyNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorEffectivePolicyNotFoundException(v protocol.ResponseMetadata) error {
- return &EffectivePolicyNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *EffectivePolicyNotFoundException) Code() string {
- return "EffectivePolicyNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *EffectivePolicyNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *EffectivePolicyNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *EffectivePolicyNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *EffectivePolicyNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *EffectivePolicyNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type EnableAWSServiceAccessInput struct {
- _ struct{} `type:"structure"`
-
- // The service principal name of the AWS service for which you want to enable
- // integration with your organization. This is typically in the form of a URL,
- // such as service-abbreviation.amazonaws.com.
- //
- // ServicePrincipal is a required field
- ServicePrincipal *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s EnableAWSServiceAccessInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableAWSServiceAccessInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *EnableAWSServiceAccessInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EnableAWSServiceAccessInput"}
- if s.ServicePrincipal == nil {
- invalidParams.Add(request.NewErrParamRequired("ServicePrincipal"))
- }
- if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetServicePrincipal sets the ServicePrincipal field's value.
-func (s *EnableAWSServiceAccessInput) SetServicePrincipal(v string) *EnableAWSServiceAccessInput {
- s.ServicePrincipal = &v
- return s
-}
-
-type EnableAWSServiceAccessOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableAWSServiceAccessOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableAWSServiceAccessOutput) GoString() string {
- return s.String()
-}
-
-type EnableAllFeaturesInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableAllFeaturesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableAllFeaturesInput) GoString() string {
- return s.String()
-}
-
-type EnableAllFeaturesOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the handshake created to support
- // this request to enable all features in the organization.
- Handshake *Handshake `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnableAllFeaturesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnableAllFeaturesOutput) GoString() string {
- return s.String()
-}
-
-// SetHandshake sets the Handshake field's value.
-func (s *EnableAllFeaturesOutput) SetHandshake(v *Handshake) *EnableAllFeaturesOutput {
- s.Handshake = v
- return s
-}
-
-type EnablePolicyTypeInput struct {
- _ struct{} `type:"structure"`
-
- // The policy type that you want to enable. You can specify one of the following
- // values:
- //
- // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
- //
- // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
- //
- // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
- //
- // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
- //
- // PolicyType is a required field
- PolicyType *string `type:"string" required:"true" enum:"PolicyType"`
-
- // The unique identifier (ID) of the root in which you want to enable a policy
- // type. You can get the ID from the ListRoots operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string
- // requires "r-" followed by from 4 to 32 lowercase letters or digits.
- //
- // RootId is a required field
- RootId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s EnablePolicyTypeInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnablePolicyTypeInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *EnablePolicyTypeInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EnablePolicyTypeInput"}
- if s.PolicyType == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyType"))
- }
- if s.RootId == nil {
- invalidParams.Add(request.NewErrParamRequired("RootId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPolicyType sets the PolicyType field's value.
-func (s *EnablePolicyTypeInput) SetPolicyType(v string) *EnablePolicyTypeInput {
- s.PolicyType = &v
- return s
-}
-
-// SetRootId sets the RootId field's value.
-func (s *EnablePolicyTypeInput) SetRootId(v string) *EnablePolicyTypeInput {
- s.RootId = &v
- return s
-}
-
-type EnablePolicyTypeOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that shows the root with the updated list of enabled policy types.
- Root *Root `type:"structure"`
-}
-
-// String returns the string representation
-func (s EnablePolicyTypeOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnablePolicyTypeOutput) GoString() string {
- return s.String()
-}
-
-// SetRoot sets the Root field's value.
-func (s *EnablePolicyTypeOutput) SetRoot(v *Root) *EnablePolicyTypeOutput {
- s.Root = v
- return s
-}
-
-// A structure that contains details of a service principal that represents
-// an AWS service that is enabled to integrate with AWS Organizations.
-type EnabledServicePrincipal struct {
- _ struct{} `type:"structure"`
-
- // The date that the service principal was enabled for integration with AWS
- // Organizations.
- DateEnabled *time.Time `type:"timestamp"`
-
- // The name of the service principal. This is typically in the form of a URL,
- // such as: servicename.amazonaws.com.
- ServicePrincipal *string `min:"1" type:"string"`
-}
-
-// String returns the string representation
-func (s EnabledServicePrincipal) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EnabledServicePrincipal) GoString() string {
- return s.String()
-}
-
-// SetDateEnabled sets the DateEnabled field's value.
-func (s *EnabledServicePrincipal) SetDateEnabled(v time.Time) *EnabledServicePrincipal {
- s.DateEnabled = &v
- return s
-}
-
-// SetServicePrincipal sets the ServicePrincipal field's value.
-func (s *EnabledServicePrincipal) SetServicePrincipal(v string) *EnabledServicePrincipal {
- s.ServicePrincipal = &v
- return s
-}
-
-// AWS Organizations couldn't perform the operation because your organization
-// hasn't finished initializing. This can take up to an hour. Try again later.
-// If after one hour you continue to receive this error, contact AWS Support
-// (https://console.aws.amazon.com/support/home#/).
-type FinalizingOrganizationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s FinalizingOrganizationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s FinalizingOrganizationException) GoString() string {
- return s.String()
-}
-
-func newErrorFinalizingOrganizationException(v protocol.ResponseMetadata) error {
- return &FinalizingOrganizationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *FinalizingOrganizationException) Code() string {
- return "FinalizingOrganizationException"
-}
-
-// Message returns the exception's message.
-func (s *FinalizingOrganizationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *FinalizingOrganizationException) OrigErr() error {
- return nil
-}
-
-func (s *FinalizingOrganizationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *FinalizingOrganizationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *FinalizingOrganizationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains information that must be exchanged to securely establish a relationship
-// between two accounts (an originator and a recipient). For example, when a
-// management account (the originator) invites another account (the recipient)
-// to join its organization, the two accounts exchange information as a series
-// of handshake requests and responses.
-//
-// Note: Handshakes that are CANCELED, ACCEPTED, or DECLINED show up in lists
-// for only 30 days after entering that state After that they are deleted.
-type Handshake struct {
- _ struct{} `type:"structure"`
-
- // The type of handshake, indicating what action occurs when the recipient accepts
- // the handshake. The following handshake types are supported:
- //
- // * INVITE: This type of handshake represents a request to join an organization.
- // It is always sent from the management account to only non-member accounts.
- //
- // * ENABLE_ALL_FEATURES: This type of handshake represents a request to
- // enable all features in an organization. It is always sent from the management
- // account to only invited member accounts. Created accounts do not receive
- // this because those accounts were created by the organization's management
- // account and approval is inferred.
- //
- // * APPROVE_ALL_FEATURES: This type of handshake is sent from the Organizations
- // service when all member accounts have approved the ENABLE_ALL_FEATURES
- // invitation. It is sent only to the management account and signals the
- // master that it can finalize the process to enable all features.
- Action *string `type:"string" enum:"ActionType"`
-
- // The Amazon Resource Name (ARN) of a handshake.
- //
- // For more information about ARNs in Organizations, see ARN Formats Supported
- // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
- // in the AWS Service Authorization Reference.
- Arn *string `type:"string"`
-
- // The date and time that the handshake expires. If the recipient of the handshake
- // request fails to respond before the specified date and time, the handshake
- // becomes inactive and is no longer valid.
- ExpirationTimestamp *time.Time `type:"timestamp"`
-
- // The unique identifier (ID) of a handshake. The originating account creates
- // the ID when it initiates the handshake.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
- // requires "h-" followed by from 8 to 32 lowercase letters or digits.
- Id *string `type:"string"`
-
- // Information about the two accounts that are participating in the handshake.
- Parties []*HandshakeParty `type:"list"`
-
- // The date and time that the handshake request was made.
- RequestedTimestamp *time.Time `type:"timestamp"`
-
- // Additional information that is needed to process the handshake.
- Resources []*HandshakeResource `type:"list"`
-
- // The current state of the handshake. Use the state to trace the flow of the
- // handshake through the process from its creation to its acceptance. The meaning
- // of each of the valid values is as follows:
- //
- // * REQUESTED: This handshake was sent to multiple recipients (applicable
- // to only some handshake types) and not all recipients have responded yet.
- // The request stays in this state until all recipients respond.
- //
- // * OPEN: This handshake was sent to multiple recipients (applicable to
- // only some policy types) and all recipients have responded, allowing the
- // originator to complete the handshake action.
- //
- // * CANCELED: This handshake is no longer active because it was canceled
- // by the originating account.
- //
- // * ACCEPTED: This handshake is complete because it has been accepted by
- // the recipient.
- //
- // * DECLINED: This handshake is no longer active because it was declined
- // by the recipient account.
- //
- // * EXPIRED: This handshake is no longer active because the originator did
- // not receive a response of any kind from the recipient before the expiration
- // time (15 days).
- State *string `type:"string" enum:"HandshakeState"`
-}
-
-// String returns the string representation
-func (s Handshake) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Handshake) GoString() string {
- return s.String()
-}
-
-// SetAction sets the Action field's value.
-func (s *Handshake) SetAction(v string) *Handshake {
- s.Action = &v
- return s
-}
-
-// SetArn sets the Arn field's value.
-func (s *Handshake) SetArn(v string) *Handshake {
- s.Arn = &v
- return s
-}
-
-// SetExpirationTimestamp sets the ExpirationTimestamp field's value.
-func (s *Handshake) SetExpirationTimestamp(v time.Time) *Handshake {
- s.ExpirationTimestamp = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *Handshake) SetId(v string) *Handshake {
- s.Id = &v
- return s
-}
-
-// SetParties sets the Parties field's value.
-func (s *Handshake) SetParties(v []*HandshakeParty) *Handshake {
- s.Parties = v
- return s
-}
-
-// SetRequestedTimestamp sets the RequestedTimestamp field's value.
-func (s *Handshake) SetRequestedTimestamp(v time.Time) *Handshake {
- s.RequestedTimestamp = &v
- return s
-}
-
-// SetResources sets the Resources field's value.
-func (s *Handshake) SetResources(v []*HandshakeResource) *Handshake {
- s.Resources = v
- return s
-}
-
-// SetState sets the State field's value.
-func (s *Handshake) SetState(v string) *Handshake {
- s.State = &v
- return s
-}
-
-// The specified handshake is already in the requested state. For example, you
-// can't accept a handshake that was already accepted.
-type HandshakeAlreadyInStateException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s HandshakeAlreadyInStateException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HandshakeAlreadyInStateException) GoString() string {
- return s.String()
-}
-
-func newErrorHandshakeAlreadyInStateException(v protocol.ResponseMetadata) error {
- return &HandshakeAlreadyInStateException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *HandshakeAlreadyInStateException) Code() string {
- return "HandshakeAlreadyInStateException"
-}
-
-// Message returns the exception's message.
-func (s *HandshakeAlreadyInStateException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *HandshakeAlreadyInStateException) OrigErr() error {
- return nil
-}
-
-func (s *HandshakeAlreadyInStateException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *HandshakeAlreadyInStateException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *HandshakeAlreadyInStateException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The requested operation would violate the constraint identified in the reason
-// code.
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation:
-//
-// * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
-// the number of accounts in an organization. Note that deleted and closed
-// accounts still count toward your limit. If you get this exception immediately
-// after creating the organization, wait one hour and try again. If after
-// an hour it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/).
-//
-// * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
-// the invited account is already a member of an organization.
-//
-// * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
-// handshakes that you can send in one day.
-//
-// * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
-// to join an organization while it's in the process of enabling all features.
-// You can resume inviting accounts after you finalize the process when all
-// accounts have agreed to the change.
-//
-// * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
-// because the organization has already enabled all features.
-//
-// * ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
-// request is invalid because the organization has already started the process
-// to enable all features.
-//
-// * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
-// the account is from a different marketplace than the accounts in the organization.
-// For example, accounts with India addresses must be associated with the
-// AISPL marketplace. All accounts in an organization must be from the same
-// marketplace.
-//
-// * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
-// change the membership of an account too quickly after its previous change.
-//
-// * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
-// account that doesn't have a payment instrument, such as a credit card,
-// associated with it.
-type HandshakeConstraintViolationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-
- Reason *string `type:"string" enum:"HandshakeConstraintViolationExceptionReason"`
-}
-
-// String returns the string representation
-func (s HandshakeConstraintViolationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HandshakeConstraintViolationException) GoString() string {
- return s.String()
-}
-
-func newErrorHandshakeConstraintViolationException(v protocol.ResponseMetadata) error {
- return &HandshakeConstraintViolationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *HandshakeConstraintViolationException) Code() string {
- return "HandshakeConstraintViolationException"
-}
-
-// Message returns the exception's message.
-func (s *HandshakeConstraintViolationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *HandshakeConstraintViolationException) OrigErr() error {
- return nil
-}
-
-func (s *HandshakeConstraintViolationException) Error() string {
- return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *HandshakeConstraintViolationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *HandshakeConstraintViolationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Specifies the criteria that are used to select the handshakes for the operation.
-type HandshakeFilter struct {
- _ struct{} `type:"structure"`
-
- // Specifies the type of handshake action.
- //
- // If you specify ActionType, you cannot also specify ParentHandshakeId.
- ActionType *string `type:"string" enum:"ActionType"`
-
- // Specifies the parent handshake. Only used for handshake types that are a
- // child of another type.
- //
- // If you specify ParentHandshakeId, you cannot also specify ActionType.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
- // requires "h-" followed by from 8 to 32 lowercase letters or digits.
- ParentHandshakeId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s HandshakeFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HandshakeFilter) GoString() string {
- return s.String()
-}
-
-// SetActionType sets the ActionType field's value.
-func (s *HandshakeFilter) SetActionType(v string) *HandshakeFilter {
- s.ActionType = &v
- return s
-}
-
-// SetParentHandshakeId sets the ParentHandshakeId field's value.
-func (s *HandshakeFilter) SetParentHandshakeId(v string) *HandshakeFilter {
- s.ParentHandshakeId = &v
- return s
-}
-
-// We can't find a handshake with the HandshakeId that you specified.
-type HandshakeNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s HandshakeNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HandshakeNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorHandshakeNotFoundException(v protocol.ResponseMetadata) error {
- return &HandshakeNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *HandshakeNotFoundException) Code() string {
- return "HandshakeNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *HandshakeNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *HandshakeNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *HandshakeNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *HandshakeNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *HandshakeNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Identifies a participant in a handshake.
-type HandshakeParty struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) for the party.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for handshake ID string
- // requires "h-" followed by from 8 to 32 lowercase letters or digits.
- //
- // Id is a required field
- Id *string `min:"1" type:"string" required:"true" sensitive:"true"`
-
- // The type of party.
- //
- // Type is a required field
- Type *string `type:"string" required:"true" enum:"HandshakePartyType"`
-}
-
-// String returns the string representation
-func (s HandshakeParty) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HandshakeParty) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *HandshakeParty) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "HandshakeParty"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Id != nil && len(*s.Id) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Id", 1))
- }
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetId sets the Id field's value.
-func (s *HandshakeParty) SetId(v string) *HandshakeParty {
- s.Id = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *HandshakeParty) SetType(v string) *HandshakeParty {
- s.Type = &v
- return s
-}
-
-// Contains additional data that is needed to process a handshake.
-type HandshakeResource struct {
- _ struct{} `type:"structure"`
-
- // When needed, contains an additional array of HandshakeResource objects.
- Resources []*HandshakeResource `type:"list"`
-
- // The type of information being passed, specifying how the value is to be interpreted
- // by the other party:
- //
- // * ACCOUNT - Specifies an AWS account ID number.
- //
- // * ORGANIZATION - Specifies an organization ID number.
- //
- // * EMAIL - Specifies the email address that is associated with the account
- // that receives the handshake.
- //
- // * OWNER_EMAIL - Specifies the email address associated with the management
- // account. Included as information about an organization.
- //
- // * OWNER_NAME - Specifies the name associated with the management account.
- // Included as information about an organization.
- //
- // * NOTES - Additional text provided by the handshake initiator and intended
- // for the recipient to read.
- Type *string `type:"string" enum:"HandshakeResourceType"`
-
- // The information that is passed to the other party in the handshake. The format
- // of the value string must match the requirements of the specified type.
- Value *string `type:"string" sensitive:"true"`
-}
-
-// String returns the string representation
-func (s HandshakeResource) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HandshakeResource) GoString() string {
- return s.String()
-}
-
-// SetResources sets the Resources field's value.
-func (s *HandshakeResource) SetResources(v []*HandshakeResource) *HandshakeResource {
- s.Resources = v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *HandshakeResource) SetType(v string) *HandshakeResource {
- s.Type = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *HandshakeResource) SetValue(v string) *HandshakeResource {
- s.Value = &v
- return s
-}
-
-// You can't perform the operation on the handshake in its current state. For
-// example, you can't cancel a handshake that was already accepted or accept
-// a handshake that was already declined.
-type InvalidHandshakeTransitionException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidHandshakeTransitionException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidHandshakeTransitionException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidHandshakeTransitionException(v protocol.ResponseMetadata) error {
- return &InvalidHandshakeTransitionException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidHandshakeTransitionException) Code() string {
- return "InvalidHandshakeTransitionException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidHandshakeTransitionException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidHandshakeTransitionException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidHandshakeTransitionException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidHandshakeTransitionException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidHandshakeTransitionException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The requested operation failed because you provided invalid values for one
-// or more of the request parameters. This exception includes a reason that
-// contains additional information about the violated limit:
-//
-// Some of the reasons in the following list might not be applicable to this
-// specific API or operation.
-//
-// * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
-// the same entity.
-//
-// * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
-// can't be modified.
-//
-// * INPUT_REQUIRED: You must include a value for all required parameters.
-//
-// * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
-// for the invited account owner.
-//
-// * INVALID_ENUM: You specified an invalid value.
-//
-// * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
-//
-// * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
-// characters.
-//
-// * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
-// at least one invalid value.
-//
-// * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
-// from the response to a previous call of the operation.
-//
-// * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
-// organization, or email) as a party.
-//
-// * INVALID_PATTERN: You provided a value that doesn't match the required
-// pattern.
-//
-// * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
-// match the required pattern.
-//
-// * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
-// name can't begin with the reserved prefix AWSServiceRoleFor.
-//
-// * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
-// Name (ARN) for the organization.
-//
-// * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
-//
-// * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
-// tag. You can’t add, edit, or delete system tag keys because they're
-// reserved for AWS use. System tags don’t count against your tags per
-// resource limit.
-//
-// * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
-// for the operation.
-//
-// * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
-// than allowed.
-//
-// * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
-// value than allowed.
-//
-// * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
-// than allowed.
-//
-// * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
-// value than allowed.
-//
-// * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
-// between entities in the same root.
-//
-// * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
-// target entity.
-//
-// * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
-// isn't recognized.
-type InvalidInputException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-
- Reason *string `type:"string" enum:"InvalidInputExceptionReason"`
-}
-
-// String returns the string representation
-func (s InvalidInputException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidInputException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidInputException(v protocol.ResponseMetadata) error {
- return &InvalidInputException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidInputException) Code() string {
- return "InvalidInputException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidInputException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidInputException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidInputException) Error() string {
- return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidInputException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidInputException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type InviteAccountToOrganizationInput struct {
- _ struct{} `type:"structure"`
-
- // Additional information that you want to include in the generated email to
- // the recipient account owner.
- Notes *string `type:"string" sensitive:"true"`
-
- // A list of tags that you want to attach to the account when it becomes a member
- // of the organization. For each tag in the list, you must specify both a tag
- // key and a value. You can set the value to an empty string, but you can't
- // set it to null. For more information about tagging, see Tagging AWS Organizations
- // resources (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_tagging.html)
- // in the AWS Organizations User Guide.
- //
- // Any tags in the request are checked for compliance with any applicable tag
- // policies when the request is made. The request is rejected if the tags in
- // the request don't match the requirements of the policy at that time. Tag
- // policy compliance is not checked again when the invitation is accepted and
- // the tags are actually attached to the account. That means that if the tag
- // policy changes between the invitation and the acceptance, then that tags
- // could potentially be non-compliant.
- //
- // If any one of the tags is invalid or if you exceed the allowed number of
- // tags for an account, then the entire request fails and invitations are not
- // sent.
- Tags []*Tag `type:"list"`
-
- // The identifier (ID) of the AWS account that you want to invite to join your
- // organization. This is a JSON object that contains the following elements:
- //
- // { "Type": "ACCOUNT", "Id": "< account id number >" }
- //
- // If you use the AWS CLI, you can submit this as a single string, similar to
- // the following example:
- //
- // --target Id=123456789012,Type=ACCOUNT
- //
- // If you specify "Type": "ACCOUNT", you must provide the AWS account ID number
- // as the Id. If you specify "Type": "EMAIL", you must specify the email address
- // that is associated with the account.
- //
- // --target Id=diego@example.com,Type=EMAIL
- //
- // Target is a required field
- Target *HandshakeParty `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s InviteAccountToOrganizationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InviteAccountToOrganizationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InviteAccountToOrganizationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InviteAccountToOrganizationInput"}
- if s.Target == nil {
- invalidParams.Add(request.NewErrParamRequired("Target"))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Target != nil {
- if err := s.Target.Validate(); err != nil {
- invalidParams.AddNested("Target", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetNotes sets the Notes field's value.
-func (s *InviteAccountToOrganizationInput) SetNotes(v string) *InviteAccountToOrganizationInput {
- s.Notes = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *InviteAccountToOrganizationInput) SetTags(v []*Tag) *InviteAccountToOrganizationInput {
- s.Tags = v
- return s
-}
-
-// SetTarget sets the Target field's value.
-func (s *InviteAccountToOrganizationInput) SetTarget(v *HandshakeParty) *InviteAccountToOrganizationInput {
- s.Target = v
- return s
-}
-
-type InviteAccountToOrganizationOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the handshake that is created to
- // support this invitation request.
- Handshake *Handshake `type:"structure"`
-}
-
-// String returns the string representation
-func (s InviteAccountToOrganizationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InviteAccountToOrganizationOutput) GoString() string {
- return s.String()
-}
-
-// SetHandshake sets the Handshake field's value.
-func (s *InviteAccountToOrganizationOutput) SetHandshake(v *Handshake) *InviteAccountToOrganizationOutput {
- s.Handshake = v
- return s
-}
-
-type LeaveOrganizationInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s LeaveOrganizationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LeaveOrganizationInput) GoString() string {
- return s.String()
-}
-
-type LeaveOrganizationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s LeaveOrganizationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LeaveOrganizationOutput) GoString() string {
- return s.String()
-}
-
-type ListAWSServiceAccessForOrganizationInput struct {
- _ struct{} `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListAWSServiceAccessForOrganizationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListAWSServiceAccessForOrganizationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListAWSServiceAccessForOrganizationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAWSServiceAccessForOrganizationInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListAWSServiceAccessForOrganizationInput) SetMaxResults(v int64) *ListAWSServiceAccessForOrganizationInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAWSServiceAccessForOrganizationInput) SetNextToken(v string) *ListAWSServiceAccessForOrganizationInput {
- s.NextToken = &v
- return s
-}
-
-type ListAWSServiceAccessForOrganizationOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of the service principals for the services that are enabled to integrate
- // with your organization. Each principal is a structure that includes the name
- // and the date that it was enabled for integration with AWS Organizations.
- EnabledServicePrincipals []*EnabledServicePrincipal `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListAWSServiceAccessForOrganizationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListAWSServiceAccessForOrganizationOutput) GoString() string {
- return s.String()
-}
-
-// SetEnabledServicePrincipals sets the EnabledServicePrincipals field's value.
-func (s *ListAWSServiceAccessForOrganizationOutput) SetEnabledServicePrincipals(v []*EnabledServicePrincipal) *ListAWSServiceAccessForOrganizationOutput {
- s.EnabledServicePrincipals = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAWSServiceAccessForOrganizationOutput) SetNextToken(v string) *ListAWSServiceAccessForOrganizationOutput {
- s.NextToken = &v
- return s
-}
-
-type ListAccountsForParentInput struct {
- _ struct{} `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-
- // The unique identifier (ID) for the parent root or organization unit (OU)
- // whose accounts you want to list.
- //
- // ParentId is a required field
- ParentId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s ListAccountsForParentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListAccountsForParentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListAccountsForParentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAccountsForParentInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.ParentId == nil {
- invalidParams.Add(request.NewErrParamRequired("ParentId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListAccountsForParentInput) SetMaxResults(v int64) *ListAccountsForParentInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountsForParentInput) SetNextToken(v string) *ListAccountsForParentInput {
- s.NextToken = &v
- return s
-}
-
-// SetParentId sets the ParentId field's value.
-func (s *ListAccountsForParentInput) SetParentId(v string) *ListAccountsForParentInput {
- s.ParentId = &v
- return s
-}
-
-type ListAccountsForParentOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of the accounts in the specified root or OU.
- Accounts []*Account `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListAccountsForParentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListAccountsForParentOutput) GoString() string {
- return s.String()
-}
-
-// SetAccounts sets the Accounts field's value.
-func (s *ListAccountsForParentOutput) SetAccounts(v []*Account) *ListAccountsForParentOutput {
- s.Accounts = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountsForParentOutput) SetNextToken(v string) *ListAccountsForParentOutput {
- s.NextToken = &v
- return s
-}
-
-type ListAccountsInput struct {
- _ struct{} `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListAccountsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListAccountsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListAccountsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAccountsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput {
- s.NextToken = &v
- return s
-}
-
-type ListAccountsOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of objects in the organization.
- Accounts []*Account `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListAccountsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListAccountsOutput) GoString() string {
- return s.String()
-}
-
-// SetAccounts sets the Accounts field's value.
-func (s *ListAccountsOutput) SetAccounts(v []*Account) *ListAccountsOutput {
- s.Accounts = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput {
- s.NextToken = &v
- return s
-}
-
-type ListChildrenInput struct {
- _ struct{} `type:"structure"`
-
- // Filters the output to include only the specified child type.
- //
- // ChildType is a required field
- ChildType *string `type:"string" required:"true" enum:"ChildType"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-
- // The unique identifier (ID) for the parent root or OU whose children you want
- // to list.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- //
- // ParentId is a required field
- ParentId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s ListChildrenInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListChildrenInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListChildrenInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListChildrenInput"}
- if s.ChildType == nil {
- invalidParams.Add(request.NewErrParamRequired("ChildType"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.ParentId == nil {
- invalidParams.Add(request.NewErrParamRequired("ParentId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetChildType sets the ChildType field's value.
-func (s *ListChildrenInput) SetChildType(v string) *ListChildrenInput {
- s.ChildType = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListChildrenInput) SetMaxResults(v int64) *ListChildrenInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListChildrenInput) SetNextToken(v string) *ListChildrenInput {
- s.NextToken = &v
- return s
-}
-
-// SetParentId sets the ParentId field's value.
-func (s *ListChildrenInput) SetParentId(v string) *ListChildrenInput {
- s.ParentId = &v
- return s
-}
-
-type ListChildrenOutput struct {
- _ struct{} `type:"structure"`
-
- // The list of children of the specified parent container.
- Children []*Child `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListChildrenOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListChildrenOutput) GoString() string {
- return s.String()
-}
-
-// SetChildren sets the Children field's value.
-func (s *ListChildrenOutput) SetChildren(v []*Child) *ListChildrenOutput {
- s.Children = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListChildrenOutput) SetNextToken(v string) *ListChildrenOutput {
- s.NextToken = &v
- return s
-}
-
-type ListCreateAccountStatusInput struct {
- _ struct{} `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-
- // A list of one or more states that you want included in the response. If this
- // parameter isn't present, all requests are included in the response.
- States []*string `type:"list"`
-}
-
-// String returns the string representation
-func (s ListCreateAccountStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListCreateAccountStatusInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListCreateAccountStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListCreateAccountStatusInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListCreateAccountStatusInput) SetMaxResults(v int64) *ListCreateAccountStatusInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListCreateAccountStatusInput) SetNextToken(v string) *ListCreateAccountStatusInput {
- s.NextToken = &v
- return s
-}
-
-// SetStates sets the States field's value.
-func (s *ListCreateAccountStatusInput) SetStates(v []*string) *ListCreateAccountStatusInput {
- s.States = v
- return s
-}
-
-type ListCreateAccountStatusOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of objects with details about the requests. Certain elements, such
- // as the accountId number, are present in the output only after the account
- // has been successfully created.
- CreateAccountStatuses []*CreateAccountStatus `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListCreateAccountStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListCreateAccountStatusOutput) GoString() string {
- return s.String()
-}
-
-// SetCreateAccountStatuses sets the CreateAccountStatuses field's value.
-func (s *ListCreateAccountStatusOutput) SetCreateAccountStatuses(v []*CreateAccountStatus) *ListCreateAccountStatusOutput {
- s.CreateAccountStatuses = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListCreateAccountStatusOutput) SetNextToken(v string) *ListCreateAccountStatusOutput {
- s.NextToken = &v
- return s
-}
-
-type ListDelegatedAdministratorsInput struct {
- _ struct{} `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-
- // Specifies a service principal name. If specified, then the operation lists
- // the delegated administrators only for the specified service.
- //
- // If you don't specify a service principal, the operation lists all delegated
- // administrators for all services in your organization.
- ServicePrincipal *string `min:"1" type:"string"`
-}
-
-// String returns the string representation
-func (s ListDelegatedAdministratorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListDelegatedAdministratorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListDelegatedAdministratorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListDelegatedAdministratorsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListDelegatedAdministratorsInput) SetMaxResults(v int64) *ListDelegatedAdministratorsInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListDelegatedAdministratorsInput) SetNextToken(v string) *ListDelegatedAdministratorsInput {
- s.NextToken = &v
- return s
-}
-
-// SetServicePrincipal sets the ServicePrincipal field's value.
-func (s *ListDelegatedAdministratorsInput) SetServicePrincipal(v string) *ListDelegatedAdministratorsInput {
- s.ServicePrincipal = &v
- return s
-}
-
-type ListDelegatedAdministratorsOutput struct {
- _ struct{} `type:"structure"`
-
- // The list of delegated administrators in your organization.
- DelegatedAdministrators []*DelegatedAdministrator `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListDelegatedAdministratorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListDelegatedAdministratorsOutput) GoString() string {
- return s.String()
-}
-
-// SetDelegatedAdministrators sets the DelegatedAdministrators field's value.
-func (s *ListDelegatedAdministratorsOutput) SetDelegatedAdministrators(v []*DelegatedAdministrator) *ListDelegatedAdministratorsOutput {
- s.DelegatedAdministrators = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListDelegatedAdministratorsOutput) SetNextToken(v string) *ListDelegatedAdministratorsOutput {
- s.NextToken = &v
- return s
-}
-
-type ListDelegatedServicesForAccountInput struct {
- _ struct{} `type:"structure"`
-
- // The account ID number of a delegated administrator account in the organization.
- //
- // AccountId is a required field
- AccountId *string `type:"string" required:"true"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListDelegatedServicesForAccountInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListDelegatedServicesForAccountInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListDelegatedServicesForAccountInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListDelegatedServicesForAccountInput"}
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *ListDelegatedServicesForAccountInput) SetAccountId(v string) *ListDelegatedServicesForAccountInput {
- s.AccountId = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListDelegatedServicesForAccountInput) SetMaxResults(v int64) *ListDelegatedServicesForAccountInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListDelegatedServicesForAccountInput) SetNextToken(v string) *ListDelegatedServicesForAccountInput {
- s.NextToken = &v
- return s
-}
-
-type ListDelegatedServicesForAccountOutput struct {
- _ struct{} `type:"structure"`
-
- // The services for which the account is a delegated administrator.
- DelegatedServices []*DelegatedService `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListDelegatedServicesForAccountOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListDelegatedServicesForAccountOutput) GoString() string {
- return s.String()
-}
-
-// SetDelegatedServices sets the DelegatedServices field's value.
-func (s *ListDelegatedServicesForAccountOutput) SetDelegatedServices(v []*DelegatedService) *ListDelegatedServicesForAccountOutput {
- s.DelegatedServices = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListDelegatedServicesForAccountOutput) SetNextToken(v string) *ListDelegatedServicesForAccountOutput {
- s.NextToken = &v
- return s
-}
-
-type ListHandshakesForAccountInput struct {
- _ struct{} `type:"structure"`
-
- // Filters the handshakes that you want included in the response. The default
- // is all types. Use the ActionType element to limit the output to only a specified
- // type, such as INVITE, ENABLE_ALL_FEATURES, or APPROVE_ALL_FEATURES. Alternatively,
- // for the ENABLE_ALL_FEATURES handshake that generates a separate child handshake
- // for each member account, you can specify ParentHandshakeId to see only the
- // handshakes that were generated by that parent request.
- Filter *HandshakeFilter `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListHandshakesForAccountInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListHandshakesForAccountInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListHandshakesForAccountInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListHandshakesForAccountInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *ListHandshakesForAccountInput) SetFilter(v *HandshakeFilter) *ListHandshakesForAccountInput {
- s.Filter = v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListHandshakesForAccountInput) SetMaxResults(v int64) *ListHandshakesForAccountInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListHandshakesForAccountInput) SetNextToken(v string) *ListHandshakesForAccountInput {
- s.NextToken = &v
- return s
-}
-
-type ListHandshakesForAccountOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of Handshake objects with details about each of the handshakes that
- // is associated with the specified account.
- Handshakes []*Handshake `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListHandshakesForAccountOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListHandshakesForAccountOutput) GoString() string {
- return s.String()
-}
-
-// SetHandshakes sets the Handshakes field's value.
-func (s *ListHandshakesForAccountOutput) SetHandshakes(v []*Handshake) *ListHandshakesForAccountOutput {
- s.Handshakes = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListHandshakesForAccountOutput) SetNextToken(v string) *ListHandshakesForAccountOutput {
- s.NextToken = &v
- return s
-}
-
-type ListHandshakesForOrganizationInput struct {
- _ struct{} `type:"structure"`
-
- // A filter of the handshakes that you want included in the response. The default
- // is all types. Use the ActionType element to limit the output to only a specified
- // type, such as INVITE, ENABLE-ALL-FEATURES, or APPROVE-ALL-FEATURES. Alternatively,
- // for the ENABLE-ALL-FEATURES handshake that generates a separate child handshake
- // for each member account, you can specify the ParentHandshakeId to see only
- // the handshakes that were generated by that parent request.
- Filter *HandshakeFilter `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListHandshakesForOrganizationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListHandshakesForOrganizationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListHandshakesForOrganizationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListHandshakesForOrganizationInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *ListHandshakesForOrganizationInput) SetFilter(v *HandshakeFilter) *ListHandshakesForOrganizationInput {
- s.Filter = v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListHandshakesForOrganizationInput) SetMaxResults(v int64) *ListHandshakesForOrganizationInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListHandshakesForOrganizationInput) SetNextToken(v string) *ListHandshakesForOrganizationInput {
- s.NextToken = &v
- return s
-}
-
-type ListHandshakesForOrganizationOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of Handshake objects with details about each of the handshakes that
- // are associated with an organization.
- Handshakes []*Handshake `type:"list"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListHandshakesForOrganizationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListHandshakesForOrganizationOutput) GoString() string {
- return s.String()
-}
-
-// SetHandshakes sets the Handshakes field's value.
-func (s *ListHandshakesForOrganizationOutput) SetHandshakes(v []*Handshake) *ListHandshakesForOrganizationOutput {
- s.Handshakes = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListHandshakesForOrganizationOutput) SetNextToken(v string) *ListHandshakesForOrganizationOutput {
- s.NextToken = &v
- return s
-}
-
-type ListOrganizationalUnitsForParentInput struct {
- _ struct{} `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-
- // The unique identifier (ID) of the root or OU whose child OUs you want to
- // list.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- //
- // ParentId is a required field
- ParentId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s ListOrganizationalUnitsForParentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListOrganizationalUnitsForParentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListOrganizationalUnitsForParentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListOrganizationalUnitsForParentInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.ParentId == nil {
- invalidParams.Add(request.NewErrParamRequired("ParentId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListOrganizationalUnitsForParentInput) SetMaxResults(v int64) *ListOrganizationalUnitsForParentInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListOrganizationalUnitsForParentInput) SetNextToken(v string) *ListOrganizationalUnitsForParentInput {
- s.NextToken = &v
- return s
-}
-
-// SetParentId sets the ParentId field's value.
-func (s *ListOrganizationalUnitsForParentInput) SetParentId(v string) *ListOrganizationalUnitsForParentInput {
- s.ParentId = &v
- return s
-}
-
-type ListOrganizationalUnitsForParentOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-
- // A list of the OUs in the specified root or parent OU.
- OrganizationalUnits []*OrganizationalUnit `type:"list"`
-}
-
-// String returns the string representation
-func (s ListOrganizationalUnitsForParentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListOrganizationalUnitsForParentOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListOrganizationalUnitsForParentOutput) SetNextToken(v string) *ListOrganizationalUnitsForParentOutput {
- s.NextToken = &v
- return s
-}
-
-// SetOrganizationalUnits sets the OrganizationalUnits field's value.
-func (s *ListOrganizationalUnitsForParentOutput) SetOrganizationalUnits(v []*OrganizationalUnit) *ListOrganizationalUnitsForParentOutput {
- s.OrganizationalUnits = v
- return s
-}
-
-type ListParentsInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the OU or account whose parent containers you
- // want to list. Don't specify a root.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a child ID string
- // requires one of the following:
- //
- // * Account - A string that consists of exactly 12 digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that contains
- // the OU). This string is followed by a second "-" dash and from 8 to 32
- // additional lowercase letters or digits.
- //
- // ChildId is a required field
- ChildId *string `type:"string" required:"true"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListParentsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListParentsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListParentsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListParentsInput"}
- if s.ChildId == nil {
- invalidParams.Add(request.NewErrParamRequired("ChildId"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetChildId sets the ChildId field's value.
-func (s *ListParentsInput) SetChildId(v string) *ListParentsInput {
- s.ChildId = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListParentsInput) SetMaxResults(v int64) *ListParentsInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListParentsInput) SetNextToken(v string) *ListParentsInput {
- s.NextToken = &v
- return s
-}
-
-type ListParentsOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-
- // A list of parents for the specified child account or OU.
- Parents []*Parent `type:"list"`
-}
-
-// String returns the string representation
-func (s ListParentsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListParentsOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListParentsOutput) SetNextToken(v string) *ListParentsOutput {
- s.NextToken = &v
- return s
-}
-
-// SetParents sets the Parents field's value.
-func (s *ListParentsOutput) SetParents(v []*Parent) *ListParentsOutput {
- s.Parents = v
- return s
-}
-
-type ListPoliciesForTargetInput struct {
- _ struct{} `type:"structure"`
-
- // The type of policy that you want to include in the returned list. You must
- // specify one of the following values:
- //
- // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
- //
- // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
- //
- // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
- //
- // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
- //
- // Filter is a required field
- Filter *string `type:"string" required:"true" enum:"PolicyType"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-
- // The unique identifier (ID) of the root, organizational unit, or account whose
- // policies you want to list.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Account - A string that consists of exactly 12 digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- //
- // TargetId is a required field
- TargetId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s ListPoliciesForTargetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListPoliciesForTargetInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListPoliciesForTargetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListPoliciesForTargetInput"}
- if s.Filter == nil {
- invalidParams.Add(request.NewErrParamRequired("Filter"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.TargetId == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *ListPoliciesForTargetInput) SetFilter(v string) *ListPoliciesForTargetInput {
- s.Filter = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListPoliciesForTargetInput) SetMaxResults(v int64) *ListPoliciesForTargetInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListPoliciesForTargetInput) SetNextToken(v string) *ListPoliciesForTargetInput {
- s.NextToken = &v
- return s
-}
-
-// SetTargetId sets the TargetId field's value.
-func (s *ListPoliciesForTargetInput) SetTargetId(v string) *ListPoliciesForTargetInput {
- s.TargetId = &v
- return s
-}
-
-type ListPoliciesForTargetOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-
- // The list of policies that match the criteria in the request.
- Policies []*PolicySummary `type:"list"`
-}
-
-// String returns the string representation
-func (s ListPoliciesForTargetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListPoliciesForTargetOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListPoliciesForTargetOutput) SetNextToken(v string) *ListPoliciesForTargetOutput {
- s.NextToken = &v
- return s
-}
-
-// SetPolicies sets the Policies field's value.
-func (s *ListPoliciesForTargetOutput) SetPolicies(v []*PolicySummary) *ListPoliciesForTargetOutput {
- s.Policies = v
- return s
-}
-
-type ListPoliciesInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the type of policy that you want to include in the response. You
- // must specify one of the following values:
- //
- // * AISERVICES_OPT_OUT_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_ai-opt-out.html)
- //
- // * BACKUP_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_backup.html)
- //
- // * SERVICE_CONTROL_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scp.html)
- //
- // * TAG_POLICY (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
- //
- // Filter is a required field
- Filter *string `type:"string" required:"true" enum:"PolicyType"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListPoliciesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListPoliciesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListPoliciesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"}
- if s.Filter == nil {
- invalidParams.Add(request.NewErrParamRequired("Filter"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *ListPoliciesInput) SetFilter(v string) *ListPoliciesInput {
- s.Filter = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListPoliciesInput) SetMaxResults(v int64) *ListPoliciesInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput {
- s.NextToken = &v
- return s
-}
-
-type ListPoliciesOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-
- // A list of policies that match the filter criteria in the request. The output
- // list doesn't include the policy contents. To see the content for a policy,
- // see DescribePolicy.
- Policies []*PolicySummary `type:"list"`
-}
-
-// String returns the string representation
-func (s ListPoliciesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListPoliciesOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListPoliciesOutput) SetNextToken(v string) *ListPoliciesOutput {
- s.NextToken = &v
- return s
-}
-
-// SetPolicies sets the Policies field's value.
-func (s *ListPoliciesOutput) SetPolicies(v []*PolicySummary) *ListPoliciesOutput {
- s.Policies = v
- return s
-}
-
-type ListRootsInput struct {
- _ struct{} `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListRootsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListRootsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListRootsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListRootsInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListRootsInput) SetMaxResults(v int64) *ListRootsInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListRootsInput) SetNextToken(v string) *ListRootsInput {
- s.NextToken = &v
- return s
-}
-
-type ListRootsOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-
- // A list of roots that are defined in an organization.
- Roots []*Root `type:"list"`
-}
-
-// String returns the string representation
-func (s ListRootsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListRootsOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListRootsOutput) SetNextToken(v string) *ListRootsOutput {
- s.NextToken = &v
- return s
-}
-
-// SetRoots sets the Roots field's value.
-func (s *ListRootsOutput) SetRoots(v []*Root) *ListRootsOutput {
- s.Roots = v
- return s
-}
-
-type ListTagsForResourceInput struct {
- _ struct{} `type:"structure"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-
- // The ID of the resource with the tags to list.
- //
- // You can specify any of the following taggable resources.
- //
- // * AWS account – specify the account ID number.
- //
- // * Organizational unit – specify the OU ID that begins with ou- and looks
- // similar to: ou-1a2b-34uvwxyz
- //
- // * Root – specify the root ID that begins with r- and looks similar to:
- // r-1a2b
- //
- // * Policy – specify the policy ID that begins with p- andlooks similar
- // to: p-12abcdefg3
- //
- // ResourceId is a required field
- ResourceId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s ListTagsForResourceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListTagsForResourceInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListTagsForResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
- if s.ResourceId == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput {
- s.NextToken = &v
- return s
-}
-
-// SetResourceId sets the ResourceId field's value.
-func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceInput {
- s.ResourceId = &v
- return s
-}
-
-type ListTagsForResourceOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-
- // The tags that are assigned to the resource.
- Tags []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s ListTagsForResourceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListTagsForResourceOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput {
- s.NextToken = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput {
- s.Tags = v
- return s
-}
-
-type ListTargetsForPolicyInput struct {
- _ struct{} `type:"structure"`
-
- // The total number of results that you want included on each page of the response.
- // If you do not include this parameter, it defaults to a value that is specific
- // to the operation. If additional items exist beyond the maximum you specify,
- // the NextToken response element is present and has a value (is not null).
- // Include that value as the NextToken request parameter in the next call to
- // the operation to get the next part of the results. Note that Organizations
- // might return fewer results than the maximum even when there are more results
- // available. You should check NextToken after every operation to ensure that
- // you receive all of the results.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // The parameter for receiving additional results if you receive a NextToken
- // response in a previous request. A NextToken response indicates that more
- // output is available. Set this parameter to the value of the previous call's
- // NextToken response to indicate where the output should continue from.
- NextToken *string `type:"string"`
-
- // The unique identifier (ID) of the policy whose attachments you want to know.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
- // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
- // or the underscore character (_).
- //
- // PolicyId is a required field
- PolicyId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s ListTargetsForPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListTargetsForPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListTargetsForPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListTargetsForPolicyInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.PolicyId == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListTargetsForPolicyInput) SetMaxResults(v int64) *ListTargetsForPolicyInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListTargetsForPolicyInput) SetNextToken(v string) *ListTargetsForPolicyInput {
- s.NextToken = &v
- return s
-}
-
-// SetPolicyId sets the PolicyId field's value.
-func (s *ListTargetsForPolicyInput) SetPolicyId(v string) *ListTargetsForPolicyInput {
- s.PolicyId = &v
- return s
-}
-
-type ListTargetsForPolicyOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that more output is available than is included in the
- // current response. Use this value in the NextToken request parameter in a
- // subsequent call to the operation to get the next part of the output. You
- // should repeat this until the NextToken response element comes back as null.
- NextToken *string `type:"string"`
-
- // A list of structures, each of which contains details about one of the entities
- // to which the specified policy is attached.
- Targets []*PolicyTargetSummary `type:"list"`
-}
-
-// String returns the string representation
-func (s ListTargetsForPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListTargetsForPolicyOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListTargetsForPolicyOutput) SetNextToken(v string) *ListTargetsForPolicyOutput {
- s.NextToken = &v
- return s
-}
-
-// SetTargets sets the Targets field's value.
-func (s *ListTargetsForPolicyOutput) SetTargets(v []*PolicyTargetSummary) *ListTargetsForPolicyOutput {
- s.Targets = v
- return s
-}
-
-// The provided policy document doesn't meet the requirements of the specified
-// policy type. For example, the syntax might be incorrect. For details about
-// service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
-// in the AWS Organizations User Guide.
-type MalformedPolicyDocumentException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s MalformedPolicyDocumentException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MalformedPolicyDocumentException) GoString() string {
- return s.String()
-}
-
-func newErrorMalformedPolicyDocumentException(v protocol.ResponseMetadata) error {
- return &MalformedPolicyDocumentException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *MalformedPolicyDocumentException) Code() string {
- return "MalformedPolicyDocumentException"
-}
-
-// Message returns the exception's message.
-func (s *MalformedPolicyDocumentException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *MalformedPolicyDocumentException) OrigErr() error {
- return nil
-}
-
-func (s *MalformedPolicyDocumentException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *MalformedPolicyDocumentException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *MalformedPolicyDocumentException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// You can't remove a management account from an organization. If you want the
-// management account to become a member account in another organization, you
-// must first delete the current organization of the management account.
-type MasterCannotLeaveOrganizationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s MasterCannotLeaveOrganizationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MasterCannotLeaveOrganizationException) GoString() string {
- return s.String()
-}
-
-func newErrorMasterCannotLeaveOrganizationException(v protocol.ResponseMetadata) error {
- return &MasterCannotLeaveOrganizationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *MasterCannotLeaveOrganizationException) Code() string {
- return "MasterCannotLeaveOrganizationException"
-}
-
-// Message returns the exception's message.
-func (s *MasterCannotLeaveOrganizationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *MasterCannotLeaveOrganizationException) OrigErr() error {
- return nil
-}
-
-func (s *MasterCannotLeaveOrganizationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *MasterCannotLeaveOrganizationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *MasterCannotLeaveOrganizationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type MoveAccountInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the account that you want to move.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
- // requires exactly 12 digits.
- //
- // AccountId is a required field
- AccountId *string `type:"string" required:"true"`
-
- // The unique identifier (ID) of the root or organizational unit that you want
- // to move the account to.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- //
- // DestinationParentId is a required field
- DestinationParentId *string `type:"string" required:"true"`
-
- // The unique identifier (ID) of the root or organizational unit that you want
- // to move the account from.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- //
- // SourceParentId is a required field
- SourceParentId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s MoveAccountInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MoveAccountInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *MoveAccountInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MoveAccountInput"}
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
- if s.DestinationParentId == nil {
- invalidParams.Add(request.NewErrParamRequired("DestinationParentId"))
- }
- if s.SourceParentId == nil {
- invalidParams.Add(request.NewErrParamRequired("SourceParentId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *MoveAccountInput) SetAccountId(v string) *MoveAccountInput {
- s.AccountId = &v
- return s
-}
-
-// SetDestinationParentId sets the DestinationParentId field's value.
-func (s *MoveAccountInput) SetDestinationParentId(v string) *MoveAccountInput {
- s.DestinationParentId = &v
- return s
-}
-
-// SetSourceParentId sets the SourceParentId field's value.
-func (s *MoveAccountInput) SetSourceParentId(v string) *MoveAccountInput {
- s.SourceParentId = &v
- return s
-}
-
-type MoveAccountOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s MoveAccountOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MoveAccountOutput) GoString() string {
- return s.String()
-}
-
-// Contains details about an organization. An organization is a collection of
-// accounts that are centrally managed together using consolidated billing,
-// organized hierarchically with organizational units (OUs), and controlled
-// with policies .
-type Organization struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of an organization.
- //
- // For more information about ARNs in Organizations, see ARN Formats Supported
- // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
- // in the AWS Service Authorization Reference.
- Arn *string `type:"string"`
-
- //
- // Do not use. This field is deprecated and doesn't provide complete information
- // about the policies in your organization.
- //
- // To determine the policies that are enabled and available for use in your
- // organization, use the ListRoots operation instead.
- AvailablePolicyTypes []*PolicyTypeSummary `type:"list"`
-
- // Specifies the functionality that currently is available to the organization.
- // If set to "ALL", then all features are enabled and policies can be applied
- // to accounts in the organization. If set to "CONSOLIDATED_BILLING", then only
- // consolidated billing functionality is available. For more information, see
- // Enabling All Features in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
- // in the AWS Organizations User Guide.
- FeatureSet *string `type:"string" enum:"OrganizationFeatureSet"`
-
- // The unique identifier (ID) of an organization.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an organization ID
- // string requires "o-" followed by from 10 to 32 lowercase letters or digits.
- Id *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the account that is designated as the management
- // account for the organization.
- //
- // For more information about ARNs in Organizations, see ARN Formats Supported
- // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
- // in the AWS Service Authorization Reference.
- MasterAccountArn *string `type:"string"`
-
- // The email address that is associated with the AWS account that is designated
- // as the management account for the organization.
- MasterAccountEmail *string `min:"6" type:"string" sensitive:"true"`
-
- // The unique identifier (ID) of the management account of an organization.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
- // requires exactly 12 digits.
- MasterAccountId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Organization) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Organization) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *Organization) SetArn(v string) *Organization {
- s.Arn = &v
- return s
-}
-
-// SetAvailablePolicyTypes sets the AvailablePolicyTypes field's value.
-func (s *Organization) SetAvailablePolicyTypes(v []*PolicyTypeSummary) *Organization {
- s.AvailablePolicyTypes = v
- return s
-}
-
-// SetFeatureSet sets the FeatureSet field's value.
-func (s *Organization) SetFeatureSet(v string) *Organization {
- s.FeatureSet = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *Organization) SetId(v string) *Organization {
- s.Id = &v
- return s
-}
-
-// SetMasterAccountArn sets the MasterAccountArn field's value.
-func (s *Organization) SetMasterAccountArn(v string) *Organization {
- s.MasterAccountArn = &v
- return s
-}
-
-// SetMasterAccountEmail sets the MasterAccountEmail field's value.
-func (s *Organization) SetMasterAccountEmail(v string) *Organization {
- s.MasterAccountEmail = &v
- return s
-}
-
-// SetMasterAccountId sets the MasterAccountId field's value.
-func (s *Organization) SetMasterAccountId(v string) *Organization {
- s.MasterAccountId = &v
- return s
-}
-
-// The organization isn't empty. To delete an organization, you must first remove
-// all accounts except the management account, delete all OUs, and delete all
-// policies.
-type OrganizationNotEmptyException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s OrganizationNotEmptyException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OrganizationNotEmptyException) GoString() string {
- return s.String()
-}
-
-func newErrorOrganizationNotEmptyException(v protocol.ResponseMetadata) error {
- return &OrganizationNotEmptyException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *OrganizationNotEmptyException) Code() string {
- return "OrganizationNotEmptyException"
-}
-
-// Message returns the exception's message.
-func (s *OrganizationNotEmptyException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *OrganizationNotEmptyException) OrigErr() error {
- return nil
-}
-
-func (s *OrganizationNotEmptyException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *OrganizationNotEmptyException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *OrganizationNotEmptyException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains details about an organizational unit (OU). An OU is a container
-// of AWS accounts within a root of an organization. Policies that are attached
-// to an OU apply to all accounts contained in that OU and in any child OUs.
-type OrganizationalUnit struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of this OU.
- //
- // For more information about ARNs in Organizations, see ARN Formats Supported
- // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
- // in the AWS Service Authorization Reference.
- Arn *string `type:"string"`
-
- // The unique identifier (ID) associated with this OU.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational
- // unit ID string requires "ou-" followed by from 4 to 32 lowercase letters
- // or digits (the ID of the root that contains the OU). This string is followed
- // by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
- Id *string `type:"string"`
-
- // The friendly name of this OU.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter is a string of any of the characters in the ASCII character
- // range.
- Name *string `min:"1" type:"string"`
-}
-
-// String returns the string representation
-func (s OrganizationalUnit) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OrganizationalUnit) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *OrganizationalUnit) SetArn(v string) *OrganizationalUnit {
- s.Arn = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *OrganizationalUnit) SetId(v string) *OrganizationalUnit {
- s.Id = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *OrganizationalUnit) SetName(v string) *OrganizationalUnit {
- s.Name = &v
- return s
-}
-
-// The specified OU is not empty. Move all accounts to another root or to other
-// OUs, remove all child OUs, and try the operation again.
-type OrganizationalUnitNotEmptyException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s OrganizationalUnitNotEmptyException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OrganizationalUnitNotEmptyException) GoString() string {
- return s.String()
-}
-
-func newErrorOrganizationalUnitNotEmptyException(v protocol.ResponseMetadata) error {
- return &OrganizationalUnitNotEmptyException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *OrganizationalUnitNotEmptyException) Code() string {
- return "OrganizationalUnitNotEmptyException"
-}
-
-// Message returns the exception's message.
-func (s *OrganizationalUnitNotEmptyException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *OrganizationalUnitNotEmptyException) OrigErr() error {
- return nil
-}
-
-func (s *OrganizationalUnitNotEmptyException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *OrganizationalUnitNotEmptyException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *OrganizationalUnitNotEmptyException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// We can't find an OU with the OrganizationalUnitId that you specified.
-type OrganizationalUnitNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s OrganizationalUnitNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OrganizationalUnitNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorOrganizationalUnitNotFoundException(v protocol.ResponseMetadata) error {
- return &OrganizationalUnitNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *OrganizationalUnitNotFoundException) Code() string {
- return "OrganizationalUnitNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *OrganizationalUnitNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *OrganizationalUnitNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *OrganizationalUnitNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *OrganizationalUnitNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *OrganizationalUnitNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains information about either a root or an organizational unit (OU) that
-// can contain OUs or accounts in an organization.
-type Parent struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the parent entity.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a parent ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- Id *string `type:"string"`
-
- // The type of the parent entity.
- Type *string `type:"string" enum:"ParentType"`
-}
-
-// String returns the string representation
-func (s Parent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Parent) GoString() string {
- return s.String()
-}
-
-// SetId sets the Id field's value.
-func (s *Parent) SetId(v string) *Parent {
- s.Id = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *Parent) SetType(v string) *Parent {
- s.Type = &v
- return s
-}
-
-// We can't find a root or OU with the ParentId that you specified.
-type ParentNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s ParentNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ParentNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorParentNotFoundException(v protocol.ResponseMetadata) error {
- return &ParentNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ParentNotFoundException) Code() string {
- return "ParentNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *ParentNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ParentNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *ParentNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ParentNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ParentNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains rules to be applied to the affected accounts. Policies can be attached
-// directly to accounts, or to roots and OUs to affect all accounts in those
-// hierarchies.
-type Policy struct {
- _ struct{} `type:"structure"`
-
- // The text content of the policy.
- Content *string `min:"1" type:"string"`
-
- // A structure that contains additional details about the policy.
- PolicySummary *PolicySummary `type:"structure"`
-}
-
-// String returns the string representation
-func (s Policy) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Policy) GoString() string {
- return s.String()
-}
-
-// SetContent sets the Content field's value.
-func (s *Policy) SetContent(v string) *Policy {
- s.Content = &v
- return s
-}
-
-// SetPolicySummary sets the PolicySummary field's value.
-func (s *Policy) SetPolicySummary(v *PolicySummary) *Policy {
- s.PolicySummary = v
- return s
-}
-
-// Changes to the effective policy are in progress, and its contents can't be
-// returned. Try the operation again later.
-type PolicyChangesInProgressException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s PolicyChangesInProgressException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyChangesInProgressException) GoString() string {
- return s.String()
-}
-
-func newErrorPolicyChangesInProgressException(v protocol.ResponseMetadata) error {
- return &PolicyChangesInProgressException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *PolicyChangesInProgressException) Code() string {
- return "PolicyChangesInProgressException"
-}
-
-// Message returns the exception's message.
-func (s *PolicyChangesInProgressException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *PolicyChangesInProgressException) OrigErr() error {
- return nil
-}
-
-func (s *PolicyChangesInProgressException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *PolicyChangesInProgressException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *PolicyChangesInProgressException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The policy is attached to one or more entities. You must detach it from all
-// roots, OUs, and accounts before performing this operation.
-type PolicyInUseException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s PolicyInUseException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyInUseException) GoString() string {
- return s.String()
-}
-
-func newErrorPolicyInUseException(v protocol.ResponseMetadata) error {
- return &PolicyInUseException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *PolicyInUseException) Code() string {
- return "PolicyInUseException"
-}
-
-// Message returns the exception's message.
-func (s *PolicyInUseException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *PolicyInUseException) OrigErr() error {
- return nil
-}
-
-func (s *PolicyInUseException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *PolicyInUseException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *PolicyInUseException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The policy isn't attached to the specified target in the specified root.
-type PolicyNotAttachedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s PolicyNotAttachedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyNotAttachedException) GoString() string {
- return s.String()
-}
-
-func newErrorPolicyNotAttachedException(v protocol.ResponseMetadata) error {
- return &PolicyNotAttachedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *PolicyNotAttachedException) Code() string {
- return "PolicyNotAttachedException"
-}
-
-// Message returns the exception's message.
-func (s *PolicyNotAttachedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *PolicyNotAttachedException) OrigErr() error {
- return nil
-}
-
-func (s *PolicyNotAttachedException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *PolicyNotAttachedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *PolicyNotAttachedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// We can't find a policy with the PolicyId that you specified.
-type PolicyNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s PolicyNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorPolicyNotFoundException(v protocol.ResponseMetadata) error {
- return &PolicyNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *PolicyNotFoundException) Code() string {
- return "PolicyNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *PolicyNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *PolicyNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *PolicyNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *PolicyNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *PolicyNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains information about a policy, but does not include the content. To
-// see the content of a policy, see DescribePolicy.
-type PolicySummary struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the policy.
- //
- // For more information about ARNs in Organizations, see ARN Formats Supported
- // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
- // in the AWS Service Authorization Reference.
- Arn *string `type:"string"`
-
- // A boolean value that indicates whether the specified policy is an AWS managed
- // policy. If true, then you can attach the policy to roots, OUs, or accounts,
- // but you cannot edit it.
- AwsManaged *bool `type:"boolean"`
-
- // The description of the policy.
- Description *string `type:"string"`
-
- // The unique identifier (ID) of the policy.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
- // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
- // or the underscore character (_).
- Id *string `type:"string"`
-
- // The friendly name of the policy.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter is a string of any of the characters in the ASCII character
- // range.
- Name *string `min:"1" type:"string"`
-
- // The type of policy.
- Type *string `type:"string" enum:"PolicyType"`
-}
-
-// String returns the string representation
-func (s PolicySummary) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicySummary) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *PolicySummary) SetArn(v string) *PolicySummary {
- s.Arn = &v
- return s
-}
-
-// SetAwsManaged sets the AwsManaged field's value.
-func (s *PolicySummary) SetAwsManaged(v bool) *PolicySummary {
- s.AwsManaged = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *PolicySummary) SetDescription(v string) *PolicySummary {
- s.Description = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *PolicySummary) SetId(v string) *PolicySummary {
- s.Id = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *PolicySummary) SetName(v string) *PolicySummary {
- s.Name = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *PolicySummary) SetType(v string) *PolicySummary {
- s.Type = &v
- return s
-}
-
-// Contains information about a root, OU, or account that a policy is attached
-// to.
-type PolicyTargetSummary struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the policy target.
- //
- // For more information about ARNs in Organizations, see ARN Formats Supported
- // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
- // in the AWS Service Authorization Reference.
- Arn *string `type:"string"`
-
- // The friendly name of the policy target.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter is a string of any of the characters in the ASCII character
- // range.
- Name *string `min:"1" type:"string"`
-
- // The unique identifier (ID) of the policy target.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a target ID string
- // requires one of the following:
- //
- // * Root - A string that begins with "r-" followed by from 4 to 32 lowercase
- // letters or digits.
- //
- // * Account - A string that consists of exactly 12 digits.
- //
- // * Organizational unit (OU) - A string that begins with "ou-" followed
- // by from 4 to 32 lowercase letters or digits (the ID of the root that the
- // OU is in). This string is followed by a second "-" dash and from 8 to
- // 32 additional lowercase letters or digits.
- TargetId *string `type:"string"`
-
- // The type of the policy target.
- Type *string `type:"string" enum:"TargetType"`
-}
-
-// String returns the string representation
-func (s PolicyTargetSummary) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyTargetSummary) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *PolicyTargetSummary) SetArn(v string) *PolicyTargetSummary {
- s.Arn = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *PolicyTargetSummary) SetName(v string) *PolicyTargetSummary {
- s.Name = &v
- return s
-}
-
-// SetTargetId sets the TargetId field's value.
-func (s *PolicyTargetSummary) SetTargetId(v string) *PolicyTargetSummary {
- s.TargetId = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *PolicyTargetSummary) SetType(v string) *PolicyTargetSummary {
- s.Type = &v
- return s
-}
-
-// The specified policy type is already enabled in the specified root.
-type PolicyTypeAlreadyEnabledException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s PolicyTypeAlreadyEnabledException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyTypeAlreadyEnabledException) GoString() string {
- return s.String()
-}
-
-func newErrorPolicyTypeAlreadyEnabledException(v protocol.ResponseMetadata) error {
- return &PolicyTypeAlreadyEnabledException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *PolicyTypeAlreadyEnabledException) Code() string {
- return "PolicyTypeAlreadyEnabledException"
-}
-
-// Message returns the exception's message.
-func (s *PolicyTypeAlreadyEnabledException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *PolicyTypeAlreadyEnabledException) OrigErr() error {
- return nil
-}
-
-func (s *PolicyTypeAlreadyEnabledException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *PolicyTypeAlreadyEnabledException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *PolicyTypeAlreadyEnabledException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// You can't use the specified policy type with the feature set currently enabled
-// for this organization. For example, you can enable SCPs only after you enable
-// all features in the organization. For more information, see Managing AWS
-// Organizations Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in
-// the AWS Organizations User Guide.
-type PolicyTypeNotAvailableForOrganizationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s PolicyTypeNotAvailableForOrganizationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyTypeNotAvailableForOrganizationException) GoString() string {
- return s.String()
-}
-
-func newErrorPolicyTypeNotAvailableForOrganizationException(v protocol.ResponseMetadata) error {
- return &PolicyTypeNotAvailableForOrganizationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *PolicyTypeNotAvailableForOrganizationException) Code() string {
- return "PolicyTypeNotAvailableForOrganizationException"
-}
-
-// Message returns the exception's message.
-func (s *PolicyTypeNotAvailableForOrganizationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *PolicyTypeNotAvailableForOrganizationException) OrigErr() error {
- return nil
-}
-
-func (s *PolicyTypeNotAvailableForOrganizationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *PolicyTypeNotAvailableForOrganizationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *PolicyTypeNotAvailableForOrganizationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The specified policy type isn't currently enabled in this root. You can't
-// attach policies of the specified type to entities in a root until you enable
-// that type in the root. For more information, see Enabling All Features in
-// Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
-// in the AWS Organizations User Guide.
-type PolicyTypeNotEnabledException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s PolicyTypeNotEnabledException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyTypeNotEnabledException) GoString() string {
- return s.String()
-}
-
-func newErrorPolicyTypeNotEnabledException(v protocol.ResponseMetadata) error {
- return &PolicyTypeNotEnabledException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *PolicyTypeNotEnabledException) Code() string {
- return "PolicyTypeNotEnabledException"
-}
-
-// Message returns the exception's message.
-func (s *PolicyTypeNotEnabledException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *PolicyTypeNotEnabledException) OrigErr() error {
- return nil
-}
-
-func (s *PolicyTypeNotEnabledException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *PolicyTypeNotEnabledException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *PolicyTypeNotEnabledException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains information about a policy type and its status in the associated
-// root.
-type PolicyTypeSummary struct {
- _ struct{} `type:"structure"`
-
- // The status of the policy type as it relates to the associated root. To attach
- // a policy of the specified type to a root or to an OU or account in that root,
- // it must be available in the organization and enabled for that root.
- Status *string `type:"string" enum:"PolicyTypeStatus"`
-
- // The name of the policy type.
- Type *string `type:"string" enum:"PolicyType"`
-}
-
-// String returns the string representation
-func (s PolicyTypeSummary) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyTypeSummary) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *PolicyTypeSummary) SetStatus(v string) *PolicyTypeSummary {
- s.Status = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *PolicyTypeSummary) SetType(v string) *PolicyTypeSummary {
- s.Type = &v
- return s
-}
-
-type RegisterDelegatedAdministratorInput struct {
- _ struct{} `type:"structure"`
-
- // The account ID number of the member account in the organization to register
- // as a delegated administrator.
- //
- // AccountId is a required field
- AccountId *string `type:"string" required:"true"`
-
- // The service principal of the AWS service for which you want to make the member
- // account a delegated administrator.
- //
- // ServicePrincipal is a required field
- ServicePrincipal *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s RegisterDelegatedAdministratorInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RegisterDelegatedAdministratorInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RegisterDelegatedAdministratorInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RegisterDelegatedAdministratorInput"}
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
- if s.ServicePrincipal == nil {
- invalidParams.Add(request.NewErrParamRequired("ServicePrincipal"))
- }
- if s.ServicePrincipal != nil && len(*s.ServicePrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ServicePrincipal", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *RegisterDelegatedAdministratorInput) SetAccountId(v string) *RegisterDelegatedAdministratorInput {
- s.AccountId = &v
- return s
-}
-
-// SetServicePrincipal sets the ServicePrincipal field's value.
-func (s *RegisterDelegatedAdministratorInput) SetServicePrincipal(v string) *RegisterDelegatedAdministratorInput {
- s.ServicePrincipal = &v
- return s
-}
-
-type RegisterDelegatedAdministratorOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s RegisterDelegatedAdministratorOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RegisterDelegatedAdministratorOutput) GoString() string {
- return s.String()
-}
-
-type RemoveAccountFromOrganizationInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier (ID) of the member account that you want to remove
- // from the organization.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an account ID string
- // requires exactly 12 digits.
- //
- // AccountId is a required field
- AccountId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s RemoveAccountFromOrganizationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RemoveAccountFromOrganizationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RemoveAccountFromOrganizationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RemoveAccountFromOrganizationInput"}
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *RemoveAccountFromOrganizationInput) SetAccountId(v string) *RemoveAccountFromOrganizationInput {
- s.AccountId = &v
- return s
-}
-
-type RemoveAccountFromOrganizationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s RemoveAccountFromOrganizationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RemoveAccountFromOrganizationOutput) GoString() string {
- return s.String()
-}
-
-// Contains details about a root. A root is a top-level parent node in the hierarchy
-// of an organization that can contain organizational units (OUs) and accounts.
-// The root contains every AWS account in the organization.
-type Root struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the root.
- //
- // For more information about ARNs in Organizations, see ARN Formats Supported
- // by Organizations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsorganizations.html#awsorganizations-resources-for-iam-policies)
- // in the AWS Service Authorization Reference.
- Arn *string `type:"string"`
-
- // The unique identifier (ID) for the root.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a root ID string
- // requires "r-" followed by from 4 to 32 lowercase letters or digits.
- Id *string `type:"string"`
-
- // The friendly name of the root.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter is a string of any of the characters in the ASCII character
- // range.
- Name *string `min:"1" type:"string"`
-
- // The types of policies that are currently enabled for the root and therefore
- // can be attached to the root or to its OUs or accounts.
- //
- // Even if a policy type is shown as available in the organization, you can
- // separately enable and disable them at the root level by using EnablePolicyType
- // and DisablePolicyType. Use DescribeOrganization to see the availability of
- // the policy types in that organization.
- PolicyTypes []*PolicyTypeSummary `type:"list"`
-}
-
-// String returns the string representation
-func (s Root) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Root) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *Root) SetArn(v string) *Root {
- s.Arn = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *Root) SetId(v string) *Root {
- s.Id = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *Root) SetName(v string) *Root {
- s.Name = &v
- return s
-}
-
-// SetPolicyTypes sets the PolicyTypes field's value.
-func (s *Root) SetPolicyTypes(v []*PolicyTypeSummary) *Root {
- s.PolicyTypes = v
- return s
-}
-
-// We can't find a root with the RootId that you specified.
-type RootNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s RootNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RootNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorRootNotFoundException(v protocol.ResponseMetadata) error {
- return &RootNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *RootNotFoundException) Code() string {
- return "RootNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *RootNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *RootNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *RootNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *RootNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *RootNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// AWS Organizations can't complete your request because of an internal service
-// error. Try again later.
-type ServiceException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s ServiceException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ServiceException) GoString() string {
- return s.String()
-}
-
-func newErrorServiceException(v protocol.ResponseMetadata) error {
- return &ServiceException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ServiceException) Code() string {
- return "ServiceException"
-}
-
-// Message returns the exception's message.
-func (s *ServiceException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ServiceException) OrigErr() error {
- return nil
-}
-
-func (s *ServiceException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ServiceException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ServiceException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// We can't find a source root or OU with the ParentId that you specified.
-type SourceParentNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s SourceParentNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SourceParentNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorSourceParentNotFoundException(v protocol.ResponseMetadata) error {
- return &SourceParentNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *SourceParentNotFoundException) Code() string {
- return "SourceParentNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *SourceParentNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *SourceParentNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *SourceParentNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *SourceParentNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *SourceParentNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// A custom key-value pair associated with a resource within your organization.
-//
-// You can attach tags to any of the following organization resources.
-//
-// * AWS account
-//
-// * Organizational unit (OU)
-//
-// * Organization root
-//
-// * Policy
-type Tag struct {
- _ struct{} `type:"structure"`
-
- // The key identifier, or name, of the tag.
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-
- // The string value that's associated with the key of the tag. You can set the
- // value of a tag to an empty string, but you can't set the value of a tag to
- // null.
- //
- // Value is a required field
- Value *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Tag) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tag) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tag"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.Value == nil {
- invalidParams.Add(request.NewErrParamRequired("Value"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKey sets the Key field's value.
-func (s *Tag) SetKey(v string) *Tag {
- s.Key = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *Tag) SetValue(v string) *Tag {
- s.Value = &v
- return s
-}
-
-type TagResourceInput struct {
- _ struct{} `type:"structure"`
-
- // The ID of the resource to add a tag to.
- //
- // ResourceId is a required field
- ResourceId *string `type:"string" required:"true"`
-
- // A list of tags to add to the specified resource.
- //
- // You can specify any of the following taggable resources.
- //
- // * AWS account – specify the account ID number.
- //
- // * Organizational unit – specify the OU ID that begins with ou- and looks
- // similar to: ou-1a2b-34uvwxyz
- //
- // * Root – specify the root ID that begins with r- and looks similar to:
- // r-1a2b
- //
- // * Policy – specify the policy ID that begins with p- andlooks similar
- // to: p-12abcdefg3
- //
- // For each tag in the list, you must specify both a tag key and a value. You
- // can set the value to an empty string, but you can't set it to null.
- //
- // If any one of the tags is invalid or if you exceed the allowed number of
- // tags for an account user, then the entire request fails and the account is
- // not created.
- //
- // Tags is a required field
- Tags []*Tag `type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s TagResourceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TagResourceInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *TagResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
- if s.ResourceId == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceId"))
- }
- if s.Tags == nil {
- invalidParams.Add(request.NewErrParamRequired("Tags"))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceId sets the ResourceId field's value.
-func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput {
- s.ResourceId = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
- s.Tags = v
- return s
-}
-
-type TagResourceOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s TagResourceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TagResourceOutput) GoString() string {
- return s.String()
-}
-
-// We can't find a root, OU, account, or policy with the TargetId that you specified.
-type TargetNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s TargetNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TargetNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorTargetNotFoundException(v protocol.ResponseMetadata) error {
- return &TargetNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TargetNotFoundException) Code() string {
- return "TargetNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *TargetNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TargetNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *TargetNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *TargetNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TargetNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// You have sent too many requests in too short a period of time. The quota
-// helps protect against denial-of-service attacks. Try again later.
-//
-// For information about quotas that affect AWS Organizations, see Quotas for
-// AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
-// the AWS Organizations User Guide.
-type TooManyRequestsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-
- Type *string `type:"string"`
-}
-
-// String returns the string representation
-func (s TooManyRequestsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TooManyRequestsException) GoString() string {
- return s.String()
-}
-
-func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error {
- return &TooManyRequestsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TooManyRequestsException) Code() string {
- return "TooManyRequestsException"
-}
-
-// Message returns the exception's message.
-func (s *TooManyRequestsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TooManyRequestsException) OrigErr() error {
- return nil
-}
-
-func (s *TooManyRequestsException) Error() string {
- return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *TooManyRequestsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TooManyRequestsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This action isn't available in the current AWS Region.
-type UnsupportedAPIEndpointException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s UnsupportedAPIEndpointException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UnsupportedAPIEndpointException) GoString() string {
- return s.String()
-}
-
-func newErrorUnsupportedAPIEndpointException(v protocol.ResponseMetadata) error {
- return &UnsupportedAPIEndpointException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *UnsupportedAPIEndpointException) Code() string {
- return "UnsupportedAPIEndpointException"
-}
-
-// Message returns the exception's message.
-func (s *UnsupportedAPIEndpointException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *UnsupportedAPIEndpointException) OrigErr() error {
- return nil
-}
-
-func (s *UnsupportedAPIEndpointException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *UnsupportedAPIEndpointException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *UnsupportedAPIEndpointException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type UntagResourceInput struct {
- _ struct{} `type:"structure"`
-
- // The ID of the resource to remove a tag from.
- //
- // You can specify any of the following taggable resources.
- //
- // * AWS account – specify the account ID number.
- //
- // * Organizational unit – specify the OU ID that begins with ou- and looks
- // similar to: ou-1a2b-34uvwxyz
- //
- // * Root – specify the root ID that begins with r- and looks similar to:
- // r-1a2b
- //
- // * Policy – specify the policy ID that begins with p- andlooks similar
- // to: p-12abcdefg3
- //
- // ResourceId is a required field
- ResourceId *string `type:"string" required:"true"`
-
- // The list of keys for tags to remove from the specified resource.
- //
- // TagKeys is a required field
- TagKeys []*string `type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s UntagResourceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UntagResourceInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UntagResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
- if s.ResourceId == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceId"))
- }
- if s.TagKeys == nil {
- invalidParams.Add(request.NewErrParamRequired("TagKeys"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceId sets the ResourceId field's value.
-func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput {
- s.ResourceId = &v
- return s
-}
-
-// SetTagKeys sets the TagKeys field's value.
-func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
- s.TagKeys = v
- return s
-}
-
-type UntagResourceOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s UntagResourceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UntagResourceOutput) GoString() string {
- return s.String()
-}
-
-type UpdateOrganizationalUnitInput struct {
- _ struct{} `type:"structure"`
-
- // The new name that you want to assign to the OU.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter is a string of any of the characters in the ASCII character
- // range.
- Name *string `min:"1" type:"string"`
-
- // The unique identifier (ID) of the OU that you want to rename. You can get
- // the ID from the ListOrganizationalUnitsForParent operation.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for an organizational
- // unit ID string requires "ou-" followed by from 4 to 32 lowercase letters
- // or digits (the ID of the root that contains the OU). This string is followed
- // by a second "-" dash and from 8 to 32 additional lowercase letters or digits.
- //
- // OrganizationalUnitId is a required field
- OrganizationalUnitId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s UpdateOrganizationalUnitInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UpdateOrganizationalUnitInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UpdateOrganizationalUnitInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateOrganizationalUnitInput"}
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.OrganizationalUnitId == nil {
- invalidParams.Add(request.NewErrParamRequired("OrganizationalUnitId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *UpdateOrganizationalUnitInput) SetName(v string) *UpdateOrganizationalUnitInput {
- s.Name = &v
- return s
-}
-
-// SetOrganizationalUnitId sets the OrganizationalUnitId field's value.
-func (s *UpdateOrganizationalUnitInput) SetOrganizationalUnitId(v string) *UpdateOrganizationalUnitInput {
- s.OrganizationalUnitId = &v
- return s
-}
-
-type UpdateOrganizationalUnitOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains the details about the specified OU, including its
- // new name.
- OrganizationalUnit *OrganizationalUnit `type:"structure"`
-}
-
-// String returns the string representation
-func (s UpdateOrganizationalUnitOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UpdateOrganizationalUnitOutput) GoString() string {
- return s.String()
-}
-
-// SetOrganizationalUnit sets the OrganizationalUnit field's value.
-func (s *UpdateOrganizationalUnitOutput) SetOrganizationalUnit(v *OrganizationalUnit) *UpdateOrganizationalUnitOutput {
- s.OrganizationalUnit = v
- return s
-}
-
-type UpdatePolicyInput struct {
- _ struct{} `type:"structure"`
-
- // If provided, the new content for the policy. The text must be correctly formatted
- // JSON that complies with the syntax for the policy's type. For more information,
- // see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
- // in the AWS Organizations User Guide.
- Content *string `min:"1" type:"string"`
-
- // If provided, the new description for the policy.
- Description *string `type:"string"`
-
- // If provided, the new name for the policy.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) that is used to validate
- // this parameter is a string of any of the characters in the ASCII character
- // range.
- Name *string `min:"1" type:"string"`
-
- // The unique identifier (ID) of the policy that you want to update.
- //
- // The regex pattern (http://wikipedia.org/wiki/regex) for a policy ID string
- // requires "p-" followed by from 8 to 128 lowercase or uppercase letters, digits,
- // or the underscore character (_).
- //
- // PolicyId is a required field
- PolicyId *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s UpdatePolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UpdatePolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UpdatePolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdatePolicyInput"}
- if s.Content != nil && len(*s.Content) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Content", 1))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.PolicyId == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetContent sets the Content field's value.
-func (s *UpdatePolicyInput) SetContent(v string) *UpdatePolicyInput {
- s.Content = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *UpdatePolicyInput) SetDescription(v string) *UpdatePolicyInput {
- s.Description = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *UpdatePolicyInput) SetName(v string) *UpdatePolicyInput {
- s.Name = &v
- return s
-}
-
-// SetPolicyId sets the PolicyId field's value.
-func (s *UpdatePolicyInput) SetPolicyId(v string) *UpdatePolicyInput {
- s.PolicyId = &v
- return s
-}
-
-type UpdatePolicyOutput struct {
- _ struct{} `type:"structure"`
-
- // A structure that contains details about the updated policy, showing the requested
- // changes.
- Policy *Policy `type:"structure"`
-}
-
-// String returns the string representation
-func (s UpdatePolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UpdatePolicyOutput) GoString() string {
- return s.String()
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *UpdatePolicyOutput) SetPolicy(v *Policy) *UpdatePolicyOutput {
- s.Policy = v
- return s
-}
-
-const (
- // AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole is a AccessDeniedForDependencyExceptionReason enum value
- AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole = "ACCESS_DENIED_DURING_CREATE_SERVICE_LINKED_ROLE"
-)
-
-// AccessDeniedForDependencyExceptionReason_Values returns all elements of the AccessDeniedForDependencyExceptionReason enum
-func AccessDeniedForDependencyExceptionReason_Values() []string {
- return []string{
- AccessDeniedForDependencyExceptionReasonAccessDeniedDuringCreateServiceLinkedRole,
- }
-}
-
-const (
- // AccountJoinedMethodInvited is a AccountJoinedMethod enum value
- AccountJoinedMethodInvited = "INVITED"
-
- // AccountJoinedMethodCreated is a AccountJoinedMethod enum value
- AccountJoinedMethodCreated = "CREATED"
-)
-
-// AccountJoinedMethod_Values returns all elements of the AccountJoinedMethod enum
-func AccountJoinedMethod_Values() []string {
- return []string{
- AccountJoinedMethodInvited,
- AccountJoinedMethodCreated,
- }
-}
-
-const (
- // AccountStatusActive is a AccountStatus enum value
- AccountStatusActive = "ACTIVE"
-
- // AccountStatusSuspended is a AccountStatus enum value
- AccountStatusSuspended = "SUSPENDED"
-)
-
-// AccountStatus_Values returns all elements of the AccountStatus enum
-func AccountStatus_Values() []string {
- return []string{
- AccountStatusActive,
- AccountStatusSuspended,
- }
-}
-
-const (
- // ActionTypeInvite is a ActionType enum value
- ActionTypeInvite = "INVITE"
-
- // ActionTypeEnableAllFeatures is a ActionType enum value
- ActionTypeEnableAllFeatures = "ENABLE_ALL_FEATURES"
-
- // ActionTypeApproveAllFeatures is a ActionType enum value
- ActionTypeApproveAllFeatures = "APPROVE_ALL_FEATURES"
-
- // ActionTypeAddOrganizationsServiceLinkedRole is a ActionType enum value
- ActionTypeAddOrganizationsServiceLinkedRole = "ADD_ORGANIZATIONS_SERVICE_LINKED_ROLE"
-)
-
-// ActionType_Values returns all elements of the ActionType enum
-func ActionType_Values() []string {
- return []string{
- ActionTypeInvite,
- ActionTypeEnableAllFeatures,
- ActionTypeApproveAllFeatures,
- ActionTypeAddOrganizationsServiceLinkedRole,
- }
-}
-
-const (
- // ChildTypeAccount is a ChildType enum value
- ChildTypeAccount = "ACCOUNT"
-
- // ChildTypeOrganizationalUnit is a ChildType enum value
- ChildTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT"
-)
-
-// ChildType_Values returns all elements of the ChildType enum
-func ChildType_Values() []string {
- return []string{
- ChildTypeAccount,
- ChildTypeOrganizationalUnit,
- }
-}
-
-const (
- // ConstraintViolationExceptionReasonAccountNumberLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonAccountNumberLimitExceeded = "ACCOUNT_NUMBER_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonHandshakeRateLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonHandshakeRateLimitExceeded = "HANDSHAKE_RATE_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonOuNumberLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonOuNumberLimitExceeded = "OU_NUMBER_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonOuDepthLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonOuDepthLimitExceeded = "OU_DEPTH_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonPolicyNumberLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonPolicyNumberLimitExceeded = "POLICY_NUMBER_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonPolicyContentLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonPolicyContentLimitExceeded = "POLICY_CONTENT_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded = "MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded = "MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonAccountCannotLeaveOrganization is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonAccountCannotLeaveOrganization = "ACCOUNT_CANNOT_LEAVE_ORGANIZATION"
-
- // ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula = "ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA"
-
- // ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification = "ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION"
-
- // ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired = "MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED"
-
- // ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired = "MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED"
-
- // ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded = "ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace = "MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE"
-
- // ConstraintViolationExceptionReasonMasterAccountMissingContactInfo is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMasterAccountMissingContactInfo = "MASTER_ACCOUNT_MISSING_CONTACT_INFO"
-
- // ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled = "MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED"
-
- // ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode = "ORGANIZATION_NOT_IN_ALL_FEATURES_MODE"
-
- // ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion = "CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION"
-
- // ConstraintViolationExceptionReasonEmailVerificationCodeExpired is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonEmailVerificationCodeExpired = "EMAIL_VERIFICATION_CODE_EXPIRED"
-
- // ConstraintViolationExceptionReasonWaitPeriodActive is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonWaitPeriodActive = "WAIT_PERIOD_ACTIVE"
-
- // ConstraintViolationExceptionReasonMaxTagLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMaxTagLimitExceeded = "MAX_TAG_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonTagPolicyViolation is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonTagPolicyViolation = "TAG_POLICY_VIOLATION"
-
- // ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded = "MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED"
-
- // ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator = "CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR"
-
- // ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg = "CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG"
-
- // ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService = "DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE"
-
- // ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense is a ConstraintViolationExceptionReason enum value
- ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense = "MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE"
-)
-
-// ConstraintViolationExceptionReason_Values returns all elements of the ConstraintViolationExceptionReason enum
-func ConstraintViolationExceptionReason_Values() []string {
- return []string{
- ConstraintViolationExceptionReasonAccountNumberLimitExceeded,
- ConstraintViolationExceptionReasonHandshakeRateLimitExceeded,
- ConstraintViolationExceptionReasonOuNumberLimitExceeded,
- ConstraintViolationExceptionReasonOuDepthLimitExceeded,
- ConstraintViolationExceptionReasonPolicyNumberLimitExceeded,
- ConstraintViolationExceptionReasonPolicyContentLimitExceeded,
- ConstraintViolationExceptionReasonMaxPolicyTypeAttachmentLimitExceeded,
- ConstraintViolationExceptionReasonMinPolicyTypeAttachmentLimitExceeded,
- ConstraintViolationExceptionReasonAccountCannotLeaveOrganization,
- ConstraintViolationExceptionReasonAccountCannotLeaveWithoutEula,
- ConstraintViolationExceptionReasonAccountCannotLeaveWithoutPhoneVerification,
- ConstraintViolationExceptionReasonMasterAccountPaymentInstrumentRequired,
- ConstraintViolationExceptionReasonMemberAccountPaymentInstrumentRequired,
- ConstraintViolationExceptionReasonAccountCreationRateLimitExceeded,
- ConstraintViolationExceptionReasonMasterAccountAddressDoesNotMatchMarketplace,
- ConstraintViolationExceptionReasonMasterAccountMissingContactInfo,
- ConstraintViolationExceptionReasonMasterAccountNotGovcloudEnabled,
- ConstraintViolationExceptionReasonOrganizationNotInAllFeaturesMode,
- ConstraintViolationExceptionReasonCreateOrganizationInBillingModeUnsupportedRegion,
- ConstraintViolationExceptionReasonEmailVerificationCodeExpired,
- ConstraintViolationExceptionReasonWaitPeriodActive,
- ConstraintViolationExceptionReasonMaxTagLimitExceeded,
- ConstraintViolationExceptionReasonTagPolicyViolation,
- ConstraintViolationExceptionReasonMaxDelegatedAdministratorsForServiceLimitExceeded,
- ConstraintViolationExceptionReasonCannotRegisterMasterAsDelegatedAdministrator,
- ConstraintViolationExceptionReasonCannotRemoveDelegatedAdministratorFromOrg,
- ConstraintViolationExceptionReasonDelegatedAdministratorExistsForThisService,
- ConstraintViolationExceptionReasonMasterAccountMissingBusinessLicense,
- }
-}
-
-const (
- // CreateAccountFailureReasonAccountLimitExceeded is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonAccountLimitExceeded = "ACCOUNT_LIMIT_EXCEEDED"
-
- // CreateAccountFailureReasonEmailAlreadyExists is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonEmailAlreadyExists = "EMAIL_ALREADY_EXISTS"
-
- // CreateAccountFailureReasonInvalidAddress is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonInvalidAddress = "INVALID_ADDRESS"
-
- // CreateAccountFailureReasonInvalidEmail is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonInvalidEmail = "INVALID_EMAIL"
-
- // CreateAccountFailureReasonConcurrentAccountModification is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonConcurrentAccountModification = "CONCURRENT_ACCOUNT_MODIFICATION"
-
- // CreateAccountFailureReasonInternalFailure is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonInternalFailure = "INTERNAL_FAILURE"
-
- // CreateAccountFailureReasonGovcloudAccountAlreadyExists is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonGovcloudAccountAlreadyExists = "GOVCLOUD_ACCOUNT_ALREADY_EXISTS"
-
- // CreateAccountFailureReasonMissingBusinessValidation is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonMissingBusinessValidation = "MISSING_BUSINESS_VALIDATION"
-
- // CreateAccountFailureReasonFailedBusinessValidation is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonFailedBusinessValidation = "FAILED_BUSINESS_VALIDATION"
-
- // CreateAccountFailureReasonPendingBusinessValidation is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonPendingBusinessValidation = "PENDING_BUSINESS_VALIDATION"
-
- // CreateAccountFailureReasonInvalidIdentityForBusinessValidation is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonInvalidIdentityForBusinessValidation = "INVALID_IDENTITY_FOR_BUSINESS_VALIDATION"
-
- // CreateAccountFailureReasonUnknownBusinessValidation is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonUnknownBusinessValidation = "UNKNOWN_BUSINESS_VALIDATION"
-
- // CreateAccountFailureReasonMissingPaymentInstrument is a CreateAccountFailureReason enum value
- CreateAccountFailureReasonMissingPaymentInstrument = "MISSING_PAYMENT_INSTRUMENT"
-)
-
-// CreateAccountFailureReason_Values returns all elements of the CreateAccountFailureReason enum
-func CreateAccountFailureReason_Values() []string {
- return []string{
- CreateAccountFailureReasonAccountLimitExceeded,
- CreateAccountFailureReasonEmailAlreadyExists,
- CreateAccountFailureReasonInvalidAddress,
- CreateAccountFailureReasonInvalidEmail,
- CreateAccountFailureReasonConcurrentAccountModification,
- CreateAccountFailureReasonInternalFailure,
- CreateAccountFailureReasonGovcloudAccountAlreadyExists,
- CreateAccountFailureReasonMissingBusinessValidation,
- CreateAccountFailureReasonFailedBusinessValidation,
- CreateAccountFailureReasonPendingBusinessValidation,
- CreateAccountFailureReasonInvalidIdentityForBusinessValidation,
- CreateAccountFailureReasonUnknownBusinessValidation,
- CreateAccountFailureReasonMissingPaymentInstrument,
- }
-}
-
-const (
- // CreateAccountStateInProgress is a CreateAccountState enum value
- CreateAccountStateInProgress = "IN_PROGRESS"
-
- // CreateAccountStateSucceeded is a CreateAccountState enum value
- CreateAccountStateSucceeded = "SUCCEEDED"
-
- // CreateAccountStateFailed is a CreateAccountState enum value
- CreateAccountStateFailed = "FAILED"
-)
-
-// CreateAccountState_Values returns all elements of the CreateAccountState enum
-func CreateAccountState_Values() []string {
- return []string{
- CreateAccountStateInProgress,
- CreateAccountStateSucceeded,
- CreateAccountStateFailed,
- }
-}
-
-const (
- // EffectivePolicyTypeTagPolicy is a EffectivePolicyType enum value
- EffectivePolicyTypeTagPolicy = "TAG_POLICY"
-
- // EffectivePolicyTypeBackupPolicy is a EffectivePolicyType enum value
- EffectivePolicyTypeBackupPolicy = "BACKUP_POLICY"
-
- // EffectivePolicyTypeAiservicesOptOutPolicy is a EffectivePolicyType enum value
- EffectivePolicyTypeAiservicesOptOutPolicy = "AISERVICES_OPT_OUT_POLICY"
-)
-
-// EffectivePolicyType_Values returns all elements of the EffectivePolicyType enum
-func EffectivePolicyType_Values() []string {
- return []string{
- EffectivePolicyTypeTagPolicy,
- EffectivePolicyTypeBackupPolicy,
- EffectivePolicyTypeAiservicesOptOutPolicy,
- }
-}
-
-const (
- // HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded = "ACCOUNT_NUMBER_LIMIT_EXCEEDED"
-
- // HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded = "HANDSHAKE_RATE_LIMIT_EXCEEDED"
-
- // HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization = "ALREADY_IN_AN_ORGANIZATION"
-
- // HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures = "ORGANIZATION_ALREADY_HAS_ALL_FEATURES"
-
- // HandshakeConstraintViolationExceptionReasonOrganizationIsAlreadyPendingAllFeaturesMigration is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonOrganizationIsAlreadyPendingAllFeaturesMigration = "ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION"
-
- // HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures = "INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES"
-
- // HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired = "PAYMENT_INSTRUMENT_REQUIRED"
-
- // HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord = "ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD"
-
- // HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded is a HandshakeConstraintViolationExceptionReason enum value
- HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded = "ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED"
-)
-
-// HandshakeConstraintViolationExceptionReason_Values returns all elements of the HandshakeConstraintViolationExceptionReason enum
-func HandshakeConstraintViolationExceptionReason_Values() []string {
- return []string{
- HandshakeConstraintViolationExceptionReasonAccountNumberLimitExceeded,
- HandshakeConstraintViolationExceptionReasonHandshakeRateLimitExceeded,
- HandshakeConstraintViolationExceptionReasonAlreadyInAnOrganization,
- HandshakeConstraintViolationExceptionReasonOrganizationAlreadyHasAllFeatures,
- HandshakeConstraintViolationExceptionReasonOrganizationIsAlreadyPendingAllFeaturesMigration,
- HandshakeConstraintViolationExceptionReasonInviteDisabledDuringEnableAllFeatures,
- HandshakeConstraintViolationExceptionReasonPaymentInstrumentRequired,
- HandshakeConstraintViolationExceptionReasonOrganizationFromDifferentSellerOfRecord,
- HandshakeConstraintViolationExceptionReasonOrganizationMembershipChangeRateLimitExceeded,
- }
-}
-
-const (
- // HandshakePartyTypeAccount is a HandshakePartyType enum value
- HandshakePartyTypeAccount = "ACCOUNT"
-
- // HandshakePartyTypeOrganization is a HandshakePartyType enum value
- HandshakePartyTypeOrganization = "ORGANIZATION"
-
- // HandshakePartyTypeEmail is a HandshakePartyType enum value
- HandshakePartyTypeEmail = "EMAIL"
-)
-
-// HandshakePartyType_Values returns all elements of the HandshakePartyType enum
-func HandshakePartyType_Values() []string {
- return []string{
- HandshakePartyTypeAccount,
- HandshakePartyTypeOrganization,
- HandshakePartyTypeEmail,
- }
-}
-
-const (
- // HandshakeResourceTypeAccount is a HandshakeResourceType enum value
- HandshakeResourceTypeAccount = "ACCOUNT"
-
- // HandshakeResourceTypeOrganization is a HandshakeResourceType enum value
- HandshakeResourceTypeOrganization = "ORGANIZATION"
-
- // HandshakeResourceTypeOrganizationFeatureSet is a HandshakeResourceType enum value
- HandshakeResourceTypeOrganizationFeatureSet = "ORGANIZATION_FEATURE_SET"
-
- // HandshakeResourceTypeEmail is a HandshakeResourceType enum value
- HandshakeResourceTypeEmail = "EMAIL"
-
- // HandshakeResourceTypeMasterEmail is a HandshakeResourceType enum value
- HandshakeResourceTypeMasterEmail = "MASTER_EMAIL"
-
- // HandshakeResourceTypeMasterName is a HandshakeResourceType enum value
- HandshakeResourceTypeMasterName = "MASTER_NAME"
-
- // HandshakeResourceTypeNotes is a HandshakeResourceType enum value
- HandshakeResourceTypeNotes = "NOTES"
-
- // HandshakeResourceTypeParentHandshake is a HandshakeResourceType enum value
- HandshakeResourceTypeParentHandshake = "PARENT_HANDSHAKE"
-)
-
-// HandshakeResourceType_Values returns all elements of the HandshakeResourceType enum
-func HandshakeResourceType_Values() []string {
- return []string{
- HandshakeResourceTypeAccount,
- HandshakeResourceTypeOrganization,
- HandshakeResourceTypeOrganizationFeatureSet,
- HandshakeResourceTypeEmail,
- HandshakeResourceTypeMasterEmail,
- HandshakeResourceTypeMasterName,
- HandshakeResourceTypeNotes,
- HandshakeResourceTypeParentHandshake,
- }
-}
-
-const (
- // HandshakeStateRequested is a HandshakeState enum value
- HandshakeStateRequested = "REQUESTED"
-
- // HandshakeStateOpen is a HandshakeState enum value
- HandshakeStateOpen = "OPEN"
-
- // HandshakeStateCanceled is a HandshakeState enum value
- HandshakeStateCanceled = "CANCELED"
-
- // HandshakeStateAccepted is a HandshakeState enum value
- HandshakeStateAccepted = "ACCEPTED"
-
- // HandshakeStateDeclined is a HandshakeState enum value
- HandshakeStateDeclined = "DECLINED"
-
- // HandshakeStateExpired is a HandshakeState enum value
- HandshakeStateExpired = "EXPIRED"
-)
-
-// HandshakeState_Values returns all elements of the HandshakeState enum
-func HandshakeState_Values() []string {
- return []string{
- HandshakeStateRequested,
- HandshakeStateOpen,
- HandshakeStateCanceled,
- HandshakeStateAccepted,
- HandshakeStateDeclined,
- HandshakeStateExpired,
- }
-}
-
-const (
- // IAMUserAccessToBillingAllow is a IAMUserAccessToBilling enum value
- IAMUserAccessToBillingAllow = "ALLOW"
-
- // IAMUserAccessToBillingDeny is a IAMUserAccessToBilling enum value
- IAMUserAccessToBillingDeny = "DENY"
-)
-
-// IAMUserAccessToBilling_Values returns all elements of the IAMUserAccessToBilling enum
-func IAMUserAccessToBilling_Values() []string {
- return []string{
- IAMUserAccessToBillingAllow,
- IAMUserAccessToBillingDeny,
- }
-}
-
-const (
- // InvalidInputExceptionReasonInvalidPartyTypeTarget is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidPartyTypeTarget = "INVALID_PARTY_TYPE_TARGET"
-
- // InvalidInputExceptionReasonInvalidSyntaxOrganizationArn is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidSyntaxOrganizationArn = "INVALID_SYNTAX_ORGANIZATION_ARN"
-
- // InvalidInputExceptionReasonInvalidSyntaxPolicyId is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidSyntaxPolicyId = "INVALID_SYNTAX_POLICY_ID"
-
- // InvalidInputExceptionReasonInvalidEnum is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidEnum = "INVALID_ENUM"
-
- // InvalidInputExceptionReasonInvalidEnumPolicyType is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidEnumPolicyType = "INVALID_ENUM_POLICY_TYPE"
-
- // InvalidInputExceptionReasonInvalidListMember is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidListMember = "INVALID_LIST_MEMBER"
-
- // InvalidInputExceptionReasonMaxLengthExceeded is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonMaxLengthExceeded = "MAX_LENGTH_EXCEEDED"
-
- // InvalidInputExceptionReasonMaxValueExceeded is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonMaxValueExceeded = "MAX_VALUE_EXCEEDED"
-
- // InvalidInputExceptionReasonMinLengthExceeded is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonMinLengthExceeded = "MIN_LENGTH_EXCEEDED"
-
- // InvalidInputExceptionReasonMinValueExceeded is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonMinValueExceeded = "MIN_VALUE_EXCEEDED"
-
- // InvalidInputExceptionReasonImmutablePolicy is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonImmutablePolicy = "IMMUTABLE_POLICY"
-
- // InvalidInputExceptionReasonInvalidPattern is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidPattern = "INVALID_PATTERN"
-
- // InvalidInputExceptionReasonInvalidPatternTargetId is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidPatternTargetId = "INVALID_PATTERN_TARGET_ID"
-
- // InvalidInputExceptionReasonInputRequired is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInputRequired = "INPUT_REQUIRED"
-
- // InvalidInputExceptionReasonInvalidNextToken is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidNextToken = "INVALID_NEXT_TOKEN"
-
- // InvalidInputExceptionReasonMaxLimitExceededFilter is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonMaxLimitExceededFilter = "MAX_LIMIT_EXCEEDED_FILTER"
-
- // InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots = "MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS"
-
- // InvalidInputExceptionReasonInvalidFullNameTarget is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidFullNameTarget = "INVALID_FULL_NAME_TARGET"
-
- // InvalidInputExceptionReasonUnrecognizedServicePrincipal is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonUnrecognizedServicePrincipal = "UNRECOGNIZED_SERVICE_PRINCIPAL"
-
- // InvalidInputExceptionReasonInvalidRoleName is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidRoleName = "INVALID_ROLE_NAME"
-
- // InvalidInputExceptionReasonInvalidSystemTagsParameter is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidSystemTagsParameter = "INVALID_SYSTEM_TAGS_PARAMETER"
-
- // InvalidInputExceptionReasonDuplicateTagKey is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonDuplicateTagKey = "DUPLICATE_TAG_KEY"
-
- // InvalidInputExceptionReasonTargetNotSupported is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonTargetNotSupported = "TARGET_NOT_SUPPORTED"
-
- // InvalidInputExceptionReasonInvalidEmailAddressTarget is a InvalidInputExceptionReason enum value
- InvalidInputExceptionReasonInvalidEmailAddressTarget = "INVALID_EMAIL_ADDRESS_TARGET"
-)
-
-// InvalidInputExceptionReason_Values returns all elements of the InvalidInputExceptionReason enum
-func InvalidInputExceptionReason_Values() []string {
- return []string{
- InvalidInputExceptionReasonInvalidPartyTypeTarget,
- InvalidInputExceptionReasonInvalidSyntaxOrganizationArn,
- InvalidInputExceptionReasonInvalidSyntaxPolicyId,
- InvalidInputExceptionReasonInvalidEnum,
- InvalidInputExceptionReasonInvalidEnumPolicyType,
- InvalidInputExceptionReasonInvalidListMember,
- InvalidInputExceptionReasonMaxLengthExceeded,
- InvalidInputExceptionReasonMaxValueExceeded,
- InvalidInputExceptionReasonMinLengthExceeded,
- InvalidInputExceptionReasonMinValueExceeded,
- InvalidInputExceptionReasonImmutablePolicy,
- InvalidInputExceptionReasonInvalidPattern,
- InvalidInputExceptionReasonInvalidPatternTargetId,
- InvalidInputExceptionReasonInputRequired,
- InvalidInputExceptionReasonInvalidNextToken,
- InvalidInputExceptionReasonMaxLimitExceededFilter,
- InvalidInputExceptionReasonMovingAccountBetweenDifferentRoots,
- InvalidInputExceptionReasonInvalidFullNameTarget,
- InvalidInputExceptionReasonUnrecognizedServicePrincipal,
- InvalidInputExceptionReasonInvalidRoleName,
- InvalidInputExceptionReasonInvalidSystemTagsParameter,
- InvalidInputExceptionReasonDuplicateTagKey,
- InvalidInputExceptionReasonTargetNotSupported,
- InvalidInputExceptionReasonInvalidEmailAddressTarget,
- }
-}
-
-const (
- // OrganizationFeatureSetAll is a OrganizationFeatureSet enum value
- OrganizationFeatureSetAll = "ALL"
-
- // OrganizationFeatureSetConsolidatedBilling is a OrganizationFeatureSet enum value
- OrganizationFeatureSetConsolidatedBilling = "CONSOLIDATED_BILLING"
-)
-
-// OrganizationFeatureSet_Values returns all elements of the OrganizationFeatureSet enum
-func OrganizationFeatureSet_Values() []string {
- return []string{
- OrganizationFeatureSetAll,
- OrganizationFeatureSetConsolidatedBilling,
- }
-}
-
-const (
- // ParentTypeRoot is a ParentType enum value
- ParentTypeRoot = "ROOT"
-
- // ParentTypeOrganizationalUnit is a ParentType enum value
- ParentTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT"
-)
-
-// ParentType_Values returns all elements of the ParentType enum
-func ParentType_Values() []string {
- return []string{
- ParentTypeRoot,
- ParentTypeOrganizationalUnit,
- }
-}
-
-const (
- // PolicyTypeServiceControlPolicy is a PolicyType enum value
- PolicyTypeServiceControlPolicy = "SERVICE_CONTROL_POLICY"
-
- // PolicyTypeTagPolicy is a PolicyType enum value
- PolicyTypeTagPolicy = "TAG_POLICY"
-
- // PolicyTypeBackupPolicy is a PolicyType enum value
- PolicyTypeBackupPolicy = "BACKUP_POLICY"
-
- // PolicyTypeAiservicesOptOutPolicy is a PolicyType enum value
- PolicyTypeAiservicesOptOutPolicy = "AISERVICES_OPT_OUT_POLICY"
-)
-
-// PolicyType_Values returns all elements of the PolicyType enum
-func PolicyType_Values() []string {
- return []string{
- PolicyTypeServiceControlPolicy,
- PolicyTypeTagPolicy,
- PolicyTypeBackupPolicy,
- PolicyTypeAiservicesOptOutPolicy,
- }
-}
-
-const (
- // PolicyTypeStatusEnabled is a PolicyTypeStatus enum value
- PolicyTypeStatusEnabled = "ENABLED"
-
- // PolicyTypeStatusPendingEnable is a PolicyTypeStatus enum value
- PolicyTypeStatusPendingEnable = "PENDING_ENABLE"
-
- // PolicyTypeStatusPendingDisable is a PolicyTypeStatus enum value
- PolicyTypeStatusPendingDisable = "PENDING_DISABLE"
-)
-
-// PolicyTypeStatus_Values returns all elements of the PolicyTypeStatus enum
-func PolicyTypeStatus_Values() []string {
- return []string{
- PolicyTypeStatusEnabled,
- PolicyTypeStatusPendingEnable,
- PolicyTypeStatusPendingDisable,
- }
-}
-
-const (
- // TargetTypeAccount is a TargetType enum value
- TargetTypeAccount = "ACCOUNT"
-
- // TargetTypeOrganizationalUnit is a TargetType enum value
- TargetTypeOrganizationalUnit = "ORGANIZATIONAL_UNIT"
-
- // TargetTypeRoot is a TargetType enum value
- TargetTypeRoot = "ROOT"
-)
-
-// TargetType_Values returns all elements of the TargetType enum
-func TargetType_Values() []string {
- return []string{
- TargetTypeAccount,
- TargetTypeOrganizationalUnit,
- TargetTypeRoot,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go
deleted file mode 100644
index 8ca6de911..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/organizations/doc.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package organizations provides the client and types for making API
-// requests to AWS Organizations.
-//
-// AWS Organizations is a web service that enables you to consolidate your multiple
-// AWS accounts into an organization and centrally manage your accounts and
-// their resources.
-//
-// This guide provides descriptions of the Organizations operations. For more
-// information about using this service, see the AWS Organizations User Guide
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html).
-//
-// Support and feedback for AWS Organizations
-//
-// We welcome your feedback. Send your comments to feedback-awsorganizations@amazon.com
-// (mailto:feedback-awsorganizations@amazon.com) or post your feedback and questions
-// in the AWS Organizations support forum (http://forums.aws.amazon.com/forum.jspa?forumID=219).
-// For more information about the AWS support forums, see Forums Help (http://forums.aws.amazon.com/help.jspa).
-//
-// Endpoint to call When using the AWS CLI or the AWS SDK
-//
-// For the current release of Organizations, specify the us-east-1 region for
-// all AWS API and AWS CLI calls made from the commercial AWS Regions outside
-// of China. If calling from one of the AWS Regions in China, then specify cn-northwest-1.
-// You can do this in the AWS CLI by using these parameters and commands:
-//
-// * Use the following parameter with each command to specify both the endpoint
-// and its region: --endpoint-url https://organizations.us-east-1.amazonaws.com
-// (from commercial AWS Regions outside of China) or --endpoint-url https://organizations.cn-northwest-1.amazonaws.com.cn
-// (from AWS Regions in China)
-//
-// * Use the default endpoint, but configure your default region with this
-// command: aws configure set default.region us-east-1 (from commercial AWS
-// Regions outside of China) or aws configure set default.region cn-northwest-1
-// (from AWS Regions in China)
-//
-// * Use the following parameter with each command to specify the endpoint:
-// --region us-east-1 (from commercial AWS Regions outside of China) or --region
-// cn-northwest-1 (from AWS Regions in China)
-//
-// Recording API Requests
-//
-// AWS Organizations supports AWS CloudTrail, a service that records AWS API
-// calls for your AWS account and delivers log files to an Amazon S3 bucket.
-// By using information collected by AWS CloudTrail, you can determine which
-// requests the Organizations service received, who made the request and when,
-// and so on. For more about AWS Organizations and its support for AWS CloudTrail,
-// see Logging AWS Organizations Events with AWS CloudTrail (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_incident-response.html#orgs_cloudtrail-integration)
-// in the AWS Organizations User Guide. To learn more about AWS CloudTrail,
-// including how to turn it on and find your log files, see the AWS CloudTrail
-// User Guide (http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html).
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28 for more information on this service.
-//
-// See organizations package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/organizations/
-//
-// Using the Client
-//
-// To contact AWS Organizations with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the AWS Organizations client Organizations for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/organizations/#New
-package organizations
diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go
deleted file mode 100644
index 6380ad594..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/organizations/errors.go
+++ /dev/null
@@ -1,628 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package organizations
-
-import (
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-const (
-
- // ErrCodeAWSOrganizationsNotInUseException for service response error code
- // "AWSOrganizationsNotInUseException".
- //
- // Your account isn't a member of an organization. To make this request, you
- // must use the credentials of an account that belongs to an organization.
- ErrCodeAWSOrganizationsNotInUseException = "AWSOrganizationsNotInUseException"
-
- // ErrCodeAccessDeniedException for service response error code
- // "AccessDeniedException".
- //
- // You don't have permissions to perform the requested operation. The user or
- // role that is making the request must have at least one IAM permissions policy
- // attached that grants the required permissions. For more information, see
- // Access Management (https://docs.aws.amazon.com/IAM/latest/UserGuide/access.html)
- // in the IAM User Guide.
- ErrCodeAccessDeniedException = "AccessDeniedException"
-
- // ErrCodeAccessDeniedForDependencyException for service response error code
- // "AccessDeniedForDependencyException".
- //
- // The operation that you attempted requires you to have the iam:CreateServiceLinkedRole
- // for organizations.amazonaws.com permission so that AWS Organizations can
- // create the required service-linked role. You don't have that permission.
- ErrCodeAccessDeniedForDependencyException = "AccessDeniedForDependencyException"
-
- // ErrCodeAccountAlreadyRegisteredException for service response error code
- // "AccountAlreadyRegisteredException".
- //
- // The specified account is already a delegated administrator for this AWS service.
- ErrCodeAccountAlreadyRegisteredException = "AccountAlreadyRegisteredException"
-
- // ErrCodeAccountNotFoundException for service response error code
- // "AccountNotFoundException".
- //
- // We can't find an AWS account with the AccountId that you specified, or the
- // account whose credentials you used to make this request isn't a member of
- // an organization.
- ErrCodeAccountNotFoundException = "AccountNotFoundException"
-
- // ErrCodeAccountNotRegisteredException for service response error code
- // "AccountNotRegisteredException".
- //
- // The specified account is not a delegated administrator for this AWS service.
- ErrCodeAccountNotRegisteredException = "AccountNotRegisteredException"
-
- // ErrCodeAccountOwnerNotVerifiedException for service response error code
- // "AccountOwnerNotVerifiedException".
- //
- // You can't invite an existing account to your organization until you verify
- // that you own the email address associated with the management account. For
- // more information, see Email Address Verification (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_create.html#about-email-verification)
- // in the AWS Organizations User Guide.
- ErrCodeAccountOwnerNotVerifiedException = "AccountOwnerNotVerifiedException"
-
- // ErrCodeAlreadyInOrganizationException for service response error code
- // "AlreadyInOrganizationException".
- //
- // This account is already a member of an organization. An account can belong
- // to only one organization at a time.
- ErrCodeAlreadyInOrganizationException = "AlreadyInOrganizationException"
-
- // ErrCodeChildNotFoundException for service response error code
- // "ChildNotFoundException".
- //
- // We can't find an organizational unit (OU) or AWS account with the ChildId
- // that you specified.
- ErrCodeChildNotFoundException = "ChildNotFoundException"
-
- // ErrCodeConcurrentModificationException for service response error code
- // "ConcurrentModificationException".
- //
- // The target of the operation is currently being modified by a different request.
- // Try again later.
- ErrCodeConcurrentModificationException = "ConcurrentModificationException"
-
- // ErrCodeConstraintViolationException for service response error code
- // "ConstraintViolationException".
- //
- // Performing this operation violates a minimum or maximum value limit. For
- // example, attempting to remove the last service control policy (SCP) from
- // an OU or root, inviting or creating too many accounts to the organization,
- // or attaching too many policies to an account, OU, or root. This exception
- // includes a reason that contains additional information about the violated
- // limit:
- //
- // Some of the reasons in the following list might not be applicable to this
- // specific API or operation.
- //
- // * ACCOUNT_CANNOT_LEAVE_ORGANIZATION: You attempted to remove the management
- // account from the organization. You can't remove the management account.
- // Instead, after you remove all member accounts, delete the organization
- // itself.
- //
- // * ACCOUNT_CANNOT_LEAVE_WITHOUT_EULA: You attempted to remove an account
- // from the organization that doesn't yet have enough information to exist
- // as a standalone account. This account requires you to first agree to the
- // AWS Customer Agreement. Follow the steps at Removing a member account
- // from your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)in
- // the AWS Organizations User Guide.
- //
- // * ACCOUNT_CANNOT_LEAVE_WITHOUT_PHONE_VERIFICATION: You attempted to remove
- // an account from the organization that doesn't yet have enough information
- // to exist as a standalone account. This account requires you to first complete
- // phone verification. Follow the steps at Removing a member account from
- // your organization (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#orgs_manage_accounts_remove-from-master)
- // in the AWS Organizations User Guide.
- //
- // * ACCOUNT_CREATION_RATE_LIMIT_EXCEEDED: You attempted to exceed the number
- // of accounts that you can create in one day.
- //
- // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
- // the number of accounts in an organization. If you need more accounts,
- // contact AWS Support (https://console.aws.amazon.com/support/home#/) to
- // request an increase in your limit. Or the number of invitations that you
- // tried to send would cause you to exceed the limit of accounts in your
- // organization. Send fewer invitations or contact AWS Support to request
- // an increase in the number of accounts. Deleted and closed accounts still
- // count toward your limit. If you get this exception when running a command
- // immediately after creating the organization, wait one hour and try again.
- // After an hour, if the command continues to fail with this error, contact
- // AWS Support (https://console.aws.amazon.com/support/home#/).
- //
- // * CANNOT_REGISTER_MASTER_AS_DELEGATED_ADMINISTRATOR: You attempted to
- // register the management account of the organization as a delegated administrator
- // for an AWS service integrated with Organizations. You can designate only
- // a member account as a delegated administrator.
- //
- // * CANNOT_REMOVE_DELEGATED_ADMINISTRATOR_FROM_ORG: You attempted to remove
- // an account that is registered as a delegated administrator for a service
- // integrated with your organization. To complete this operation, you must
- // first deregister this account as a delegated administrator.
- //
- // * CREATE_ORGANIZATION_IN_BILLING_MODE_UNSUPPORTED_REGION: To create an
- // organization in the specified region, you must enable all features mode.
- //
- // * DELEGATED_ADMINISTRATOR_EXISTS_FOR_THIS_SERVICE: You attempted to register
- // an AWS account as a delegated administrator for an AWS service that already
- // has a delegated administrator. To complete this operation, you must first
- // deregister any existing delegated administrators for this service.
- //
- // * EMAIL_VERIFICATION_CODE_EXPIRED: The email verification code is only
- // valid for a limited period of time. You must resubmit the request and
- // generate a new verfication code.
- //
- // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
- // handshakes that you can send in one day.
- //
- // * MASTER_ACCOUNT_ADDRESS_DOES_NOT_MATCH_MARKETPLACE: To create an account
- // in this organization, you first must migrate the organization's management
- // account to the marketplace that corresponds to the management account's
- // address. For example, accounts with India addresses must be associated
- // with the AISPL marketplace. All accounts in an organization must be associated
- // with the same marketplace.
- //
- // * MASTER_ACCOUNT_MISSING_BUSINESS_LICENSE: Applies only to the AWS Regions
- // in China. To create an organization, the master must have a valid business
- // license. For more information, contact customer support.
- //
- // * MASTER_ACCOUNT_MISSING_CONTACT_INFO: To complete this operation, you
- // must first provide a valid contact address and phone number for the management
- // account. Then try the operation again.
- //
- // * MASTER_ACCOUNT_NOT_GOVCLOUD_ENABLED: To complete this operation, the
- // management account must have an associated account in the AWS GovCloud
- // (US-West) Region. For more information, see AWS Organizations (http://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-organizations.html)
- // in the AWS GovCloud User Guide.
- //
- // * MASTER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To create an organization
- // with this management account, you first must associate a valid payment
- // instrument, such as a credit card, with the account. Follow the steps
- // at To leave an organization when all required account information has
- // not yet been provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
- // in the AWS Organizations User Guide.
- //
- // * MAX_DELEGATED_ADMINISTRATORS_FOR_SERVICE_LIMIT_EXCEEDED: You attempted
- // to register more delegated administrators than allowed for the service
- // principal.
- //
- // * MAX_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to exceed the
- // number of policies of a certain type that can be attached to an entity
- // at one time.
- //
- // * MAX_TAG_LIMIT_EXCEEDED: You have exceeded the number of tags allowed
- // on this resource.
- //
- // * MEMBER_ACCOUNT_PAYMENT_INSTRUMENT_REQUIRED: To complete this operation
- // with this member account, you first must associate a valid payment instrument,
- // such as a credit card, with the account. Follow the steps at To leave
- // an organization when all required account information has not yet been
- // provided (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts_remove.html#leave-without-all-info)
- // in the AWS Organizations User Guide.
- //
- // * MIN_POLICY_TYPE_ATTACHMENT_LIMIT_EXCEEDED: You attempted to detach a
- // policy from an entity that would cause the entity to have fewer than the
- // minimum number of policies of a certain type required.
- //
- // * ORGANIZATION_NOT_IN_ALL_FEATURES_MODE: You attempted to perform an operation
- // that requires the organization to be configured to support all features.
- // An organization that supports only consolidated billing features can't
- // perform this operation.
- //
- // * OU_DEPTH_LIMIT_EXCEEDED: You attempted to create an OU tree that is
- // too many levels deep.
- //
- // * OU_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of OUs
- // that you can have in an organization.
- //
- // * POLICY_CONTENT_LIMIT_EXCEEDED: You attempted to create a policy that
- // is larger than the maximum size.
- //
- // * POLICY_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the number of
- // policies that you can have in an organization.
- //
- // * TAG_POLICY_VIOLATION: You attempted to create or update a resource with
- // tags that are not compliant with the tag policy requirements for this
- // account.
- ErrCodeConstraintViolationException = "ConstraintViolationException"
-
- // ErrCodeCreateAccountStatusNotFoundException for service response error code
- // "CreateAccountStatusNotFoundException".
- //
- // We can't find an create account request with the CreateAccountRequestId that
- // you specified.
- ErrCodeCreateAccountStatusNotFoundException = "CreateAccountStatusNotFoundException"
-
- // ErrCodeDestinationParentNotFoundException for service response error code
- // "DestinationParentNotFoundException".
- //
- // We can't find the destination container (a root or OU) with the ParentId
- // that you specified.
- ErrCodeDestinationParentNotFoundException = "DestinationParentNotFoundException"
-
- // ErrCodeDuplicateAccountException for service response error code
- // "DuplicateAccountException".
- //
- // That account is already present in the specified destination.
- ErrCodeDuplicateAccountException = "DuplicateAccountException"
-
- // ErrCodeDuplicateHandshakeException for service response error code
- // "DuplicateHandshakeException".
- //
- // A handshake with the same action and target already exists. For example,
- // if you invited an account to join your organization, the invited account
- // might already have a pending invitation from this organization. If you intend
- // to resend an invitation to an account, ensure that existing handshakes that
- // might be considered duplicates are canceled or declined.
- ErrCodeDuplicateHandshakeException = "DuplicateHandshakeException"
-
- // ErrCodeDuplicateOrganizationalUnitException for service response error code
- // "DuplicateOrganizationalUnitException".
- //
- // An OU with the same name already exists.
- ErrCodeDuplicateOrganizationalUnitException = "DuplicateOrganizationalUnitException"
-
- // ErrCodeDuplicatePolicyAttachmentException for service response error code
- // "DuplicatePolicyAttachmentException".
- //
- // The selected policy is already attached to the specified target.
- ErrCodeDuplicatePolicyAttachmentException = "DuplicatePolicyAttachmentException"
-
- // ErrCodeDuplicatePolicyException for service response error code
- // "DuplicatePolicyException".
- //
- // A policy with the same name already exists.
- ErrCodeDuplicatePolicyException = "DuplicatePolicyException"
-
- // ErrCodeEffectivePolicyNotFoundException for service response error code
- // "EffectivePolicyNotFoundException".
- //
- // If you ran this action on the management account, this policy type is not
- // enabled. If you ran the action on a member account, the account doesn't have
- // an effective policy of this type. Contact the administrator of your organization
- // about attaching a policy of this type to the account.
- ErrCodeEffectivePolicyNotFoundException = "EffectivePolicyNotFoundException"
-
- // ErrCodeFinalizingOrganizationException for service response error code
- // "FinalizingOrganizationException".
- //
- // AWS Organizations couldn't perform the operation because your organization
- // hasn't finished initializing. This can take up to an hour. Try again later.
- // If after one hour you continue to receive this error, contact AWS Support
- // (https://console.aws.amazon.com/support/home#/).
- ErrCodeFinalizingOrganizationException = "FinalizingOrganizationException"
-
- // ErrCodeHandshakeAlreadyInStateException for service response error code
- // "HandshakeAlreadyInStateException".
- //
- // The specified handshake is already in the requested state. For example, you
- // can't accept a handshake that was already accepted.
- ErrCodeHandshakeAlreadyInStateException = "HandshakeAlreadyInStateException"
-
- // ErrCodeHandshakeConstraintViolationException for service response error code
- // "HandshakeConstraintViolationException".
- //
- // The requested operation would violate the constraint identified in the reason
- // code.
- //
- // Some of the reasons in the following list might not be applicable to this
- // specific API or operation:
- //
- // * ACCOUNT_NUMBER_LIMIT_EXCEEDED: You attempted to exceed the limit on
- // the number of accounts in an organization. Note that deleted and closed
- // accounts still count toward your limit. If you get this exception immediately
- // after creating the organization, wait one hour and try again. If after
- // an hour it continues to fail with this error, contact AWS Support (https://console.aws.amazon.com/support/home#/).
- //
- // * ALREADY_IN_AN_ORGANIZATION: The handshake request is invalid because
- // the invited account is already a member of an organization.
- //
- // * HANDSHAKE_RATE_LIMIT_EXCEEDED: You attempted to exceed the number of
- // handshakes that you can send in one day.
- //
- // * INVITE_DISABLED_DURING_ENABLE_ALL_FEATURES: You can't issue new invitations
- // to join an organization while it's in the process of enabling all features.
- // You can resume inviting accounts after you finalize the process when all
- // accounts have agreed to the change.
- //
- // * ORGANIZATION_ALREADY_HAS_ALL_FEATURES: The handshake request is invalid
- // because the organization has already enabled all features.
- //
- // * ORGANIZATION_IS_ALREADY_PENDING_ALL_FEATURES_MIGRATION: The handshake
- // request is invalid because the organization has already started the process
- // to enable all features.
- //
- // * ORGANIZATION_FROM_DIFFERENT_SELLER_OF_RECORD: The request failed because
- // the account is from a different marketplace than the accounts in the organization.
- // For example, accounts with India addresses must be associated with the
- // AISPL marketplace. All accounts in an organization must be from the same
- // marketplace.
- //
- // * ORGANIZATION_MEMBERSHIP_CHANGE_RATE_LIMIT_EXCEEDED: You attempted to
- // change the membership of an account too quickly after its previous change.
- //
- // * PAYMENT_INSTRUMENT_REQUIRED: You can't complete the operation with an
- // account that doesn't have a payment instrument, such as a credit card,
- // associated with it.
- ErrCodeHandshakeConstraintViolationException = "HandshakeConstraintViolationException"
-
- // ErrCodeHandshakeNotFoundException for service response error code
- // "HandshakeNotFoundException".
- //
- // We can't find a handshake with the HandshakeId that you specified.
- ErrCodeHandshakeNotFoundException = "HandshakeNotFoundException"
-
- // ErrCodeInvalidHandshakeTransitionException for service response error code
- // "InvalidHandshakeTransitionException".
- //
- // You can't perform the operation on the handshake in its current state. For
- // example, you can't cancel a handshake that was already accepted or accept
- // a handshake that was already declined.
- ErrCodeInvalidHandshakeTransitionException = "InvalidHandshakeTransitionException"
-
- // ErrCodeInvalidInputException for service response error code
- // "InvalidInputException".
- //
- // The requested operation failed because you provided invalid values for one
- // or more of the request parameters. This exception includes a reason that
- // contains additional information about the violated limit:
- //
- // Some of the reasons in the following list might not be applicable to this
- // specific API or operation.
- //
- // * DUPLICATE_TAG_KEY: Tag keys must be unique among the tags attached to
- // the same entity.
- //
- // * IMMUTABLE_POLICY: You specified a policy that is managed by AWS and
- // can't be modified.
- //
- // * INPUT_REQUIRED: You must include a value for all required parameters.
- //
- // * INVALID_EMAIL_ADDRESS_TARGET: You specified an invalid email address
- // for the invited account owner.
- //
- // * INVALID_ENUM: You specified an invalid value.
- //
- // * INVALID_ENUM_POLICY_TYPE: You specified an invalid policy type string.
- //
- // * INVALID_FULL_NAME_TARGET: You specified a full name that contains invalid
- // characters.
- //
- // * INVALID_LIST_MEMBER: You provided a list to a parameter that contains
- // at least one invalid value.
- //
- // * INVALID_PAGINATION_TOKEN: Get the value for the NextToken parameter
- // from the response to a previous call of the operation.
- //
- // * INVALID_PARTY_TYPE_TARGET: You specified the wrong type of entity (account,
- // organization, or email) as a party.
- //
- // * INVALID_PATTERN: You provided a value that doesn't match the required
- // pattern.
- //
- // * INVALID_PATTERN_TARGET_ID: You specified a policy target ID that doesn't
- // match the required pattern.
- //
- // * INVALID_ROLE_NAME: You provided a role name that isn't valid. A role
- // name can't begin with the reserved prefix AWSServiceRoleFor.
- //
- // * INVALID_SYNTAX_ORGANIZATION_ARN: You specified an invalid Amazon Resource
- // Name (ARN) for the organization.
- //
- // * INVALID_SYNTAX_POLICY_ID: You specified an invalid policy ID.
- //
- // * INVALID_SYSTEM_TAGS_PARAMETER: You specified a tag key that is a system
- // tag. You can’t add, edit, or delete system tag keys because they're
- // reserved for AWS use. System tags don’t count against your tags per
- // resource limit.
- //
- // * MAX_FILTER_LIMIT_EXCEEDED: You can specify only one filter parameter
- // for the operation.
- //
- // * MAX_LENGTH_EXCEEDED: You provided a string parameter that is longer
- // than allowed.
- //
- // * MAX_VALUE_EXCEEDED: You provided a numeric parameter that has a larger
- // value than allowed.
- //
- // * MIN_LENGTH_EXCEEDED: You provided a string parameter that is shorter
- // than allowed.
- //
- // * MIN_VALUE_EXCEEDED: You provided a numeric parameter that has a smaller
- // value than allowed.
- //
- // * MOVING_ACCOUNT_BETWEEN_DIFFERENT_ROOTS: You can move an account only
- // between entities in the same root.
- //
- // * TARGET_NOT_SUPPORTED: You can't perform the specified operation on that
- // target entity.
- //
- // * UNRECOGNIZED_SERVICE_PRINCIPAL: You specified a service principal that
- // isn't recognized.
- ErrCodeInvalidInputException = "InvalidInputException"
-
- // ErrCodeMalformedPolicyDocumentException for service response error code
- // "MalformedPolicyDocumentException".
- //
- // The provided policy document doesn't meet the requirements of the specified
- // policy type. For example, the syntax might be incorrect. For details about
- // service control policy syntax, see Service Control Policy Syntax (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_scp-syntax.html)
- // in the AWS Organizations User Guide.
- ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException"
-
- // ErrCodeMasterCannotLeaveOrganizationException for service response error code
- // "MasterCannotLeaveOrganizationException".
- //
- // You can't remove a management account from an organization. If you want the
- // management account to become a member account in another organization, you
- // must first delete the current organization of the management account.
- ErrCodeMasterCannotLeaveOrganizationException = "MasterCannotLeaveOrganizationException"
-
- // ErrCodeOrganizationNotEmptyException for service response error code
- // "OrganizationNotEmptyException".
- //
- // The organization isn't empty. To delete an organization, you must first remove
- // all accounts except the management account, delete all OUs, and delete all
- // policies.
- ErrCodeOrganizationNotEmptyException = "OrganizationNotEmptyException"
-
- // ErrCodeOrganizationalUnitNotEmptyException for service response error code
- // "OrganizationalUnitNotEmptyException".
- //
- // The specified OU is not empty. Move all accounts to another root or to other
- // OUs, remove all child OUs, and try the operation again.
- ErrCodeOrganizationalUnitNotEmptyException = "OrganizationalUnitNotEmptyException"
-
- // ErrCodeOrganizationalUnitNotFoundException for service response error code
- // "OrganizationalUnitNotFoundException".
- //
- // We can't find an OU with the OrganizationalUnitId that you specified.
- ErrCodeOrganizationalUnitNotFoundException = "OrganizationalUnitNotFoundException"
-
- // ErrCodeParentNotFoundException for service response error code
- // "ParentNotFoundException".
- //
- // We can't find a root or OU with the ParentId that you specified.
- ErrCodeParentNotFoundException = "ParentNotFoundException"
-
- // ErrCodePolicyChangesInProgressException for service response error code
- // "PolicyChangesInProgressException".
- //
- // Changes to the effective policy are in progress, and its contents can't be
- // returned. Try the operation again later.
- ErrCodePolicyChangesInProgressException = "PolicyChangesInProgressException"
-
- // ErrCodePolicyInUseException for service response error code
- // "PolicyInUseException".
- //
- // The policy is attached to one or more entities. You must detach it from all
- // roots, OUs, and accounts before performing this operation.
- ErrCodePolicyInUseException = "PolicyInUseException"
-
- // ErrCodePolicyNotAttachedException for service response error code
- // "PolicyNotAttachedException".
- //
- // The policy isn't attached to the specified target in the specified root.
- ErrCodePolicyNotAttachedException = "PolicyNotAttachedException"
-
- // ErrCodePolicyNotFoundException for service response error code
- // "PolicyNotFoundException".
- //
- // We can't find a policy with the PolicyId that you specified.
- ErrCodePolicyNotFoundException = "PolicyNotFoundException"
-
- // ErrCodePolicyTypeAlreadyEnabledException for service response error code
- // "PolicyTypeAlreadyEnabledException".
- //
- // The specified policy type is already enabled in the specified root.
- ErrCodePolicyTypeAlreadyEnabledException = "PolicyTypeAlreadyEnabledException"
-
- // ErrCodePolicyTypeNotAvailableForOrganizationException for service response error code
- // "PolicyTypeNotAvailableForOrganizationException".
- //
- // You can't use the specified policy type with the feature set currently enabled
- // for this organization. For example, you can enable SCPs only after you enable
- // all features in the organization. For more information, see Managing AWS
- // Organizations Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies.html#enable_policies_on_root)in
- // the AWS Organizations User Guide.
- ErrCodePolicyTypeNotAvailableForOrganizationException = "PolicyTypeNotAvailableForOrganizationException"
-
- // ErrCodePolicyTypeNotEnabledException for service response error code
- // "PolicyTypeNotEnabledException".
- //
- // The specified policy type isn't currently enabled in this root. You can't
- // attach policies of the specified type to entities in a root until you enable
- // that type in the root. For more information, see Enabling All Features in
- // Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html)
- // in the AWS Organizations User Guide.
- ErrCodePolicyTypeNotEnabledException = "PolicyTypeNotEnabledException"
-
- // ErrCodeRootNotFoundException for service response error code
- // "RootNotFoundException".
- //
- // We can't find a root with the RootId that you specified.
- ErrCodeRootNotFoundException = "RootNotFoundException"
-
- // ErrCodeServiceException for service response error code
- // "ServiceException".
- //
- // AWS Organizations can't complete your request because of an internal service
- // error. Try again later.
- ErrCodeServiceException = "ServiceException"
-
- // ErrCodeSourceParentNotFoundException for service response error code
- // "SourceParentNotFoundException".
- //
- // We can't find a source root or OU with the ParentId that you specified.
- ErrCodeSourceParentNotFoundException = "SourceParentNotFoundException"
-
- // ErrCodeTargetNotFoundException for service response error code
- // "TargetNotFoundException".
- //
- // We can't find a root, OU, account, or policy with the TargetId that you specified.
- ErrCodeTargetNotFoundException = "TargetNotFoundException"
-
- // ErrCodeTooManyRequestsException for service response error code
- // "TooManyRequestsException".
- //
- // You have sent too many requests in too short a period of time. The quota
- // helps protect against denial-of-service attacks. Try again later.
- //
- // For information about quotas that affect AWS Organizations, see Quotas for
- // AWS Organizations (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_reference_limits.html)in
- // the AWS Organizations User Guide.
- ErrCodeTooManyRequestsException = "TooManyRequestsException"
-
- // ErrCodeUnsupportedAPIEndpointException for service response error code
- // "UnsupportedAPIEndpointException".
- //
- // This action isn't available in the current AWS Region.
- ErrCodeUnsupportedAPIEndpointException = "UnsupportedAPIEndpointException"
-)
-
-var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
- "AWSOrganizationsNotInUseException": newErrorAWSOrganizationsNotInUseException,
- "AccessDeniedException": newErrorAccessDeniedException,
- "AccessDeniedForDependencyException": newErrorAccessDeniedForDependencyException,
- "AccountAlreadyRegisteredException": newErrorAccountAlreadyRegisteredException,
- "AccountNotFoundException": newErrorAccountNotFoundException,
- "AccountNotRegisteredException": newErrorAccountNotRegisteredException,
- "AccountOwnerNotVerifiedException": newErrorAccountOwnerNotVerifiedException,
- "AlreadyInOrganizationException": newErrorAlreadyInOrganizationException,
- "ChildNotFoundException": newErrorChildNotFoundException,
- "ConcurrentModificationException": newErrorConcurrentModificationException,
- "ConstraintViolationException": newErrorConstraintViolationException,
- "CreateAccountStatusNotFoundException": newErrorCreateAccountStatusNotFoundException,
- "DestinationParentNotFoundException": newErrorDestinationParentNotFoundException,
- "DuplicateAccountException": newErrorDuplicateAccountException,
- "DuplicateHandshakeException": newErrorDuplicateHandshakeException,
- "DuplicateOrganizationalUnitException": newErrorDuplicateOrganizationalUnitException,
- "DuplicatePolicyAttachmentException": newErrorDuplicatePolicyAttachmentException,
- "DuplicatePolicyException": newErrorDuplicatePolicyException,
- "EffectivePolicyNotFoundException": newErrorEffectivePolicyNotFoundException,
- "FinalizingOrganizationException": newErrorFinalizingOrganizationException,
- "HandshakeAlreadyInStateException": newErrorHandshakeAlreadyInStateException,
- "HandshakeConstraintViolationException": newErrorHandshakeConstraintViolationException,
- "HandshakeNotFoundException": newErrorHandshakeNotFoundException,
- "InvalidHandshakeTransitionException": newErrorInvalidHandshakeTransitionException,
- "InvalidInputException": newErrorInvalidInputException,
- "MalformedPolicyDocumentException": newErrorMalformedPolicyDocumentException,
- "MasterCannotLeaveOrganizationException": newErrorMasterCannotLeaveOrganizationException,
- "OrganizationNotEmptyException": newErrorOrganizationNotEmptyException,
- "OrganizationalUnitNotEmptyException": newErrorOrganizationalUnitNotEmptyException,
- "OrganizationalUnitNotFoundException": newErrorOrganizationalUnitNotFoundException,
- "ParentNotFoundException": newErrorParentNotFoundException,
- "PolicyChangesInProgressException": newErrorPolicyChangesInProgressException,
- "PolicyInUseException": newErrorPolicyInUseException,
- "PolicyNotAttachedException": newErrorPolicyNotAttachedException,
- "PolicyNotFoundException": newErrorPolicyNotFoundException,
- "PolicyTypeAlreadyEnabledException": newErrorPolicyTypeAlreadyEnabledException,
- "PolicyTypeNotAvailableForOrganizationException": newErrorPolicyTypeNotAvailableForOrganizationException,
- "PolicyTypeNotEnabledException": newErrorPolicyTypeNotEnabledException,
- "RootNotFoundException": newErrorRootNotFoundException,
- "ServiceException": newErrorServiceException,
- "SourceParentNotFoundException": newErrorSourceParentNotFoundException,
- "TargetNotFoundException": newErrorTargetNotFoundException,
- "TooManyRequestsException": newErrorTooManyRequestsException,
- "UnsupportedAPIEndpointException": newErrorUnsupportedAPIEndpointException,
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go b/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go
deleted file mode 100644
index 7a87e3ba3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/organizations/service.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package organizations
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-// Organizations provides the API operation methods for making requests to
-// AWS Organizations. See this package's package overview docs
-// for details on the service.
-//
-// Organizations methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type Organizations struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "organizations" // Name of service.
- EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "Organizations" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the Organizations client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// mySession := session.Must(session.NewSession())
-//
-// // Create a Organizations client from just a session.
-// svc := organizations.New(mySession)
-//
-// // Create a Organizations client with additional configuration
-// svc := organizations.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *Organizations {
- c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *Organizations {
- svc := &Organizations{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2016-11-28",
- JSONVersion: "1.1",
- TargetPrefix: "AWSOrganizationsV20161128",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(
- protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
- )
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a Organizations operation and runs any
-// custom request initialization.
-func (c *Organizations) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/api.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/api.go
deleted file mode 100644
index 383868d73..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/api.go
+++ /dev/null
@@ -1,2777 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package resourcegroupstaggingapi
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-const opDescribeReportCreation = "DescribeReportCreation"
-
-// DescribeReportCreationRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeReportCreation operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeReportCreation for more information on using the DescribeReportCreation
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeReportCreationRequest method.
-// req, resp := client.DescribeReportCreationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/DescribeReportCreation
-func (c *ResourceGroupsTaggingAPI) DescribeReportCreationRequest(input *DescribeReportCreationInput) (req *request.Request, output *DescribeReportCreationOutput) {
- op := &request.Operation{
- Name: opDescribeReportCreation,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeReportCreationInput{}
- }
-
- output = &DescribeReportCreationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeReportCreation API operation for AWS Resource Groups Tagging API.
-//
-// Describes the status of the StartReportCreation operation.
-//
-// You can call this operation only from the organization's management account
-// and from the us-east-1 Region.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Resource Groups Tagging API's
-// API operation DescribeReportCreation for usage and error information.
-//
-// Returned Error Types:
-// * ConstraintViolationException
-// The request was denied because performing this operation violates a constraint.
-//
-// Some of the reasons in the following list might not apply to this specific
-// operation.
-//
-// * You must meet the prerequisites for using tag policies. For information,
-// see Prerequisites and Permissions for Using Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html)
-// in the AWS Organizations User Guide.
-//
-// * You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com)
-// to integrate with AWS Organizations For information, see EnableAWSServiceAccess
-// (http://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html).
-//
-// * You must have a tag policy attached to the organization root, an OU,
-// or an account.
-//
-// * InternalServiceException
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-//
-// * InvalidParameterException
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-//
-// * ThrottledException
-// The request was denied to limit the frequency of submitted requests.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/DescribeReportCreation
-func (c *ResourceGroupsTaggingAPI) DescribeReportCreation(input *DescribeReportCreationInput) (*DescribeReportCreationOutput, error) {
- req, out := c.DescribeReportCreationRequest(input)
- return out, req.Send()
-}
-
-// DescribeReportCreationWithContext is the same as DescribeReportCreation with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeReportCreation for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) DescribeReportCreationWithContext(ctx aws.Context, input *DescribeReportCreationInput, opts ...request.Option) (*DescribeReportCreationOutput, error) {
- req, out := c.DescribeReportCreationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetComplianceSummary = "GetComplianceSummary"
-
-// GetComplianceSummaryRequest generates a "aws/request.Request" representing the
-// client's request for the GetComplianceSummary operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetComplianceSummary for more information on using the GetComplianceSummary
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetComplianceSummaryRequest method.
-// req, resp := client.GetComplianceSummaryRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetComplianceSummary
-func (c *ResourceGroupsTaggingAPI) GetComplianceSummaryRequest(input *GetComplianceSummaryInput) (req *request.Request, output *GetComplianceSummaryOutput) {
- op := &request.Operation{
- Name: opGetComplianceSummary,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"PaginationToken"},
- OutputTokens: []string{"PaginationToken"},
- LimitToken: "MaxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &GetComplianceSummaryInput{}
- }
-
- output = &GetComplianceSummaryOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetComplianceSummary API operation for AWS Resource Groups Tagging API.
-//
-// Returns a table that shows counts of resources that are noncompliant with
-// their tag policies.
-//
-// For more information on tag policies, see Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
-// in the AWS Organizations User Guide.
-//
-// You can call this operation only from the organization's management account
-// and from the us-east-1 Region.
-//
-// This operation supports pagination, where the response can be sent in multiple
-// pages. You should check the PaginationToken response parameter to determine
-// if there are additional results available to return. Repeat the query, passing
-// the PaginationToken response parameter value as an input to the next request
-// until you recieve a null value. A null value for PaginationToken indicates
-// that there are no more results waiting to be returned.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Resource Groups Tagging API's
-// API operation GetComplianceSummary for usage and error information.
-//
-// Returned Error Types:
-// * ConstraintViolationException
-// The request was denied because performing this operation violates a constraint.
-//
-// Some of the reasons in the following list might not apply to this specific
-// operation.
-//
-// * You must meet the prerequisites for using tag policies. For information,
-// see Prerequisites and Permissions for Using Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html)
-// in the AWS Organizations User Guide.
-//
-// * You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com)
-// to integrate with AWS Organizations For information, see EnableAWSServiceAccess
-// (http://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html).
-//
-// * You must have a tag policy attached to the organization root, an OU,
-// or an account.
-//
-// * InternalServiceException
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-//
-// * InvalidParameterException
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-//
-// * ThrottledException
-// The request was denied to limit the frequency of submitted requests.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetComplianceSummary
-func (c *ResourceGroupsTaggingAPI) GetComplianceSummary(input *GetComplianceSummaryInput) (*GetComplianceSummaryOutput, error) {
- req, out := c.GetComplianceSummaryRequest(input)
- return out, req.Send()
-}
-
-// GetComplianceSummaryWithContext is the same as GetComplianceSummary with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetComplianceSummary for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) GetComplianceSummaryWithContext(ctx aws.Context, input *GetComplianceSummaryInput, opts ...request.Option) (*GetComplianceSummaryOutput, error) {
- req, out := c.GetComplianceSummaryRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// GetComplianceSummaryPages iterates over the pages of a GetComplianceSummary operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See GetComplianceSummary method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a GetComplianceSummary operation.
-// pageNum := 0
-// err := client.GetComplianceSummaryPages(params,
-// func(page *resourcegroupstaggingapi.GetComplianceSummaryOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *ResourceGroupsTaggingAPI) GetComplianceSummaryPages(input *GetComplianceSummaryInput, fn func(*GetComplianceSummaryOutput, bool) bool) error {
- return c.GetComplianceSummaryPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// GetComplianceSummaryPagesWithContext same as GetComplianceSummaryPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) GetComplianceSummaryPagesWithContext(ctx aws.Context, input *GetComplianceSummaryInput, fn func(*GetComplianceSummaryOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *GetComplianceSummaryInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.GetComplianceSummaryRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*GetComplianceSummaryOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opGetResources = "GetResources"
-
-// GetResourcesRequest generates a "aws/request.Request" representing the
-// client's request for the GetResources operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetResources for more information on using the GetResources
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetResourcesRequest method.
-// req, resp := client.GetResourcesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetResources
-func (c *ResourceGroupsTaggingAPI) GetResourcesRequest(input *GetResourcesInput) (req *request.Request, output *GetResourcesOutput) {
- op := &request.Operation{
- Name: opGetResources,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"PaginationToken"},
- OutputTokens: []string{"PaginationToken"},
- LimitToken: "ResourcesPerPage",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &GetResourcesInput{}
- }
-
- output = &GetResourcesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetResources API operation for AWS Resource Groups Tagging API.
-//
-// Returns all the tagged or previously tagged resources that are located in
-// the specified Region for the AWS account.
-//
-// Depending on what information you want returned, you can also specify the
-// following:
-//
-// * Filters that specify what tags and resource types you want returned.
-// The response includes all tags that are associated with the requested
-// resources.
-//
-// * Information about compliance with the account's effective tag policy.
-// For more information on tag policies, see Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html)
-// in the AWS Organizations User Guide.
-//
-// This operation supports pagination, where the response can be sent in multiple
-// pages. You should check the PaginationToken response parameter to determine
-// if there are additional results available to return. Repeat the query, passing
-// the PaginationToken response parameter value as an input to the next request
-// until you recieve a null value. A null value for PaginationToken indicates
-// that there are no more results waiting to be returned.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Resource Groups Tagging API's
-// API operation GetResources for usage and error information.
-//
-// Returned Error Types:
-// * InvalidParameterException
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-//
-// * ThrottledException
-// The request was denied to limit the frequency of submitted requests.
-//
-// * InternalServiceException
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-//
-// * PaginationTokenExpiredException
-// A PaginationToken is valid for a maximum of 15 minutes. Your request was
-// denied because the specified PaginationToken has expired.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetResources
-func (c *ResourceGroupsTaggingAPI) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error) {
- req, out := c.GetResourcesRequest(input)
- return out, req.Send()
-}
-
-// GetResourcesWithContext is the same as GetResources with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetResources for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) GetResourcesWithContext(ctx aws.Context, input *GetResourcesInput, opts ...request.Option) (*GetResourcesOutput, error) {
- req, out := c.GetResourcesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// GetResourcesPages iterates over the pages of a GetResources operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See GetResources method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a GetResources operation.
-// pageNum := 0
-// err := client.GetResourcesPages(params,
-// func(page *resourcegroupstaggingapi.GetResourcesOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *ResourceGroupsTaggingAPI) GetResourcesPages(input *GetResourcesInput, fn func(*GetResourcesOutput, bool) bool) error {
- return c.GetResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// GetResourcesPagesWithContext same as GetResourcesPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) GetResourcesPagesWithContext(ctx aws.Context, input *GetResourcesInput, fn func(*GetResourcesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *GetResourcesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.GetResourcesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*GetResourcesOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opGetTagKeys = "GetTagKeys"
-
-// GetTagKeysRequest generates a "aws/request.Request" representing the
-// client's request for the GetTagKeys operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetTagKeys for more information on using the GetTagKeys
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetTagKeysRequest method.
-// req, resp := client.GetTagKeysRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagKeys
-func (c *ResourceGroupsTaggingAPI) GetTagKeysRequest(input *GetTagKeysInput) (req *request.Request, output *GetTagKeysOutput) {
- op := &request.Operation{
- Name: opGetTagKeys,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"PaginationToken"},
- OutputTokens: []string{"PaginationToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &GetTagKeysInput{}
- }
-
- output = &GetTagKeysOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetTagKeys API operation for AWS Resource Groups Tagging API.
-//
-// Returns all tag keys currently in use in the specified Region for the calling
-// AWS account.
-//
-// This operation supports pagination, where the response can be sent in multiple
-// pages. You should check the PaginationToken response parameter to determine
-// if there are additional results available to return. Repeat the query, passing
-// the PaginationToken response parameter value as an input to the next request
-// until you recieve a null value. A null value for PaginationToken indicates
-// that there are no more results waiting to be returned.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Resource Groups Tagging API's
-// API operation GetTagKeys for usage and error information.
-//
-// Returned Error Types:
-// * InvalidParameterException
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-//
-// * ThrottledException
-// The request was denied to limit the frequency of submitted requests.
-//
-// * InternalServiceException
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-//
-// * PaginationTokenExpiredException
-// A PaginationToken is valid for a maximum of 15 minutes. Your request was
-// denied because the specified PaginationToken has expired.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagKeys
-func (c *ResourceGroupsTaggingAPI) GetTagKeys(input *GetTagKeysInput) (*GetTagKeysOutput, error) {
- req, out := c.GetTagKeysRequest(input)
- return out, req.Send()
-}
-
-// GetTagKeysWithContext is the same as GetTagKeys with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetTagKeys for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) GetTagKeysWithContext(ctx aws.Context, input *GetTagKeysInput, opts ...request.Option) (*GetTagKeysOutput, error) {
- req, out := c.GetTagKeysRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// GetTagKeysPages iterates over the pages of a GetTagKeys operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See GetTagKeys method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a GetTagKeys operation.
-// pageNum := 0
-// err := client.GetTagKeysPages(params,
-// func(page *resourcegroupstaggingapi.GetTagKeysOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *ResourceGroupsTaggingAPI) GetTagKeysPages(input *GetTagKeysInput, fn func(*GetTagKeysOutput, bool) bool) error {
- return c.GetTagKeysPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// GetTagKeysPagesWithContext same as GetTagKeysPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) GetTagKeysPagesWithContext(ctx aws.Context, input *GetTagKeysInput, fn func(*GetTagKeysOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *GetTagKeysInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.GetTagKeysRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*GetTagKeysOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opGetTagValues = "GetTagValues"
-
-// GetTagValuesRequest generates a "aws/request.Request" representing the
-// client's request for the GetTagValues operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetTagValues for more information on using the GetTagValues
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetTagValuesRequest method.
-// req, resp := client.GetTagValuesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagValues
-func (c *ResourceGroupsTaggingAPI) GetTagValuesRequest(input *GetTagValuesInput) (req *request.Request, output *GetTagValuesOutput) {
- op := &request.Operation{
- Name: opGetTagValues,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"PaginationToken"},
- OutputTokens: []string{"PaginationToken"},
- LimitToken: "",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &GetTagValuesInput{}
- }
-
- output = &GetTagValuesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetTagValues API operation for AWS Resource Groups Tagging API.
-//
-// Returns all tag values for the specified key that are used in the specified
-// AWS Region for the calling AWS account.
-//
-// This operation supports pagination, where the response can be sent in multiple
-// pages. You should check the PaginationToken response parameter to determine
-// if there are additional results available to return. Repeat the query, passing
-// the PaginationToken response parameter value as an input to the next request
-// until you recieve a null value. A null value for PaginationToken indicates
-// that there are no more results waiting to be returned.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Resource Groups Tagging API's
-// API operation GetTagValues for usage and error information.
-//
-// Returned Error Types:
-// * InvalidParameterException
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-//
-// * ThrottledException
-// The request was denied to limit the frequency of submitted requests.
-//
-// * InternalServiceException
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-//
-// * PaginationTokenExpiredException
-// A PaginationToken is valid for a maximum of 15 minutes. Your request was
-// denied because the specified PaginationToken has expired.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagValues
-func (c *ResourceGroupsTaggingAPI) GetTagValues(input *GetTagValuesInput) (*GetTagValuesOutput, error) {
- req, out := c.GetTagValuesRequest(input)
- return out, req.Send()
-}
-
-// GetTagValuesWithContext is the same as GetTagValues with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetTagValues for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) GetTagValuesWithContext(ctx aws.Context, input *GetTagValuesInput, opts ...request.Option) (*GetTagValuesOutput, error) {
- req, out := c.GetTagValuesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// GetTagValuesPages iterates over the pages of a GetTagValues operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See GetTagValues method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a GetTagValues operation.
-// pageNum := 0
-// err := client.GetTagValuesPages(params,
-// func(page *resourcegroupstaggingapi.GetTagValuesOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *ResourceGroupsTaggingAPI) GetTagValuesPages(input *GetTagValuesInput, fn func(*GetTagValuesOutput, bool) bool) error {
- return c.GetTagValuesPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// GetTagValuesPagesWithContext same as GetTagValuesPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) GetTagValuesPagesWithContext(ctx aws.Context, input *GetTagValuesInput, fn func(*GetTagValuesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *GetTagValuesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.GetTagValuesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*GetTagValuesOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opStartReportCreation = "StartReportCreation"
-
-// StartReportCreationRequest generates a "aws/request.Request" representing the
-// client's request for the StartReportCreation operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See StartReportCreation for more information on using the StartReportCreation
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the StartReportCreationRequest method.
-// req, resp := client.StartReportCreationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/StartReportCreation
-func (c *ResourceGroupsTaggingAPI) StartReportCreationRequest(input *StartReportCreationInput) (req *request.Request, output *StartReportCreationOutput) {
- op := &request.Operation{
- Name: opStartReportCreation,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &StartReportCreationInput{}
- }
-
- output = &StartReportCreationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// StartReportCreation API operation for AWS Resource Groups Tagging API.
-//
-// Generates a report that lists all tagged resources in the accounts across
-// your organization and tells whether each resource is compliant with the effective
-// tag policy. Compliance data is refreshed daily. The report is generated asynchronously.
-//
-// The generated report is saved to the following location:
-//
-// s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/report.csv
-//
-// You can call this operation only from the organization's management account
-// and from the us-east-1 Region.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Resource Groups Tagging API's
-// API operation StartReportCreation for usage and error information.
-//
-// Returned Error Types:
-// * ConcurrentModificationException
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-//
-// * ConstraintViolationException
-// The request was denied because performing this operation violates a constraint.
-//
-// Some of the reasons in the following list might not apply to this specific
-// operation.
-//
-// * You must meet the prerequisites for using tag policies. For information,
-// see Prerequisites and Permissions for Using Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html)
-// in the AWS Organizations User Guide.
-//
-// * You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com)
-// to integrate with AWS Organizations For information, see EnableAWSServiceAccess
-// (http://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html).
-//
-// * You must have a tag policy attached to the organization root, an OU,
-// or an account.
-//
-// * InternalServiceException
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-//
-// * InvalidParameterException
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-//
-// * ThrottledException
-// The request was denied to limit the frequency of submitted requests.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/StartReportCreation
-func (c *ResourceGroupsTaggingAPI) StartReportCreation(input *StartReportCreationInput) (*StartReportCreationOutput, error) {
- req, out := c.StartReportCreationRequest(input)
- return out, req.Send()
-}
-
-// StartReportCreationWithContext is the same as StartReportCreation with the addition of
-// the ability to pass a context and additional request options.
-//
-// See StartReportCreation for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) StartReportCreationWithContext(ctx aws.Context, input *StartReportCreationInput, opts ...request.Option) (*StartReportCreationOutput, error) {
- req, out := c.StartReportCreationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opTagResources = "TagResources"
-
-// TagResourcesRequest generates a "aws/request.Request" representing the
-// client's request for the TagResources operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See TagResources for more information on using the TagResources
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the TagResourcesRequest method.
-// req, resp := client.TagResourcesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/TagResources
-func (c *ResourceGroupsTaggingAPI) TagResourcesRequest(input *TagResourcesInput) (req *request.Request, output *TagResourcesOutput) {
- op := &request.Operation{
- Name: opTagResources,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &TagResourcesInput{}
- }
-
- output = &TagResourcesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// TagResources API operation for AWS Resource Groups Tagging API.
-//
-// Applies one or more tags to the specified resources. Note the following:
-//
-// * Not all resources can have tags. For a list of services with resources
-// that support tagging using this operation, see Services that support the
-// Resource Groups Tagging API (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html).
-//
-// * Each resource can have up to 50 tags. For other limits, see Tag Naming
-// and Usage Conventions (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions)
-// in the AWS General Reference.
-//
-// * You can only tag resources that are located in the specified AWS Region
-// for the AWS account.
-//
-// * To add tags to a resource, you need the necessary permissions for the
-// service that the resource belongs to as well as permissions for adding
-// tags. For more information, see the documentation for each service.
-//
-// Do not store personally identifiable information (PII) or other confidential
-// or sensitive information in tags. We use tags to provide you with billing
-// and administration services. Tags are not intended to be used for private
-// or sensitive data.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Resource Groups Tagging API's
-// API operation TagResources for usage and error information.
-//
-// Returned Error Types:
-// * InvalidParameterException
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-//
-// * ThrottledException
-// The request was denied to limit the frequency of submitted requests.
-//
-// * InternalServiceException
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/TagResources
-func (c *ResourceGroupsTaggingAPI) TagResources(input *TagResourcesInput) (*TagResourcesOutput, error) {
- req, out := c.TagResourcesRequest(input)
- return out, req.Send()
-}
-
-// TagResourcesWithContext is the same as TagResources with the addition of
-// the ability to pass a context and additional request options.
-//
-// See TagResources for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) TagResourcesWithContext(ctx aws.Context, input *TagResourcesInput, opts ...request.Option) (*TagResourcesOutput, error) {
- req, out := c.TagResourcesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUntagResources = "UntagResources"
-
-// UntagResourcesRequest generates a "aws/request.Request" representing the
-// client's request for the UntagResources operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UntagResources for more information on using the UntagResources
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UntagResourcesRequest method.
-// req, resp := client.UntagResourcesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources
-func (c *ResourceGroupsTaggingAPI) UntagResourcesRequest(input *UntagResourcesInput) (req *request.Request, output *UntagResourcesOutput) {
- op := &request.Operation{
- Name: opUntagResources,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UntagResourcesInput{}
- }
-
- output = &UntagResourcesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UntagResources API operation for AWS Resource Groups Tagging API.
-//
-// Removes the specified tags from the specified resources. When you specify
-// a tag key, the action removes both that key and its associated value. The
-// operation succeeds even if you attempt to remove tags from a resource that
-// were already removed. Note the following:
-//
-// * To remove tags from a resource, you need the necessary permissions for
-// the service that the resource belongs to as well as permissions for removing
-// tags. For more information, see the documentation for the service whose
-// resource you want to untag.
-//
-// * You can only tag resources that are located in the specified AWS Region
-// for the calling AWS account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Resource Groups Tagging API's
-// API operation UntagResources for usage and error information.
-//
-// Returned Error Types:
-// * InvalidParameterException
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-//
-// * ThrottledException
-// The request was denied to limit the frequency of submitted requests.
-//
-// * InternalServiceException
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources
-func (c *ResourceGroupsTaggingAPI) UntagResources(input *UntagResourcesInput) (*UntagResourcesOutput, error) {
- req, out := c.UntagResourcesRequest(input)
- return out, req.Send()
-}
-
-// UntagResourcesWithContext is the same as UntagResources with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UntagResources for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *ResourceGroupsTaggingAPI) UntagResourcesWithContext(ctx aws.Context, input *UntagResourcesInput, opts ...request.Option) (*UntagResourcesOutput, error) {
- req, out := c.UntagResourcesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// Information that shows whether a resource is compliant with the effective
-// tag policy, including details on any noncompliant tag keys.
-type ComplianceDetails struct {
- _ struct{} `type:"structure"`
-
- // Whether a resource is compliant with the effective tag policy.
- ComplianceStatus *bool `type:"boolean"`
-
- // These are keys defined in the effective policy that are on the resource with
- // either incorrect case treatment or noncompliant values.
- KeysWithNoncompliantValues []*string `type:"list"`
-
- // These tag keys on the resource are noncompliant with the effective tag policy.
- NoncompliantKeys []*string `type:"list"`
-}
-
-// String returns the string representation
-func (s ComplianceDetails) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ComplianceDetails) GoString() string {
- return s.String()
-}
-
-// SetComplianceStatus sets the ComplianceStatus field's value.
-func (s *ComplianceDetails) SetComplianceStatus(v bool) *ComplianceDetails {
- s.ComplianceStatus = &v
- return s
-}
-
-// SetKeysWithNoncompliantValues sets the KeysWithNoncompliantValues field's value.
-func (s *ComplianceDetails) SetKeysWithNoncompliantValues(v []*string) *ComplianceDetails {
- s.KeysWithNoncompliantValues = v
- return s
-}
-
-// SetNoncompliantKeys sets the NoncompliantKeys field's value.
-func (s *ComplianceDetails) SetNoncompliantKeys(v []*string) *ComplianceDetails {
- s.NoncompliantKeys = v
- return s
-}
-
-// The target of the operation is currently being modified by a different request.
-// Try again later.
-type ConcurrentModificationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s ConcurrentModificationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ConcurrentModificationException) GoString() string {
- return s.String()
-}
-
-func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error {
- return &ConcurrentModificationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ConcurrentModificationException) Code() string {
- return "ConcurrentModificationException"
-}
-
-// Message returns the exception's message.
-func (s *ConcurrentModificationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ConcurrentModificationException) OrigErr() error {
- return nil
-}
-
-func (s *ConcurrentModificationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ConcurrentModificationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ConcurrentModificationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was denied because performing this operation violates a constraint.
-//
-// Some of the reasons in the following list might not apply to this specific
-// operation.
-//
-// * You must meet the prerequisites for using tag policies. For information,
-// see Prerequisites and Permissions for Using Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html)
-// in the AWS Organizations User Guide.
-//
-// * You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com)
-// to integrate with AWS Organizations For information, see EnableAWSServiceAccess
-// (http://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html).
-//
-// * You must have a tag policy attached to the organization root, an OU,
-// or an account.
-type ConstraintViolationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s ConstraintViolationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ConstraintViolationException) GoString() string {
- return s.String()
-}
-
-func newErrorConstraintViolationException(v protocol.ResponseMetadata) error {
- return &ConstraintViolationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ConstraintViolationException) Code() string {
- return "ConstraintViolationException"
-}
-
-// Message returns the exception's message.
-func (s *ConstraintViolationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ConstraintViolationException) OrigErr() error {
- return nil
-}
-
-func (s *ConstraintViolationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ConstraintViolationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ConstraintViolationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type DescribeReportCreationInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DescribeReportCreationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReportCreationInput) GoString() string {
- return s.String()
-}
-
-type DescribeReportCreationOutput struct {
- _ struct{} `type:"structure"`
-
- // Details of the common errors that all operations return.
- ErrorMessage *string `type:"string"`
-
- // The path to the Amazon S3 bucket where the report was stored on creation.
- S3Location *string `type:"string"`
-
- // Reports the status of the operation.
- //
- // The operation status can be one of the following:
- //
- // * RUNNING - Report creation is in progress.
- //
- // * SUCCEEDED - Report creation is complete. You can open the report from
- // the Amazon S3 bucket that you specified when you ran StartReportCreation.
- //
- // * FAILED - Report creation timed out or the Amazon S3 bucket is not accessible.
- //
- // * NO REPORT - No report was generated in the last 90 days.
- Status *string `type:"string"`
-}
-
-// String returns the string representation
-func (s DescribeReportCreationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeReportCreationOutput) GoString() string {
- return s.String()
-}
-
-// SetErrorMessage sets the ErrorMessage field's value.
-func (s *DescribeReportCreationOutput) SetErrorMessage(v string) *DescribeReportCreationOutput {
- s.ErrorMessage = &v
- return s
-}
-
-// SetS3Location sets the S3Location field's value.
-func (s *DescribeReportCreationOutput) SetS3Location(v string) *DescribeReportCreationOutput {
- s.S3Location = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *DescribeReportCreationOutput) SetStatus(v string) *DescribeReportCreationOutput {
- s.Status = &v
- return s
-}
-
-// Information about the errors that are returned for each failed resource.
-// This information can include InternalServiceException and InvalidParameterException
-// errors. It can also include any valid error code returned by the AWS service
-// that hosts the resource that the ARN key represents.
-//
-// The following are common error codes that you might receive from other AWS
-// services:
-//
-// * InternalServiceException – This can mean that the Resource Groups
-// Tagging API didn't receive a response from another AWS service. It can
-// also mean the the resource type in the request is not supported by the
-// Resource Groups Tagging API. In these cases, it's safe to retry the request
-// and then call GetResources (http://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html)
-// to verify the changes.
-//
-// * AccessDeniedException – This can mean that you need permission to
-// calling tagging operations in the AWS service that contains the resource.
-// For example, to use the Resource Groups Tagging API to tag a CloudWatch
-// alarm resource, you need permission to call TagResources (http://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_TagResources.html)
-// and TagResource (http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html)
-// in the CloudWatch API.
-//
-// For more information on errors that are generated from other AWS services,
-// see the documentation for that service.
-type FailureInfo struct {
- _ struct{} `type:"structure"`
-
- // The code of the common error. Valid values include InternalServiceException,
- // InvalidParameterException, and any valid error code returned by the AWS service
- // that hosts the resource that you want to tag.
- ErrorCode *string `type:"string" enum:"ErrorCode"`
-
- // The message of the common error.
- ErrorMessage *string `type:"string"`
-
- // The HTTP status code of the common error.
- StatusCode *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s FailureInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s FailureInfo) GoString() string {
- return s.String()
-}
-
-// SetErrorCode sets the ErrorCode field's value.
-func (s *FailureInfo) SetErrorCode(v string) *FailureInfo {
- s.ErrorCode = &v
- return s
-}
-
-// SetErrorMessage sets the ErrorMessage field's value.
-func (s *FailureInfo) SetErrorMessage(v string) *FailureInfo {
- s.ErrorMessage = &v
- return s
-}
-
-// SetStatusCode sets the StatusCode field's value.
-func (s *FailureInfo) SetStatusCode(v int64) *FailureInfo {
- s.StatusCode = &v
- return s
-}
-
-type GetComplianceSummaryInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies a list of attributes to group the counts of noncompliant resources
- // by. If supplied, the counts are sorted by those attributes.
- GroupBy []*string `type:"list"`
-
- // Specifies the maximum number of results to be returned in each page. A query
- // can return fewer than this maximum, even if there are more results still
- // to return. You should always check the PaginationToken response value to
- // see if there are more results. You can specify a minimum of 1 and a maximum
- // value of 100.
- MaxResults *int64 `min:"1" type:"integer"`
-
- // Specifies a PaginationToken response value from a previous request to indicate
- // that you want the next page of results. Leave this parameter empty in your
- // initial request.
- PaginationToken *string `type:"string"`
-
- // Specifies a list of AWS Regions to limit the output by. If you use this parameter,
- // the count of returned noncompliant resources includes only resources in the
- // specified Regions.
- RegionFilters []*string `min:"1" type:"list"`
-
- // Specifies that you want the response to include information for only resources
- // of the specified types. The format of each resource type is service[:resourceType].
- // For example, specifying a resource type of ec2 returns all Amazon EC2 resources
- // (which includes EC2 instances). Specifying a resource type of ec2:instance
- // returns only EC2 instances.
- //
- // The string for each service name and resource type is the same as that embedded
- // in a resource's Amazon Resource Name (ARN). Consult the AWS General Reference
- // for the following:
- //
- // * For a list of service name strings, see AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces).
- //
- // * For resource type strings, see Example ARNs (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax).
- //
- // * For more information about ARNs, see Amazon Resource Names (ARNs) and
- // AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
- //
- // You can specify multiple resource types by using a comma separated array.
- // The array can include up to 100 items. Note that the length constraint requirement
- // applies to each resource type filter.
- ResourceTypeFilters []*string `type:"list"`
-
- // Specifies that you want the response to include information for only resources
- // that have tags with the specified tag keys. If you use this parameter, the
- // count of returned noncompliant resources includes only resources that have
- // the specified tag keys.
- TagKeyFilters []*string `min:"1" type:"list"`
-
- // Specifies target identifiers (usually, specific account IDs) to limit the
- // output by. If you use this parameter, the count of returned noncompliant
- // resources includes only resources with the specified target IDs.
- TargetIdFilters []*string `min:"1" type:"list"`
-}
-
-// String returns the string representation
-func (s GetComplianceSummaryInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetComplianceSummaryInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetComplianceSummaryInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetComplianceSummaryInput"}
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
- if s.RegionFilters != nil && len(s.RegionFilters) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RegionFilters", 1))
- }
- if s.TagKeyFilters != nil && len(s.TagKeyFilters) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TagKeyFilters", 1))
- }
- if s.TargetIdFilters != nil && len(s.TargetIdFilters) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TargetIdFilters", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGroupBy sets the GroupBy field's value.
-func (s *GetComplianceSummaryInput) SetGroupBy(v []*string) *GetComplianceSummaryInput {
- s.GroupBy = v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *GetComplianceSummaryInput) SetMaxResults(v int64) *GetComplianceSummaryInput {
- s.MaxResults = &v
- return s
-}
-
-// SetPaginationToken sets the PaginationToken field's value.
-func (s *GetComplianceSummaryInput) SetPaginationToken(v string) *GetComplianceSummaryInput {
- s.PaginationToken = &v
- return s
-}
-
-// SetRegionFilters sets the RegionFilters field's value.
-func (s *GetComplianceSummaryInput) SetRegionFilters(v []*string) *GetComplianceSummaryInput {
- s.RegionFilters = v
- return s
-}
-
-// SetResourceTypeFilters sets the ResourceTypeFilters field's value.
-func (s *GetComplianceSummaryInput) SetResourceTypeFilters(v []*string) *GetComplianceSummaryInput {
- s.ResourceTypeFilters = v
- return s
-}
-
-// SetTagKeyFilters sets the TagKeyFilters field's value.
-func (s *GetComplianceSummaryInput) SetTagKeyFilters(v []*string) *GetComplianceSummaryInput {
- s.TagKeyFilters = v
- return s
-}
-
-// SetTargetIdFilters sets the TargetIdFilters field's value.
-func (s *GetComplianceSummaryInput) SetTargetIdFilters(v []*string) *GetComplianceSummaryInput {
- s.TargetIdFilters = v
- return s
-}
-
-type GetComplianceSummaryOutput struct {
- _ struct{} `type:"structure"`
-
- // A string that indicates that there is more data available than this response
- // contains. To receive the next part of the response, specify this response
- // value as the PaginationToken value in the request for the next page.
- PaginationToken *string `type:"string"`
-
- // A table that shows counts of noncompliant resources.
- SummaryList []*Summary `type:"list"`
-}
-
-// String returns the string representation
-func (s GetComplianceSummaryOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetComplianceSummaryOutput) GoString() string {
- return s.String()
-}
-
-// SetPaginationToken sets the PaginationToken field's value.
-func (s *GetComplianceSummaryOutput) SetPaginationToken(v string) *GetComplianceSummaryOutput {
- s.PaginationToken = &v
- return s
-}
-
-// SetSummaryList sets the SummaryList field's value.
-func (s *GetComplianceSummaryOutput) SetSummaryList(v []*Summary) *GetComplianceSummaryOutput {
- s.SummaryList = v
- return s
-}
-
-type GetResourcesInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether to exclude resources that are compliant with the tag policy.
- // Set this to true if you are interested in retrieving information on noncompliant
- // resources only.
- //
- // You can use this parameter only if the IncludeComplianceDetails parameter
- // is also set to true.
- ExcludeCompliantResources *bool `type:"boolean"`
-
- // Specifies whether to include details regarding the compliance with the effective
- // tag policy. Set this to true to determine whether resources are compliant
- // with the tag policy and to get details.
- IncludeComplianceDetails *bool `type:"boolean"`
-
- // Specifies a PaginationToken response value from a previous request to indicate
- // that you want the next page of results. Leave this parameter empty in your
- // initial request.
- PaginationToken *string `type:"string"`
-
- // Specifies a list of ARNs of resources for which you want to retrieve tag
- // data. You can't specify both this parameter and any of the pagination parameters
- // (ResourcesPerPage, TagsPerPage, PaginationToken) in the same request. If
- // you specify both, you get an Invalid Parameter exception.
- //
- // If a resource specified by this parameter doesn't exist, it doesn't generate
- // an error; it simply isn't included in the response.
- //
- // An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,
- // see Amazon Resource Names (ARNs) and AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the AWS General Reference.
- ResourceARNList []*string `min:"1" type:"list"`
-
- // Specifies the resource types that you want included in the response. The
- // format of each resource type is service[:resourceType]. For example, specifying
- // a resource type of ec2 returns all Amazon EC2 resources (which includes EC2
- // instances). Specifying a resource type of ec2:instance returns only EC2 instances.
- //
- // The string for each service name and resource type is the same as that embedded
- // in a resource's Amazon Resource Name (ARN). Consult the AWS General Reference
- // for the following:
- //
- // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS
- // Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
- //
- // You can specify multiple resource types by using an array. The array can
- // include up to 100 items. Note that the length constraint requirement applies
- // to each resource type filter.
- ResourceTypeFilters []*string `type:"list"`
-
- // Specifies the maximum number of results to be returned in each page. A query
- // can return fewer than this maximum, even if there are more results still
- // to return. You should always check the PaginationToken response value to
- // see if there are more results. You can specify a minimum of 1 and a maximum
- // value of 100.
- ResourcesPerPage *int64 `type:"integer"`
-
- // Specifies a list of TagFilters (keys and values) to restrict the output to
- // only those resources that have the specified tag and, if included, the specified
- // value. Each TagFilter must contain a key with values optional. A request
- // can include up to 50 keys, and each key can include up to 20 values.
- //
- // Note the following when deciding how to use TagFilters:
- //
- // * If you don't specify a TagFilter, the response includes all resources
- // that are currently tagged or ever had a tag. Resources that currently
- // don't have tags are shown with an empty tag set, like this: "Tags": [].
- //
- // * If you specify more than one filter in a single request, the response
- // returns only those resources that satisfy all filters.
- //
- // * If you specify a filter that contains more than one value for a key,
- // the response returns resources that match any of the specified values
- // for that key.
- //
- // * If you don't specify any values for a key, the response returns resources
- // that are tagged with that key and any or no value. For example, for the
- // following filters: filter1= {keyA,{value1}}, filter2={keyB,{value2,value3,value4}},
- // filter3= {keyC}: GetResources({filter1}) returns resources tagged with
- // key1=value1 GetResources({filter2}) returns resources tagged with key2=value2
- // or key2=value3 or key2=value4 GetResources({filter3}) returns resources
- // tagged with any tag with the key key3, and with any or no value GetResources({filter1,filter2,filter3})
- // returns resources tagged with (key1=value1) and (key2=value2 or key2=value3
- // or key2=value4) and (key3, any or no value)
- TagFilters []*TagFilter `type:"list"`
-
- // AWS recommends using ResourcesPerPage instead of this parameter.
- //
- // A limit that restricts the number of tags (key and value pairs) returned
- // by GetResources in paginated output. A resource with no tags is counted as
- // having one tag (one key and value pair).
- //
- // GetResources does not split a resource and its associated tags across pages.
- // If the specified TagsPerPage would cause such a break, a PaginationToken
- // is returned in place of the affected resource and its tags. Use that token
- // in another request to get the remaining data. For example, if you specify
- // a TagsPerPage of 100 and the account has 22 resources with 10 tags each (meaning
- // that each resource has 10 key and value pairs), the output will consist of
- // three pages. The first page displays the first 10 resources, each with its
- // 10 tags. The second page displays the next 10 resources, each with its 10
- // tags. The third page displays the remaining 2 resources, each with its 10
- // tags.
- //
- // You can set TagsPerPage to a minimum of 100 items up to a maximum of 500
- // items.
- TagsPerPage *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s GetResourcesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetResourcesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetResourcesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetResourcesInput"}
- if s.ResourceARNList != nil && len(s.ResourceARNList) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceARNList", 1))
- }
- if s.TagFilters != nil {
- for i, v := range s.TagFilters {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagFilters", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetExcludeCompliantResources sets the ExcludeCompliantResources field's value.
-func (s *GetResourcesInput) SetExcludeCompliantResources(v bool) *GetResourcesInput {
- s.ExcludeCompliantResources = &v
- return s
-}
-
-// SetIncludeComplianceDetails sets the IncludeComplianceDetails field's value.
-func (s *GetResourcesInput) SetIncludeComplianceDetails(v bool) *GetResourcesInput {
- s.IncludeComplianceDetails = &v
- return s
-}
-
-// SetPaginationToken sets the PaginationToken field's value.
-func (s *GetResourcesInput) SetPaginationToken(v string) *GetResourcesInput {
- s.PaginationToken = &v
- return s
-}
-
-// SetResourceARNList sets the ResourceARNList field's value.
-func (s *GetResourcesInput) SetResourceARNList(v []*string) *GetResourcesInput {
- s.ResourceARNList = v
- return s
-}
-
-// SetResourceTypeFilters sets the ResourceTypeFilters field's value.
-func (s *GetResourcesInput) SetResourceTypeFilters(v []*string) *GetResourcesInput {
- s.ResourceTypeFilters = v
- return s
-}
-
-// SetResourcesPerPage sets the ResourcesPerPage field's value.
-func (s *GetResourcesInput) SetResourcesPerPage(v int64) *GetResourcesInput {
- s.ResourcesPerPage = &v
- return s
-}
-
-// SetTagFilters sets the TagFilters field's value.
-func (s *GetResourcesInput) SetTagFilters(v []*TagFilter) *GetResourcesInput {
- s.TagFilters = v
- return s
-}
-
-// SetTagsPerPage sets the TagsPerPage field's value.
-func (s *GetResourcesInput) SetTagsPerPage(v int64) *GetResourcesInput {
- s.TagsPerPage = &v
- return s
-}
-
-type GetResourcesOutput struct {
- _ struct{} `type:"structure"`
-
- // A string that indicates that there is more data available than this response
- // contains. To receive the next part of the response, specify this response
- // value as the PaginationToken value in the request for the next page.
- PaginationToken *string `type:"string"`
-
- // A list of resource ARNs and the tags (keys and values) associated with those
- // ARNs.
- ResourceTagMappingList []*ResourceTagMapping `type:"list"`
-}
-
-// String returns the string representation
-func (s GetResourcesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetResourcesOutput) GoString() string {
- return s.String()
-}
-
-// SetPaginationToken sets the PaginationToken field's value.
-func (s *GetResourcesOutput) SetPaginationToken(v string) *GetResourcesOutput {
- s.PaginationToken = &v
- return s
-}
-
-// SetResourceTagMappingList sets the ResourceTagMappingList field's value.
-func (s *GetResourcesOutput) SetResourceTagMappingList(v []*ResourceTagMapping) *GetResourcesOutput {
- s.ResourceTagMappingList = v
- return s
-}
-
-type GetTagKeysInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies a PaginationToken response value from a previous request to indicate
- // that you want the next page of results. Leave this parameter empty in your
- // initial request.
- PaginationToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s GetTagKeysInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetTagKeysInput) GoString() string {
- return s.String()
-}
-
-// SetPaginationToken sets the PaginationToken field's value.
-func (s *GetTagKeysInput) SetPaginationToken(v string) *GetTagKeysInput {
- s.PaginationToken = &v
- return s
-}
-
-type GetTagKeysOutput struct {
- _ struct{} `type:"structure"`
-
- // A string that indicates that there is more data available than this response
- // contains. To receive the next part of the response, specify this response
- // value as the PaginationToken value in the request for the next page.
- PaginationToken *string `type:"string"`
-
- // A list of all tag keys in the AWS account.
- TagKeys []*string `type:"list"`
-}
-
-// String returns the string representation
-func (s GetTagKeysOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetTagKeysOutput) GoString() string {
- return s.String()
-}
-
-// SetPaginationToken sets the PaginationToken field's value.
-func (s *GetTagKeysOutput) SetPaginationToken(v string) *GetTagKeysOutput {
- s.PaginationToken = &v
- return s
-}
-
-// SetTagKeys sets the TagKeys field's value.
-func (s *GetTagKeysOutput) SetTagKeys(v []*string) *GetTagKeysOutput {
- s.TagKeys = v
- return s
-}
-
-type GetTagValuesInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the tag key for which you want to list all existing values that
- // are currently used in the specified AWS Region for the calling AWS account.
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-
- // Specifies a PaginationToken response value from a previous request to indicate
- // that you want the next page of results. Leave this parameter empty in your
- // initial request.
- PaginationToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s GetTagValuesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetTagValuesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetTagValuesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetTagValuesInput"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKey sets the Key field's value.
-func (s *GetTagValuesInput) SetKey(v string) *GetTagValuesInput {
- s.Key = &v
- return s
-}
-
-// SetPaginationToken sets the PaginationToken field's value.
-func (s *GetTagValuesInput) SetPaginationToken(v string) *GetTagValuesInput {
- s.PaginationToken = &v
- return s
-}
-
-type GetTagValuesOutput struct {
- _ struct{} `type:"structure"`
-
- // A string that indicates that there is more data available than this response
- // contains. To receive the next part of the response, specify this response
- // value as the PaginationToken value in the request for the next page.
- PaginationToken *string `type:"string"`
-
- // A list of all tag values for the specified key currently used in the specified
- // AWS Region for the calling AWS account.
- TagValues []*string `type:"list"`
-}
-
-// String returns the string representation
-func (s GetTagValuesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetTagValuesOutput) GoString() string {
- return s.String()
-}
-
-// SetPaginationToken sets the PaginationToken field's value.
-func (s *GetTagValuesOutput) SetPaginationToken(v string) *GetTagValuesOutput {
- s.PaginationToken = &v
- return s
-}
-
-// SetTagValues sets the TagValues field's value.
-func (s *GetTagValuesOutput) SetTagValues(v []*string) *GetTagValuesOutput {
- s.TagValues = v
- return s
-}
-
-// The request processing failed because of an unknown error, exception, or
-// failure. You can retry the request.
-type InternalServiceException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s InternalServiceException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InternalServiceException) GoString() string {
- return s.String()
-}
-
-func newErrorInternalServiceException(v protocol.ResponseMetadata) error {
- return &InternalServiceException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InternalServiceException) Code() string {
- return "InternalServiceException"
-}
-
-// Message returns the exception's message.
-func (s *InternalServiceException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InternalServiceException) OrigErr() error {
- return nil
-}
-
-func (s *InternalServiceException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InternalServiceException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InternalServiceException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// This error indicates one of the following:
-//
-// * A parameter is missing.
-//
-// * A malformed string was supplied for the request parameter.
-//
-// * An out-of-range value was supplied for the request parameter.
-//
-// * The target ID is invalid, unsupported, or doesn't exist.
-//
-// * You can't access the Amazon S3 bucket for report storage. For more information,
-// see Additional Requirements for Organization-wide Tag Compliance Reports
-// (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
-// in the AWS Organizations User Guide.
-type InvalidParameterException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s InvalidParameterException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InvalidParameterException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidParameterException(v protocol.ResponseMetadata) error {
- return &InvalidParameterException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidParameterException) Code() string {
- return "InvalidParameterException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidParameterException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidParameterException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidParameterException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidParameterException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidParameterException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// A PaginationToken is valid for a maximum of 15 minutes. Your request was
-// denied because the specified PaginationToken has expired.
-type PaginationTokenExpiredException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s PaginationTokenExpiredException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PaginationTokenExpiredException) GoString() string {
- return s.String()
-}
-
-func newErrorPaginationTokenExpiredException(v protocol.ResponseMetadata) error {
- return &PaginationTokenExpiredException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *PaginationTokenExpiredException) Code() string {
- return "PaginationTokenExpiredException"
-}
-
-// Message returns the exception's message.
-func (s *PaginationTokenExpiredException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *PaginationTokenExpiredException) OrigErr() error {
- return nil
-}
-
-func (s *PaginationTokenExpiredException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *PaginationTokenExpiredException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *PaginationTokenExpiredException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// A list of resource ARNs and the tags (keys and values) that are associated
-// with each.
-type ResourceTagMapping struct {
- _ struct{} `type:"structure"`
-
- // Information that shows whether a resource is compliant with the effective
- // tag policy, including details on any noncompliant tag keys.
- ComplianceDetails *ComplianceDetails `type:"structure"`
-
- // The ARN of the resource.
- ResourceARN *string `min:"1" type:"string"`
-
- // The tags that have been applied to one or more AWS resources.
- Tags []*Tag `type:"list"`
-}
-
-// String returns the string representation
-func (s ResourceTagMapping) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ResourceTagMapping) GoString() string {
- return s.String()
-}
-
-// SetComplianceDetails sets the ComplianceDetails field's value.
-func (s *ResourceTagMapping) SetComplianceDetails(v *ComplianceDetails) *ResourceTagMapping {
- s.ComplianceDetails = v
- return s
-}
-
-// SetResourceARN sets the ResourceARN field's value.
-func (s *ResourceTagMapping) SetResourceARN(v string) *ResourceTagMapping {
- s.ResourceARN = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *ResourceTagMapping) SetTags(v []*Tag) *ResourceTagMapping {
- s.Tags = v
- return s
-}
-
-type StartReportCreationInput struct {
- _ struct{} `type:"structure"`
-
- // The name of the Amazon S3 bucket where the report will be stored; for example:
- //
- // awsexamplebucket
- //
- // For more information on S3 bucket requirements, including an example bucket
- // policy, see the example S3 bucket policy on this page.
- //
- // S3Bucket is a required field
- S3Bucket *string `min:"3" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s StartReportCreationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StartReportCreationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *StartReportCreationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StartReportCreationInput"}
- if s.S3Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("S3Bucket"))
- }
- if s.S3Bucket != nil && len(*s.S3Bucket) < 3 {
- invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetS3Bucket sets the S3Bucket field's value.
-func (s *StartReportCreationInput) SetS3Bucket(v string) *StartReportCreationInput {
- s.S3Bucket = &v
- return s
-}
-
-type StartReportCreationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s StartReportCreationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StartReportCreationOutput) GoString() string {
- return s.String()
-}
-
-// A count of noncompliant resources.
-type Summary struct {
- _ struct{} `type:"structure"`
-
- // The timestamp that shows when this summary was generated in this Region.
- LastUpdated *string `type:"string"`
-
- // The count of noncompliant resources.
- NonCompliantResources *int64 `type:"long"`
-
- // The AWS Region that the summary applies to.
- Region *string `min:"1" type:"string"`
-
- // The AWS resource type.
- ResourceType *string `type:"string"`
-
- // The account identifier or the root identifier of the organization. If you
- // don't know the root ID, you can call the AWS Organizations ListRoots (http://docs.aws.amazon.com/organizations/latest/APIReference/API_ListRoots.html)
- // API.
- TargetId *string `min:"6" type:"string"`
-
- // Whether the target is an account, an OU, or the organization root.
- TargetIdType *string `type:"string" enum:"TargetIdType"`
-}
-
-// String returns the string representation
-func (s Summary) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Summary) GoString() string {
- return s.String()
-}
-
-// SetLastUpdated sets the LastUpdated field's value.
-func (s *Summary) SetLastUpdated(v string) *Summary {
- s.LastUpdated = &v
- return s
-}
-
-// SetNonCompliantResources sets the NonCompliantResources field's value.
-func (s *Summary) SetNonCompliantResources(v int64) *Summary {
- s.NonCompliantResources = &v
- return s
-}
-
-// SetRegion sets the Region field's value.
-func (s *Summary) SetRegion(v string) *Summary {
- s.Region = &v
- return s
-}
-
-// SetResourceType sets the ResourceType field's value.
-func (s *Summary) SetResourceType(v string) *Summary {
- s.ResourceType = &v
- return s
-}
-
-// SetTargetId sets the TargetId field's value.
-func (s *Summary) SetTargetId(v string) *Summary {
- s.TargetId = &v
- return s
-}
-
-// SetTargetIdType sets the TargetIdType field's value.
-func (s *Summary) SetTargetIdType(v string) *Summary {
- s.TargetIdType = &v
- return s
-}
-
-// The metadata that you apply to AWS resources to help you categorize and organize
-// them. Each tag consists of a key and a value, both of which you define. For
-// more information, see Tagging AWS Resources (http://docs.aws.amazon.com/general/latest/gr/aws_tagging.html)
-// in the AWS General Reference.
-type Tag struct {
- _ struct{} `type:"structure"`
-
- // One part of a key-value pair that makes up a tag. A key is a general label
- // that acts like a category for more specific tag values.
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-
- // One part of a key-value pair that make up a tag. A value acts as a descriptor
- // within a tag category (key). The value can be empty or null.
- //
- // Value is a required field
- Value *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Tag) GoString() string {
- return s.String()
-}
-
-// SetKey sets the Key field's value.
-func (s *Tag) SetKey(v string) *Tag {
- s.Key = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *Tag) SetValue(v string) *Tag {
- s.Value = &v
- return s
-}
-
-// A list of tags (keys and values) that are used to specify the associated
-// resources.
-type TagFilter struct {
- _ struct{} `type:"structure"`
-
- // One part of a key-value pair that makes up a tag. A key is a general label
- // that acts like a category for more specific tag values.
- Key *string `min:"1" type:"string"`
-
- // One part of a key-value pair that make up a tag. A value acts as a descriptor
- // within a tag category (key). The value can be empty or null.
- Values []*string `type:"list"`
-}
-
-// String returns the string representation
-func (s TagFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TagFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *TagFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TagFilter"}
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKey sets the Key field's value.
-func (s *TagFilter) SetKey(v string) *TagFilter {
- s.Key = &v
- return s
-}
-
-// SetValues sets the Values field's value.
-func (s *TagFilter) SetValues(v []*string) *TagFilter {
- s.Values = v
- return s
-}
-
-type TagResourcesInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the list of ARNs of the resources that you want to apply tags to.
- //
- // An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,
- // see Amazon Resource Names (ARNs) and AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the AWS General Reference.
- //
- // ResourceARNList is a required field
- ResourceARNList []*string `min:"1" type:"list" required:"true"`
-
- // Specifies a list of tags that you want to add to the specified resources.
- // A tag consists of a key and a value that you define.
- //
- // Tags is a required field
- Tags map[string]*string `min:"1" type:"map" required:"true"`
-}
-
-// String returns the string representation
-func (s TagResourcesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TagResourcesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *TagResourcesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TagResourcesInput"}
- if s.ResourceARNList == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceARNList"))
- }
- if s.ResourceARNList != nil && len(s.ResourceARNList) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceARNList", 1))
- }
- if s.Tags == nil {
- invalidParams.Add(request.NewErrParamRequired("Tags"))
- }
- if s.Tags != nil && len(s.Tags) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceARNList sets the ResourceARNList field's value.
-func (s *TagResourcesInput) SetResourceARNList(v []*string) *TagResourcesInput {
- s.ResourceARNList = v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *TagResourcesInput) SetTags(v map[string]*string) *TagResourcesInput {
- s.Tags = v
- return s
-}
-
-type TagResourcesOutput struct {
- _ struct{} `type:"structure"`
-
- // A map containing a key-value pair for each failed item that couldn't be tagged.
- // The key is the ARN of the failed resource. The value is a FailureInfo object
- // that contains an error code, a status code, and an error message. If there
- // are no errors, the FailedResourcesMap is empty.
- FailedResourcesMap map[string]*FailureInfo `type:"map"`
-}
-
-// String returns the string representation
-func (s TagResourcesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TagResourcesOutput) GoString() string {
- return s.String()
-}
-
-// SetFailedResourcesMap sets the FailedResourcesMap field's value.
-func (s *TagResourcesOutput) SetFailedResourcesMap(v map[string]*FailureInfo) *TagResourcesOutput {
- s.FailedResourcesMap = v
- return s
-}
-
-// The request was denied to limit the frequency of submitted requests.
-type ThrottledException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"Message" type:"string"`
-}
-
-// String returns the string representation
-func (s ThrottledException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ThrottledException) GoString() string {
- return s.String()
-}
-
-func newErrorThrottledException(v protocol.ResponseMetadata) error {
- return &ThrottledException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ThrottledException) Code() string {
- return "ThrottledException"
-}
-
-// Message returns the exception's message.
-func (s *ThrottledException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ThrottledException) OrigErr() error {
- return nil
-}
-
-func (s *ThrottledException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ThrottledException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ThrottledException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type UntagResourcesInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies a list of ARNs of the resources that you want to remove tags from.
- //
- // An ARN (Amazon Resource Name) uniquely identifies a resource. For more information,
- // see Amazon Resource Names (ARNs) and AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the AWS General Reference.
- //
- // ResourceARNList is a required field
- ResourceARNList []*string `min:"1" type:"list" required:"true"`
-
- // Specifies a list of tag keys that you want to remove from the specified resources.
- //
- // TagKeys is a required field
- TagKeys []*string `min:"1" type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s UntagResourcesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UntagResourcesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UntagResourcesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UntagResourcesInput"}
- if s.ResourceARNList == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceARNList"))
- }
- if s.ResourceARNList != nil && len(s.ResourceARNList) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceARNList", 1))
- }
- if s.TagKeys == nil {
- invalidParams.Add(request.NewErrParamRequired("TagKeys"))
- }
- if s.TagKeys != nil && len(s.TagKeys) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceARNList sets the ResourceARNList field's value.
-func (s *UntagResourcesInput) SetResourceARNList(v []*string) *UntagResourcesInput {
- s.ResourceARNList = v
- return s
-}
-
-// SetTagKeys sets the TagKeys field's value.
-func (s *UntagResourcesInput) SetTagKeys(v []*string) *UntagResourcesInput {
- s.TagKeys = v
- return s
-}
-
-type UntagResourcesOutput struct {
- _ struct{} `type:"structure"`
-
- // A map containing a key-value pair for each failed item that couldn't be untagged.
- // The key is the ARN of the failed resource. The value is a FailureInfo object
- // that contains an error code, a status code, and an error message. If there
- // are no errors, the FailedResourcesMap is empty.
- FailedResourcesMap map[string]*FailureInfo `type:"map"`
-}
-
-// String returns the string representation
-func (s UntagResourcesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UntagResourcesOutput) GoString() string {
- return s.String()
-}
-
-// SetFailedResourcesMap sets the FailedResourcesMap field's value.
-func (s *UntagResourcesOutput) SetFailedResourcesMap(v map[string]*FailureInfo) *UntagResourcesOutput {
- s.FailedResourcesMap = v
- return s
-}
-
-const (
- // ErrorCodeInternalServiceException is a ErrorCode enum value
- ErrorCodeInternalServiceException = "InternalServiceException"
-
- // ErrorCodeInvalidParameterException is a ErrorCode enum value
- ErrorCodeInvalidParameterException = "InvalidParameterException"
-)
-
-// ErrorCode_Values returns all elements of the ErrorCode enum
-func ErrorCode_Values() []string {
- return []string{
- ErrorCodeInternalServiceException,
- ErrorCodeInvalidParameterException,
- }
-}
-
-const (
- // GroupByAttributeTargetId is a GroupByAttribute enum value
- GroupByAttributeTargetId = "TARGET_ID"
-
- // GroupByAttributeRegion is a GroupByAttribute enum value
- GroupByAttributeRegion = "REGION"
-
- // GroupByAttributeResourceType is a GroupByAttribute enum value
- GroupByAttributeResourceType = "RESOURCE_TYPE"
-)
-
-// GroupByAttribute_Values returns all elements of the GroupByAttribute enum
-func GroupByAttribute_Values() []string {
- return []string{
- GroupByAttributeTargetId,
- GroupByAttributeRegion,
- GroupByAttributeResourceType,
- }
-}
-
-const (
- // TargetIdTypeAccount is a TargetIdType enum value
- TargetIdTypeAccount = "ACCOUNT"
-
- // TargetIdTypeOu is a TargetIdType enum value
- TargetIdTypeOu = "OU"
-
- // TargetIdTypeRoot is a TargetIdType enum value
- TargetIdTypeRoot = "ROOT"
-)
-
-// TargetIdType_Values returns all elements of the TargetIdType enum
-func TargetIdType_Values() []string {
- return []string{
- TargetIdTypeAccount,
- TargetIdTypeOu,
- TargetIdTypeRoot,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/doc.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/doc.go
deleted file mode 100644
index 932da3e82..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/doc.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package resourcegroupstaggingapi provides the client and types for making API
-// requests to AWS Resource Groups Tagging API.
-//
-// Resource Groups Tagging API
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26 for more information on this service.
-//
-// See resourcegroupstaggingapi package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroupstaggingapi/
-//
-// Using the Client
-//
-// To contact AWS Resource Groups Tagging API with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the AWS Resource Groups Tagging API client ResourceGroupsTaggingAPI for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroupstaggingapi/#New
-package resourcegroupstaggingapi
diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/errors.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/errors.go
deleted file mode 100644
index 0f4fa1136..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/errors.go
+++ /dev/null
@@ -1,85 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package resourcegroupstaggingapi
-
-import (
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-const (
-
- // ErrCodeConcurrentModificationException for service response error code
- // "ConcurrentModificationException".
- //
- // The target of the operation is currently being modified by a different request.
- // Try again later.
- ErrCodeConcurrentModificationException = "ConcurrentModificationException"
-
- // ErrCodeConstraintViolationException for service response error code
- // "ConstraintViolationException".
- //
- // The request was denied because performing this operation violates a constraint.
- //
- // Some of the reasons in the following list might not apply to this specific
- // operation.
- //
- // * You must meet the prerequisites for using tag policies. For information,
- // see Prerequisites and Permissions for Using Tag Policies (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html)
- // in the AWS Organizations User Guide.
- //
- // * You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com)
- // to integrate with AWS Organizations For information, see EnableAWSServiceAccess
- // (http://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html).
- //
- // * You must have a tag policy attached to the organization root, an OU,
- // or an account.
- ErrCodeConstraintViolationException = "ConstraintViolationException"
-
- // ErrCodeInternalServiceException for service response error code
- // "InternalServiceException".
- //
- // The request processing failed because of an unknown error, exception, or
- // failure. You can retry the request.
- ErrCodeInternalServiceException = "InternalServiceException"
-
- // ErrCodeInvalidParameterException for service response error code
- // "InvalidParameterException".
- //
- // This error indicates one of the following:
- //
- // * A parameter is missing.
- //
- // * A malformed string was supplied for the request parameter.
- //
- // * An out-of-range value was supplied for the request parameter.
- //
- // * The target ID is invalid, unsupported, or doesn't exist.
- //
- // * You can't access the Amazon S3 bucket for report storage. For more information,
- // see Additional Requirements for Organization-wide Tag Compliance Reports
- // (http://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report)
- // in the AWS Organizations User Guide.
- ErrCodeInvalidParameterException = "InvalidParameterException"
-
- // ErrCodePaginationTokenExpiredException for service response error code
- // "PaginationTokenExpiredException".
- //
- // A PaginationToken is valid for a maximum of 15 minutes. Your request was
- // denied because the specified PaginationToken has expired.
- ErrCodePaginationTokenExpiredException = "PaginationTokenExpiredException"
-
- // ErrCodeThrottledException for service response error code
- // "ThrottledException".
- //
- // The request was denied to limit the frequency of submitted requests.
- ErrCodeThrottledException = "ThrottledException"
-)
-
-var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
- "ConcurrentModificationException": newErrorConcurrentModificationException,
- "ConstraintViolationException": newErrorConstraintViolationException,
- "InternalServiceException": newErrorInternalServiceException,
- "InvalidParameterException": newErrorInvalidParameterException,
- "PaginationTokenExpiredException": newErrorPaginationTokenExpiredException,
- "ThrottledException": newErrorThrottledException,
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/service.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/service.go
deleted file mode 100644
index 997fa35ab..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/service.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package resourcegroupstaggingapi
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-// ResourceGroupsTaggingAPI provides the API operation methods for making requests to
-// AWS Resource Groups Tagging API. See this package's package overview docs
-// for details on the service.
-//
-// ResourceGroupsTaggingAPI methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type ResourceGroupsTaggingAPI struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "tagging" // Name of service.
- EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "Resource Groups Tagging API" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the ResourceGroupsTaggingAPI client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// mySession := session.Must(session.NewSession())
-//
-// // Create a ResourceGroupsTaggingAPI client from just a session.
-// svc := resourcegroupstaggingapi.New(mySession)
-//
-// // Create a ResourceGroupsTaggingAPI client with additional configuration
-// svc := resourcegroupstaggingapi.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *ResourceGroupsTaggingAPI {
- c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *ResourceGroupsTaggingAPI {
- svc := &ResourceGroupsTaggingAPI{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2017-01-26",
- JSONVersion: "1.1",
- TargetPrefix: "ResourceGroupsTaggingAPI_20170126",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(
- protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
- )
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a ResourceGroupsTaggingAPI operation and runs any
-// custom request initialization.
-func (c *ResourceGroupsTaggingAPI) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
deleted file mode 100644
index e23d94b1a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go
+++ /dev/null
@@ -1,36685 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3
-
-import (
- "bytes"
- "fmt"
- "io"
- "sync"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
- "github.com/aws/aws-sdk-go/private/checksum"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/eventstream"
- "github.com/aws/aws-sdk-go/private/protocol/eventstream/eventstreamapi"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
- "github.com/aws/aws-sdk-go/private/protocol/restxml"
-)
-
-const opAbortMultipartUpload = "AbortMultipartUpload"
-
-// AbortMultipartUploadRequest generates a "aws/request.Request" representing the
-// client's request for the AbortMultipartUpload operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See AbortMultipartUpload for more information on using the AbortMultipartUpload
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the AbortMultipartUploadRequest method.
-// req, resp := client.AbortMultipartUploadRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
-func (c *S3) AbortMultipartUploadRequest(input *AbortMultipartUploadInput) (req *request.Request, output *AbortMultipartUploadOutput) {
- op := &request.Operation{
- Name: opAbortMultipartUpload,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &AbortMultipartUploadInput{}
- }
-
- output = &AbortMultipartUploadOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// AbortMultipartUpload API operation for Amazon Simple Storage Service.
-//
-// This action aborts a multipart upload. After a multipart upload is aborted,
-// no additional parts can be uploaded using that upload ID. The storage consumed
-// by any previously uploaded parts will be freed. However, if any part uploads
-// are currently in progress, those part uploads might or might not succeed.
-// As a result, it might be necessary to abort a given multipart upload multiple
-// times in order to completely free all storage consumed by all parts.
-//
-// To verify that all parts have been removed, so you don't get charged for
-// the part storage, you should call the ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-// action and ensure that the parts list is empty.
-//
-// For information about permissions required to use the multipart upload, see
-// Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// The following operations are related to AbortMultipartUpload:
-//
-// * CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// * UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// * CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// * ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// * ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation AbortMultipartUpload for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchUpload "NoSuchUpload"
-// The specified multipart upload does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AbortMultipartUpload
-func (c *S3) AbortMultipartUpload(input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error) {
- req, out := c.AbortMultipartUploadRequest(input)
- return out, req.Send()
-}
-
-// AbortMultipartUploadWithContext is the same as AbortMultipartUpload with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AbortMultipartUpload for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) AbortMultipartUploadWithContext(ctx aws.Context, input *AbortMultipartUploadInput, opts ...request.Option) (*AbortMultipartUploadOutput, error) {
- req, out := c.AbortMultipartUploadRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCompleteMultipartUpload = "CompleteMultipartUpload"
-
-// CompleteMultipartUploadRequest generates a "aws/request.Request" representing the
-// client's request for the CompleteMultipartUpload operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CompleteMultipartUpload for more information on using the CompleteMultipartUpload
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CompleteMultipartUploadRequest method.
-// req, resp := client.CompleteMultipartUploadRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
-func (c *S3) CompleteMultipartUploadRequest(input *CompleteMultipartUploadInput) (req *request.Request, output *CompleteMultipartUploadOutput) {
- op := &request.Operation{
- Name: opCompleteMultipartUpload,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &CompleteMultipartUploadInput{}
- }
-
- output = &CompleteMultipartUploadOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CompleteMultipartUpload API operation for Amazon Simple Storage Service.
-//
-// Completes a multipart upload by assembling previously uploaded parts.
-//
-// You first initiate the multipart upload and then upload all parts using the
-// UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-// operation. After successfully uploading all relevant parts of an upload,
-// you call this action to complete the upload. Upon receiving this request,
-// Amazon S3 concatenates all the parts in ascending order by part number to
-// create a new object. In the Complete Multipart Upload request, you must provide
-// the parts list. You must ensure that the parts list is complete. This action
-// concatenates the parts that you provide in the list. For each part in the
-// list, you must provide the part number and the ETag value, returned after
-// that part was uploaded.
-//
-// Processing of a Complete Multipart Upload request could take several minutes
-// to complete. After Amazon S3 begins processing the request, it sends an HTTP
-// response header that specifies a 200 OK response. While processing is in
-// progress, Amazon S3 periodically sends white space characters to keep the
-// connection from timing out. Because a request could fail after the initial
-// 200 OK response has been sent, it is important that you check the response
-// body to determine whether the request succeeded.
-//
-// Note that if CompleteMultipartUpload fails, applications should be prepared
-// to retry the failed requests. For more information, see Amazon S3 Error Best
-// Practices (https://docs.aws.amazon.com/AmazonS3/latest/dev/ErrorBestPractices.html).
-//
-// For more information about multipart uploads, see Uploading Objects Using
-// Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
-//
-// For information about permissions required to use the multipart upload API,
-// see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// CompleteMultipartUpload has the following special errors:
-//
-// * Error code: EntityTooSmall Description: Your proposed upload is smaller
-// than the minimum allowed object size. Each part must be at least 5 MB
-// in size, except the last part. 400 Bad Request
-//
-// * Error code: InvalidPart Description: One or more of the specified parts
-// could not be found. The part might not have been uploaded, or the specified
-// entity tag might not have matched the part's entity tag. 400 Bad Request
-//
-// * Error code: InvalidPartOrder Description: The list of parts was not
-// in ascending order. The parts list must be specified in order by part
-// number. 400 Bad Request
-//
-// * Error code: NoSuchUpload Description: The specified multipart upload
-// does not exist. The upload ID might be invalid, or the multipart upload
-// might have been aborted or completed. 404 Not Found
-//
-// The following operations are related to CompleteMultipartUpload:
-//
-// * CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// * UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// * AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// * ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// * ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation CompleteMultipartUpload for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CompleteMultipartUpload
-func (c *S3) CompleteMultipartUpload(input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error) {
- req, out := c.CompleteMultipartUploadRequest(input)
- return out, req.Send()
-}
-
-// CompleteMultipartUploadWithContext is the same as CompleteMultipartUpload with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CompleteMultipartUpload for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) CompleteMultipartUploadWithContext(ctx aws.Context, input *CompleteMultipartUploadInput, opts ...request.Option) (*CompleteMultipartUploadOutput, error) {
- req, out := c.CompleteMultipartUploadRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCopyObject = "CopyObject"
-
-// CopyObjectRequest generates a "aws/request.Request" representing the
-// client's request for the CopyObject operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CopyObject for more information on using the CopyObject
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CopyObjectRequest method.
-// req, resp := client.CopyObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
-func (c *S3) CopyObjectRequest(input *CopyObjectInput) (req *request.Request, output *CopyObjectOutput) {
- op := &request.Operation{
- Name: opCopyObject,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &CopyObjectInput{}
- }
-
- output = &CopyObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CopyObject API operation for Amazon Simple Storage Service.
-//
-// Creates a copy of an object that is already stored in Amazon S3.
-//
-// You can store individual objects of up to 5 TB in Amazon S3. You create a
-// copy of your object up to 5 GB in size in a single atomic action using this
-// API. However, to copy an object greater than 5 GB, you must use the multipart
-// upload Upload Part - Copy API. For more information, see Copy Object Using
-// the REST Multipart Upload API (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjctsUsingRESTMPUapi.html).
-//
-// All copy requests must be authenticated. Additionally, you must have read
-// access to the source object and write access to the destination bucket. For
-// more information, see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
-// Both the Region that you want to copy the object from and the Region that
-// you want to copy the object to must be enabled for your account.
-//
-// A copy request might return an error when Amazon S3 receives the copy request
-// or while Amazon S3 is copying the files. If the error occurs before the copy
-// action starts, you receive a standard Amazon S3 error. If the error occurs
-// during the copy operation, the error response is embedded in the 200 OK response.
-// This means that a 200 OK response can contain either a success or an error.
-// Design your application to parse the contents of the response and handle
-// it appropriately.
-//
-// If the copy is successful, you receive a response with information about
-// the copied object.
-//
-// If the request is an HTTP 1.1 request, the response is chunk encoded. If
-// it were not, it would not contain the content-length, and you would need
-// to read the entire body.
-//
-// The copy request charge is based on the storage class and Region that you
-// specify for the destination object. For pricing information, see Amazon S3
-// pricing (http://aws.amazon.com/s3/pricing/).
-//
-// Amazon S3 transfer acceleration does not support cross-Region copies. If
-// you request a cross-Region copy using a transfer acceleration endpoint, you
-// get a 400 Bad Request error. For more information, see Transfer Acceleration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
-//
-// Metadata
-//
-// When copying an object, you can preserve all metadata (default) or specify
-// new metadata. However, the ACL is not preserved and is set to private for
-// the user making the request. To override the default ACL setting, specify
-// a new ACL when generating a copy request. For more information, see Using
-// ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
-//
-// To specify whether you want the object metadata copied from the source object
-// or replaced with metadata provided in the request, you can optionally add
-// the x-amz-metadata-directive header. When you grant permissions, you can
-// use the s3:x-amz-metadata-directive condition key to enforce certain metadata
-// behavior when objects are uploaded. For more information, see Specifying
-// Conditions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/amazon-s3-policy-keys.html)
-// in the Amazon S3 User Guide. For a complete list of Amazon S3-specific condition
-// keys, see Actions, Resources, and Condition Keys for Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html).
-//
-// x-amz-copy-source-if Headers
-//
-// To only copy an object under certain conditions, such as whether the Etag
-// matches or whether the object was modified before or after a specified date,
-// use the following request parameters:
-//
-// * x-amz-copy-source-if-match
-//
-// * x-amz-copy-source-if-none-match
-//
-// * x-amz-copy-source-if-unmodified-since
-//
-// * x-amz-copy-source-if-modified-since
-//
-// If both the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
-// headers are present in the request and evaluate as follows, Amazon S3 returns
-// 200 OK and copies the data:
-//
-// * x-amz-copy-source-if-match condition evaluates to true
-//
-// * x-amz-copy-source-if-unmodified-since condition evaluates to false
-//
-// If both the x-amz-copy-source-if-none-match and x-amz-copy-source-if-modified-since
-// headers are present in the request and evaluate as follows, Amazon S3 returns
-// the 412 Precondition Failed response code:
-//
-// * x-amz-copy-source-if-none-match condition evaluates to false
-//
-// * x-amz-copy-source-if-modified-since condition evaluates to true
-//
-// All headers with the x-amz- prefix, including x-amz-copy-source, must be
-// signed.
-//
-// Server-side encryption
-//
-// When you perform a CopyObject operation, you can optionally use the appropriate
-// encryption-related headers to encrypt the object using server-side encryption
-// with AWS managed encryption keys (SSE-S3 or SSE-KMS) or a customer-provided
-// encryption key. With server-side encryption, Amazon S3 encrypts your data
-// as it writes it to disks in its data centers and decrypts the data when you
-// access it. For more information about server-side encryption, see Using Server-Side
-// Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
-//
-// If a target object uses SSE-KMS, you can enable an S3 Bucket Key for the
-// object. For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
-// in the Amazon S3 User Guide.
-//
-// Access Control List (ACL)-Specific Request Headers
-//
-// When copying an object, you can optionally use headers to grant ACL-based
-// permissions. By default, all objects are private. Only the owner has full
-// access control. When adding a new object, you can grant permissions to individual
-// AWS accounts or to predefined groups defined by Amazon S3. These permissions
-// are then added to the ACL on the object. For more information, see Access
-// Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
-// and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
-//
-// Storage Class Options
-//
-// You can use the CopyObject action to change the storage class of an object
-// that is already stored in Amazon S3 using the StorageClass parameter. For
-// more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
-// in the Amazon S3 User Guide.
-//
-// Versioning
-//
-// By default, x-amz-copy-source identifies the current version of an object
-// to copy. If the current version is a delete marker, Amazon S3 behaves as
-// if the object was deleted. To copy a different version, use the versionId
-// subresource.
-//
-// If you enable versioning on the target bucket, Amazon S3 generates a unique
-// version ID for the object being copied. This version ID is different from
-// the version ID of the source object. Amazon S3 returns the version ID of
-// the copied object in the x-amz-version-id response header in the response.
-//
-// If you do not enable versioning or suspend it on the target bucket, the version
-// ID that Amazon S3 generates is always null.
-//
-// If the source object's storage class is GLACIER, you must restore a copy
-// of this object before you can use it as a source object for the copy operation.
-// For more information, see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html).
-//
-// The following operations are related to CopyObject:
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// For more information, see Copying Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/CopyingObjectsExamples.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation CopyObject for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeObjectNotInActiveTierError "ObjectNotInActiveTierError"
-// The source object of the COPY action is not in the active tier and is only
-// stored in Amazon S3 Glacier.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CopyObject
-func (c *S3) CopyObject(input *CopyObjectInput) (*CopyObjectOutput, error) {
- req, out := c.CopyObjectRequest(input)
- return out, req.Send()
-}
-
-// CopyObjectWithContext is the same as CopyObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CopyObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) CopyObjectWithContext(ctx aws.Context, input *CopyObjectInput, opts ...request.Option) (*CopyObjectOutput, error) {
- req, out := c.CopyObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateBucket = "CreateBucket"
-
-// CreateBucketRequest generates a "aws/request.Request" representing the
-// client's request for the CreateBucket operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateBucket for more information on using the CreateBucket
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateBucketRequest method.
-// req, resp := client.CreateBucketRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
-func (c *S3) CreateBucketRequest(input *CreateBucketInput) (req *request.Request, output *CreateBucketOutput) {
- op := &request.Operation{
- Name: opCreateBucket,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}",
- }
-
- if input == nil {
- input = &CreateBucketInput{}
- }
-
- output = &CreateBucketOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateBucket API operation for Amazon Simple Storage Service.
-//
-// Creates a new S3 bucket. To create a bucket, you must register with Amazon
-// S3 and have a valid AWS Access Key ID to authenticate requests. Anonymous
-// requests are never allowed to create buckets. By creating the bucket, you
-// become the bucket owner.
-//
-// Not every string is an acceptable bucket name. For information about bucket
-// naming restrictions, see Bucket naming rules (https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html).
-//
-// If you want to create an Amazon S3 on Outposts bucket, see Create Bucket
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateBucket.html).
-//
-// By default, the bucket is created in the US East (N. Virginia) Region. You
-// can optionally specify a Region in the request body. You might choose a Region
-// to optimize latency, minimize costs, or address regulatory requirements.
-// For example, if you reside in Europe, you will probably find it advantageous
-// to create buckets in the Europe (Ireland) Region. For more information, see
-// Accessing a bucket (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
-//
-// If you send your create bucket request to the s3.amazonaws.com endpoint,
-// the request goes to the us-east-1 Region. Accordingly, the signature calculations
-// in Signature Version 4 must use us-east-1 as the Region, even if the location
-// constraint in the request specifies another Region where the bucket is to
-// be created. If you create a bucket in a Region other than US East (N. Virginia),
-// your application must be able to handle 307 redirect. For more information,
-// see Virtual hosting of buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html).
-//
-// When creating a bucket using this operation, you can optionally specify the
-// accounts or groups that should be granted specific permissions on the bucket.
-// There are two ways to grant the appropriate permissions using the request
-// headers.
-//
-// * Specify a canned ACL using the x-amz-acl request header. Amazon S3 supports
-// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
-// predefined set of grantees and permissions. For more information, see
-// Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-//
-// * Specify access permissions explicitly using the x-amz-grant-read, x-amz-grant-write,
-// x-amz-grant-read-acp, x-amz-grant-write-acp, and x-amz-grant-full-control
-// headers. These headers map to the set of permissions Amazon S3 supports
-// in an ACL. For more information, see Access control list (ACL) overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html). You
-// specify each grantee as a type=value pair, where the type is one of the
-// following: id – if the value specified is the canonical user ID of an
-// AWS account uri – if you are granting permissions to a predefined group
-// emailAddress – if the value specified is the email address of an AWS
-// account Using email addresses to specify a grantee is only supported in
-// the following AWS Regions: US East (N. Virginia) US West (N. California)
-// US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific
-// (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all
-// the Amazon S3 supported Regions and endpoints, see Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in
-// the AWS General Reference. For example, the following x-amz-grant-read
-// header grants the AWS accounts identified by account IDs permissions to
-// read object data and its metadata: x-amz-grant-read: id="11112222333",
-// id="444455556666"
-//
-// You can use either a canned ACL or specify access permissions explicitly.
-// You cannot do both.
-//
-// The following operations are related to CreateBucket:
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// * DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation CreateBucket for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeBucketAlreadyExists "BucketAlreadyExists"
-// The requested bucket name is not available. The bucket namespace is shared
-// by all users of the system. Select a different name and try again.
-//
-// * ErrCodeBucketAlreadyOwnedByYou "BucketAlreadyOwnedByYou"
-// The bucket you tried to create already exists, and you own it. Amazon S3
-// returns this error in all AWS Regions except in the North Virginia Region.
-// For legacy compatibility, if you re-create an existing bucket that you already
-// own in the North Virginia Region, Amazon S3 returns 200 OK and resets the
-// bucket access control lists (ACLs).
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateBucket
-func (c *S3) CreateBucket(input *CreateBucketInput) (*CreateBucketOutput, error) {
- req, out := c.CreateBucketRequest(input)
- return out, req.Send()
-}
-
-// CreateBucketWithContext is the same as CreateBucket with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateBucket for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) CreateBucketWithContext(ctx aws.Context, input *CreateBucketInput, opts ...request.Option) (*CreateBucketOutput, error) {
- req, out := c.CreateBucketRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateMultipartUpload = "CreateMultipartUpload"
-
-// CreateMultipartUploadRequest generates a "aws/request.Request" representing the
-// client's request for the CreateMultipartUpload operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateMultipartUpload for more information on using the CreateMultipartUpload
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateMultipartUploadRequest method.
-// req, resp := client.CreateMultipartUploadRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
-func (c *S3) CreateMultipartUploadRequest(input *CreateMultipartUploadInput) (req *request.Request, output *CreateMultipartUploadOutput) {
- op := &request.Operation{
- Name: opCreateMultipartUpload,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}/{Key+}?uploads",
- }
-
- if input == nil {
- input = &CreateMultipartUploadInput{}
- }
-
- output = &CreateMultipartUploadOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateMultipartUpload API operation for Amazon Simple Storage Service.
-//
-// This action initiates a multipart upload and returns an upload ID. This upload
-// ID is used to associate all of the parts in the specific multipart upload.
-// You specify this upload ID in each of your subsequent upload part requests
-// (see UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)).
-// You also include this upload ID in the final request to either complete or
-// abort the multipart upload request.
-//
-// For more information about multipart uploads, see Multipart Upload Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html).
-//
-// If you have configured a lifecycle rule to abort incomplete multipart uploads,
-// the upload must complete within the number of days specified in the bucket
-// lifecycle configuration. Otherwise, the incomplete multipart upload becomes
-// eligible for an abort action and Amazon S3 aborts the multipart upload. For
-// more information, see Aborting Incomplete Multipart Uploads Using a Bucket
-// Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
-//
-// For information about the permissions required to use the multipart upload
-// API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// For request signing, multipart upload is just a series of regular requests.
-// You initiate a multipart upload, send one or more requests to upload parts,
-// and then complete the multipart upload process. You sign each request individually.
-// There is nothing special about signing multipart upload requests. For more
-// information about signing, see Authenticating Requests (AWS Signature Version
-// 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
-//
-// After you initiate a multipart upload and upload one or more parts, to stop
-// being charged for storing the uploaded parts, you must either complete or
-// abort the multipart upload. Amazon S3 frees up the space used to store the
-// parts and stop charging you for storing them only after you either complete
-// or abort a multipart upload.
-//
-// You can optionally request server-side encryption. For server-side encryption,
-// Amazon S3 encrypts your data as it writes it to disks in its data centers
-// and decrypts it when you access it. You can provide your own encryption key,
-// or use AWS Key Management Service (AWS KMS) customer master keys (CMKs) or
-// Amazon S3-managed encryption keys. If you choose to provide your own encryption
-// key, the request headers you provide in UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-// and UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
-// requests must match the headers you used in the request to initiate the upload
-// by using CreateMultipartUpload.
-//
-// To perform a multipart upload with encryption using an AWS KMS CMK, the requester
-// must have permission to the kms:Decrypt and kms:GenerateDataKey* actions
-// on the key. These permissions are required because Amazon S3 must decrypt
-// and read data from the encrypted file parts before it completes the multipart
-// upload. For more information, see Multipart upload API and permissions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/mpuoverview.html#mpuAndPermissions)
-// in the Amazon S3 User Guide.
-//
-// If your AWS Identity and Access Management (IAM) user or role is in the same
-// AWS account as the AWS KMS CMK, then you must have these permissions on the
-// key policy. If your IAM user or role belongs to a different account than
-// the key, then you must have the permissions on both the key policy and your
-// IAM user or role.
-//
-// For more information, see Protecting Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html).
-//
-// Access Permissions
-//
-// When copying an object, you can optionally specify the accounts or groups
-// that should be granted specific permissions on the new object. There are
-// two ways to grant the permissions using the request headers:
-//
-// * Specify a canned ACL with the x-amz-acl request header. For more information,
-// see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-//
-// * Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
-// x-amz-grant-write-acp, and x-amz-grant-full-control headers. These parameters
-// map to the set of permissions that Amazon S3 supports in an ACL. For more
-// information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
-//
-// You can use either a canned ACL or specify access permissions explicitly.
-// You cannot do both.
-//
-// Server-Side- Encryption-Specific Request Headers
-//
-// You can optionally tell Amazon S3 to encrypt data at rest using server-side
-// encryption. Server-side encryption is for data encryption at rest. Amazon
-// S3 encrypts your data as it writes it to disks in its data centers and decrypts
-// it when you access it. The option you use depends on whether you want to
-// use AWS managed encryption keys or provide your own encryption key.
-//
-// * Use encryption keys managed by Amazon S3 or customer master keys (CMKs)
-// stored in AWS Key Management Service (AWS KMS) – If you want AWS to
-// manage the keys used to encrypt data, specify the following headers in
-// the request. x-amz-server-side-encryption x-amz-server-side-encryption-aws-kms-key-id
-// x-amz-server-side-encryption-context If you specify x-amz-server-side-encryption:aws:kms,
-// but don't provide x-amz-server-side-encryption-aws-kms-key-id, Amazon
-// S3 uses the AWS managed CMK in AWS KMS to protect the data. All GET and
-// PUT requests for an object protected by AWS KMS fail if you don't make
-// them with SSL or by using SigV4. For more information about server-side
-// encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting Data
-// Using Server-Side Encryption with CMKs stored in AWS KMS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
-//
-// * Use customer-provided encryption keys – If you want to manage your
-// own encryption keys, provide all the following headers in the request.
-// x-amz-server-side-encryption-customer-algorithm x-amz-server-side-encryption-customer-key
-// x-amz-server-side-encryption-customer-key-MD5 For more information about
-// server-side encryption with CMKs stored in AWS KMS (SSE-KMS), see Protecting
-// Data Using Server-Side Encryption with CMKs stored in AWS KMS (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingKMSEncryption.html).
-//
-// Access-Control-List (ACL)-Specific Request Headers
-//
-// You also can use the following access control–related headers with this
-// operation. By default, all objects are private. Only the owner has full access
-// control. When adding a new object, you can grant permissions to individual
-// AWS accounts or to predefined groups defined by Amazon S3. These permissions
-// are then added to the access control list (ACL) on the object. For more information,
-// see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
-// With this operation, you can grant access permissions using one of the following
-// two methods:
-//
-// * Specify a canned ACL (x-amz-acl) — Amazon S3 supports a set of predefined
-// ACLs, known as canned ACLs. Each canned ACL has a predefined set of grantees
-// and permissions. For more information, see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-//
-// * Specify access permissions explicitly — To explicitly grant access
-// permissions to specific AWS accounts or groups, use the following headers.
-// Each header maps to specific permissions that Amazon S3 supports in an
-// ACL. For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
-// In the header, you specify a list of grantees who get the specific permission.
-// To grant permissions explicitly, use: x-amz-grant-read x-amz-grant-write
-// x-amz-grant-read-acp x-amz-grant-write-acp x-amz-grant-full-control You
-// specify each grantee as a type=value pair, where the type is one of the
-// following: id – if the value specified is the canonical user ID of an
-// AWS account uri – if you are granting permissions to a predefined group
-// emailAddress – if the value specified is the email address of an AWS
-// account Using email addresses to specify a grantee is only supported in
-// the following AWS Regions: US East (N. Virginia) US West (N. California)
-// US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific
-// (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all
-// the Amazon S3 supported Regions and endpoints, see Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in
-// the AWS General Reference. For example, the following x-amz-grant-read
-// header grants the AWS accounts identified by account IDs permissions to
-// read object data and its metadata: x-amz-grant-read: id="11112222333",
-// id="444455556666"
-//
-// The following operations are related to CreateMultipartUpload:
-//
-// * UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// * CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// * AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// * ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// * ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation CreateMultipartUpload for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/CreateMultipartUpload
-func (c *S3) CreateMultipartUpload(input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error) {
- req, out := c.CreateMultipartUploadRequest(input)
- return out, req.Send()
-}
-
-// CreateMultipartUploadWithContext is the same as CreateMultipartUpload with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateMultipartUpload for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) CreateMultipartUploadWithContext(ctx aws.Context, input *CreateMultipartUploadInput, opts ...request.Option) (*CreateMultipartUploadOutput, error) {
- req, out := c.CreateMultipartUploadRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucket = "DeleteBucket"
-
-// DeleteBucketRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucket operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucket for more information on using the DeleteBucket
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketRequest method.
-// req, resp := client.DeleteBucketRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
-func (c *S3) DeleteBucketRequest(input *DeleteBucketInput) (req *request.Request, output *DeleteBucketOutput) {
- op := &request.Operation{
- Name: opDeleteBucket,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}",
- }
-
- if input == nil {
- input = &DeleteBucketInput{}
- }
-
- output = &DeleteBucketOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucket API operation for Amazon Simple Storage Service.
-//
-// Deletes the S3 bucket. All objects (including all object versions and delete
-// markers) in the bucket must be deleted before the bucket itself can be deleted.
-//
-// Related Resources
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucket for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucket
-func (c *S3) DeleteBucket(input *DeleteBucketInput) (*DeleteBucketOutput, error) {
- req, out := c.DeleteBucketRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketWithContext is the same as DeleteBucket with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucket for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketWithContext(ctx aws.Context, input *DeleteBucketInput, opts ...request.Option) (*DeleteBucketOutput, error) {
- req, out := c.DeleteBucketRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketAnalyticsConfiguration = "DeleteBucketAnalyticsConfiguration"
-
-// DeleteBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketAnalyticsConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketAnalyticsConfiguration for more information on using the DeleteBucketAnalyticsConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketAnalyticsConfigurationRequest method.
-// req, resp := client.DeleteBucketAnalyticsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
-func (c *S3) DeleteBucketAnalyticsConfigurationRequest(input *DeleteBucketAnalyticsConfigurationInput) (req *request.Request, output *DeleteBucketAnalyticsConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketAnalyticsConfiguration,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?analytics",
- }
-
- if input == nil {
- input = &DeleteBucketAnalyticsConfigurationInput{}
- }
-
- output = &DeleteBucketAnalyticsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Deletes an analytics configuration for the bucket (specified by the analytics
-// configuration ID).
-//
-// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For information about the Amazon S3 analytics feature, see Amazon S3 Analytics
-// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
-//
-// The following operations are related to DeleteBucketAnalyticsConfiguration:
-//
-// * GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// * ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
-//
-// * PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketAnalyticsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketAnalyticsConfiguration
-func (c *S3) DeleteBucketAnalyticsConfiguration(input *DeleteBucketAnalyticsConfigurationInput) (*DeleteBucketAnalyticsConfigurationOutput, error) {
- req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketAnalyticsConfigurationWithContext is the same as DeleteBucketAnalyticsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketAnalyticsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *DeleteBucketAnalyticsConfigurationInput, opts ...request.Option) (*DeleteBucketAnalyticsConfigurationOutput, error) {
- req, out := c.DeleteBucketAnalyticsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketCors = "DeleteBucketCors"
-
-// DeleteBucketCorsRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketCors operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketCors for more information on using the DeleteBucketCors
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketCorsRequest method.
-// req, resp := client.DeleteBucketCorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
-func (c *S3) DeleteBucketCorsRequest(input *DeleteBucketCorsInput) (req *request.Request, output *DeleteBucketCorsOutput) {
- op := &request.Operation{
- Name: opDeleteBucketCors,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?cors",
- }
-
- if input == nil {
- input = &DeleteBucketCorsInput{}
- }
-
- output = &DeleteBucketCorsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketCors API operation for Amazon Simple Storage Service.
-//
-// Deletes the cors configuration information set for the bucket.
-//
-// To use this operation, you must have permission to perform the s3:PutBucketCORS
-// action. The bucket owner has this permission by default and can grant this
-// permission to others.
-//
-// For information about cors, see Enabling Cross-Origin Resource Sharing (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html)
-// in the Amazon S3 User Guide.
-//
-// Related Resources:
-//
-// * PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
-//
-// * RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketCors for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketCors
-func (c *S3) DeleteBucketCors(input *DeleteBucketCorsInput) (*DeleteBucketCorsOutput, error) {
- req, out := c.DeleteBucketCorsRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketCorsWithContext is the same as DeleteBucketCors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketCors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketCorsWithContext(ctx aws.Context, input *DeleteBucketCorsInput, opts ...request.Option) (*DeleteBucketCorsOutput, error) {
- req, out := c.DeleteBucketCorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketEncryption = "DeleteBucketEncryption"
-
-// DeleteBucketEncryptionRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketEncryption operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketEncryption for more information on using the DeleteBucketEncryption
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketEncryptionRequest method.
-// req, resp := client.DeleteBucketEncryptionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
-func (c *S3) DeleteBucketEncryptionRequest(input *DeleteBucketEncryptionInput) (req *request.Request, output *DeleteBucketEncryptionOutput) {
- op := &request.Operation{
- Name: opDeleteBucketEncryption,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?encryption",
- }
-
- if input == nil {
- input = &DeleteBucketEncryptionInput{}
- }
-
- output = &DeleteBucketEncryptionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketEncryption API operation for Amazon Simple Storage Service.
-//
-// This implementation of the DELETE action removes default encryption from
-// the bucket. For information about the Amazon S3 default encryption feature,
-// see Amazon S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
-// in the Amazon S3 User Guide.
-//
-// To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// Related Resources
-//
-// * PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
-//
-// * GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketEncryption for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketEncryption
-func (c *S3) DeleteBucketEncryption(input *DeleteBucketEncryptionInput) (*DeleteBucketEncryptionOutput, error) {
- req, out := c.DeleteBucketEncryptionRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketEncryptionWithContext is the same as DeleteBucketEncryption with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketEncryption for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketEncryptionWithContext(ctx aws.Context, input *DeleteBucketEncryptionInput, opts ...request.Option) (*DeleteBucketEncryptionOutput, error) {
- req, out := c.DeleteBucketEncryptionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketIntelligentTieringConfiguration = "DeleteBucketIntelligentTieringConfiguration"
-
-// DeleteBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketIntelligentTieringConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketIntelligentTieringConfiguration for more information on using the DeleteBucketIntelligentTieringConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketIntelligentTieringConfigurationRequest method.
-// req, resp := client.DeleteBucketIntelligentTieringConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketIntelligentTieringConfiguration
-func (c *S3) DeleteBucketIntelligentTieringConfigurationRequest(input *DeleteBucketIntelligentTieringConfigurationInput) (req *request.Request, output *DeleteBucketIntelligentTieringConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketIntelligentTieringConfiguration,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?intelligent-tiering",
- }
-
- if input == nil {
- input = &DeleteBucketIntelligentTieringConfigurationInput{}
- }
-
- output = &DeleteBucketIntelligentTieringConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
-//
-// Deletes the S3 Intelligent-Tiering configuration from the specified bucket.
-//
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without additional operational overhead. S3 Intelligent-Tiering delivers
-// automatic cost savings by moving data between access tiers, when access patterns
-// change.
-//
-// The S3 Intelligent-Tiering storage class is suitable for objects larger than
-// 128 KB that you plan to store for at least 30 days. If the size of an object
-// is less than 128 KB, it is not eligible for auto-tiering. Smaller objects
-// can be stored, but they are always charged at the frequent access tier rates
-// in the S3 Intelligent-Tiering storage class.
-//
-// If you delete an object before the end of the 30-day minimum storage duration
-// period, you are charged for 30 days. For more information, see Storage class
-// for automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-//
-// Operations related to DeleteBucketIntelligentTieringConfiguration include:
-//
-// * GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
-//
-// * PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// * ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketIntelligentTieringConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketIntelligentTieringConfiguration
-func (c *S3) DeleteBucketIntelligentTieringConfiguration(input *DeleteBucketIntelligentTieringConfigurationInput) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.DeleteBucketIntelligentTieringConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketIntelligentTieringConfigurationWithContext is the same as DeleteBucketIntelligentTieringConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketIntelligentTieringConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *DeleteBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*DeleteBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.DeleteBucketIntelligentTieringConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketInventoryConfiguration = "DeleteBucketInventoryConfiguration"
-
-// DeleteBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketInventoryConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketInventoryConfiguration for more information on using the DeleteBucketInventoryConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketInventoryConfigurationRequest method.
-// req, resp := client.DeleteBucketInventoryConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
-func (c *S3) DeleteBucketInventoryConfigurationRequest(input *DeleteBucketInventoryConfigurationInput) (req *request.Request, output *DeleteBucketInventoryConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketInventoryConfiguration,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?inventory",
- }
-
- if input == nil {
- input = &DeleteBucketInventoryConfigurationInput{}
- }
-
- output = &DeleteBucketInventoryConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
-//
-// Deletes an inventory configuration (identified by the inventory ID) from
-// the bucket.
-//
-// To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html).
-//
-// Operations related to DeleteBucketInventoryConfiguration include:
-//
-// * GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// * PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
-//
-// * ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketInventoryConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketInventoryConfiguration
-func (c *S3) DeleteBucketInventoryConfiguration(input *DeleteBucketInventoryConfigurationInput) (*DeleteBucketInventoryConfigurationOutput, error) {
- req, out := c.DeleteBucketInventoryConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketInventoryConfigurationWithContext is the same as DeleteBucketInventoryConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketInventoryConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketInventoryConfigurationWithContext(ctx aws.Context, input *DeleteBucketInventoryConfigurationInput, opts ...request.Option) (*DeleteBucketInventoryConfigurationOutput, error) {
- req, out := c.DeleteBucketInventoryConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketLifecycle = "DeleteBucketLifecycle"
-
-// DeleteBucketLifecycleRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketLifecycle operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketLifecycle for more information on using the DeleteBucketLifecycle
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketLifecycleRequest method.
-// req, resp := client.DeleteBucketLifecycleRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
-func (c *S3) DeleteBucketLifecycleRequest(input *DeleteBucketLifecycleInput) (req *request.Request, output *DeleteBucketLifecycleOutput) {
- op := &request.Operation{
- Name: opDeleteBucketLifecycle,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &DeleteBucketLifecycleInput{}
- }
-
- output = &DeleteBucketLifecycleOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketLifecycle API operation for Amazon Simple Storage Service.
-//
-// Deletes the lifecycle configuration from the specified bucket. Amazon S3
-// removes all the lifecycle configuration rules in the lifecycle subresource
-// associated with the bucket. Your objects never expire, and Amazon S3 no longer
-// automatically deletes any objects on the basis of rules contained in the
-// deleted lifecycle configuration.
-//
-// To use this operation, you must have permission to perform the s3:PutLifecycleConfiguration
-// action. By default, the bucket owner has this permission and the bucket owner
-// can grant this permission to others.
-//
-// There is usually some time lag before lifecycle configuration deletion is
-// fully propagated to all the Amazon S3 systems.
-//
-// For more information about the object expiration, see Elements to Describe
-// Lifecycle Actions (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#intro-lifecycle-rules-actions).
-//
-// Related actions include:
-//
-// * PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-//
-// * GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketLifecycle for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketLifecycle
-func (c *S3) DeleteBucketLifecycle(input *DeleteBucketLifecycleInput) (*DeleteBucketLifecycleOutput, error) {
- req, out := c.DeleteBucketLifecycleRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketLifecycleWithContext is the same as DeleteBucketLifecycle with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketLifecycle for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketLifecycleWithContext(ctx aws.Context, input *DeleteBucketLifecycleInput, opts ...request.Option) (*DeleteBucketLifecycleOutput, error) {
- req, out := c.DeleteBucketLifecycleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketMetricsConfiguration = "DeleteBucketMetricsConfiguration"
-
-// DeleteBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketMetricsConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketMetricsConfiguration for more information on using the DeleteBucketMetricsConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketMetricsConfigurationRequest method.
-// req, resp := client.DeleteBucketMetricsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
-func (c *S3) DeleteBucketMetricsConfigurationRequest(input *DeleteBucketMetricsConfigurationInput) (req *request.Request, output *DeleteBucketMetricsConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketMetricsConfiguration,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?metrics",
- }
-
- if input == nil {
- input = &DeleteBucketMetricsConfigurationInput{}
- }
-
- output = &DeleteBucketMetricsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Deletes a metrics configuration for the Amazon CloudWatch request metrics
-// (specified by the metrics configuration ID) from the bucket. Note that this
-// doesn't include the daily storage metrics.
-//
-// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For information about CloudWatch request metrics for Amazon S3, see Monitoring
-// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
-//
-// The following operations are related to DeleteBucketMetricsConfiguration:
-//
-// * GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
-//
-// * PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// * ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// * Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketMetricsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketMetricsConfiguration
-func (c *S3) DeleteBucketMetricsConfiguration(input *DeleteBucketMetricsConfigurationInput) (*DeleteBucketMetricsConfigurationOutput, error) {
- req, out := c.DeleteBucketMetricsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketMetricsConfigurationWithContext is the same as DeleteBucketMetricsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketMetricsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketMetricsConfigurationWithContext(ctx aws.Context, input *DeleteBucketMetricsConfigurationInput, opts ...request.Option) (*DeleteBucketMetricsConfigurationOutput, error) {
- req, out := c.DeleteBucketMetricsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketOwnershipControls = "DeleteBucketOwnershipControls"
-
-// DeleteBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketOwnershipControls operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketOwnershipControls for more information on using the DeleteBucketOwnershipControls
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketOwnershipControlsRequest method.
-// req, resp := client.DeleteBucketOwnershipControlsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOwnershipControls
-func (c *S3) DeleteBucketOwnershipControlsRequest(input *DeleteBucketOwnershipControlsInput) (req *request.Request, output *DeleteBucketOwnershipControlsOutput) {
- op := &request.Operation{
- Name: opDeleteBucketOwnershipControls,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?ownershipControls",
- }
-
- if input == nil {
- input = &DeleteBucketOwnershipControlsInput{}
- }
-
- output = &DeleteBucketOwnershipControlsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketOwnershipControls API operation for Amazon Simple Storage Service.
-//
-// Removes OwnershipControls for an Amazon S3 bucket. To use this operation,
-// you must have the s3:PutBucketOwnershipControls permission. For more information
-// about Amazon S3 permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-//
-// For information about Amazon S3 Object Ownership, see Using Object Ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
-//
-// The following operations are related to DeleteBucketOwnershipControls:
-//
-// * GetBucketOwnershipControls
-//
-// * PutBucketOwnershipControls
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketOwnershipControls for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketOwnershipControls
-func (c *S3) DeleteBucketOwnershipControls(input *DeleteBucketOwnershipControlsInput) (*DeleteBucketOwnershipControlsOutput, error) {
- req, out := c.DeleteBucketOwnershipControlsRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketOwnershipControlsWithContext is the same as DeleteBucketOwnershipControls with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketOwnershipControls for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketOwnershipControlsWithContext(ctx aws.Context, input *DeleteBucketOwnershipControlsInput, opts ...request.Option) (*DeleteBucketOwnershipControlsOutput, error) {
- req, out := c.DeleteBucketOwnershipControlsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketPolicy = "DeleteBucketPolicy"
-
-// DeleteBucketPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketPolicy for more information on using the DeleteBucketPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketPolicyRequest method.
-// req, resp := client.DeleteBucketPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
-func (c *S3) DeleteBucketPolicyRequest(input *DeleteBucketPolicyInput) (req *request.Request, output *DeleteBucketPolicyOutput) {
- op := &request.Operation{
- Name: opDeleteBucketPolicy,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?policy",
- }
-
- if input == nil {
- input = &DeleteBucketPolicyInput{}
- }
-
- output = &DeleteBucketPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketPolicy API operation for Amazon Simple Storage Service.
-//
-// This implementation of the DELETE action uses the policy subresource to delete
-// the policy of a specified bucket. If you are using an identity other than
-// the root user of the AWS account that owns the bucket, the calling identity
-// must have the DeleteBucketPolicy permissions on the specified bucket and
-// belong to the bucket owner's account to use this operation.
-//
-// If you don't have DeleteBucketPolicy permissions, Amazon S3 returns a 403
-// Access Denied error. If you have the correct permissions, but you're not
-// using an identity that belongs to the bucket owner's account, Amazon S3 returns
-// a 405 Method Not Allowed error.
-//
-// As a security precaution, the root user of the AWS account that owns a bucket
-// can always use this operation, even if the policy explicitly denies the root
-// user the ability to perform this action.
-//
-// For more information about bucket policies, see Using Bucket Policies and
-// UserPolicies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
-//
-// The following operations are related to DeleteBucketPolicy
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketPolicy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketPolicy
-func (c *S3) DeleteBucketPolicy(input *DeleteBucketPolicyInput) (*DeleteBucketPolicyOutput, error) {
- req, out := c.DeleteBucketPolicyRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketPolicyWithContext is the same as DeleteBucketPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketPolicyWithContext(ctx aws.Context, input *DeleteBucketPolicyInput, opts ...request.Option) (*DeleteBucketPolicyOutput, error) {
- req, out := c.DeleteBucketPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketReplication = "DeleteBucketReplication"
-
-// DeleteBucketReplicationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketReplication operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketReplication for more information on using the DeleteBucketReplication
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketReplicationRequest method.
-// req, resp := client.DeleteBucketReplicationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
-func (c *S3) DeleteBucketReplicationRequest(input *DeleteBucketReplicationInput) (req *request.Request, output *DeleteBucketReplicationOutput) {
- op := &request.Operation{
- Name: opDeleteBucketReplication,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?replication",
- }
-
- if input == nil {
- input = &DeleteBucketReplicationInput{}
- }
-
- output = &DeleteBucketReplicationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketReplication API operation for Amazon Simple Storage Service.
-//
-// Deletes the replication configuration from the bucket.
-//
-// To use this operation, you must have permissions to perform the s3:PutReplicationConfiguration
-// action. The bucket owner has these permissions by default and can grant it
-// to others. For more information about permissions, see Permissions Related
-// to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// It can take a while for the deletion of a replication configuration to fully
-// propagate.
-//
-// For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
-// in the Amazon S3 User Guide.
-//
-// The following operations are related to DeleteBucketReplication:
-//
-// * PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
-//
-// * GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketReplication for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketReplication
-func (c *S3) DeleteBucketReplication(input *DeleteBucketReplicationInput) (*DeleteBucketReplicationOutput, error) {
- req, out := c.DeleteBucketReplicationRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketReplicationWithContext is the same as DeleteBucketReplication with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketReplication for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketReplicationWithContext(ctx aws.Context, input *DeleteBucketReplicationInput, opts ...request.Option) (*DeleteBucketReplicationOutput, error) {
- req, out := c.DeleteBucketReplicationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketTagging = "DeleteBucketTagging"
-
-// DeleteBucketTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketTagging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketTagging for more information on using the DeleteBucketTagging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketTaggingRequest method.
-// req, resp := client.DeleteBucketTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
-func (c *S3) DeleteBucketTaggingRequest(input *DeleteBucketTaggingInput) (req *request.Request, output *DeleteBucketTaggingOutput) {
- op := &request.Operation{
- Name: opDeleteBucketTagging,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?tagging",
- }
-
- if input == nil {
- input = &DeleteBucketTaggingInput{}
- }
-
- output = &DeleteBucketTaggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketTagging API operation for Amazon Simple Storage Service.
-//
-// Deletes the tags from the bucket.
-//
-// To use this operation, you must have permission to perform the s3:PutBucketTagging
-// action. By default, the bucket owner has this permission and can grant this
-// permission to others.
-//
-// The following operations are related to DeleteBucketTagging:
-//
-// * GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
-//
-// * PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketTagging
-func (c *S3) DeleteBucketTagging(input *DeleteBucketTaggingInput) (*DeleteBucketTaggingOutput, error) {
- req, out := c.DeleteBucketTaggingRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketTaggingWithContext is the same as DeleteBucketTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketTaggingWithContext(ctx aws.Context, input *DeleteBucketTaggingInput, opts ...request.Option) (*DeleteBucketTaggingOutput, error) {
- req, out := c.DeleteBucketTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteBucketWebsite = "DeleteBucketWebsite"
-
-// DeleteBucketWebsiteRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteBucketWebsite operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteBucketWebsite for more information on using the DeleteBucketWebsite
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteBucketWebsiteRequest method.
-// req, resp := client.DeleteBucketWebsiteRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
-func (c *S3) DeleteBucketWebsiteRequest(input *DeleteBucketWebsiteInput) (req *request.Request, output *DeleteBucketWebsiteOutput) {
- op := &request.Operation{
- Name: opDeleteBucketWebsite,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?website",
- }
-
- if input == nil {
- input = &DeleteBucketWebsiteInput{}
- }
-
- output = &DeleteBucketWebsiteOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteBucketWebsite API operation for Amazon Simple Storage Service.
-//
-// This action removes the website configuration for a bucket. Amazon S3 returns
-// a 200 OK response upon successfully deleting a website configuration on the
-// specified bucket. You will get a 200 OK response if the website configuration
-// you are trying to delete does not exist on the bucket. Amazon S3 returns
-// a 404 response if the bucket specified in the request does not exist.
-//
-// This DELETE action requires the S3:DeleteBucketWebsite permission. By default,
-// only the bucket owner can delete the website configuration attached to a
-// bucket. However, bucket owners can grant other users permission to delete
-// the website configuration by writing a bucket policy granting them the S3:DeleteBucketWebsite
-// permission.
-//
-// For more information about hosting websites, see Hosting Websites on Amazon
-// S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
-//
-// The following operations are related to DeleteBucketWebsite:
-//
-// * GetBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html)
-//
-// * PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteBucketWebsite for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteBucketWebsite
-func (c *S3) DeleteBucketWebsite(input *DeleteBucketWebsiteInput) (*DeleteBucketWebsiteOutput, error) {
- req, out := c.DeleteBucketWebsiteRequest(input)
- return out, req.Send()
-}
-
-// DeleteBucketWebsiteWithContext is the same as DeleteBucketWebsite with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteBucketWebsite for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteBucketWebsiteWithContext(ctx aws.Context, input *DeleteBucketWebsiteInput, opts ...request.Option) (*DeleteBucketWebsiteOutput, error) {
- req, out := c.DeleteBucketWebsiteRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteObject = "DeleteObject"
-
-// DeleteObjectRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteObject operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteObject for more information on using the DeleteObject
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteObjectRequest method.
-// req, resp := client.DeleteObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
-func (c *S3) DeleteObjectRequest(input *DeleteObjectInput) (req *request.Request, output *DeleteObjectOutput) {
- op := &request.Operation{
- Name: opDeleteObject,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &DeleteObjectInput{}
- }
-
- output = &DeleteObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DeleteObject API operation for Amazon Simple Storage Service.
-//
-// Removes the null version (if there is one) of an object and inserts a delete
-// marker, which becomes the latest version of the object. If there isn't a
-// null version, Amazon S3 does not remove any objects but will still respond
-// that the command was successful.
-//
-// To remove a specific version, you must be the bucket owner and you must use
-// the version Id subresource. Using this subresource permanently deletes the
-// version. If the object deleted is a delete marker, Amazon S3 sets the response
-// header, x-amz-delete-marker, to true.
-//
-// If the object you want to delete is in a bucket where the bucket versioning
-// configuration is MFA Delete enabled, you must include the x-amz-mfa request
-// header in the DELETE versionId request. Requests that include x-amz-mfa must
-// use HTTPS.
-//
-// For more information about MFA Delete, see Using MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMFADelete.html).
-// To see sample requests that use versioning, see Sample Request (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html#ExampleVersionObjectDelete).
-//
-// You can delete objects by explicitly calling DELETE Object or configure its
-// lifecycle (PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html))
-// to enable Amazon S3 to remove them for you. If you want to block users or
-// accounts from removing or deleting objects from your bucket, you must deny
-// them the s3:DeleteObject, s3:DeleteObjectVersion, and s3:PutLifeCycleConfiguration
-// actions.
-//
-// The following action is related to DeleteObject:
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteObject for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObject
-func (c *S3) DeleteObject(input *DeleteObjectInput) (*DeleteObjectOutput, error) {
- req, out := c.DeleteObjectRequest(input)
- return out, req.Send()
-}
-
-// DeleteObjectWithContext is the same as DeleteObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteObjectWithContext(ctx aws.Context, input *DeleteObjectInput, opts ...request.Option) (*DeleteObjectOutput, error) {
- req, out := c.DeleteObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteObjectTagging = "DeleteObjectTagging"
-
-// DeleteObjectTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteObjectTagging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteObjectTagging for more information on using the DeleteObjectTagging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteObjectTaggingRequest method.
-// req, resp := client.DeleteObjectTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
-func (c *S3) DeleteObjectTaggingRequest(input *DeleteObjectTaggingInput) (req *request.Request, output *DeleteObjectTaggingOutput) {
- op := &request.Operation{
- Name: opDeleteObjectTagging,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}/{Key+}?tagging",
- }
-
- if input == nil {
- input = &DeleteObjectTaggingInput{}
- }
-
- output = &DeleteObjectTaggingOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DeleteObjectTagging API operation for Amazon Simple Storage Service.
-//
-// Removes the entire tag set from the specified object. For more information
-// about managing object tags, see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
-//
-// To use this operation, you must have permission to perform the s3:DeleteObjectTagging
-// action.
-//
-// To delete tags of a specific object version, add the versionId query parameter
-// in the request. You will need permission for the s3:DeleteObjectVersionTagging
-// action.
-//
-// The following operations are related to DeleteBucketMetricsConfiguration:
-//
-// * PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
-//
-// * GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteObjectTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjectTagging
-func (c *S3) DeleteObjectTagging(input *DeleteObjectTaggingInput) (*DeleteObjectTaggingOutput, error) {
- req, out := c.DeleteObjectTaggingRequest(input)
- return out, req.Send()
-}
-
-// DeleteObjectTaggingWithContext is the same as DeleteObjectTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteObjectTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteObjectTaggingWithContext(ctx aws.Context, input *DeleteObjectTaggingInput, opts ...request.Option) (*DeleteObjectTaggingOutput, error) {
- req, out := c.DeleteObjectTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteObjects = "DeleteObjects"
-
-// DeleteObjectsRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteObjects operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteObjects for more information on using the DeleteObjects
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteObjectsRequest method.
-// req, resp := client.DeleteObjectsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
-func (c *S3) DeleteObjectsRequest(input *DeleteObjectsInput) (req *request.Request, output *DeleteObjectsOutput) {
- op := &request.Operation{
- Name: opDeleteObjects,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}?delete",
- }
-
- if input == nil {
- input = &DeleteObjectsInput{}
- }
-
- output = &DeleteObjectsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// DeleteObjects API operation for Amazon Simple Storage Service.
-//
-// This action enables you to delete multiple objects from a bucket using a
-// single HTTP request. If you know the object keys that you want to delete,
-// then this action provides a suitable alternative to sending individual delete
-// requests, reducing per-request overhead.
-//
-// The request contains a list of up to 1000 keys that you want to delete. In
-// the XML, you provide the object key names, and optionally, version IDs if
-// you want to delete a specific version of the object from a versioning-enabled
-// bucket. For each key, Amazon S3 performs a delete action and returns the
-// result of that delete, success, or failure, in the response. Note that if
-// the object specified in the request is not found, Amazon S3 returns the result
-// as deleted.
-//
-// The action supports two modes for the response: verbose and quiet. By default,
-// the action uses verbose mode in which the response includes the result of
-// deletion of each key in your request. In quiet mode the response includes
-// only keys where the delete action encountered an error. For a successful
-// deletion, the action does not return any information about the delete in
-// the response body.
-//
-// When performing this action on an MFA Delete enabled bucket, that attempts
-// to delete any versioned objects, you must include an MFA token. If you do
-// not provide one, the entire request will fail, even if there are non-versioned
-// objects you are trying to delete. If you provide an invalid token, whether
-// there are versioned keys in the request or not, the entire Multi-Object Delete
-// request will fail. For information about MFA Delete, see MFA Delete (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html#MultiFactorAuthenticationDelete).
-//
-// Finally, the Content-MD5 header is required for all Multi-Object Delete requests.
-// Amazon S3 uses the header value to ensure that your request body has not
-// been altered in transit.
-//
-// The following operations are related to DeleteObjects:
-//
-// * CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// * UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// * CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// * ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// * AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeleteObjects for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeleteObjects
-func (c *S3) DeleteObjects(input *DeleteObjectsInput) (*DeleteObjectsOutput, error) {
- req, out := c.DeleteObjectsRequest(input)
- return out, req.Send()
-}
-
-// DeleteObjectsWithContext is the same as DeleteObjects with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteObjects for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeleteObjectsWithContext(ctx aws.Context, input *DeleteObjectsInput, opts ...request.Option) (*DeleteObjectsOutput, error) {
- req, out := c.DeleteObjectsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeletePublicAccessBlock = "DeletePublicAccessBlock"
-
-// DeletePublicAccessBlockRequest generates a "aws/request.Request" representing the
-// client's request for the DeletePublicAccessBlock operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeletePublicAccessBlock for more information on using the DeletePublicAccessBlock
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeletePublicAccessBlockRequest method.
-// req, resp := client.DeletePublicAccessBlockRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
-func (c *S3) DeletePublicAccessBlockRequest(input *DeletePublicAccessBlockInput) (req *request.Request, output *DeletePublicAccessBlockOutput) {
- op := &request.Operation{
- Name: opDeletePublicAccessBlock,
- HTTPMethod: "DELETE",
- HTTPPath: "/{Bucket}?publicAccessBlock",
- }
-
- if input == nil {
- input = &DeletePublicAccessBlockInput{}
- }
-
- output = &DeletePublicAccessBlockOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeletePublicAccessBlock API operation for Amazon Simple Storage Service.
-//
-// Removes the PublicAccessBlock configuration for an Amazon S3 bucket. To use
-// this operation, you must have the s3:PutBucketPublicAccessBlock permission.
-// For more information about permissions, see Permissions Related to Bucket
-// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// The following operations are related to DeletePublicAccessBlock:
-//
-// * Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-//
-// * GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// * PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// * GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation DeletePublicAccessBlock for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/DeletePublicAccessBlock
-func (c *S3) DeletePublicAccessBlock(input *DeletePublicAccessBlockInput) (*DeletePublicAccessBlockOutput, error) {
- req, out := c.DeletePublicAccessBlockRequest(input)
- return out, req.Send()
-}
-
-// DeletePublicAccessBlockWithContext is the same as DeletePublicAccessBlock with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeletePublicAccessBlock for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) DeletePublicAccessBlockWithContext(ctx aws.Context, input *DeletePublicAccessBlockInput, opts ...request.Option) (*DeletePublicAccessBlockOutput, error) {
- req, out := c.DeletePublicAccessBlockRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketAccelerateConfiguration = "GetBucketAccelerateConfiguration"
-
-// GetBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketAccelerateConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketAccelerateConfiguration for more information on using the GetBucketAccelerateConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketAccelerateConfigurationRequest method.
-// req, resp := client.GetBucketAccelerateConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
-func (c *S3) GetBucketAccelerateConfigurationRequest(input *GetBucketAccelerateConfigurationInput) (req *request.Request, output *GetBucketAccelerateConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketAccelerateConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?accelerate",
- }
-
- if input == nil {
- input = &GetBucketAccelerateConfigurationInput{}
- }
-
- output = &GetBucketAccelerateConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
-//
-// This implementation of the GET action uses the accelerate subresource to
-// return the Transfer Acceleration state of a bucket, which is either Enabled
-// or Suspended. Amazon S3 Transfer Acceleration is a bucket-level feature that
-// enables you to perform faster data transfers to and from Amazon S3.
-//
-// To use this operation, you must have permission to perform the s3:GetAccelerateConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// You set the Transfer Acceleration state of an existing bucket to Enabled
-// or Suspended by using the PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
-// operation.
-//
-// A GET accelerate request does not return a state value for a bucket that
-// has no transfer acceleration state. A bucket has no Transfer Acceleration
-// state if a state has never been set on the bucket.
-//
-// For more information about transfer acceleration, see Transfer Acceleration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
-// in the Amazon S3 User Guide.
-//
-// Related Resources
-//
-// * PutBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketAccelerateConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAccelerateConfiguration
-func (c *S3) GetBucketAccelerateConfiguration(input *GetBucketAccelerateConfigurationInput) (*GetBucketAccelerateConfigurationOutput, error) {
- req, out := c.GetBucketAccelerateConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketAccelerateConfigurationWithContext is the same as GetBucketAccelerateConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketAccelerateConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketAccelerateConfigurationWithContext(ctx aws.Context, input *GetBucketAccelerateConfigurationInput, opts ...request.Option) (*GetBucketAccelerateConfigurationOutput, error) {
- req, out := c.GetBucketAccelerateConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketAcl = "GetBucketAcl"
-
-// GetBucketAclRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketAcl operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketAcl for more information on using the GetBucketAcl
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketAclRequest method.
-// req, resp := client.GetBucketAclRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
-func (c *S3) GetBucketAclRequest(input *GetBucketAclInput) (req *request.Request, output *GetBucketAclOutput) {
- op := &request.Operation{
- Name: opGetBucketAcl,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?acl",
- }
-
- if input == nil {
- input = &GetBucketAclInput{}
- }
-
- output = &GetBucketAclOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketAcl API operation for Amazon Simple Storage Service.
-//
-// This implementation of the GET action uses the acl subresource to return
-// the access control list (ACL) of a bucket. To use GET to return the ACL of
-// the bucket, you must have READ_ACP access to the bucket. If READ_ACP permission
-// is granted to the anonymous user, you can return the ACL of the bucket without
-// using an authorization header.
-//
-// Related Resources
-//
-// * ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketAcl for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAcl
-func (c *S3) GetBucketAcl(input *GetBucketAclInput) (*GetBucketAclOutput, error) {
- req, out := c.GetBucketAclRequest(input)
- return out, req.Send()
-}
-
-// GetBucketAclWithContext is the same as GetBucketAcl with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketAcl for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketAclWithContext(ctx aws.Context, input *GetBucketAclInput, opts ...request.Option) (*GetBucketAclOutput, error) {
- req, out := c.GetBucketAclRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketAnalyticsConfiguration = "GetBucketAnalyticsConfiguration"
-
-// GetBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketAnalyticsConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketAnalyticsConfiguration for more information on using the GetBucketAnalyticsConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketAnalyticsConfigurationRequest method.
-// req, resp := client.GetBucketAnalyticsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
-func (c *S3) GetBucketAnalyticsConfigurationRequest(input *GetBucketAnalyticsConfigurationInput) (req *request.Request, output *GetBucketAnalyticsConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketAnalyticsConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?analytics",
- }
-
- if input == nil {
- input = &GetBucketAnalyticsConfigurationInput{}
- }
-
- output = &GetBucketAnalyticsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
-//
-// This implementation of the GET action returns an analytics configuration
-// (identified by the analytics configuration ID) from the bucket.
-//
-// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// For information about Amazon S3 analytics feature, see Amazon S3 Analytics
-// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html)
-// in the Amazon S3 User Guide.
-//
-// Related Resources
-//
-// * DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// * ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
-//
-// * PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketAnalyticsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketAnalyticsConfiguration
-func (c *S3) GetBucketAnalyticsConfiguration(input *GetBucketAnalyticsConfigurationInput) (*GetBucketAnalyticsConfigurationOutput, error) {
- req, out := c.GetBucketAnalyticsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketAnalyticsConfigurationWithContext is the same as GetBucketAnalyticsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketAnalyticsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *GetBucketAnalyticsConfigurationInput, opts ...request.Option) (*GetBucketAnalyticsConfigurationOutput, error) {
- req, out := c.GetBucketAnalyticsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketCors = "GetBucketCors"
-
-// GetBucketCorsRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketCors operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketCors for more information on using the GetBucketCors
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketCorsRequest method.
-// req, resp := client.GetBucketCorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
-func (c *S3) GetBucketCorsRequest(input *GetBucketCorsInput) (req *request.Request, output *GetBucketCorsOutput) {
- op := &request.Operation{
- Name: opGetBucketCors,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?cors",
- }
-
- if input == nil {
- input = &GetBucketCorsInput{}
- }
-
- output = &GetBucketCorsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketCors API operation for Amazon Simple Storage Service.
-//
-// Returns the cors configuration information set for the bucket.
-//
-// To use this operation, you must have permission to perform the s3:GetBucketCORS
-// action. By default, the bucket owner has this permission and can grant it
-// to others.
-//
-// For more information about cors, see Enabling Cross-Origin Resource Sharing
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html).
-//
-// The following operations are related to GetBucketCors:
-//
-// * PutBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html)
-//
-// * DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketCors for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketCors
-func (c *S3) GetBucketCors(input *GetBucketCorsInput) (*GetBucketCorsOutput, error) {
- req, out := c.GetBucketCorsRequest(input)
- return out, req.Send()
-}
-
-// GetBucketCorsWithContext is the same as GetBucketCors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketCors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketCorsWithContext(ctx aws.Context, input *GetBucketCorsInput, opts ...request.Option) (*GetBucketCorsOutput, error) {
- req, out := c.GetBucketCorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketEncryption = "GetBucketEncryption"
-
-// GetBucketEncryptionRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketEncryption operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketEncryption for more information on using the GetBucketEncryption
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketEncryptionRequest method.
-// req, resp := client.GetBucketEncryptionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
-func (c *S3) GetBucketEncryptionRequest(input *GetBucketEncryptionInput) (req *request.Request, output *GetBucketEncryptionOutput) {
- op := &request.Operation{
- Name: opGetBucketEncryption,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?encryption",
- }
-
- if input == nil {
- input = &GetBucketEncryptionInput{}
- }
-
- output = &GetBucketEncryptionOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketEncryption API operation for Amazon Simple Storage Service.
-//
-// Returns the default encryption configuration for an Amazon S3 bucket. If
-// the bucket does not have a default encryption configuration, GetBucketEncryption
-// returns ServerSideEncryptionConfigurationNotFoundError.
-//
-// For information about the Amazon S3 default encryption feature, see Amazon
-// S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html).
-//
-// To use this operation, you must have permission to perform the s3:GetEncryptionConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// The following operations are related to GetBucketEncryption:
-//
-// * PutBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html)
-//
-// * DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketEncryption for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketEncryption
-func (c *S3) GetBucketEncryption(input *GetBucketEncryptionInput) (*GetBucketEncryptionOutput, error) {
- req, out := c.GetBucketEncryptionRequest(input)
- return out, req.Send()
-}
-
-// GetBucketEncryptionWithContext is the same as GetBucketEncryption with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketEncryption for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketEncryptionWithContext(ctx aws.Context, input *GetBucketEncryptionInput, opts ...request.Option) (*GetBucketEncryptionOutput, error) {
- req, out := c.GetBucketEncryptionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketIntelligentTieringConfiguration = "GetBucketIntelligentTieringConfiguration"
-
-// GetBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketIntelligentTieringConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketIntelligentTieringConfiguration for more information on using the GetBucketIntelligentTieringConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketIntelligentTieringConfigurationRequest method.
-// req, resp := client.GetBucketIntelligentTieringConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketIntelligentTieringConfiguration
-func (c *S3) GetBucketIntelligentTieringConfigurationRequest(input *GetBucketIntelligentTieringConfigurationInput) (req *request.Request, output *GetBucketIntelligentTieringConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketIntelligentTieringConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?intelligent-tiering",
- }
-
- if input == nil {
- input = &GetBucketIntelligentTieringConfigurationInput{}
- }
-
- output = &GetBucketIntelligentTieringConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
-//
-// Gets the S3 Intelligent-Tiering configuration from the specified bucket.
-//
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without additional operational overhead. S3 Intelligent-Tiering delivers
-// automatic cost savings by moving data between access tiers, when access patterns
-// change.
-//
-// The S3 Intelligent-Tiering storage class is suitable for objects larger than
-// 128 KB that you plan to store for at least 30 days. If the size of an object
-// is less than 128 KB, it is not eligible for auto-tiering. Smaller objects
-// can be stored, but they are always charged at the frequent access tier rates
-// in the S3 Intelligent-Tiering storage class.
-//
-// If you delete an object before the end of the 30-day minimum storage duration
-// period, you are charged for 30 days. For more information, see Storage class
-// for automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-//
-// Operations related to GetBucketIntelligentTieringConfiguration include:
-//
-// * DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// * PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// * ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketIntelligentTieringConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketIntelligentTieringConfiguration
-func (c *S3) GetBucketIntelligentTieringConfiguration(input *GetBucketIntelligentTieringConfigurationInput) (*GetBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.GetBucketIntelligentTieringConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketIntelligentTieringConfigurationWithContext is the same as GetBucketIntelligentTieringConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketIntelligentTieringConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *GetBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*GetBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.GetBucketIntelligentTieringConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketInventoryConfiguration = "GetBucketInventoryConfiguration"
-
-// GetBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketInventoryConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketInventoryConfiguration for more information on using the GetBucketInventoryConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketInventoryConfigurationRequest method.
-// req, resp := client.GetBucketInventoryConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
-func (c *S3) GetBucketInventoryConfigurationRequest(input *GetBucketInventoryConfigurationInput) (req *request.Request, output *GetBucketInventoryConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketInventoryConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?inventory",
- }
-
- if input == nil {
- input = &GetBucketInventoryConfigurationInput{}
- }
-
- output = &GetBucketInventoryConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
-//
-// Returns an inventory configuration (identified by the inventory configuration
-// ID) from the bucket.
-//
-// To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration
-// action. The bucket owner has this permission by default and can grant this
-// permission to others. For more information about permissions, see Permissions
-// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html).
-//
-// The following operations are related to GetBucketInventoryConfiguration:
-//
-// * DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// * ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
-//
-// * PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketInventoryConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketInventoryConfiguration
-func (c *S3) GetBucketInventoryConfiguration(input *GetBucketInventoryConfigurationInput) (*GetBucketInventoryConfigurationOutput, error) {
- req, out := c.GetBucketInventoryConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketInventoryConfigurationWithContext is the same as GetBucketInventoryConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketInventoryConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketInventoryConfigurationWithContext(ctx aws.Context, input *GetBucketInventoryConfigurationInput, opts ...request.Option) (*GetBucketInventoryConfigurationOutput, error) {
- req, out := c.GetBucketInventoryConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketLifecycle = "GetBucketLifecycle"
-
-// GetBucketLifecycleRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketLifecycle operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketLifecycle for more information on using the GetBucketLifecycle
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketLifecycleRequest method.
-// req, resp := client.GetBucketLifecycleRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
-//
-// Deprecated: GetBucketLifecycle has been deprecated
-func (c *S3) GetBucketLifecycleRequest(input *GetBucketLifecycleInput) (req *request.Request, output *GetBucketLifecycleOutput) {
- if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, GetBucketLifecycle, has been deprecated")
- }
- op := &request.Operation{
- Name: opGetBucketLifecycle,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &GetBucketLifecycleInput{}
- }
-
- output = &GetBucketLifecycleOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketLifecycle API operation for Amazon Simple Storage Service.
-//
-//
-// For an updated version of this API, see GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html).
-// If you configured a bucket lifecycle using the filter element, you should
-// see the updated version of this topic. This topic is provided for backward
-// compatibility.
-//
-// Returns the lifecycle configuration information set on the bucket. For information
-// about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html).
-//
-// To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// GetBucketLifecycle has the following special error:
-//
-// * Error code: NoSuchLifecycleConfiguration Description: The lifecycle
-// configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault
-// Code Prefix: Client
-//
-// The following operations are related to GetBucketLifecycle:
-//
-// * GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// * PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
-//
-// * DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketLifecycle for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycle
-//
-// Deprecated: GetBucketLifecycle has been deprecated
-func (c *S3) GetBucketLifecycle(input *GetBucketLifecycleInput) (*GetBucketLifecycleOutput, error) {
- req, out := c.GetBucketLifecycleRequest(input)
- return out, req.Send()
-}
-
-// GetBucketLifecycleWithContext is the same as GetBucketLifecycle with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketLifecycle for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-//
-// Deprecated: GetBucketLifecycleWithContext has been deprecated
-func (c *S3) GetBucketLifecycleWithContext(ctx aws.Context, input *GetBucketLifecycleInput, opts ...request.Option) (*GetBucketLifecycleOutput, error) {
- req, out := c.GetBucketLifecycleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketLifecycleConfiguration = "GetBucketLifecycleConfiguration"
-
-// GetBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketLifecycleConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketLifecycleConfiguration for more information on using the GetBucketLifecycleConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketLifecycleConfigurationRequest method.
-// req, resp := client.GetBucketLifecycleConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
-func (c *S3) GetBucketLifecycleConfigurationRequest(input *GetBucketLifecycleConfigurationInput) (req *request.Request, output *GetBucketLifecycleConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketLifecycleConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &GetBucketLifecycleConfigurationInput{}
- }
-
- output = &GetBucketLifecycleConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
-//
-//
-// Bucket lifecycle configuration now supports specifying a lifecycle rule using
-// an object key name prefix, one or more object tags, or a combination of both.
-// Accordingly, this section describes the latest API. The response describes
-// the new filter element that you can use to specify a filter to select a subset
-// of objects to which the rule applies. If you are using a previous version
-// of the lifecycle configuration, it still works. For the earlier action, see
-// GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html).
-//
-// Returns the lifecycle configuration information set on the bucket. For information
-// about lifecycle configuration, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html).
-//
-// To use this operation, you must have permission to perform the s3:GetLifecycleConfiguration
-// action. The bucket owner has this permission, by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// GetBucketLifecycleConfiguration has the following special error:
-//
-// * Error code: NoSuchLifecycleConfiguration Description: The lifecycle
-// configuration does not exist. HTTP Status Code: 404 Not Found SOAP Fault
-// Code Prefix: Client
-//
-// The following operations are related to GetBucketLifecycleConfiguration:
-//
-// * GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)
-//
-// * PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html)
-//
-// * DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketLifecycleConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLifecycleConfiguration
-func (c *S3) GetBucketLifecycleConfiguration(input *GetBucketLifecycleConfigurationInput) (*GetBucketLifecycleConfigurationOutput, error) {
- req, out := c.GetBucketLifecycleConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketLifecycleConfigurationWithContext is the same as GetBucketLifecycleConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketLifecycleConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketLifecycleConfigurationWithContext(ctx aws.Context, input *GetBucketLifecycleConfigurationInput, opts ...request.Option) (*GetBucketLifecycleConfigurationOutput, error) {
- req, out := c.GetBucketLifecycleConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketLocation = "GetBucketLocation"
-
-// GetBucketLocationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketLocation operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketLocation for more information on using the GetBucketLocation
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketLocationRequest method.
-// req, resp := client.GetBucketLocationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
-func (c *S3) GetBucketLocationRequest(input *GetBucketLocationInput) (req *request.Request, output *GetBucketLocationOutput) {
- op := &request.Operation{
- Name: opGetBucketLocation,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?location",
- }
-
- if input == nil {
- input = &GetBucketLocationInput{}
- }
-
- output = &GetBucketLocationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketLocation API operation for Amazon Simple Storage Service.
-//
-// Returns the Region the bucket resides in. You set the bucket's Region using
-// the LocationConstraint request parameter in a CreateBucket request. For more
-// information, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html).
-//
-// To use this implementation of the operation, you must be the bucket owner.
-//
-// The following operations are related to GetBucketLocation:
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketLocation for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLocation
-func (c *S3) GetBucketLocation(input *GetBucketLocationInput) (*GetBucketLocationOutput, error) {
- req, out := c.GetBucketLocationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketLocationWithContext is the same as GetBucketLocation with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketLocation for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketLocationWithContext(ctx aws.Context, input *GetBucketLocationInput, opts ...request.Option) (*GetBucketLocationOutput, error) {
- req, out := c.GetBucketLocationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketLogging = "GetBucketLogging"
-
-// GetBucketLoggingRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketLogging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketLogging for more information on using the GetBucketLogging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketLoggingRequest method.
-// req, resp := client.GetBucketLoggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
-func (c *S3) GetBucketLoggingRequest(input *GetBucketLoggingInput) (req *request.Request, output *GetBucketLoggingOutput) {
- op := &request.Operation{
- Name: opGetBucketLogging,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?logging",
- }
-
- if input == nil {
- input = &GetBucketLoggingInput{}
- }
-
- output = &GetBucketLoggingOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketLogging API operation for Amazon Simple Storage Service.
-//
-// Returns the logging status of a bucket and the permissions users have to
-// view and modify that status. To use GET, you must be the bucket owner.
-//
-// The following operations are related to GetBucketLogging:
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * PutBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketLogging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketLogging
-func (c *S3) GetBucketLogging(input *GetBucketLoggingInput) (*GetBucketLoggingOutput, error) {
- req, out := c.GetBucketLoggingRequest(input)
- return out, req.Send()
-}
-
-// GetBucketLoggingWithContext is the same as GetBucketLogging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketLogging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketLoggingWithContext(ctx aws.Context, input *GetBucketLoggingInput, opts ...request.Option) (*GetBucketLoggingOutput, error) {
- req, out := c.GetBucketLoggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketMetricsConfiguration = "GetBucketMetricsConfiguration"
-
-// GetBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketMetricsConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketMetricsConfiguration for more information on using the GetBucketMetricsConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketMetricsConfigurationRequest method.
-// req, resp := client.GetBucketMetricsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
-func (c *S3) GetBucketMetricsConfigurationRequest(input *GetBucketMetricsConfigurationInput) (req *request.Request, output *GetBucketMetricsConfigurationOutput) {
- op := &request.Operation{
- Name: opGetBucketMetricsConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?metrics",
- }
-
- if input == nil {
- input = &GetBucketMetricsConfigurationInput{}
- }
-
- output = &GetBucketMetricsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Gets a metrics configuration (specified by the metrics configuration ID)
-// from the bucket. Note that this doesn't include the daily storage metrics.
-//
-// To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For information about CloudWatch request metrics for Amazon S3, see Monitoring
-// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
-//
-// The following operations are related to GetBucketMetricsConfiguration:
-//
-// * PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// * DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
-//
-// * ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// * Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketMetricsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketMetricsConfiguration
-func (c *S3) GetBucketMetricsConfiguration(input *GetBucketMetricsConfigurationInput) (*GetBucketMetricsConfigurationOutput, error) {
- req, out := c.GetBucketMetricsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketMetricsConfigurationWithContext is the same as GetBucketMetricsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketMetricsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketMetricsConfigurationWithContext(ctx aws.Context, input *GetBucketMetricsConfigurationInput, opts ...request.Option) (*GetBucketMetricsConfigurationOutput, error) {
- req, out := c.GetBucketMetricsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketNotification = "GetBucketNotification"
-
-// GetBucketNotificationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketNotification operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketNotification for more information on using the GetBucketNotification
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketNotificationRequest method.
-// req, resp := client.GetBucketNotificationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
-//
-// Deprecated: GetBucketNotification has been deprecated
-func (c *S3) GetBucketNotificationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfigurationDeprecated) {
- if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, GetBucketNotification, has been deprecated")
- }
- op := &request.Operation{
- Name: opGetBucketNotification,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?notification",
- }
-
- if input == nil {
- input = &GetBucketNotificationConfigurationRequest{}
- }
-
- output = &NotificationConfigurationDeprecated{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketNotification API operation for Amazon Simple Storage Service.
-//
-// No longer used, see GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketNotification for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotification
-//
-// Deprecated: GetBucketNotification has been deprecated
-func (c *S3) GetBucketNotification(input *GetBucketNotificationConfigurationRequest) (*NotificationConfigurationDeprecated, error) {
- req, out := c.GetBucketNotificationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketNotificationWithContext is the same as GetBucketNotification with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketNotification for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-//
-// Deprecated: GetBucketNotificationWithContext has been deprecated
-func (c *S3) GetBucketNotificationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfigurationDeprecated, error) {
- req, out := c.GetBucketNotificationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketNotificationConfiguration = "GetBucketNotificationConfiguration"
-
-// GetBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketNotificationConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketNotificationConfiguration for more information on using the GetBucketNotificationConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketNotificationConfigurationRequest method.
-// req, resp := client.GetBucketNotificationConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
-func (c *S3) GetBucketNotificationConfigurationRequest(input *GetBucketNotificationConfigurationRequest) (req *request.Request, output *NotificationConfiguration) {
- op := &request.Operation{
- Name: opGetBucketNotificationConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?notification",
- }
-
- if input == nil {
- input = &GetBucketNotificationConfigurationRequest{}
- }
-
- output = &NotificationConfiguration{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
-//
-// Returns the notification configuration of a bucket.
-//
-// If notifications are not enabled on the bucket, the action returns an empty
-// NotificationConfiguration element.
-//
-// By default, you must be the bucket owner to read the notification configuration
-// of a bucket. However, the bucket owner can use a bucket policy to grant permission
-// to other users to read this configuration with the s3:GetBucketNotification
-// permission.
-//
-// For more information about setting and reading the notification configuration
-// on a bucket, see Setting Up Notification of Bucket Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
-// For more information about bucket policies, see Using Bucket Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
-//
-// The following action is related to GetBucketNotification:
-//
-// * PutBucketNotification (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotification.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketNotificationConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketNotificationConfiguration
-func (c *S3) GetBucketNotificationConfiguration(input *GetBucketNotificationConfigurationRequest) (*NotificationConfiguration, error) {
- req, out := c.GetBucketNotificationConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketNotificationConfigurationWithContext is the same as GetBucketNotificationConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketNotificationConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketNotificationConfigurationWithContext(ctx aws.Context, input *GetBucketNotificationConfigurationRequest, opts ...request.Option) (*NotificationConfiguration, error) {
- req, out := c.GetBucketNotificationConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketOwnershipControls = "GetBucketOwnershipControls"
-
-// GetBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketOwnershipControls operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketOwnershipControls for more information on using the GetBucketOwnershipControls
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketOwnershipControlsRequest method.
-// req, resp := client.GetBucketOwnershipControlsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketOwnershipControls
-func (c *S3) GetBucketOwnershipControlsRequest(input *GetBucketOwnershipControlsInput) (req *request.Request, output *GetBucketOwnershipControlsOutput) {
- op := &request.Operation{
- Name: opGetBucketOwnershipControls,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?ownershipControls",
- }
-
- if input == nil {
- input = &GetBucketOwnershipControlsInput{}
- }
-
- output = &GetBucketOwnershipControlsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketOwnershipControls API operation for Amazon Simple Storage Service.
-//
-// Retrieves OwnershipControls for an Amazon S3 bucket. To use this operation,
-// you must have the s3:GetBucketOwnershipControls permission. For more information
-// about Amazon S3 permissions, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-//
-// For information about Amazon S3 Object Ownership, see Using Object Ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
-//
-// The following operations are related to GetBucketOwnershipControls:
-//
-// * PutBucketOwnershipControls
-//
-// * DeleteBucketOwnershipControls
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketOwnershipControls for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketOwnershipControls
-func (c *S3) GetBucketOwnershipControls(input *GetBucketOwnershipControlsInput) (*GetBucketOwnershipControlsOutput, error) {
- req, out := c.GetBucketOwnershipControlsRequest(input)
- return out, req.Send()
-}
-
-// GetBucketOwnershipControlsWithContext is the same as GetBucketOwnershipControls with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketOwnershipControls for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketOwnershipControlsWithContext(ctx aws.Context, input *GetBucketOwnershipControlsInput, opts ...request.Option) (*GetBucketOwnershipControlsOutput, error) {
- req, out := c.GetBucketOwnershipControlsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketPolicy = "GetBucketPolicy"
-
-// GetBucketPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketPolicy for more information on using the GetBucketPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketPolicyRequest method.
-// req, resp := client.GetBucketPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
-func (c *S3) GetBucketPolicyRequest(input *GetBucketPolicyInput) (req *request.Request, output *GetBucketPolicyOutput) {
- op := &request.Operation{
- Name: opGetBucketPolicy,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?policy",
- }
-
- if input == nil {
- input = &GetBucketPolicyInput{}
- }
-
- output = &GetBucketPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketPolicy API operation for Amazon Simple Storage Service.
-//
-// Returns the policy of a specified bucket. If you are using an identity other
-// than the root user of the AWS account that owns the bucket, the calling identity
-// must have the GetBucketPolicy permissions on the specified bucket and belong
-// to the bucket owner's account in order to use this operation.
-//
-// If you don't have GetBucketPolicy permissions, Amazon S3 returns a 403 Access
-// Denied error. If you have the correct permissions, but you're not using an
-// identity that belongs to the bucket owner's account, Amazon S3 returns a
-// 405 Method Not Allowed error.
-//
-// As a security precaution, the root user of the AWS account that owns a bucket
-// can always use this operation, even if the policy explicitly denies the root
-// user the ability to perform this action.
-//
-// For more information about bucket policies, see Using Bucket Policies and
-// User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
-//
-// The following action is related to GetBucketPolicy:
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketPolicy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicy
-func (c *S3) GetBucketPolicy(input *GetBucketPolicyInput) (*GetBucketPolicyOutput, error) {
- req, out := c.GetBucketPolicyRequest(input)
- return out, req.Send()
-}
-
-// GetBucketPolicyWithContext is the same as GetBucketPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketPolicyWithContext(ctx aws.Context, input *GetBucketPolicyInput, opts ...request.Option) (*GetBucketPolicyOutput, error) {
- req, out := c.GetBucketPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketPolicyStatus = "GetBucketPolicyStatus"
-
-// GetBucketPolicyStatusRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketPolicyStatus operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketPolicyStatus for more information on using the GetBucketPolicyStatus
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketPolicyStatusRequest method.
-// req, resp := client.GetBucketPolicyStatusRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
-func (c *S3) GetBucketPolicyStatusRequest(input *GetBucketPolicyStatusInput) (req *request.Request, output *GetBucketPolicyStatusOutput) {
- op := &request.Operation{
- Name: opGetBucketPolicyStatus,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?policyStatus",
- }
-
- if input == nil {
- input = &GetBucketPolicyStatusInput{}
- }
-
- output = &GetBucketPolicyStatusOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketPolicyStatus API operation for Amazon Simple Storage Service.
-//
-// Retrieves the policy status for an Amazon S3 bucket, indicating whether the
-// bucket is public. In order to use this operation, you must have the s3:GetBucketPolicyStatus
-// permission. For more information about Amazon S3 permissions, see Specifying
-// Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-//
-// For more information about when Amazon S3 considers a bucket public, see
-// The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
-//
-// The following operations are related to GetBucketPolicyStatus:
-//
-// * Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-//
-// * GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// * PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// * DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketPolicyStatus for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketPolicyStatus
-func (c *S3) GetBucketPolicyStatus(input *GetBucketPolicyStatusInput) (*GetBucketPolicyStatusOutput, error) {
- req, out := c.GetBucketPolicyStatusRequest(input)
- return out, req.Send()
-}
-
-// GetBucketPolicyStatusWithContext is the same as GetBucketPolicyStatus with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketPolicyStatus for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketPolicyStatusWithContext(ctx aws.Context, input *GetBucketPolicyStatusInput, opts ...request.Option) (*GetBucketPolicyStatusOutput, error) {
- req, out := c.GetBucketPolicyStatusRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketReplication = "GetBucketReplication"
-
-// GetBucketReplicationRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketReplication operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketReplication for more information on using the GetBucketReplication
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketReplicationRequest method.
-// req, resp := client.GetBucketReplicationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
-func (c *S3) GetBucketReplicationRequest(input *GetBucketReplicationInput) (req *request.Request, output *GetBucketReplicationOutput) {
- op := &request.Operation{
- Name: opGetBucketReplication,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?replication",
- }
-
- if input == nil {
- input = &GetBucketReplicationInput{}
- }
-
- output = &GetBucketReplicationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketReplication API operation for Amazon Simple Storage Service.
-//
-// Returns the replication configuration of a bucket.
-//
-// It can take a while to propagate the put or delete a replication configuration
-// to all Amazon S3 systems. Therefore, a get request soon after put or delete
-// can return a wrong result.
-//
-// For information about replication configuration, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
-// in the Amazon S3 User Guide.
-//
-// This action requires permissions for the s3:GetReplicationConfiguration action.
-// For more information about permissions, see Using Bucket Policies and User
-// Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
-//
-// If you include the Filter element in a replication configuration, you must
-// also include the DeleteMarkerReplication and Priority elements. The response
-// also returns those elements.
-//
-// For information about GetBucketReplication errors, see List of replication-related
-// error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
-//
-// The following operations are related to GetBucketReplication:
-//
-// * PutBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html)
-//
-// * DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketReplication for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketReplication
-func (c *S3) GetBucketReplication(input *GetBucketReplicationInput) (*GetBucketReplicationOutput, error) {
- req, out := c.GetBucketReplicationRequest(input)
- return out, req.Send()
-}
-
-// GetBucketReplicationWithContext is the same as GetBucketReplication with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketReplication for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketReplicationWithContext(ctx aws.Context, input *GetBucketReplicationInput, opts ...request.Option) (*GetBucketReplicationOutput, error) {
- req, out := c.GetBucketReplicationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketRequestPayment = "GetBucketRequestPayment"
-
-// GetBucketRequestPaymentRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketRequestPayment operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketRequestPayment for more information on using the GetBucketRequestPayment
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketRequestPaymentRequest method.
-// req, resp := client.GetBucketRequestPaymentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
-func (c *S3) GetBucketRequestPaymentRequest(input *GetBucketRequestPaymentInput) (req *request.Request, output *GetBucketRequestPaymentOutput) {
- op := &request.Operation{
- Name: opGetBucketRequestPayment,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?requestPayment",
- }
-
- if input == nil {
- input = &GetBucketRequestPaymentInput{}
- }
-
- output = &GetBucketRequestPaymentOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketRequestPayment API operation for Amazon Simple Storage Service.
-//
-// Returns the request payment configuration of a bucket. To use this version
-// of the operation, you must be the bucket owner. For more information, see
-// Requester Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html).
-//
-// The following operations are related to GetBucketRequestPayment:
-//
-// * ListObjects (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketRequestPayment for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketRequestPayment
-func (c *S3) GetBucketRequestPayment(input *GetBucketRequestPaymentInput) (*GetBucketRequestPaymentOutput, error) {
- req, out := c.GetBucketRequestPaymentRequest(input)
- return out, req.Send()
-}
-
-// GetBucketRequestPaymentWithContext is the same as GetBucketRequestPayment with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketRequestPayment for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketRequestPaymentWithContext(ctx aws.Context, input *GetBucketRequestPaymentInput, opts ...request.Option) (*GetBucketRequestPaymentOutput, error) {
- req, out := c.GetBucketRequestPaymentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketTagging = "GetBucketTagging"
-
-// GetBucketTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketTagging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketTagging for more information on using the GetBucketTagging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketTaggingRequest method.
-// req, resp := client.GetBucketTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
-func (c *S3) GetBucketTaggingRequest(input *GetBucketTaggingInput) (req *request.Request, output *GetBucketTaggingOutput) {
- op := &request.Operation{
- Name: opGetBucketTagging,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?tagging",
- }
-
- if input == nil {
- input = &GetBucketTaggingInput{}
- }
-
- output = &GetBucketTaggingOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketTagging API operation for Amazon Simple Storage Service.
-//
-// Returns the tag set associated with the bucket.
-//
-// To use this operation, you must have permission to perform the s3:GetBucketTagging
-// action. By default, the bucket owner has this permission and can grant this
-// permission to others.
-//
-// GetBucketTagging has the following special error:
-//
-// * Error code: NoSuchTagSetError Description: There is no tag set associated
-// with the bucket.
-//
-// The following operations are related to GetBucketTagging:
-//
-// * PutBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html)
-//
-// * DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketTagging
-func (c *S3) GetBucketTagging(input *GetBucketTaggingInput) (*GetBucketTaggingOutput, error) {
- req, out := c.GetBucketTaggingRequest(input)
- return out, req.Send()
-}
-
-// GetBucketTaggingWithContext is the same as GetBucketTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketTaggingWithContext(ctx aws.Context, input *GetBucketTaggingInput, opts ...request.Option) (*GetBucketTaggingOutput, error) {
- req, out := c.GetBucketTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketVersioning = "GetBucketVersioning"
-
-// GetBucketVersioningRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketVersioning operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketVersioning for more information on using the GetBucketVersioning
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketVersioningRequest method.
-// req, resp := client.GetBucketVersioningRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
-func (c *S3) GetBucketVersioningRequest(input *GetBucketVersioningInput) (req *request.Request, output *GetBucketVersioningOutput) {
- op := &request.Operation{
- Name: opGetBucketVersioning,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?versioning",
- }
-
- if input == nil {
- input = &GetBucketVersioningInput{}
- }
-
- output = &GetBucketVersioningOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketVersioning API operation for Amazon Simple Storage Service.
-//
-// Returns the versioning state of a bucket.
-//
-// To retrieve the versioning state of a bucket, you must be the bucket owner.
-//
-// This implementation also returns the MFA Delete status of the versioning
-// state. If the MFA Delete status is enabled, the bucket owner must use an
-// authentication device to change the versioning state of the bucket.
-//
-// The following operations are related to GetBucketVersioning:
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// * DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketVersioning for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketVersioning
-func (c *S3) GetBucketVersioning(input *GetBucketVersioningInput) (*GetBucketVersioningOutput, error) {
- req, out := c.GetBucketVersioningRequest(input)
- return out, req.Send()
-}
-
-// GetBucketVersioningWithContext is the same as GetBucketVersioning with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketVersioning for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketVersioningWithContext(ctx aws.Context, input *GetBucketVersioningInput, opts ...request.Option) (*GetBucketVersioningOutput, error) {
- req, out := c.GetBucketVersioningRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetBucketWebsite = "GetBucketWebsite"
-
-// GetBucketWebsiteRequest generates a "aws/request.Request" representing the
-// client's request for the GetBucketWebsite operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetBucketWebsite for more information on using the GetBucketWebsite
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetBucketWebsiteRequest method.
-// req, resp := client.GetBucketWebsiteRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
-func (c *S3) GetBucketWebsiteRequest(input *GetBucketWebsiteInput) (req *request.Request, output *GetBucketWebsiteOutput) {
- op := &request.Operation{
- Name: opGetBucketWebsite,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?website",
- }
-
- if input == nil {
- input = &GetBucketWebsiteInput{}
- }
-
- output = &GetBucketWebsiteOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetBucketWebsite API operation for Amazon Simple Storage Service.
-//
-// Returns the website configuration for a bucket. To host website on Amazon
-// S3, you can configure a bucket as website by adding a website configuration.
-// For more information about hosting websites, see Hosting Websites on Amazon
-// S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
-//
-// This GET action requires the S3:GetBucketWebsite permission. By default,
-// only the bucket owner can read the bucket website configuration. However,
-// bucket owners can allow other users to read the website configuration by
-// writing a bucket policy granting them the S3:GetBucketWebsite permission.
-//
-// The following operations are related to DeleteBucketWebsite:
-//
-// * DeleteBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html)
-//
-// * PutBucketWebsite (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetBucketWebsite for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetBucketWebsite
-func (c *S3) GetBucketWebsite(input *GetBucketWebsiteInput) (*GetBucketWebsiteOutput, error) {
- req, out := c.GetBucketWebsiteRequest(input)
- return out, req.Send()
-}
-
-// GetBucketWebsiteWithContext is the same as GetBucketWebsite with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetBucketWebsite for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetBucketWebsiteWithContext(ctx aws.Context, input *GetBucketWebsiteInput, opts ...request.Option) (*GetBucketWebsiteOutput, error) {
- req, out := c.GetBucketWebsiteRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObject = "GetObject"
-
-// GetObjectRequest generates a "aws/request.Request" representing the
-// client's request for the GetObject operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetObject for more information on using the GetObject
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetObjectRequest method.
-// req, resp := client.GetObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
-func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, output *GetObjectOutput) {
- op := &request.Operation{
- Name: opGetObject,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &GetObjectInput{}
- }
-
- output = &GetObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObject API operation for Amazon Simple Storage Service.
-//
-// Retrieves objects from Amazon S3. To use GET, you must have READ access to
-// the object. If you grant READ access to the anonymous user, you can return
-// the object without using an authorization header.
-//
-// An Amazon S3 bucket has no directory hierarchy such as you would find in
-// a typical computer file system. You can, however, create a logical hierarchy
-// by using object key names that imply a folder structure. For example, instead
-// of naming an object sample.jpg, you can name it photos/2006/February/sample.jpg.
-//
-// To get an object from such a logical hierarchy, specify the full key name
-// for the object in the GET operation. For a virtual hosted-style request example,
-// if you have the object photos/2006/February/sample.jpg, specify the resource
-// as /photos/2006/February/sample.jpg. For a path-style request example, if
-// you have the object photos/2006/February/sample.jpg in the bucket named examplebucket,
-// specify the resource as /examplebucket/photos/2006/February/sample.jpg. For
-// more information about request types, see HTTP Host Header Bucket Specification
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html#VirtualHostingSpecifyBucket).
-//
-// To distribute large files to many people, you can save bandwidth costs by
-// using BitTorrent. For more information, see Amazon S3 Torrent (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html).
-// For more information about returning the ACL of an object, see GetObjectAcl
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html).
-//
-// If the object you are retrieving is stored in the S3 Glacier or S3 Glacier
-// Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering
-// Deep Archive tiers, before you can retrieve the object you must first restore
-// a copy using RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html).
-// Otherwise, this action returns an InvalidObjectStateError error. For information
-// about restoring archived objects, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html).
-//
-// Encryption request headers, like x-amz-server-side-encryption, should not
-// be sent for GET requests if your object uses server-side encryption with
-// CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon S3–managed
-// encryption keys (SSE-S3). If your object does use these types of keys, you’ll
-// get an HTTP 400 BadRequest error.
-//
-// If you encrypt an object by using server-side encryption with customer-provided
-// encryption keys (SSE-C) when you store the object in Amazon S3, then when
-// you GET the object, you must use the following headers:
-//
-// * x-amz-server-side-encryption-customer-algorithm
-//
-// * x-amz-server-side-encryption-customer-key
-//
-// * x-amz-server-side-encryption-customer-key-MD5
-//
-// For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
-// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
-//
-// Assuming you have permission to read object tags (permission for the s3:GetObjectVersionTagging
-// action), the response also returns the x-amz-tagging-count header that provides
-// the count of number of tags associated with the object. You can use GetObjectTagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-// to retrieve the tag set associated with an object.
-//
-// Permissions
-//
-// You need the s3:GetObject permission for this operation. For more information,
-// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-// If the object you request does not exist, the error Amazon S3 returns depends
-// on whether you also have the s3:ListBucket permission.
-//
-// * If you have the s3:ListBucket permission on the bucket, Amazon S3 will
-// return an HTTP status code 404 ("no such key") error.
-//
-// * If you don’t have the s3:ListBucket permission, Amazon S3 will return
-// an HTTP status code 403 ("access denied") error.
-//
-// Versioning
-//
-// By default, the GET action returns the current version of an object. To return
-// a different version, use the versionId subresource.
-//
-// If the current version of the object is a delete marker, Amazon S3 behaves
-// as if the object was deleted and includes x-amz-delete-marker: true in the
-// response.
-//
-// For more information about versioning, see PutBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html).
-//
-// Overriding Response Header Values
-//
-// There are times when you want to override certain response header values
-// in a GET response. For example, you might override the Content-Disposition
-// response header value in your GET request.
-//
-// You can override values for a set of response headers using the following
-// query parameters. These response header values are sent only on a successful
-// request, that is, when status code 200 OK is returned. The set of headers
-// you can override using these parameters is a subset of the headers that Amazon
-// S3 accepts when you create an object. The response headers that you can override
-// for the GET response are Content-Type, Content-Language, Expires, Cache-Control,
-// Content-Disposition, and Content-Encoding. To override these header values
-// in the GET response, you use the following request parameters.
-//
-// You must sign the request, either using an Authorization header or a presigned
-// URL, when using these parameters. They cannot be used with an unsigned (anonymous)
-// request.
-//
-// * response-content-type
-//
-// * response-content-language
-//
-// * response-expires
-//
-// * response-cache-control
-//
-// * response-content-disposition
-//
-// * response-content-encoding
-//
-// Additional Considerations about Request Headers
-//
-// If both of the If-Match and If-Unmodified-Since headers are present in the
-// request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since
-// condition evaluates to false; then, S3 returns 200 OK and the data requested.
-//
-// If both of the If-None-Match and If-Modified-Since headers are present in
-// the request as follows:If-None-Match condition evaluates to false, and; If-Modified-Since
-// condition evaluates to true; then, S3 returns 304 Not Modified response code.
-//
-// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232).
-//
-// The following operations are related to GetObject:
-//
-// * ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
-//
-// * GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObject for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
-// * ErrCodeInvalidObjectState "InvalidObjectState"
-// Object is archived and inaccessible until restored.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObject
-func (c *S3) GetObject(input *GetObjectInput) (*GetObjectOutput, error) {
- req, out := c.GetObjectRequest(input)
- return out, req.Send()
-}
-
-// GetObjectWithContext is the same as GetObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectWithContext(ctx aws.Context, input *GetObjectInput, opts ...request.Option) (*GetObjectOutput, error) {
- req, out := c.GetObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectAcl = "GetObjectAcl"
-
-// GetObjectAclRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectAcl operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetObjectAcl for more information on using the GetObjectAcl
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetObjectAclRequest method.
-// req, resp := client.GetObjectAclRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
-func (c *S3) GetObjectAclRequest(input *GetObjectAclInput) (req *request.Request, output *GetObjectAclOutput) {
- op := &request.Operation{
- Name: opGetObjectAcl,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?acl",
- }
-
- if input == nil {
- input = &GetObjectAclInput{}
- }
-
- output = &GetObjectAclOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectAcl API operation for Amazon Simple Storage Service.
-//
-// Returns the access control list (ACL) of an object. To use this operation,
-// you must have READ_ACP access to the object.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// Versioning
-//
-// By default, GET returns ACL information about the current version of an object.
-// To return ACL information about a different version, use the versionId subresource.
-//
-// The following operations are related to GetObjectAcl:
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// * DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectAcl for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectAcl
-func (c *S3) GetObjectAcl(input *GetObjectAclInput) (*GetObjectAclOutput, error) {
- req, out := c.GetObjectAclRequest(input)
- return out, req.Send()
-}
-
-// GetObjectAclWithContext is the same as GetObjectAcl with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectAcl for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectAclWithContext(ctx aws.Context, input *GetObjectAclInput, opts ...request.Option) (*GetObjectAclOutput, error) {
- req, out := c.GetObjectAclRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectLegalHold = "GetObjectLegalHold"
-
-// GetObjectLegalHoldRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectLegalHold operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetObjectLegalHold for more information on using the GetObjectLegalHold
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetObjectLegalHoldRequest method.
-// req, resp := client.GetObjectLegalHoldRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
-func (c *S3) GetObjectLegalHoldRequest(input *GetObjectLegalHoldInput) (req *request.Request, output *GetObjectLegalHoldOutput) {
- op := &request.Operation{
- Name: opGetObjectLegalHold,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?legal-hold",
- }
-
- if input == nil {
- input = &GetObjectLegalHoldInput{}
- }
-
- output = &GetObjectLegalHoldOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectLegalHold API operation for Amazon Simple Storage Service.
-//
-// Gets an object's current Legal Hold status. For more information, see Locking
-// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectLegalHold for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLegalHold
-func (c *S3) GetObjectLegalHold(input *GetObjectLegalHoldInput) (*GetObjectLegalHoldOutput, error) {
- req, out := c.GetObjectLegalHoldRequest(input)
- return out, req.Send()
-}
-
-// GetObjectLegalHoldWithContext is the same as GetObjectLegalHold with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectLegalHold for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectLegalHoldWithContext(ctx aws.Context, input *GetObjectLegalHoldInput, opts ...request.Option) (*GetObjectLegalHoldOutput, error) {
- req, out := c.GetObjectLegalHoldRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectLockConfiguration = "GetObjectLockConfiguration"
-
-// GetObjectLockConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectLockConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetObjectLockConfiguration for more information on using the GetObjectLockConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetObjectLockConfigurationRequest method.
-// req, resp := client.GetObjectLockConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
-func (c *S3) GetObjectLockConfigurationRequest(input *GetObjectLockConfigurationInput) (req *request.Request, output *GetObjectLockConfigurationOutput) {
- op := &request.Operation{
- Name: opGetObjectLockConfiguration,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?object-lock",
- }
-
- if input == nil {
- input = &GetObjectLockConfigurationInput{}
- }
-
- output = &GetObjectLockConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectLockConfiguration API operation for Amazon Simple Storage Service.
-//
-// Gets the Object Lock configuration for a bucket. The rule specified in the
-// Object Lock configuration will be applied by default to every new object
-// placed in the specified bucket. For more information, see Locking Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectLockConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectLockConfiguration
-func (c *S3) GetObjectLockConfiguration(input *GetObjectLockConfigurationInput) (*GetObjectLockConfigurationOutput, error) {
- req, out := c.GetObjectLockConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetObjectLockConfigurationWithContext is the same as GetObjectLockConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectLockConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectLockConfigurationWithContext(ctx aws.Context, input *GetObjectLockConfigurationInput, opts ...request.Option) (*GetObjectLockConfigurationOutput, error) {
- req, out := c.GetObjectLockConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectRetention = "GetObjectRetention"
-
-// GetObjectRetentionRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectRetention operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetObjectRetention for more information on using the GetObjectRetention
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetObjectRetentionRequest method.
-// req, resp := client.GetObjectRetentionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
-func (c *S3) GetObjectRetentionRequest(input *GetObjectRetentionInput) (req *request.Request, output *GetObjectRetentionOutput) {
- op := &request.Operation{
- Name: opGetObjectRetention,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?retention",
- }
-
- if input == nil {
- input = &GetObjectRetentionInput{}
- }
-
- output = &GetObjectRetentionOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectRetention API operation for Amazon Simple Storage Service.
-//
-// Retrieves an object's retention settings. For more information, see Locking
-// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectRetention for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectRetention
-func (c *S3) GetObjectRetention(input *GetObjectRetentionInput) (*GetObjectRetentionOutput, error) {
- req, out := c.GetObjectRetentionRequest(input)
- return out, req.Send()
-}
-
-// GetObjectRetentionWithContext is the same as GetObjectRetention with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectRetention for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectRetentionWithContext(ctx aws.Context, input *GetObjectRetentionInput, opts ...request.Option) (*GetObjectRetentionOutput, error) {
- req, out := c.GetObjectRetentionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectTagging = "GetObjectTagging"
-
-// GetObjectTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectTagging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetObjectTagging for more information on using the GetObjectTagging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetObjectTaggingRequest method.
-// req, resp := client.GetObjectTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
-func (c *S3) GetObjectTaggingRequest(input *GetObjectTaggingInput) (req *request.Request, output *GetObjectTaggingOutput) {
- op := &request.Operation{
- Name: opGetObjectTagging,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?tagging",
- }
-
- if input == nil {
- input = &GetObjectTaggingInput{}
- }
-
- output = &GetObjectTaggingOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectTagging API operation for Amazon Simple Storage Service.
-//
-// Returns the tag-set of an object. You send the GET request against the tagging
-// subresource associated with the object.
-//
-// To use this operation, you must have permission to perform the s3:GetObjectTagging
-// action. By default, the GET action returns information about current version
-// of an object. For a versioned bucket, you can have multiple versions of an
-// object in your bucket. To retrieve tags of any other version, use the versionId
-// query parameter. You also need permission for the s3:GetObjectVersionTagging
-// action.
-//
-// By default, the bucket owner has this permission and can grant this permission
-// to others.
-//
-// For information about the Amazon S3 object tagging feature, see Object Tagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
-//
-// The following action is related to GetObjectTagging:
-//
-// * PutObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html)
-//
-// * DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTagging
-func (c *S3) GetObjectTagging(input *GetObjectTaggingInput) (*GetObjectTaggingOutput, error) {
- req, out := c.GetObjectTaggingRequest(input)
- return out, req.Send()
-}
-
-// GetObjectTaggingWithContext is the same as GetObjectTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectTaggingWithContext(ctx aws.Context, input *GetObjectTaggingInput, opts ...request.Option) (*GetObjectTaggingOutput, error) {
- req, out := c.GetObjectTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetObjectTorrent = "GetObjectTorrent"
-
-// GetObjectTorrentRequest generates a "aws/request.Request" representing the
-// client's request for the GetObjectTorrent operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetObjectTorrent for more information on using the GetObjectTorrent
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetObjectTorrentRequest method.
-// req, resp := client.GetObjectTorrentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
-func (c *S3) GetObjectTorrentRequest(input *GetObjectTorrentInput) (req *request.Request, output *GetObjectTorrentOutput) {
- op := &request.Operation{
- Name: opGetObjectTorrent,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}?torrent",
- }
-
- if input == nil {
- input = &GetObjectTorrentInput{}
- }
-
- output = &GetObjectTorrentOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetObjectTorrent API operation for Amazon Simple Storage Service.
-//
-// Returns torrent files from a bucket. BitTorrent can save you bandwidth when
-// you're distributing large files. For more information about BitTorrent, see
-// Using BitTorrent with Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3Torrent.html).
-//
-// You can get torrent only for objects that are less than 5 GB in size, and
-// that are not encrypted using server-side encryption with a customer-provided
-// encryption key.
-//
-// To use GET, you must have READ access to the object.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// The following action is related to GetObjectTorrent:
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetObjectTorrent for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetObjectTorrent
-func (c *S3) GetObjectTorrent(input *GetObjectTorrentInput) (*GetObjectTorrentOutput, error) {
- req, out := c.GetObjectTorrentRequest(input)
- return out, req.Send()
-}
-
-// GetObjectTorrentWithContext is the same as GetObjectTorrent with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetObjectTorrent for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetObjectTorrentWithContext(ctx aws.Context, input *GetObjectTorrentInput, opts ...request.Option) (*GetObjectTorrentOutput, error) {
- req, out := c.GetObjectTorrentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetPublicAccessBlock = "GetPublicAccessBlock"
-
-// GetPublicAccessBlockRequest generates a "aws/request.Request" representing the
-// client's request for the GetPublicAccessBlock operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetPublicAccessBlock for more information on using the GetPublicAccessBlock
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetPublicAccessBlockRequest method.
-// req, resp := client.GetPublicAccessBlockRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
-func (c *S3) GetPublicAccessBlockRequest(input *GetPublicAccessBlockInput) (req *request.Request, output *GetPublicAccessBlockOutput) {
- op := &request.Operation{
- Name: opGetPublicAccessBlock,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?publicAccessBlock",
- }
-
- if input == nil {
- input = &GetPublicAccessBlockInput{}
- }
-
- output = &GetPublicAccessBlockOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetPublicAccessBlock API operation for Amazon Simple Storage Service.
-//
-// Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To
-// use this operation, you must have the s3:GetBucketPublicAccessBlock permission.
-// For more information about Amazon S3 permissions, see Specifying Permissions
-// in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-//
-// When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket
-// or an object, it checks the PublicAccessBlock configuration for both the
-// bucket (or the bucket that contains the object) and the bucket owner's account.
-// If the PublicAccessBlock settings are different between the bucket and the
-// account, Amazon S3 uses the most restrictive combination of the bucket-level
-// and account-level settings.
-//
-// For more information about when Amazon S3 considers a bucket or an object
-// public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
-//
-// The following operations are related to GetPublicAccessBlock:
-//
-// * Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-//
-// * PutPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html)
-//
-// * GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// * DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation GetPublicAccessBlock for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/GetPublicAccessBlock
-func (c *S3) GetPublicAccessBlock(input *GetPublicAccessBlockInput) (*GetPublicAccessBlockOutput, error) {
- req, out := c.GetPublicAccessBlockRequest(input)
- return out, req.Send()
-}
-
-// GetPublicAccessBlockWithContext is the same as GetPublicAccessBlock with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetPublicAccessBlock for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) GetPublicAccessBlockWithContext(ctx aws.Context, input *GetPublicAccessBlockInput, opts ...request.Option) (*GetPublicAccessBlockOutput, error) {
- req, out := c.GetPublicAccessBlockRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opHeadBucket = "HeadBucket"
-
-// HeadBucketRequest generates a "aws/request.Request" representing the
-// client's request for the HeadBucket operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See HeadBucket for more information on using the HeadBucket
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the HeadBucketRequest method.
-// req, resp := client.HeadBucketRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
-func (c *S3) HeadBucketRequest(input *HeadBucketInput) (req *request.Request, output *HeadBucketOutput) {
- op := &request.Operation{
- Name: opHeadBucket,
- HTTPMethod: "HEAD",
- HTTPPath: "/{Bucket}",
- }
-
- if input == nil {
- input = &HeadBucketInput{}
- }
-
- output = &HeadBucketOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// HeadBucket API operation for Amazon Simple Storage Service.
-//
-// This action is useful to determine if a bucket exists and you have permission
-// to access it. The action returns a 200 OK if the bucket exists and you have
-// permission to access it.
-//
-// If the bucket does not exist or you do not have permission to access it,
-// the HEAD request returns a generic 404 Not Found or 403 Forbidden code. A
-// message body is not included, so you cannot determine the exception beyond
-// these error codes.
-//
-// To use this operation, you must have permissions to perform the s3:ListBucket
-// action. The bucket owner has this permission by default and can grant this
-// permission to others. For more information about permissions, see Permissions
-// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation HeadBucket for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchBucket "NoSuchBucket"
-// The specified bucket does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadBucket
-func (c *S3) HeadBucket(input *HeadBucketInput) (*HeadBucketOutput, error) {
- req, out := c.HeadBucketRequest(input)
- return out, req.Send()
-}
-
-// HeadBucketWithContext is the same as HeadBucket with the addition of
-// the ability to pass a context and additional request options.
-//
-// See HeadBucket for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) HeadBucketWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.Option) (*HeadBucketOutput, error) {
- req, out := c.HeadBucketRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opHeadObject = "HeadObject"
-
-// HeadObjectRequest generates a "aws/request.Request" representing the
-// client's request for the HeadObject operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See HeadObject for more information on using the HeadObject
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the HeadObjectRequest method.
-// req, resp := client.HeadObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
-func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, output *HeadObjectOutput) {
- op := &request.Operation{
- Name: opHeadObject,
- HTTPMethod: "HEAD",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &HeadObjectInput{}
- }
-
- output = &HeadObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// HeadObject API operation for Amazon Simple Storage Service.
-//
-// The HEAD action retrieves metadata from an object without returning the object
-// itself. This action is useful if you're only interested in an object's metadata.
-// To use HEAD, you must have READ access to the object.
-//
-// A HEAD request has the same options as a GET action on an object. The response
-// is identical to the GET response except that there is no response body. Because
-// of this, if the HEAD request generates an error, it returns a generic 404
-// Not Found or 403 Forbidden code. It is not possible to retrieve the exact
-// exception beyond these error codes.
-//
-// If you encrypt an object by using server-side encryption with customer-provided
-// encryption keys (SSE-C) when you store the object in Amazon S3, then when
-// you retrieve the metadata from the object, you must use the following headers:
-//
-// * x-amz-server-side-encryption-customer-algorithm
-//
-// * x-amz-server-side-encryption-customer-key
-//
-// * x-amz-server-side-encryption-customer-key-MD5
-//
-// For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
-// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
-//
-// * Encryption request headers, like x-amz-server-side-encryption, should
-// not be sent for GET requests if your object uses server-side encryption
-// with CMKs stored in AWS KMS (SSE-KMS) or server-side encryption with Amazon
-// S3–managed encryption keys (SSE-S3). If your object does use these types
-// of keys, you’ll get an HTTP 400 BadRequest error.
-//
-// * The last modified property in this case is the creation date of the
-// object.
-//
-// Request headers are limited to 8 KB in size. For more information, see Common
-// Request Headers (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html).
-//
-// Consider the following when using request headers:
-//
-// * Consideration 1 – If both of the If-Match and If-Unmodified-Since
-// headers are present in the request as follows: If-Match condition evaluates
-// to true, and; If-Unmodified-Since condition evaluates to false; Then Amazon
-// S3 returns 200 OK and the data requested.
-//
-// * Consideration 2 – If both of the If-None-Match and If-Modified-Since
-// headers are present in the request as follows: If-None-Match condition
-// evaluates to false, and; If-Modified-Since condition evaluates to true;
-// Then Amazon S3 returns the 304 Not Modified response code.
-//
-// For more information about conditional requests, see RFC 7232 (https://tools.ietf.org/html/rfc7232).
-//
-// Permissions
-//
-// You need the s3:GetObject permission for this operation. For more information,
-// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-// If the object you request does not exist, the error Amazon S3 returns depends
-// on whether you also have the s3:ListBucket permission.
-//
-// * If you have the s3:ListBucket permission on the bucket, Amazon S3 returns
-// an HTTP status code 404 ("no such key") error.
-//
-// * If you don’t have the s3:ListBucket permission, Amazon S3 returns
-// an HTTP status code 403 ("access denied") error.
-//
-// The following action is related to HeadObject:
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#RESTErrorResponses
-// for more information on returned errors.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation HeadObject for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/HeadObject
-func (c *S3) HeadObject(input *HeadObjectInput) (*HeadObjectOutput, error) {
- req, out := c.HeadObjectRequest(input)
- return out, req.Send()
-}
-
-// HeadObjectWithContext is the same as HeadObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See HeadObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) HeadObjectWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.Option) (*HeadObjectOutput, error) {
- req, out := c.HeadObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBucketAnalyticsConfigurations = "ListBucketAnalyticsConfigurations"
-
-// ListBucketAnalyticsConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBucketAnalyticsConfigurations operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListBucketAnalyticsConfigurations for more information on using the ListBucketAnalyticsConfigurations
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListBucketAnalyticsConfigurationsRequest method.
-// req, resp := client.ListBucketAnalyticsConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
-func (c *S3) ListBucketAnalyticsConfigurationsRequest(input *ListBucketAnalyticsConfigurationsInput) (req *request.Request, output *ListBucketAnalyticsConfigurationsOutput) {
- op := &request.Operation{
- Name: opListBucketAnalyticsConfigurations,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?analytics",
- }
-
- if input == nil {
- input = &ListBucketAnalyticsConfigurationsInput{}
- }
-
- output = &ListBucketAnalyticsConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBucketAnalyticsConfigurations API operation for Amazon Simple Storage Service.
-//
-// Lists the analytics configurations for the bucket. You can have up to 1,000
-// analytics configurations per bucket.
-//
-// This action supports list pagination and does not return more than 100 configurations
-// at a time. You should always check the IsTruncated element in the response.
-// If there are no more configurations to list, IsTruncated is set to false.
-// If there are more configurations to list, IsTruncated is set to true, and
-// there will be a value in NextContinuationToken. You use the NextContinuationToken
-// value to continue the pagination of the list by passing the value in continuation-token
-// in the request to GET the next page.
-//
-// To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For information about Amazon S3 analytics feature, see Amazon S3 Analytics
-// – Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
-//
-// The following operations are related to ListBucketAnalyticsConfigurations:
-//
-// * GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// * DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// * PutBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBucketAnalyticsConfigurations for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketAnalyticsConfigurations
-func (c *S3) ListBucketAnalyticsConfigurations(input *ListBucketAnalyticsConfigurationsInput) (*ListBucketAnalyticsConfigurationsOutput, error) {
- req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketAnalyticsConfigurationsWithContext is the same as ListBucketAnalyticsConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBucketAnalyticsConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketAnalyticsConfigurationsWithContext(ctx aws.Context, input *ListBucketAnalyticsConfigurationsInput, opts ...request.Option) (*ListBucketAnalyticsConfigurationsOutput, error) {
- req, out := c.ListBucketAnalyticsConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBucketIntelligentTieringConfigurations = "ListBucketIntelligentTieringConfigurations"
-
-// ListBucketIntelligentTieringConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBucketIntelligentTieringConfigurations operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListBucketIntelligentTieringConfigurations for more information on using the ListBucketIntelligentTieringConfigurations
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListBucketIntelligentTieringConfigurationsRequest method.
-// req, resp := client.ListBucketIntelligentTieringConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketIntelligentTieringConfigurations
-func (c *S3) ListBucketIntelligentTieringConfigurationsRequest(input *ListBucketIntelligentTieringConfigurationsInput) (req *request.Request, output *ListBucketIntelligentTieringConfigurationsOutput) {
- op := &request.Operation{
- Name: opListBucketIntelligentTieringConfigurations,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?intelligent-tiering",
- }
-
- if input == nil {
- input = &ListBucketIntelligentTieringConfigurationsInput{}
- }
-
- output = &ListBucketIntelligentTieringConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBucketIntelligentTieringConfigurations API operation for Amazon Simple Storage Service.
-//
-// Lists the S3 Intelligent-Tiering configuration from the specified bucket.
-//
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without additional operational overhead. S3 Intelligent-Tiering delivers
-// automatic cost savings by moving data between access tiers, when access patterns
-// change.
-//
-// The S3 Intelligent-Tiering storage class is suitable for objects larger than
-// 128 KB that you plan to store for at least 30 days. If the size of an object
-// is less than 128 KB, it is not eligible for auto-tiering. Smaller objects
-// can be stored, but they are always charged at the frequent access tier rates
-// in the S3 Intelligent-Tiering storage class.
-//
-// If you delete an object before the end of the 30-day minimum storage duration
-// period, you are charged for 30 days. For more information, see Storage class
-// for automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-//
-// Operations related to ListBucketIntelligentTieringConfigurations include:
-//
-// * DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// * PutBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html)
-//
-// * GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBucketIntelligentTieringConfigurations for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketIntelligentTieringConfigurations
-func (c *S3) ListBucketIntelligentTieringConfigurations(input *ListBucketIntelligentTieringConfigurationsInput) (*ListBucketIntelligentTieringConfigurationsOutput, error) {
- req, out := c.ListBucketIntelligentTieringConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketIntelligentTieringConfigurationsWithContext is the same as ListBucketIntelligentTieringConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBucketIntelligentTieringConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketIntelligentTieringConfigurationsWithContext(ctx aws.Context, input *ListBucketIntelligentTieringConfigurationsInput, opts ...request.Option) (*ListBucketIntelligentTieringConfigurationsOutput, error) {
- req, out := c.ListBucketIntelligentTieringConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBucketInventoryConfigurations = "ListBucketInventoryConfigurations"
-
-// ListBucketInventoryConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBucketInventoryConfigurations operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListBucketInventoryConfigurations for more information on using the ListBucketInventoryConfigurations
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListBucketInventoryConfigurationsRequest method.
-// req, resp := client.ListBucketInventoryConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
-func (c *S3) ListBucketInventoryConfigurationsRequest(input *ListBucketInventoryConfigurationsInput) (req *request.Request, output *ListBucketInventoryConfigurationsOutput) {
- op := &request.Operation{
- Name: opListBucketInventoryConfigurations,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?inventory",
- }
-
- if input == nil {
- input = &ListBucketInventoryConfigurationsInput{}
- }
-
- output = &ListBucketInventoryConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBucketInventoryConfigurations API operation for Amazon Simple Storage Service.
-//
-// Returns a list of inventory configurations for the bucket. You can have up
-// to 1,000 analytics configurations per bucket.
-//
-// This action supports list pagination and does not return more than 100 configurations
-// at a time. Always check the IsTruncated element in the response. If there
-// are no more configurations to list, IsTruncated is set to false. If there
-// are more configurations to list, IsTruncated is set to true, and there is
-// a value in NextContinuationToken. You use the NextContinuationToken value
-// to continue the pagination of the list by passing the value in continuation-token
-// in the request to GET the next page.
-//
-// To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For information about the Amazon S3 inventory feature, see Amazon S3 Inventory
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
-//
-// The following operations are related to ListBucketInventoryConfigurations:
-//
-// * GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// * DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// * PutBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBucketInventoryConfigurations for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketInventoryConfigurations
-func (c *S3) ListBucketInventoryConfigurations(input *ListBucketInventoryConfigurationsInput) (*ListBucketInventoryConfigurationsOutput, error) {
- req, out := c.ListBucketInventoryConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketInventoryConfigurationsWithContext is the same as ListBucketInventoryConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBucketInventoryConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketInventoryConfigurationsWithContext(ctx aws.Context, input *ListBucketInventoryConfigurationsInput, opts ...request.Option) (*ListBucketInventoryConfigurationsOutput, error) {
- req, out := c.ListBucketInventoryConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBucketMetricsConfigurations = "ListBucketMetricsConfigurations"
-
-// ListBucketMetricsConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBucketMetricsConfigurations operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListBucketMetricsConfigurations for more information on using the ListBucketMetricsConfigurations
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListBucketMetricsConfigurationsRequest method.
-// req, resp := client.ListBucketMetricsConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
-func (c *S3) ListBucketMetricsConfigurationsRequest(input *ListBucketMetricsConfigurationsInput) (req *request.Request, output *ListBucketMetricsConfigurationsOutput) {
- op := &request.Operation{
- Name: opListBucketMetricsConfigurations,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?metrics",
- }
-
- if input == nil {
- input = &ListBucketMetricsConfigurationsInput{}
- }
-
- output = &ListBucketMetricsConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBucketMetricsConfigurations API operation for Amazon Simple Storage Service.
-//
-// Lists the metrics configurations for the bucket. The metrics configurations
-// are only for the request metrics of the bucket and do not provide information
-// on daily storage metrics. You can have up to 1,000 configurations per bucket.
-//
-// This action supports list pagination and does not return more than 100 configurations
-// at a time. Always check the IsTruncated element in the response. If there
-// are no more configurations to list, IsTruncated is set to false. If there
-// are more configurations to list, IsTruncated is set to true, and there is
-// a value in NextContinuationToken. You use the NextContinuationToken value
-// to continue the pagination of the list by passing the value in continuation-token
-// in the request to GET the next page.
-//
-// To use this operation, you must have permissions to perform the s3:GetMetricsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For more information about metrics configurations and CloudWatch request
-// metrics, see Monitoring Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
-//
-// The following operations are related to ListBucketMetricsConfigurations:
-//
-// * PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// * GetBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html)
-//
-// * DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBucketMetricsConfigurations for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBucketMetricsConfigurations
-func (c *S3) ListBucketMetricsConfigurations(input *ListBucketMetricsConfigurationsInput) (*ListBucketMetricsConfigurationsOutput, error) {
- req, out := c.ListBucketMetricsConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketMetricsConfigurationsWithContext is the same as ListBucketMetricsConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBucketMetricsConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketMetricsConfigurationsWithContext(ctx aws.Context, input *ListBucketMetricsConfigurationsInput, opts ...request.Option) (*ListBucketMetricsConfigurationsOutput, error) {
- req, out := c.ListBucketMetricsConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListBuckets = "ListBuckets"
-
-// ListBucketsRequest generates a "aws/request.Request" representing the
-// client's request for the ListBuckets operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListBuckets for more information on using the ListBuckets
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListBucketsRequest method.
-// req, resp := client.ListBucketsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
-func (c *S3) ListBucketsRequest(input *ListBucketsInput) (req *request.Request, output *ListBucketsOutput) {
- op := &request.Operation{
- Name: opListBuckets,
- HTTPMethod: "GET",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListBucketsInput{}
- }
-
- output = &ListBucketsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListBuckets API operation for Amazon Simple Storage Service.
-//
-// Returns a list of all buckets owned by the authenticated sender of the request.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListBuckets for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListBuckets
-func (c *S3) ListBuckets(input *ListBucketsInput) (*ListBucketsOutput, error) {
- req, out := c.ListBucketsRequest(input)
- return out, req.Send()
-}
-
-// ListBucketsWithContext is the same as ListBuckets with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListBuckets for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListBucketsWithContext(ctx aws.Context, input *ListBucketsInput, opts ...request.Option) (*ListBucketsOutput, error) {
- req, out := c.ListBucketsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListMultipartUploads = "ListMultipartUploads"
-
-// ListMultipartUploadsRequest generates a "aws/request.Request" representing the
-// client's request for the ListMultipartUploads operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListMultipartUploads for more information on using the ListMultipartUploads
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListMultipartUploadsRequest method.
-// req, resp := client.ListMultipartUploadsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
-func (c *S3) ListMultipartUploadsRequest(input *ListMultipartUploadsInput) (req *request.Request, output *ListMultipartUploadsOutput) {
- op := &request.Operation{
- Name: opListMultipartUploads,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?uploads",
- Paginator: &request.Paginator{
- InputTokens: []string{"KeyMarker", "UploadIdMarker"},
- OutputTokens: []string{"NextKeyMarker", "NextUploadIdMarker"},
- LimitToken: "MaxUploads",
- TruncationToken: "IsTruncated",
- },
- }
-
- if input == nil {
- input = &ListMultipartUploadsInput{}
- }
-
- output = &ListMultipartUploadsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListMultipartUploads API operation for Amazon Simple Storage Service.
-//
-// This action lists in-progress multipart uploads. An in-progress multipart
-// upload is a multipart upload that has been initiated using the Initiate Multipart
-// Upload request, but has not yet been completed or aborted.
-//
-// This action returns at most 1,000 multipart uploads in the response. 1,000
-// multipart uploads is the maximum number of uploads a response can include,
-// which is also the default value. You can further limit the number of uploads
-// in a response by specifying the max-uploads parameter in the response. If
-// additional multipart uploads satisfy the list criteria, the response will
-// contain an IsTruncated element with the value true. To list the additional
-// multipart uploads, use the key-marker and upload-id-marker request parameters.
-//
-// In the response, the uploads are sorted by key. If your application has initiated
-// more than one multipart upload using the same object key, then uploads in
-// the response are first sorted by key. Additionally, uploads are sorted in
-// ascending order within each key by the upload initiation time.
-//
-// For more information on multipart uploads, see Uploading Objects Using Multipart
-// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
-//
-// For information on permissions required to use the multipart upload API,
-// see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// The following operations are related to ListMultipartUploads:
-//
-// * CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// * UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// * CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// * ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// * AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListMultipartUploads for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListMultipartUploads
-func (c *S3) ListMultipartUploads(input *ListMultipartUploadsInput) (*ListMultipartUploadsOutput, error) {
- req, out := c.ListMultipartUploadsRequest(input)
- return out, req.Send()
-}
-
-// ListMultipartUploadsWithContext is the same as ListMultipartUploads with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListMultipartUploads for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListMultipartUploadsWithContext(ctx aws.Context, input *ListMultipartUploadsInput, opts ...request.Option) (*ListMultipartUploadsOutput, error) {
- req, out := c.ListMultipartUploadsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListMultipartUploadsPages iterates over the pages of a ListMultipartUploads operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListMultipartUploads method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListMultipartUploads operation.
-// pageNum := 0
-// err := client.ListMultipartUploadsPages(params,
-// func(page *s3.ListMultipartUploadsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *S3) ListMultipartUploadsPages(input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool) error {
- return c.ListMultipartUploadsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListMultipartUploadsPagesWithContext same as ListMultipartUploadsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListMultipartUploadsPagesWithContext(ctx aws.Context, input *ListMultipartUploadsInput, fn func(*ListMultipartUploadsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListMultipartUploadsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListMultipartUploadsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListMultipartUploadsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListObjectVersions = "ListObjectVersions"
-
-// ListObjectVersionsRequest generates a "aws/request.Request" representing the
-// client's request for the ListObjectVersions operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListObjectVersions for more information on using the ListObjectVersions
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListObjectVersionsRequest method.
-// req, resp := client.ListObjectVersionsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
-func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *request.Request, output *ListObjectVersionsOutput) {
- op := &request.Operation{
- Name: opListObjectVersions,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?versions",
- Paginator: &request.Paginator{
- InputTokens: []string{"KeyMarker", "VersionIdMarker"},
- OutputTokens: []string{"NextKeyMarker", "NextVersionIdMarker"},
- LimitToken: "MaxKeys",
- TruncationToken: "IsTruncated",
- },
- }
-
- if input == nil {
- input = &ListObjectVersionsInput{}
- }
-
- output = &ListObjectVersionsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListObjectVersions API operation for Amazon Simple Storage Service.
-//
-// Returns metadata about all versions of the objects in a bucket. You can also
-// use request parameters as selection criteria to return metadata about a subset
-// of all the object versions.
-//
-// To use this operation, you must have permissions to perform the s3:ListBucketVersions
-// action. Be aware of the name difference.
-//
-// A 200 OK response can contain valid or invalid XML. Make sure to design your
-// application to parse the contents of the response and handle it appropriately.
-//
-// To use this operation, you must have READ access to the bucket.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// The following operations are related to ListObjectVersions:
-//
-// * ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// * DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListObjectVersions for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectVersions
-func (c *S3) ListObjectVersions(input *ListObjectVersionsInput) (*ListObjectVersionsOutput, error) {
- req, out := c.ListObjectVersionsRequest(input)
- return out, req.Send()
-}
-
-// ListObjectVersionsWithContext is the same as ListObjectVersions with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListObjectVersions for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectVersionsWithContext(ctx aws.Context, input *ListObjectVersionsInput, opts ...request.Option) (*ListObjectVersionsOutput, error) {
- req, out := c.ListObjectVersionsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListObjectVersionsPages iterates over the pages of a ListObjectVersions operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListObjectVersions method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListObjectVersions operation.
-// pageNum := 0
-// err := client.ListObjectVersionsPages(params,
-// func(page *s3.ListObjectVersionsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *S3) ListObjectVersionsPages(input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool) error {
- return c.ListObjectVersionsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListObjectVersionsPagesWithContext same as ListObjectVersionsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectVersionsPagesWithContext(ctx aws.Context, input *ListObjectVersionsInput, fn func(*ListObjectVersionsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListObjectVersionsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListObjectVersionsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListObjectVersionsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListObjects = "ListObjects"
-
-// ListObjectsRequest generates a "aws/request.Request" representing the
-// client's request for the ListObjects operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListObjects for more information on using the ListObjects
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListObjectsRequest method.
-// req, resp := client.ListObjectsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
-func (c *S3) ListObjectsRequest(input *ListObjectsInput) (req *request.Request, output *ListObjectsOutput) {
- op := &request.Operation{
- Name: opListObjects,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}",
- Paginator: &request.Paginator{
- InputTokens: []string{"Marker"},
- OutputTokens: []string{"NextMarker || Contents[-1].Key"},
- LimitToken: "MaxKeys",
- TruncationToken: "IsTruncated",
- },
- }
-
- if input == nil {
- input = &ListObjectsInput{}
- }
-
- output = &ListObjectsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListObjects API operation for Amazon Simple Storage Service.
-//
-// Returns some or all (up to 1,000) of the objects in a bucket. You can use
-// the request parameters as selection criteria to return a subset of the objects
-// in a bucket. A 200 OK response can contain valid or invalid XML. Be sure
-// to design your application to parse the contents of the response and handle
-// it appropriately.
-//
-// This action has been revised. We recommend that you use the newer version,
-// ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html),
-// when developing applications. For backward compatibility, Amazon S3 continues
-// to support ListObjects.
-//
-// The following operations are related to ListObjects:
-//
-// * ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html)
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListObjects for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchBucket "NoSuchBucket"
-// The specified bucket does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjects
-func (c *S3) ListObjects(input *ListObjectsInput) (*ListObjectsOutput, error) {
- req, out := c.ListObjectsRequest(input)
- return out, req.Send()
-}
-
-// ListObjectsWithContext is the same as ListObjects with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListObjects for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectsWithContext(ctx aws.Context, input *ListObjectsInput, opts ...request.Option) (*ListObjectsOutput, error) {
- req, out := c.ListObjectsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListObjectsPages iterates over the pages of a ListObjects operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListObjects method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListObjects operation.
-// pageNum := 0
-// err := client.ListObjectsPages(params,
-// func(page *s3.ListObjectsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *S3) ListObjectsPages(input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool) error {
- return c.ListObjectsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListObjectsPagesWithContext same as ListObjectsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectsPagesWithContext(ctx aws.Context, input *ListObjectsInput, fn func(*ListObjectsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListObjectsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListObjectsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListObjectsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListObjectsV2 = "ListObjectsV2"
-
-// ListObjectsV2Request generates a "aws/request.Request" representing the
-// client's request for the ListObjectsV2 operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListObjectsV2 for more information on using the ListObjectsV2
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListObjectsV2Request method.
-// req, resp := client.ListObjectsV2Request(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
-func (c *S3) ListObjectsV2Request(input *ListObjectsV2Input) (req *request.Request, output *ListObjectsV2Output) {
- op := &request.Operation{
- Name: opListObjectsV2,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}?list-type=2",
- Paginator: &request.Paginator{
- InputTokens: []string{"ContinuationToken"},
- OutputTokens: []string{"NextContinuationToken"},
- LimitToken: "MaxKeys",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListObjectsV2Input{}
- }
-
- output = &ListObjectsV2Output{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListObjectsV2 API operation for Amazon Simple Storage Service.
-//
-// Returns some or all (up to 1,000) of the objects in a bucket with each request.
-// You can use the request parameters as selection criteria to return a subset
-// of the objects in a bucket. A 200 OK response can contain valid or invalid
-// XML. Make sure to design your application to parse the contents of the response
-// and handle it appropriately. Objects are returned sorted in an ascending
-// order of the respective key names in the list. For more information about
-// listing objects, see Listing object keys programmatically (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html)
-//
-// To use this operation, you must have READ access to the bucket.
-//
-// To use this action in an AWS Identity and Access Management (IAM) policy,
-// you must have permissions to perform the s3:ListBucket action. The bucket
-// owner has this permission by default and can grant this permission to others.
-// For more information about permissions, see Permissions Related to Bucket
-// Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// This section describes the latest revision of this action. We recommend that
-// you use this revised API for application development. For backward compatibility,
-// Amazon S3 continues to support the prior version of this API, ListObjects
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html).
-//
-// To get a list of your buckets, see ListBuckets (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html).
-//
-// The following operations are related to ListObjectsV2:
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListObjectsV2 for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchBucket "NoSuchBucket"
-// The specified bucket does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListObjectsV2
-func (c *S3) ListObjectsV2(input *ListObjectsV2Input) (*ListObjectsV2Output, error) {
- req, out := c.ListObjectsV2Request(input)
- return out, req.Send()
-}
-
-// ListObjectsV2WithContext is the same as ListObjectsV2 with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListObjectsV2 for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectsV2WithContext(ctx aws.Context, input *ListObjectsV2Input, opts ...request.Option) (*ListObjectsV2Output, error) {
- req, out := c.ListObjectsV2Request(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListObjectsV2Pages iterates over the pages of a ListObjectsV2 operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListObjectsV2 method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListObjectsV2 operation.
-// pageNum := 0
-// err := client.ListObjectsV2Pages(params,
-// func(page *s3.ListObjectsV2Output, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *S3) ListObjectsV2Pages(input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool) error {
- return c.ListObjectsV2PagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListObjectsV2PagesWithContext same as ListObjectsV2Pages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListObjectsV2PagesWithContext(ctx aws.Context, input *ListObjectsV2Input, fn func(*ListObjectsV2Output, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListObjectsV2Input
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListObjectsV2Request(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListObjectsV2Output), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListParts = "ListParts"
-
-// ListPartsRequest generates a "aws/request.Request" representing the
-// client's request for the ListParts operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListParts for more information on using the ListParts
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListPartsRequest method.
-// req, resp := client.ListPartsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
-func (c *S3) ListPartsRequest(input *ListPartsInput) (req *request.Request, output *ListPartsOutput) {
- op := &request.Operation{
- Name: opListParts,
- HTTPMethod: "GET",
- HTTPPath: "/{Bucket}/{Key+}",
- Paginator: &request.Paginator{
- InputTokens: []string{"PartNumberMarker"},
- OutputTokens: []string{"NextPartNumberMarker"},
- LimitToken: "MaxParts",
- TruncationToken: "IsTruncated",
- },
- }
-
- if input == nil {
- input = &ListPartsInput{}
- }
-
- output = &ListPartsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListParts API operation for Amazon Simple Storage Service.
-//
-// Lists the parts that have been uploaded for a specific multipart upload.
-// This operation must include the upload ID, which you obtain by sending the
-// initiate multipart upload request (see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)).
-// This request returns a maximum of 1,000 uploaded parts. The default number
-// of parts returned is 1,000 parts. You can restrict the number of parts returned
-// by specifying the max-parts request parameter. If your multipart upload consists
-// of more than 1,000 parts, the response returns an IsTruncated field with
-// the value of true, and a NextPartNumberMarker element. In subsequent ListParts
-// requests you can include the part-number-marker query string parameter and
-// set its value to the NextPartNumberMarker field value from the previous response.
-//
-// For more information on multipart uploads, see Uploading Objects Using Multipart
-// Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html).
-//
-// For information on permissions required to use the multipart upload API,
-// see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html).
-//
-// The following operations are related to ListParts:
-//
-// * CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// * UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// * CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// * AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// * ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation ListParts for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ListParts
-func (c *S3) ListParts(input *ListPartsInput) (*ListPartsOutput, error) {
- req, out := c.ListPartsRequest(input)
- return out, req.Send()
-}
-
-// ListPartsWithContext is the same as ListParts with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListParts for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListPartsWithContext(ctx aws.Context, input *ListPartsInput, opts ...request.Option) (*ListPartsOutput, error) {
- req, out := c.ListPartsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListPartsPages iterates over the pages of a ListParts operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListParts method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListParts operation.
-// pageNum := 0
-// err := client.ListPartsPages(params,
-// func(page *s3.ListPartsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *S3) ListPartsPages(input *ListPartsInput, fn func(*ListPartsOutput, bool) bool) error {
- return c.ListPartsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListPartsPagesWithContext same as ListPartsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) ListPartsPagesWithContext(ctx aws.Context, input *ListPartsInput, fn func(*ListPartsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListPartsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListPartsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListPartsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opPutBucketAccelerateConfiguration = "PutBucketAccelerateConfiguration"
-
-// PutBucketAccelerateConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketAccelerateConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketAccelerateConfiguration for more information on using the PutBucketAccelerateConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketAccelerateConfigurationRequest method.
-// req, resp := client.PutBucketAccelerateConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
-func (c *S3) PutBucketAccelerateConfigurationRequest(input *PutBucketAccelerateConfigurationInput) (req *request.Request, output *PutBucketAccelerateConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketAccelerateConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?accelerate",
- }
-
- if input == nil {
- input = &PutBucketAccelerateConfigurationInput{}
- }
-
- output = &PutBucketAccelerateConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketAccelerateConfiguration API operation for Amazon Simple Storage Service.
-//
-// Sets the accelerate configuration of an existing bucket. Amazon S3 Transfer
-// Acceleration is a bucket-level feature that enables you to perform faster
-// data transfers to Amazon S3.
-//
-// To use this operation, you must have permission to perform the s3:PutAccelerateConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// The Transfer Acceleration state of a bucket can be set to one of the following
-// two values:
-//
-// * Enabled – Enables accelerated data transfers to the bucket.
-//
-// * Suspended – Disables accelerated data transfers to the bucket.
-//
-// The GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
-// action returns the transfer acceleration state of a bucket.
-//
-// After setting the Transfer Acceleration state of a bucket to Enabled, it
-// might take up to thirty minutes before the data transfer rates to the bucket
-// increase.
-//
-// The name of the bucket used for Transfer Acceleration must be DNS-compliant
-// and must not contain periods (".").
-//
-// For more information about transfer acceleration, see Transfer Acceleration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html).
-//
-// The following operations are related to PutBucketAccelerateConfiguration:
-//
-// * GetBucketAccelerateConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html)
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketAccelerateConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAccelerateConfiguration
-func (c *S3) PutBucketAccelerateConfiguration(input *PutBucketAccelerateConfigurationInput) (*PutBucketAccelerateConfigurationOutput, error) {
- req, out := c.PutBucketAccelerateConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketAccelerateConfigurationWithContext is the same as PutBucketAccelerateConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketAccelerateConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketAccelerateConfigurationWithContext(ctx aws.Context, input *PutBucketAccelerateConfigurationInput, opts ...request.Option) (*PutBucketAccelerateConfigurationOutput, error) {
- req, out := c.PutBucketAccelerateConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketAcl = "PutBucketAcl"
-
-// PutBucketAclRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketAcl operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketAcl for more information on using the PutBucketAcl
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketAclRequest method.
-// req, resp := client.PutBucketAclRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
-func (c *S3) PutBucketAclRequest(input *PutBucketAclInput) (req *request.Request, output *PutBucketAclOutput) {
- op := &request.Operation{
- Name: opPutBucketAcl,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?acl",
- }
-
- if input == nil {
- input = &PutBucketAclInput{}
- }
-
- output = &PutBucketAclOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketAcl API operation for Amazon Simple Storage Service.
-//
-// Sets the permissions on an existing bucket using access control lists (ACL).
-// For more information, see Using ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html).
-// To set the ACL of a bucket, you must have WRITE_ACP permission.
-//
-// You can use one of the following two ways to set a bucket's permissions:
-//
-// * Specify the ACL in the request body
-//
-// * Specify permissions using request headers
-//
-// You cannot specify access permission using both the body and the request
-// headers.
-//
-// Depending on your application needs, you may choose to set the ACL on a bucket
-// using either the request body or the headers. For example, if you have an
-// existing application that updates a bucket ACL using the request body, then
-// you can continue to use that approach.
-//
-// Access Permissions
-//
-// You can set access permissions using one of the following methods:
-//
-// * Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports
-// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
-// predefined set of grantees and permissions. Specify the canned ACL name
-// as the value of x-amz-acl. If you use this header, you cannot use other
-// access control-specific headers in your request. For more information,
-// see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-//
-// * Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
-// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using
-// these headers, you specify explicit access permissions and grantees (AWS
-// accounts or Amazon S3 groups) who will receive the permission. If you
-// use these ACL-specific headers, you cannot use the x-amz-acl header to
-// set a canned ACL. These parameters map to the set of permissions that
-// Amazon S3 supports in an ACL. For more information, see Access Control
-// List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
-// You specify each grantee as a type=value pair, where the type is one of
-// the following: id – if the value specified is the canonical user ID
-// of an AWS account uri – if you are granting permissions to a predefined
-// group emailAddress – if the value specified is the email address of
-// an AWS account Using email addresses to specify a grantee is only supported
-// in the following AWS Regions: US East (N. Virginia) US West (N. California)
-// US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific
-// (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all
-// the Amazon S3 supported Regions and endpoints, see Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in
-// the AWS General Reference. For example, the following x-amz-grant-write
-// header grants create, overwrite, and delete objects permission to LogDelivery
-// group predefined by Amazon S3 and two AWS accounts identified by their
-// email addresses. x-amz-grant-write: uri="http://acs.amazonaws.com/groups/s3/LogDelivery",
-// id="111122223333", id="555566667777"
-//
-// You can use either a canned ACL or specify access permissions explicitly.
-// You cannot do both.
-//
-// Grantee Values
-//
-// You can specify the person (grantee) to whom you're assigning access rights
-// (using request elements) in the following ways:
-//
-// * By the person's ID: <>ID<><>GranteesEmail<>
-// DisplayName is optional and ignored in the request
-//
-// * By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
-//
-// * By Email address: <>Grantees@email.com<>lt;/Grantee>
-// The grantee is resolved to the CanonicalUser and, in a response to a GET
-// Object acl request, appears as the CanonicalUser. Using email addresses
-// to specify a grantee is only supported in the following AWS Regions: US
-// East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
-// (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland)
-// South America (São Paulo) For a list of all the Amazon S3 supported Regions
-// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
-// in the AWS General Reference.
-//
-// Related Resources
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// * GetObjectAcl (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketAcl for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAcl
-func (c *S3) PutBucketAcl(input *PutBucketAclInput) (*PutBucketAclOutput, error) {
- req, out := c.PutBucketAclRequest(input)
- return out, req.Send()
-}
-
-// PutBucketAclWithContext is the same as PutBucketAcl with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketAcl for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketAclWithContext(ctx aws.Context, input *PutBucketAclInput, opts ...request.Option) (*PutBucketAclOutput, error) {
- req, out := c.PutBucketAclRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketAnalyticsConfiguration = "PutBucketAnalyticsConfiguration"
-
-// PutBucketAnalyticsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketAnalyticsConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketAnalyticsConfiguration for more information on using the PutBucketAnalyticsConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketAnalyticsConfigurationRequest method.
-// req, resp := client.PutBucketAnalyticsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
-func (c *S3) PutBucketAnalyticsConfigurationRequest(input *PutBucketAnalyticsConfigurationInput) (req *request.Request, output *PutBucketAnalyticsConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketAnalyticsConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?analytics",
- }
-
- if input == nil {
- input = &PutBucketAnalyticsConfigurationInput{}
- }
-
- output = &PutBucketAnalyticsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketAnalyticsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Sets an analytics configuration for the bucket (specified by the analytics
-// configuration ID). You can have up to 1,000 analytics configurations per
-// bucket.
-//
-// You can choose to have storage class analysis export analysis reports sent
-// to a comma-separated values (CSV) flat file. See the DataExport request element.
-// Reports are updated daily and are based on the object filters that you configure.
-// When selecting data export, you specify a destination bucket and an optional
-// destination prefix where the file is written. You can export the data to
-// a destination bucket in a different account. However, the destination bucket
-// must be in the same Region as the bucket that you are making the PUT analytics
-// configuration to. For more information, see Amazon S3 Analytics – Storage
-// Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/analytics-storage-class.html).
-//
-// You must create a bucket policy on the destination bucket where the exported
-// file is written to grant permissions to Amazon S3 to write objects to the
-// bucket. For an example policy, see Granting Permissions for Amazon S3 Inventory
-// and Storage Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9).
-//
-// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// Special Errors
-//
-// * HTTP Error: HTTP 400 Bad Request Code: InvalidArgument Cause: Invalid
-// argument.
-//
-// * HTTP Error: HTTP 400 Bad Request Code: TooManyConfigurations Cause:
-// You are attempting to create a new configuration but have already reached
-// the 1,000-configuration limit.
-//
-// * HTTP Error: HTTP 403 Forbidden Code: AccessDenied Cause: You are not
-// the owner of the specified bucket, or you do not have the s3:PutAnalyticsConfiguration
-// bucket permission to set the configuration on the bucket.
-//
-// Related Resources
-//
-// * GetBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html)
-//
-// * DeleteBucketAnalyticsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html)
-//
-// * ListBucketAnalyticsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketAnalyticsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketAnalyticsConfiguration
-func (c *S3) PutBucketAnalyticsConfiguration(input *PutBucketAnalyticsConfigurationInput) (*PutBucketAnalyticsConfigurationOutput, error) {
- req, out := c.PutBucketAnalyticsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketAnalyticsConfigurationWithContext is the same as PutBucketAnalyticsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketAnalyticsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketAnalyticsConfigurationWithContext(ctx aws.Context, input *PutBucketAnalyticsConfigurationInput, opts ...request.Option) (*PutBucketAnalyticsConfigurationOutput, error) {
- req, out := c.PutBucketAnalyticsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketCors = "PutBucketCors"
-
-// PutBucketCorsRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketCors operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketCors for more information on using the PutBucketCors
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketCorsRequest method.
-// req, resp := client.PutBucketCorsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
-func (c *S3) PutBucketCorsRequest(input *PutBucketCorsInput) (req *request.Request, output *PutBucketCorsOutput) {
- op := &request.Operation{
- Name: opPutBucketCors,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?cors",
- }
-
- if input == nil {
- input = &PutBucketCorsInput{}
- }
-
- output = &PutBucketCorsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketCors API operation for Amazon Simple Storage Service.
-//
-// Sets the cors configuration for your bucket. If the configuration exists,
-// Amazon S3 replaces it.
-//
-// To use this operation, you must be allowed to perform the s3:PutBucketCORS
-// action. By default, the bucket owner has this permission and can grant it
-// to others.
-//
-// You set this configuration on a bucket so that the bucket can service cross-origin
-// requests. For example, you might want to enable a request whose origin is
-// http://www.example.com to access your Amazon S3 bucket at my.example.bucket.com
-// by using the browser's XMLHttpRequest capability.
-//
-// To enable cross-origin resource sharing (CORS) on a bucket, you add the cors
-// subresource to the bucket. The cors subresource is an XML document in which
-// you configure rules that identify origins and the HTTP methods that can be
-// executed on your bucket. The document is limited to 64 KB in size.
-//
-// When Amazon S3 receives a cross-origin request (or a pre-flight OPTIONS request)
-// against a bucket, it evaluates the cors configuration on the bucket and uses
-// the first CORSRule rule that matches the incoming browser request to enable
-// a cross-origin request. For a rule to match, the following conditions must
-// be met:
-//
-// * The request's Origin header must match AllowedOrigin elements.
-//
-// * The request method (for example, GET, PUT, HEAD, and so on) or the Access-Control-Request-Method
-// header in case of a pre-flight OPTIONS request must be one of the AllowedMethod
-// elements.
-//
-// * Every header specified in the Access-Control-Request-Headers request
-// header of a pre-flight request must match an AllowedHeader element.
-//
-// For more information about CORS, go to Enabling Cross-Origin Resource Sharing
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
-// S3 User Guide.
-//
-// Related Resources
-//
-// * GetBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html)
-//
-// * DeleteBucketCors (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html)
-//
-// * RESTOPTIONSobject (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTOPTIONSobject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketCors for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketCors
-func (c *S3) PutBucketCors(input *PutBucketCorsInput) (*PutBucketCorsOutput, error) {
- req, out := c.PutBucketCorsRequest(input)
- return out, req.Send()
-}
-
-// PutBucketCorsWithContext is the same as PutBucketCors with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketCors for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketCorsWithContext(ctx aws.Context, input *PutBucketCorsInput, opts ...request.Option) (*PutBucketCorsOutput, error) {
- req, out := c.PutBucketCorsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketEncryption = "PutBucketEncryption"
-
-// PutBucketEncryptionRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketEncryption operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketEncryption for more information on using the PutBucketEncryption
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketEncryptionRequest method.
-// req, resp := client.PutBucketEncryptionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
-func (c *S3) PutBucketEncryptionRequest(input *PutBucketEncryptionInput) (req *request.Request, output *PutBucketEncryptionOutput) {
- op := &request.Operation{
- Name: opPutBucketEncryption,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?encryption",
- }
-
- if input == nil {
- input = &PutBucketEncryptionInput{}
- }
-
- output = &PutBucketEncryptionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketEncryption API operation for Amazon Simple Storage Service.
-//
-// This action uses the encryption subresource to configure default encryption
-// and Amazon S3 Bucket Key for an existing bucket.
-//
-// Default encryption for a bucket can use server-side encryption with Amazon
-// S3-managed keys (SSE-S3) or AWS KMS customer master keys (SSE-KMS). If you
-// specify default encryption using SSE-KMS, you can also configure Amazon S3
-// Bucket Key. For information about default encryption, see Amazon S3 default
-// bucket encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
-// in the Amazon S3 User Guide. For more information about S3 Bucket Keys, see
-// Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
-// in the Amazon S3 User Guide.
-//
-// This action requires AWS Signature Version 4. For more information, see Authenticating
-// Requests (AWS Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
-//
-// To use this operation, you must have permissions to perform the s3:PutEncryptionConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// Related Resources
-//
-// * GetBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html)
-//
-// * DeleteBucketEncryption (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketEncryption for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketEncryption
-func (c *S3) PutBucketEncryption(input *PutBucketEncryptionInput) (*PutBucketEncryptionOutput, error) {
- req, out := c.PutBucketEncryptionRequest(input)
- return out, req.Send()
-}
-
-// PutBucketEncryptionWithContext is the same as PutBucketEncryption with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketEncryption for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketEncryptionWithContext(ctx aws.Context, input *PutBucketEncryptionInput, opts ...request.Option) (*PutBucketEncryptionOutput, error) {
- req, out := c.PutBucketEncryptionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketIntelligentTieringConfiguration = "PutBucketIntelligentTieringConfiguration"
-
-// PutBucketIntelligentTieringConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketIntelligentTieringConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketIntelligentTieringConfiguration for more information on using the PutBucketIntelligentTieringConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketIntelligentTieringConfigurationRequest method.
-// req, resp := client.PutBucketIntelligentTieringConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketIntelligentTieringConfiguration
-func (c *S3) PutBucketIntelligentTieringConfigurationRequest(input *PutBucketIntelligentTieringConfigurationInput) (req *request.Request, output *PutBucketIntelligentTieringConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketIntelligentTieringConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?intelligent-tiering",
- }
-
- if input == nil {
- input = &PutBucketIntelligentTieringConfigurationInput{}
- }
-
- output = &PutBucketIntelligentTieringConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketIntelligentTieringConfiguration API operation for Amazon Simple Storage Service.
-//
-// Puts a S3 Intelligent-Tiering configuration to the specified bucket. You
-// can have up to 1,000 S3 Intelligent-Tiering configurations per bucket.
-//
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without additional operational overhead. S3 Intelligent-Tiering delivers
-// automatic cost savings by moving data between access tiers, when access patterns
-// change.
-//
-// The S3 Intelligent-Tiering storage class is suitable for objects larger than
-// 128 KB that you plan to store for at least 30 days. If the size of an object
-// is less than 128 KB, it is not eligible for auto-tiering. Smaller objects
-// can be stored, but they are always charged at the frequent access tier rates
-// in the S3 Intelligent-Tiering storage class.
-//
-// If you delete an object before the end of the 30-day minimum storage duration
-// period, you are charged for 30 days. For more information, see Storage class
-// for automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-//
-// Operations related to PutBucketIntelligentTieringConfiguration include:
-//
-// * DeleteBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html)
-//
-// * GetBucketIntelligentTieringConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html)
-//
-// * ListBucketIntelligentTieringConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html)
-//
-// You only need S3 Intelligent-Tiering enabled on a bucket if you want to automatically
-// move objects stored in the S3 Intelligent-Tiering storage class to the Archive
-// Access or Deep Archive Access tier.
-//
-// Special Errors
-//
-// * HTTP 400 Bad Request Error Code: InvalidArgument Cause: Invalid Argument
-//
-// * HTTP 400 Bad Request Error Code: TooManyConfigurations Cause: You are
-// attempting to create a new configuration but have already reached the
-// 1,000-configuration limit.
-//
-// * HTTP 403 Forbidden Error Code: AccessDenied Cause: You are not the owner
-// of the specified bucket, or you do not have the s3:PutIntelligentTieringConfiguration
-// bucket permission to set the configuration on the bucket.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketIntelligentTieringConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketIntelligentTieringConfiguration
-func (c *S3) PutBucketIntelligentTieringConfiguration(input *PutBucketIntelligentTieringConfigurationInput) (*PutBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.PutBucketIntelligentTieringConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketIntelligentTieringConfigurationWithContext is the same as PutBucketIntelligentTieringConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketIntelligentTieringConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketIntelligentTieringConfigurationWithContext(ctx aws.Context, input *PutBucketIntelligentTieringConfigurationInput, opts ...request.Option) (*PutBucketIntelligentTieringConfigurationOutput, error) {
- req, out := c.PutBucketIntelligentTieringConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketInventoryConfiguration = "PutBucketInventoryConfiguration"
-
-// PutBucketInventoryConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketInventoryConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketInventoryConfiguration for more information on using the PutBucketInventoryConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketInventoryConfigurationRequest method.
-// req, resp := client.PutBucketInventoryConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
-func (c *S3) PutBucketInventoryConfigurationRequest(input *PutBucketInventoryConfigurationInput) (req *request.Request, output *PutBucketInventoryConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketInventoryConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?inventory",
- }
-
- if input == nil {
- input = &PutBucketInventoryConfigurationInput{}
- }
-
- output = &PutBucketInventoryConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketInventoryConfiguration API operation for Amazon Simple Storage Service.
-//
-// This implementation of the PUT action adds an inventory configuration (identified
-// by the inventory ID) to the bucket. You can have up to 1,000 inventory configurations
-// per bucket.
-//
-// Amazon S3 inventory generates inventories of the objects in the bucket on
-// a daily or weekly basis, and the results are published to a flat file. The
-// bucket that is inventoried is called the source bucket, and the bucket where
-// the inventory flat file is stored is called the destination bucket. The destination
-// bucket must be in the same AWS Region as the source bucket.
-//
-// When you configure an inventory for a source bucket, you specify the destination
-// bucket where you want the inventory to be stored, and whether to generate
-// the inventory daily or weekly. You can also configure what object metadata
-// to include and whether to inventory all object versions or only current versions.
-// For more information, see Amazon S3 Inventory (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-inventory.html)
-// in the Amazon S3 User Guide.
-//
-// You must create a bucket policy on the destination bucket to grant permissions
-// to Amazon S3 to write objects to the bucket in the defined location. For
-// an example policy, see Granting Permissions for Amazon S3 Inventory and Storage
-// Class Analysis (https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-9).
-//
-// To use this operation, you must have permissions to perform the s3:PutInventoryConfiguration
-// action. The bucket owner has this permission by default and can grant this
-// permission to others. For more information about permissions, see Permissions
-// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// Special Errors
-//
-// * HTTP 400 Bad Request Error Code: InvalidArgument Cause: Invalid Argument
-//
-// * HTTP 400 Bad Request Error Code: TooManyConfigurations Cause: You are
-// attempting to create a new configuration but have already reached the
-// 1,000-configuration limit.
-//
-// * HTTP 403 Forbidden Error Code: AccessDenied Cause: You are not the owner
-// of the specified bucket, or you do not have the s3:PutInventoryConfiguration
-// bucket permission to set the configuration on the bucket.
-//
-// Related Resources
-//
-// * GetBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html)
-//
-// * DeleteBucketInventoryConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html)
-//
-// * ListBucketInventoryConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketInventoryConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketInventoryConfiguration
-func (c *S3) PutBucketInventoryConfiguration(input *PutBucketInventoryConfigurationInput) (*PutBucketInventoryConfigurationOutput, error) {
- req, out := c.PutBucketInventoryConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketInventoryConfigurationWithContext is the same as PutBucketInventoryConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketInventoryConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketInventoryConfigurationWithContext(ctx aws.Context, input *PutBucketInventoryConfigurationInput, opts ...request.Option) (*PutBucketInventoryConfigurationOutput, error) {
- req, out := c.PutBucketInventoryConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketLifecycle = "PutBucketLifecycle"
-
-// PutBucketLifecycleRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketLifecycle operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketLifecycle for more information on using the PutBucketLifecycle
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketLifecycleRequest method.
-// req, resp := client.PutBucketLifecycleRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
-//
-// Deprecated: PutBucketLifecycle has been deprecated
-func (c *S3) PutBucketLifecycleRequest(input *PutBucketLifecycleInput) (req *request.Request, output *PutBucketLifecycleOutput) {
- if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, PutBucketLifecycle, has been deprecated")
- }
- op := &request.Operation{
- Name: opPutBucketLifecycle,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &PutBucketLifecycleInput{}
- }
-
- output = &PutBucketLifecycleOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketLifecycle API operation for Amazon Simple Storage Service.
-//
-//
-// For an updated version of this API, see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html).
-// This version has been deprecated. Existing lifecycle configurations will
-// work. For new lifecycle configurations, use the updated API.
-//
-// Creates a new lifecycle configuration for the bucket or replaces an existing
-// lifecycle configuration. For information about lifecycle configuration, see
-// Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
-// in the Amazon S3 User Guide.
-//
-// By default, all Amazon S3 resources, including buckets, objects, and related
-// subresources (for example, lifecycle configuration and website configuration)
-// are private. Only the resource owner, the AWS account that created the resource,
-// can access it. The resource owner can optionally grant access permissions
-// to others by writing an access policy. For this operation, users must get
-// the s3:PutLifecycleConfiguration permission.
-//
-// You can also explicitly deny permissions. Explicit denial also supersedes
-// any other permissions. If you want to prevent users or accounts from removing
-// or deleting objects from your bucket, you must deny them permissions for
-// the following actions:
-//
-// * s3:DeleteObject
-//
-// * s3:DeleteObjectVersion
-//
-// * s3:PutLifecycleConfiguration
-//
-// For more information about permissions, see Managing Access Permissions to
-// your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// For more examples of transitioning objects to storage classes such as STANDARD_IA
-// or ONEZONE_IA, see Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#lifecycle-configuration-examples).
-//
-// Related Resources
-//
-// * GetBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycle.html)(Deprecated)
-//
-// * GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// * RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
-//
-// * By default, a resource owner—in this case, a bucket owner, which is
-// the AWS account that created the bucket—can perform any of the operations.
-// A resource owner can also grant others permission to perform the operation.
-// For more information, see the following topics in the Amazon S3 User Guide:
-// Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
-// Managing Access Permissions to your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketLifecycle for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycle
-//
-// Deprecated: PutBucketLifecycle has been deprecated
-func (c *S3) PutBucketLifecycle(input *PutBucketLifecycleInput) (*PutBucketLifecycleOutput, error) {
- req, out := c.PutBucketLifecycleRequest(input)
- return out, req.Send()
-}
-
-// PutBucketLifecycleWithContext is the same as PutBucketLifecycle with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketLifecycle for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-//
-// Deprecated: PutBucketLifecycleWithContext has been deprecated
-func (c *S3) PutBucketLifecycleWithContext(ctx aws.Context, input *PutBucketLifecycleInput, opts ...request.Option) (*PutBucketLifecycleOutput, error) {
- req, out := c.PutBucketLifecycleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketLifecycleConfiguration = "PutBucketLifecycleConfiguration"
-
-// PutBucketLifecycleConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketLifecycleConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketLifecycleConfiguration for more information on using the PutBucketLifecycleConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketLifecycleConfigurationRequest method.
-// req, resp := client.PutBucketLifecycleConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
-func (c *S3) PutBucketLifecycleConfigurationRequest(input *PutBucketLifecycleConfigurationInput) (req *request.Request, output *PutBucketLifecycleConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketLifecycleConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?lifecycle",
- }
-
- if input == nil {
- input = &PutBucketLifecycleConfigurationInput{}
- }
-
- output = &PutBucketLifecycleConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketLifecycleConfiguration API operation for Amazon Simple Storage Service.
-//
-// Creates a new lifecycle configuration for the bucket or replaces an existing
-// lifecycle configuration. For information about lifecycle configuration, see
-// Managing your storage lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html).
-//
-// Bucket lifecycle configuration now supports specifying a lifecycle rule using
-// an object key name prefix, one or more object tags, or a combination of both.
-// Accordingly, this section describes the latest API. The previous version
-// of the API supported filtering based only on an object key name prefix, which
-// is supported for backward compatibility. For the related API description,
-// see PutBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycle.html).
-//
-// Rules
-//
-// You specify the lifecycle configuration in your request body. The lifecycle
-// configuration is specified as XML consisting of one or more rules. Each rule
-// consists of the following:
-//
-// * Filter identifying a subset of objects to which the rule applies. The
-// filter can be based on a key name prefix, object tags, or a combination
-// of both.
-//
-// * Status whether the rule is in effect.
-//
-// * One or more lifecycle transition and expiration actions that you want
-// Amazon S3 to perform on the objects identified by the filter. If the state
-// of your bucket is versioning-enabled or versioning-suspended, you can
-// have many versions of the same object (one current version and zero or
-// more noncurrent versions). Amazon S3 provides predefined actions that
-// you can specify for current and noncurrent object versions.
-//
-// For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
-// and Lifecycle Configuration Elements (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html).
-//
-// Permissions
-//
-// By default, all Amazon S3 resources are private, including buckets, objects,
-// and related subresources (for example, lifecycle configuration and website
-// configuration). Only the resource owner (that is, the AWS account that created
-// it) can access the resource. The resource owner can optionally grant access
-// permissions to others by writing an access policy. For this operation, a
-// user must get the s3:PutLifecycleConfiguration permission.
-//
-// You can also explicitly deny permissions. Explicit deny also supersedes any
-// other permissions. If you want to block users or accounts from removing or
-// deleting objects from your bucket, you must deny them permissions for the
-// following actions:
-//
-// * s3:DeleteObject
-//
-// * s3:DeleteObjectVersion
-//
-// * s3:PutLifecycleConfiguration
-//
-// For more information about permissions, see Managing Access Permissions to
-// Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// The following are related to PutBucketLifecycleConfiguration:
-//
-// * Examples of Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-configuration-examples.html)
-//
-// * GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// * DeleteBucketLifecycle (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketLifecycleConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLifecycleConfiguration
-func (c *S3) PutBucketLifecycleConfiguration(input *PutBucketLifecycleConfigurationInput) (*PutBucketLifecycleConfigurationOutput, error) {
- req, out := c.PutBucketLifecycleConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketLifecycleConfigurationWithContext is the same as PutBucketLifecycleConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketLifecycleConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketLifecycleConfigurationWithContext(ctx aws.Context, input *PutBucketLifecycleConfigurationInput, opts ...request.Option) (*PutBucketLifecycleConfigurationOutput, error) {
- req, out := c.PutBucketLifecycleConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketLogging = "PutBucketLogging"
-
-// PutBucketLoggingRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketLogging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketLogging for more information on using the PutBucketLogging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketLoggingRequest method.
-// req, resp := client.PutBucketLoggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
-func (c *S3) PutBucketLoggingRequest(input *PutBucketLoggingInput) (req *request.Request, output *PutBucketLoggingOutput) {
- op := &request.Operation{
- Name: opPutBucketLogging,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?logging",
- }
-
- if input == nil {
- input = &PutBucketLoggingInput{}
- }
-
- output = &PutBucketLoggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketLogging API operation for Amazon Simple Storage Service.
-//
-// Set the logging parameters for a bucket and to specify permissions for who
-// can view and modify the logging parameters. All logs are saved to buckets
-// in the same AWS Region as the source bucket. To set the logging status of
-// a bucket, you must be the bucket owner.
-//
-// The bucket owner is automatically granted FULL_CONTROL to all logs. You use
-// the Grantee request element to grant access to other people. The Permissions
-// request element specifies the kind of access the grantee has to the logs.
-//
-// Grantee Values
-//
-// You can specify the person (grantee) to whom you're assigning access rights
-// (using request elements) in the following ways:
-//
-// * By the person's ID: <>ID<><>GranteesEmail<>
-// DisplayName is optional and ignored in the request.
-//
-// * By Email address: <>Grantees@email.com<>
-// The grantee is resolved to the CanonicalUser and, in a response to a GET
-// Object acl request, appears as the CanonicalUser.
-//
-// * By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
-//
-// To enable logging, you use LoggingEnabled and its children request elements.
-// To disable logging, you use an empty BucketLoggingStatus request element:
-//
-//
-//
-// For more information about server access logging, see Server Access Logging
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerLogs.html).
-//
-// For more information about creating a bucket, see CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html).
-// For more information about returning the logging status of a bucket, see
-// GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html).
-//
-// The following operations are related to PutBucketLogging:
-//
-// * PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-//
-// * DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * GetBucketLogging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketLogging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketLogging
-func (c *S3) PutBucketLogging(input *PutBucketLoggingInput) (*PutBucketLoggingOutput, error) {
- req, out := c.PutBucketLoggingRequest(input)
- return out, req.Send()
-}
-
-// PutBucketLoggingWithContext is the same as PutBucketLogging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketLogging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketLoggingWithContext(ctx aws.Context, input *PutBucketLoggingInput, opts ...request.Option) (*PutBucketLoggingOutput, error) {
- req, out := c.PutBucketLoggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketMetricsConfiguration = "PutBucketMetricsConfiguration"
-
-// PutBucketMetricsConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketMetricsConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketMetricsConfiguration for more information on using the PutBucketMetricsConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketMetricsConfigurationRequest method.
-// req, resp := client.PutBucketMetricsConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
-func (c *S3) PutBucketMetricsConfigurationRequest(input *PutBucketMetricsConfigurationInput) (req *request.Request, output *PutBucketMetricsConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketMetricsConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?metrics",
- }
-
- if input == nil {
- input = &PutBucketMetricsConfigurationInput{}
- }
-
- output = &PutBucketMetricsConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketMetricsConfiguration API operation for Amazon Simple Storage Service.
-//
-// Sets a metrics configuration (specified by the metrics configuration ID)
-// for the bucket. You can have up to 1,000 metrics configurations per bucket.
-// If you're updating an existing metrics configuration, note that this is a
-// full replacement of the existing metrics configuration. If you don't include
-// the elements you want to keep, they are erased.
-//
-// To use this operation, you must have permissions to perform the s3:PutMetricsConfiguration
-// action. The bucket owner has this permission by default. The bucket owner
-// can grant this permission to others. For more information about permissions,
-// see Permissions Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// For information about CloudWatch request metrics for Amazon S3, see Monitoring
-// Metrics with Amazon CloudWatch (https://docs.aws.amazon.com/AmazonS3/latest/dev/cloudwatch-monitoring.html).
-//
-// The following operations are related to PutBucketMetricsConfiguration:
-//
-// * DeleteBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html)
-//
-// * PutBucketMetricsConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html)
-//
-// * ListBucketMetricsConfigurations (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html)
-//
-// GetBucketLifecycle has the following special error:
-//
-// * Error code: TooManyConfigurations Description: You are attempting to
-// create a new configuration but have already reached the 1,000-configuration
-// limit. HTTP Status Code: HTTP 400 Bad Request
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketMetricsConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketMetricsConfiguration
-func (c *S3) PutBucketMetricsConfiguration(input *PutBucketMetricsConfigurationInput) (*PutBucketMetricsConfigurationOutput, error) {
- req, out := c.PutBucketMetricsConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketMetricsConfigurationWithContext is the same as PutBucketMetricsConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketMetricsConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketMetricsConfigurationWithContext(ctx aws.Context, input *PutBucketMetricsConfigurationInput, opts ...request.Option) (*PutBucketMetricsConfigurationOutput, error) {
- req, out := c.PutBucketMetricsConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketNotification = "PutBucketNotification"
-
-// PutBucketNotificationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketNotification operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketNotification for more information on using the PutBucketNotification
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketNotificationRequest method.
-// req, resp := client.PutBucketNotificationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
-//
-// Deprecated: PutBucketNotification has been deprecated
-func (c *S3) PutBucketNotificationRequest(input *PutBucketNotificationInput) (req *request.Request, output *PutBucketNotificationOutput) {
- if c.Client.Config.Logger != nil {
- c.Client.Config.Logger.Log("This operation, PutBucketNotification, has been deprecated")
- }
- op := &request.Operation{
- Name: opPutBucketNotification,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?notification",
- }
-
- if input == nil {
- input = &PutBucketNotificationInput{}
- }
-
- output = &PutBucketNotificationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketNotification API operation for Amazon Simple Storage Service.
-//
-// No longer used, see the PutBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotificationConfiguration.html)
-// operation.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketNotification for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotification
-//
-// Deprecated: PutBucketNotification has been deprecated
-func (c *S3) PutBucketNotification(input *PutBucketNotificationInput) (*PutBucketNotificationOutput, error) {
- req, out := c.PutBucketNotificationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketNotificationWithContext is the same as PutBucketNotification with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketNotification for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-//
-// Deprecated: PutBucketNotificationWithContext has been deprecated
-func (c *S3) PutBucketNotificationWithContext(ctx aws.Context, input *PutBucketNotificationInput, opts ...request.Option) (*PutBucketNotificationOutput, error) {
- req, out := c.PutBucketNotificationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketNotificationConfiguration = "PutBucketNotificationConfiguration"
-
-// PutBucketNotificationConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketNotificationConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketNotificationConfiguration for more information on using the PutBucketNotificationConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketNotificationConfigurationRequest method.
-// req, resp := client.PutBucketNotificationConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
-func (c *S3) PutBucketNotificationConfigurationRequest(input *PutBucketNotificationConfigurationInput) (req *request.Request, output *PutBucketNotificationConfigurationOutput) {
- op := &request.Operation{
- Name: opPutBucketNotificationConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?notification",
- }
-
- if input == nil {
- input = &PutBucketNotificationConfigurationInput{}
- }
-
- output = &PutBucketNotificationConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutBucketNotificationConfiguration API operation for Amazon Simple Storage Service.
-//
-// Enables notifications of specified events for a bucket. For more information
-// about event notifications, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
-//
-// Using this API, you can replace an existing notification configuration. The
-// configuration is an XML file that defines the event types that you want Amazon
-// S3 to publish and the destination where you want Amazon S3 to publish an
-// event notification when it detects an event of the specified type.
-//
-// By default, your bucket has no event notifications configured. That is, the
-// notification configuration will be an empty NotificationConfiguration.
-//
-//
-//
-//
-//
-// This action replaces the existing notification configuration with the configuration
-// you include in the request body.
-//
-// After Amazon S3 receives this request, it first verifies that any Amazon
-// Simple Notification Service (Amazon SNS) or Amazon Simple Queue Service (Amazon
-// SQS) destination exists, and that the bucket owner has permission to publish
-// to it by sending a test notification. In the case of AWS Lambda destinations,
-// Amazon S3 verifies that the Lambda function permissions grant Amazon S3 permission
-// to invoke the function from the Amazon S3 bucket. For more information, see
-// Configuring Notifications for Amazon S3 Events (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
-//
-// You can disable notifications by adding the empty NotificationConfiguration
-// element.
-//
-// By default, only the bucket owner can configure notifications on a bucket.
-// However, bucket owners can use a bucket policy to grant permission to other
-// users to set this configuration with s3:PutBucketNotification permission.
-//
-// The PUT notification is an atomic operation. For example, suppose your notification
-// configuration includes SNS topic, SQS queue, and Lambda function configurations.
-// When you send a PUT request with this configuration, Amazon S3 sends test
-// messages to your SNS topic. If the message fails, the entire PUT action will
-// fail, and Amazon S3 will not add the configuration to your bucket.
-//
-// Responses
-//
-// If the configuration in the request body includes only one TopicConfiguration
-// specifying only the s3:ReducedRedundancyLostObject event type, the response
-// will also include the x-amz-sns-test-message-id header containing the message
-// ID of the test notification sent to the topic.
-//
-// The following action is related to PutBucketNotificationConfiguration:
-//
-// * GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketNotificationConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketNotificationConfiguration
-func (c *S3) PutBucketNotificationConfiguration(input *PutBucketNotificationConfigurationInput) (*PutBucketNotificationConfigurationOutput, error) {
- req, out := c.PutBucketNotificationConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketNotificationConfigurationWithContext is the same as PutBucketNotificationConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketNotificationConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketNotificationConfigurationWithContext(ctx aws.Context, input *PutBucketNotificationConfigurationInput, opts ...request.Option) (*PutBucketNotificationConfigurationOutput, error) {
- req, out := c.PutBucketNotificationConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketOwnershipControls = "PutBucketOwnershipControls"
-
-// PutBucketOwnershipControlsRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketOwnershipControls operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketOwnershipControls for more information on using the PutBucketOwnershipControls
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketOwnershipControlsRequest method.
-// req, resp := client.PutBucketOwnershipControlsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketOwnershipControls
-func (c *S3) PutBucketOwnershipControlsRequest(input *PutBucketOwnershipControlsInput) (req *request.Request, output *PutBucketOwnershipControlsOutput) {
- op := &request.Operation{
- Name: opPutBucketOwnershipControls,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?ownershipControls",
- }
-
- if input == nil {
- input = &PutBucketOwnershipControlsInput{}
- }
-
- output = &PutBucketOwnershipControlsOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketOwnershipControls API operation for Amazon Simple Storage Service.
-//
-// Creates or modifies OwnershipControls for an Amazon S3 bucket. To use this
-// operation, you must have the s3:PutBucketOwnershipControls permission. For
-// more information about Amazon S3 permissions, see Specifying Permissions
-// in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-//
-// For information about Amazon S3 Object Ownership, see Using Object Ownership
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/about-object-ownership.html).
-//
-// The following operations are related to PutBucketOwnershipControls:
-//
-// * GetBucketOwnershipControls
-//
-// * DeleteBucketOwnershipControls
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketOwnershipControls for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketOwnershipControls
-func (c *S3) PutBucketOwnershipControls(input *PutBucketOwnershipControlsInput) (*PutBucketOwnershipControlsOutput, error) {
- req, out := c.PutBucketOwnershipControlsRequest(input)
- return out, req.Send()
-}
-
-// PutBucketOwnershipControlsWithContext is the same as PutBucketOwnershipControls with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketOwnershipControls for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketOwnershipControlsWithContext(ctx aws.Context, input *PutBucketOwnershipControlsInput, opts ...request.Option) (*PutBucketOwnershipControlsOutput, error) {
- req, out := c.PutBucketOwnershipControlsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketPolicy = "PutBucketPolicy"
-
-// PutBucketPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketPolicy for more information on using the PutBucketPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketPolicyRequest method.
-// req, resp := client.PutBucketPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
-func (c *S3) PutBucketPolicyRequest(input *PutBucketPolicyInput) (req *request.Request, output *PutBucketPolicyOutput) {
- op := &request.Operation{
- Name: opPutBucketPolicy,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?policy",
- }
-
- if input == nil {
- input = &PutBucketPolicyInput{}
- }
-
- output = &PutBucketPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketPolicy API operation for Amazon Simple Storage Service.
-//
-// Applies an Amazon S3 bucket policy to an Amazon S3 bucket. If you are using
-// an identity other than the root user of the AWS account that owns the bucket,
-// the calling identity must have the PutBucketPolicy permissions on the specified
-// bucket and belong to the bucket owner's account in order to use this operation.
-//
-// If you don't have PutBucketPolicy permissions, Amazon S3 returns a 403 Access
-// Denied error. If you have the correct permissions, but you're not using an
-// identity that belongs to the bucket owner's account, Amazon S3 returns a
-// 405 Method Not Allowed error.
-//
-// As a security precaution, the root user of the AWS account that owns a bucket
-// can always use this operation, even if the policy explicitly denies the root
-// user the ability to perform this action.
-//
-// For more information about bucket policies, see Using Bucket Policies and
-// User Policies (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-iam-policies.html).
-//
-// The following operations are related to PutBucketPolicy:
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketPolicy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketPolicy
-func (c *S3) PutBucketPolicy(input *PutBucketPolicyInput) (*PutBucketPolicyOutput, error) {
- req, out := c.PutBucketPolicyRequest(input)
- return out, req.Send()
-}
-
-// PutBucketPolicyWithContext is the same as PutBucketPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketPolicyWithContext(ctx aws.Context, input *PutBucketPolicyInput, opts ...request.Option) (*PutBucketPolicyOutput, error) {
- req, out := c.PutBucketPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketReplication = "PutBucketReplication"
-
-// PutBucketReplicationRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketReplication operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketReplication for more information on using the PutBucketReplication
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketReplicationRequest method.
-// req, resp := client.PutBucketReplicationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
-func (c *S3) PutBucketReplicationRequest(input *PutBucketReplicationInput) (req *request.Request, output *PutBucketReplicationOutput) {
- op := &request.Operation{
- Name: opPutBucketReplication,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?replication",
- }
-
- if input == nil {
- input = &PutBucketReplicationInput{}
- }
-
- output = &PutBucketReplicationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketReplication API operation for Amazon Simple Storage Service.
-//
-// Creates a replication configuration or replaces an existing one. For more
-// information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
-// in the Amazon S3 User Guide.
-//
-// To perform this operation, the user or role performing the action must have
-// the iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
-// permission.
-//
-// Specify the replication configuration in the request body. In the replication
-// configuration, you provide the name of the destination bucket or buckets
-// where you want Amazon S3 to replicate objects, the IAM role that Amazon S3
-// can assume to replicate objects on your behalf, and other relevant information.
-//
-// A replication configuration must include at least one rule, and can contain
-// a maximum of 1,000. Each rule identifies a subset of objects to replicate
-// by filtering the objects in the source bucket. To choose additional subsets
-// of objects to replicate, add a rule for each subset.
-//
-// To specify a subset of the objects in the source bucket to apply a replication
-// rule to, add the Filter element as a child of the Rule element. You can filter
-// objects based on an object key prefix, one or more object tags, or both.
-// When you add the Filter element in the configuration, you must also add the
-// following elements: DeleteMarkerReplication, Status, and Priority.
-//
-// If you are using an earlier version of the replication configuration, Amazon
-// S3 handles replication of delete markers differently. For more information,
-// see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
-//
-// For information about enabling versioning on a bucket, see Using Versioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html).
-//
-// By default, a resource owner, in this case the AWS account that created the
-// bucket, can perform this operation. The resource owner can also grant others
-// permissions to perform the operation. For more information about permissions,
-// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// Handling Replication of Encrypted Objects
-//
-// By default, Amazon S3 doesn't replicate objects that are stored at rest using
-// server-side encryption with CMKs stored in AWS KMS. To replicate AWS KMS-encrypted
-// objects, add the following: SourceSelectionCriteria, SseKmsEncryptedObjects,
-// Status, EncryptionConfiguration, and ReplicaKmsKeyID. For information about
-// replication configuration, see Replicating Objects Created with SSE Using
-// CMKs stored in AWS KMS (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-config-for-kms-objects.html).
-//
-// For information on PutBucketReplication errors, see List of replication-related
-// error codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#ReplicationErrorCodeList)
-//
-// The following operations are related to PutBucketReplication:
-//
-// * GetBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html)
-//
-// * DeleteBucketReplication (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketReplication for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketReplication
-func (c *S3) PutBucketReplication(input *PutBucketReplicationInput) (*PutBucketReplicationOutput, error) {
- req, out := c.PutBucketReplicationRequest(input)
- return out, req.Send()
-}
-
-// PutBucketReplicationWithContext is the same as PutBucketReplication with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketReplication for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketReplicationWithContext(ctx aws.Context, input *PutBucketReplicationInput, opts ...request.Option) (*PutBucketReplicationOutput, error) {
- req, out := c.PutBucketReplicationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketRequestPayment = "PutBucketRequestPayment"
-
-// PutBucketRequestPaymentRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketRequestPayment operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketRequestPayment for more information on using the PutBucketRequestPayment
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketRequestPaymentRequest method.
-// req, resp := client.PutBucketRequestPaymentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
-func (c *S3) PutBucketRequestPaymentRequest(input *PutBucketRequestPaymentInput) (req *request.Request, output *PutBucketRequestPaymentOutput) {
- op := &request.Operation{
- Name: opPutBucketRequestPayment,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?requestPayment",
- }
-
- if input == nil {
- input = &PutBucketRequestPaymentInput{}
- }
-
- output = &PutBucketRequestPaymentOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketRequestPayment API operation for Amazon Simple Storage Service.
-//
-// Sets the request payment configuration for a bucket. By default, the bucket
-// owner pays for downloads from the bucket. This configuration parameter enables
-// the bucket owner (only) to specify that the person requesting the download
-// will be charged for the download. For more information, see Requester Pays
-// Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/RequesterPaysBuckets.html).
-//
-// The following operations are related to PutBucketRequestPayment:
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * GetBucketRequestPayment (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketRequestPayment for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketRequestPayment
-func (c *S3) PutBucketRequestPayment(input *PutBucketRequestPaymentInput) (*PutBucketRequestPaymentOutput, error) {
- req, out := c.PutBucketRequestPaymentRequest(input)
- return out, req.Send()
-}
-
-// PutBucketRequestPaymentWithContext is the same as PutBucketRequestPayment with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketRequestPayment for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketRequestPaymentWithContext(ctx aws.Context, input *PutBucketRequestPaymentInput, opts ...request.Option) (*PutBucketRequestPaymentOutput, error) {
- req, out := c.PutBucketRequestPaymentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketTagging = "PutBucketTagging"
-
-// PutBucketTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketTagging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketTagging for more information on using the PutBucketTagging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketTaggingRequest method.
-// req, resp := client.PutBucketTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
-func (c *S3) PutBucketTaggingRequest(input *PutBucketTaggingInput) (req *request.Request, output *PutBucketTaggingOutput) {
- op := &request.Operation{
- Name: opPutBucketTagging,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?tagging",
- }
-
- if input == nil {
- input = &PutBucketTaggingInput{}
- }
-
- output = &PutBucketTaggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketTagging API operation for Amazon Simple Storage Service.
-//
-// Sets the tags for a bucket.
-//
-// Use tags to organize your AWS bill to reflect your own cost structure. To
-// do this, sign up to get your AWS account bill with tag key values included.
-// Then, to see the cost of combined resources, organize your billing information
-// according to resources with the same tag key values. For example, you can
-// tag several resources with a specific application name, and then organize
-// your billing information to see the total cost of that application across
-// several services. For more information, see Cost Allocation and Tagging (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html)
-// and Using Cost Allocation in Amazon S3 Bucket Tags (https://docs.aws.amazon.com/AmazonS3/latest/dev/CostAllocTagging.html).
-//
-// When this operation sets the tags for a bucket, it will overwrite any current
-// tags the bucket already has. You cannot use this operation to add tags to
-// an existing list of tags.
-//
-// To use this operation, you must have permissions to perform the s3:PutBucketTagging
-// action. The bucket owner has this permission by default and can grant this
-// permission to others. For more information about permissions, see Permissions
-// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html).
-//
-// PutBucketTagging has the following special errors:
-//
-// * Error code: InvalidTagError Description: The tag provided was not a
-// valid tag. This error can occur if the tag did not pass input validation.
-// For information about tag restrictions, see User-Defined Tag Restrictions
-// (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html)
-// and AWS-Generated Cost Allocation Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/aws-tag-restrictions.html).
-//
-// * Error code: MalformedXMLError Description: The XML provided does not
-// match the schema.
-//
-// * Error code: OperationAbortedError Description: A conflicting conditional
-// action is currently in progress against this resource. Please try again.
-//
-// * Error code: InternalError Description: The service was unable to apply
-// the provided tag to the bucket.
-//
-// The following operations are related to PutBucketTagging:
-//
-// * GetBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html)
-//
-// * DeleteBucketTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketTagging
-func (c *S3) PutBucketTagging(input *PutBucketTaggingInput) (*PutBucketTaggingOutput, error) {
- req, out := c.PutBucketTaggingRequest(input)
- return out, req.Send()
-}
-
-// PutBucketTaggingWithContext is the same as PutBucketTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketTaggingWithContext(ctx aws.Context, input *PutBucketTaggingInput, opts ...request.Option) (*PutBucketTaggingOutput, error) {
- req, out := c.PutBucketTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketVersioning = "PutBucketVersioning"
-
-// PutBucketVersioningRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketVersioning operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketVersioning for more information on using the PutBucketVersioning
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketVersioningRequest method.
-// req, resp := client.PutBucketVersioningRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
-func (c *S3) PutBucketVersioningRequest(input *PutBucketVersioningInput) (req *request.Request, output *PutBucketVersioningOutput) {
- op := &request.Operation{
- Name: opPutBucketVersioning,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?versioning",
- }
-
- if input == nil {
- input = &PutBucketVersioningInput{}
- }
-
- output = &PutBucketVersioningOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketVersioning API operation for Amazon Simple Storage Service.
-//
-// Sets the versioning state of an existing bucket. To set the versioning state,
-// you must be the bucket owner.
-//
-// You can set the versioning state with one of the following values:
-//
-// Enabled—Enables versioning for the objects in the bucket. All objects added
-// to the bucket receive a unique version ID.
-//
-// Suspended—Disables versioning for the objects in the bucket. All objects
-// added to the bucket receive the version ID null.
-//
-// If the versioning state has never been set on a bucket, it has no versioning
-// state; a GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
-// request does not return a versioning state value.
-//
-// If the bucket owner enables MFA Delete in the bucket versioning configuration,
-// the bucket owner must include the x-amz-mfa request header and the Status
-// and the MfaDelete request elements in a request to set the versioning state
-// of the bucket.
-//
-// If you have an object expiration lifecycle policy in your non-versioned bucket
-// and you want to maintain the same permanent delete behavior when you enable
-// versioning, you must add a noncurrent expiration policy. The noncurrent expiration
-// lifecycle policy will manage the deletes of the noncurrent object versions
-// in the version-enabled bucket. (A version-enabled bucket maintains one current
-// and zero or more noncurrent object versions.) For more information, see Lifecycle
-// and Versioning (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-and-other-bucket-config).
-//
-// Related Resources
-//
-// * CreateBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html)
-//
-// * DeleteBucket (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html)
-//
-// * GetBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketVersioning for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketVersioning
-func (c *S3) PutBucketVersioning(input *PutBucketVersioningInput) (*PutBucketVersioningOutput, error) {
- req, out := c.PutBucketVersioningRequest(input)
- return out, req.Send()
-}
-
-// PutBucketVersioningWithContext is the same as PutBucketVersioning with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketVersioning for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketVersioningWithContext(ctx aws.Context, input *PutBucketVersioningInput, opts ...request.Option) (*PutBucketVersioningOutput, error) {
- req, out := c.PutBucketVersioningRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutBucketWebsite = "PutBucketWebsite"
-
-// PutBucketWebsiteRequest generates a "aws/request.Request" representing the
-// client's request for the PutBucketWebsite operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutBucketWebsite for more information on using the PutBucketWebsite
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutBucketWebsiteRequest method.
-// req, resp := client.PutBucketWebsiteRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
-func (c *S3) PutBucketWebsiteRequest(input *PutBucketWebsiteInput) (req *request.Request, output *PutBucketWebsiteOutput) {
- op := &request.Operation{
- Name: opPutBucketWebsite,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?website",
- }
-
- if input == nil {
- input = &PutBucketWebsiteInput{}
- }
-
- output = &PutBucketWebsiteOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutBucketWebsite API operation for Amazon Simple Storage Service.
-//
-// Sets the configuration of the website that is specified in the website subresource.
-// To configure a bucket as a website, you can add this subresource on the bucket
-// with website configuration information such as the file name of the index
-// document and any redirect rules. For more information, see Hosting Websites
-// on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html).
-//
-// This PUT action requires the S3:PutBucketWebsite permission. By default,
-// only the bucket owner can configure the website attached to a bucket; however,
-// bucket owners can allow other users to set the website configuration by writing
-// a bucket policy that grants them the S3:PutBucketWebsite permission.
-//
-// To redirect all website requests sent to the bucket's website endpoint, you
-// add a website configuration with the following elements. Because all requests
-// are sent to another website, you don't need to provide index document name
-// for the bucket.
-//
-// * WebsiteConfiguration
-//
-// * RedirectAllRequestsTo
-//
-// * HostName
-//
-// * Protocol
-//
-// If you want granular control over redirects, you can use the following elements
-// to add routing rules that describe conditions for redirecting requests and
-// information about the redirect destination. In this case, the website configuration
-// must provide an index document for the bucket, because some requests might
-// not be redirected.
-//
-// * WebsiteConfiguration
-//
-// * IndexDocument
-//
-// * Suffix
-//
-// * ErrorDocument
-//
-// * Key
-//
-// * RoutingRules
-//
-// * RoutingRule
-//
-// * Condition
-//
-// * HttpErrorCodeReturnedEquals
-//
-// * KeyPrefixEquals
-//
-// * Redirect
-//
-// * Protocol
-//
-// * HostName
-//
-// * ReplaceKeyPrefixWith
-//
-// * ReplaceKeyWith
-//
-// * HttpRedirectCode
-//
-// Amazon S3 has a limitation of 50 routing rules per website configuration.
-// If you require more than 50 routing rules, you can use object redirect. For
-// more information, see Configuring an Object Redirect (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html)
-// in the Amazon S3 User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutBucketWebsite for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutBucketWebsite
-func (c *S3) PutBucketWebsite(input *PutBucketWebsiteInput) (*PutBucketWebsiteOutput, error) {
- req, out := c.PutBucketWebsiteRequest(input)
- return out, req.Send()
-}
-
-// PutBucketWebsiteWithContext is the same as PutBucketWebsite with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutBucketWebsite for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutBucketWebsiteWithContext(ctx aws.Context, input *PutBucketWebsiteInput, opts ...request.Option) (*PutBucketWebsiteOutput, error) {
- req, out := c.PutBucketWebsiteRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObject = "PutObject"
-
-// PutObjectRequest generates a "aws/request.Request" representing the
-// client's request for the PutObject operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutObject for more information on using the PutObject
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutObjectRequest method.
-// req, resp := client.PutObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
-func (c *S3) PutObjectRequest(input *PutObjectInput) (req *request.Request, output *PutObjectOutput) {
- op := &request.Operation{
- Name: opPutObject,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &PutObjectInput{}
- }
-
- output = &PutObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// PutObject API operation for Amazon Simple Storage Service.
-//
-// Adds an object to a bucket. You must have WRITE permissions on a bucket to
-// add an object to it.
-//
-// Amazon S3 never adds partial objects; if you receive a success response,
-// Amazon S3 added the entire object to the bucket.
-//
-// Amazon S3 is a distributed system. If it receives multiple write requests
-// for the same object simultaneously, it overwrites all but the last object
-// written. Amazon S3 does not provide object locking; if you need this, make
-// sure to build it into your application layer or use versioning instead.
-//
-// To ensure that data is not corrupted traversing the network, use the Content-MD5
-// header. When you use this header, Amazon S3 checks the object against the
-// provided MD5 value and, if they do not match, returns an error. Additionally,
-// you can calculate the MD5 while putting an object to Amazon S3 and compare
-// the returned ETag to the calculated MD5 value.
-//
-// The Content-MD5 header is required for any request to upload an object with
-// a retention period configured using Amazon S3 Object Lock. For more information
-// about Amazon S3 Object Lock, see Amazon S3 Object Lock Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock-overview.html)
-// in the Amazon S3 User Guide.
-//
-// Server-side Encryption
-//
-// You can optionally request server-side encryption. With server-side encryption,
-// Amazon S3 encrypts your data as it writes it to disks in its data centers
-// and decrypts the data when you access it. You have the option to provide
-// your own encryption key or use AWS managed encryption keys (SSE-S3 or SSE-KMS).
-// For more information, see Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html).
-//
-// If you request server-side encryption using AWS Key Management Service (SSE-KMS),
-// you can enable an S3 Bucket Key at the object-level. For more information,
-// see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
-// in the Amazon S3 User Guide.
-//
-// Access Control List (ACL)-Specific Request Headers
-//
-// You can use headers to grant ACL- based permissions. By default, all objects
-// are private. Only the owner has full access control. When adding a new object,
-// you can grant permissions to individual AWS accounts or to predefined groups
-// defined by Amazon S3. These permissions are then added to the ACL on the
-// object. For more information, see Access Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
-// and Managing ACLs Using the REST API (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-using-rest-api.html).
-//
-// Storage Class Options
-//
-// By default, Amazon S3 uses the STANDARD Storage Class to store newly created
-// objects. The STANDARD storage class provides high durability and high availability.
-// Depending on performance needs, you can specify a different Storage Class.
-// Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
-// see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
-// in the Amazon S3 User Guide.
-//
-// Versioning
-//
-// If you enable versioning for a bucket, Amazon S3 automatically generates
-// a unique version ID for the object being stored. Amazon S3 returns this ID
-// in the response. When you enable versioning for a bucket, if Amazon S3 receives
-// multiple write requests for the same object simultaneously, it stores all
-// of the objects.
-//
-// For more information about versioning, see Adding Objects to Versioning Enabled
-// Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/AddingObjectstoVersioningEnabledBuckets.html).
-// For information about returning the versioning state of a bucket, see GetBucketVersioning
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html).
-//
-// Related Resources
-//
-// * CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-//
-// * DeleteObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObject for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObject
-func (c *S3) PutObject(input *PutObjectInput) (*PutObjectOutput, error) {
- req, out := c.PutObjectRequest(input)
- return out, req.Send()
-}
-
-// PutObjectWithContext is the same as PutObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectWithContext(ctx aws.Context, input *PutObjectInput, opts ...request.Option) (*PutObjectOutput, error) {
- req, out := c.PutObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectAcl = "PutObjectAcl"
-
-// PutObjectAclRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectAcl operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutObjectAcl for more information on using the PutObjectAcl
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutObjectAclRequest method.
-// req, resp := client.PutObjectAclRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
-func (c *S3) PutObjectAclRequest(input *PutObjectAclInput) (req *request.Request, output *PutObjectAclOutput) {
- op := &request.Operation{
- Name: opPutObjectAcl,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}?acl",
- }
-
- if input == nil {
- input = &PutObjectAclInput{}
- }
-
- output = &PutObjectAclOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutObjectAcl API operation for Amazon Simple Storage Service.
-//
-// Uses the acl subresource to set the access control list (ACL) permissions
-// for a new or existing object in an S3 bucket. You must have WRITE_ACP permission
-// to set the ACL of an object. For more information, see What permissions can
-// I grant? (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#permissions)
-// in the Amazon S3 User Guide.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// Depending on your application needs, you can choose to set the ACL on an
-// object using either the request body or the headers. For example, if you
-// have an existing application that updates a bucket ACL using the request
-// body, you can continue to use that approach. For more information, see Access
-// Control List (ACL) Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html)
-// in the Amazon S3 User Guide.
-//
-// Access Permissions
-//
-// You can set access permissions using one of the following methods:
-//
-// * Specify a canned ACL with the x-amz-acl request header. Amazon S3 supports
-// a set of predefined ACLs, known as canned ACLs. Each canned ACL has a
-// predefined set of grantees and permissions. Specify the canned ACL name
-// as the value of x-amz-acl. If you use this header, you cannot use other
-// access control-specific headers in your request. For more information,
-// see Canned ACL (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
-//
-// * Specify access permissions explicitly with the x-amz-grant-read, x-amz-grant-read-acp,
-// x-amz-grant-write-acp, and x-amz-grant-full-control headers. When using
-// these headers, you specify explicit access permissions and grantees (AWS
-// accounts or Amazon S3 groups) who will receive the permission. If you
-// use these ACL-specific headers, you cannot use x-amz-acl header to set
-// a canned ACL. These parameters map to the set of permissions that Amazon
-// S3 supports in an ACL. For more information, see Access Control List (ACL)
-// Overview (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html).
-// You specify each grantee as a type=value pair, where the type is one of
-// the following: id – if the value specified is the canonical user ID
-// of an AWS account uri – if you are granting permissions to a predefined
-// group emailAddress – if the value specified is the email address of
-// an AWS account Using email addresses to specify a grantee is only supported
-// in the following AWS Regions: US East (N. Virginia) US West (N. California)
-// US West (Oregon) Asia Pacific (Singapore) Asia Pacific (Sydney) Asia Pacific
-// (Tokyo) Europe (Ireland) South America (São Paulo) For a list of all
-// the Amazon S3 supported Regions and endpoints, see Regions and Endpoints
-// (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region) in
-// the AWS General Reference. For example, the following x-amz-grant-read
-// header grants list objects permission to the two AWS accounts identified
-// by their email addresses. x-amz-grant-read: emailAddress="xyz@amazon.com",
-// emailAddress="abc@amazon.com"
-//
-// You can use either a canned ACL or specify access permissions explicitly.
-// You cannot do both.
-//
-// Grantee Values
-//
-// You can specify the person (grantee) to whom you're assigning access rights
-// (using request elements) in the following ways:
-//
-// * By the person's ID: <>ID<><>GranteesEmail<>
-// DisplayName is optional and ignored in the request.
-//
-// * By URI: <>http://acs.amazonaws.com/groups/global/AuthenticatedUsers<>
-//
-// * By Email address: <>Grantees@email.com<>lt;/Grantee>
-// The grantee is resolved to the CanonicalUser and, in a response to a GET
-// Object acl request, appears as the CanonicalUser. Using email addresses
-// to specify a grantee is only supported in the following AWS Regions: US
-// East (N. Virginia) US West (N. California) US West (Oregon) Asia Pacific
-// (Singapore) Asia Pacific (Sydney) Asia Pacific (Tokyo) Europe (Ireland)
-// South America (São Paulo) For a list of all the Amazon S3 supported Regions
-// and endpoints, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
-// in the AWS General Reference.
-//
-// Versioning
-//
-// The ACL of an object is set at the object version level. By default, PUT
-// sets the ACL of the current version of an object. To set the ACL of a different
-// version, use the versionId subresource.
-//
-// Related Resources
-//
-// * CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObjectAcl for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeNoSuchKey "NoSuchKey"
-// The specified key does not exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectAcl
-func (c *S3) PutObjectAcl(input *PutObjectAclInput) (*PutObjectAclOutput, error) {
- req, out := c.PutObjectAclRequest(input)
- return out, req.Send()
-}
-
-// PutObjectAclWithContext is the same as PutObjectAcl with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectAcl for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectAclWithContext(ctx aws.Context, input *PutObjectAclInput, opts ...request.Option) (*PutObjectAclOutput, error) {
- req, out := c.PutObjectAclRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectLegalHold = "PutObjectLegalHold"
-
-// PutObjectLegalHoldRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectLegalHold operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutObjectLegalHold for more information on using the PutObjectLegalHold
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutObjectLegalHoldRequest method.
-// req, resp := client.PutObjectLegalHoldRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
-func (c *S3) PutObjectLegalHoldRequest(input *PutObjectLegalHoldInput) (req *request.Request, output *PutObjectLegalHoldOutput) {
- op := &request.Operation{
- Name: opPutObjectLegalHold,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}?legal-hold",
- }
-
- if input == nil {
- input = &PutObjectLegalHoldInput{}
- }
-
- output = &PutObjectLegalHoldOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutObjectLegalHold API operation for Amazon Simple Storage Service.
-//
-// Applies a Legal Hold configuration to the specified object. For more information,
-// see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObjectLegalHold for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLegalHold
-func (c *S3) PutObjectLegalHold(input *PutObjectLegalHoldInput) (*PutObjectLegalHoldOutput, error) {
- req, out := c.PutObjectLegalHoldRequest(input)
- return out, req.Send()
-}
-
-// PutObjectLegalHoldWithContext is the same as PutObjectLegalHold with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectLegalHold for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectLegalHoldWithContext(ctx aws.Context, input *PutObjectLegalHoldInput, opts ...request.Option) (*PutObjectLegalHoldOutput, error) {
- req, out := c.PutObjectLegalHoldRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectLockConfiguration = "PutObjectLockConfiguration"
-
-// PutObjectLockConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectLockConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutObjectLockConfiguration for more information on using the PutObjectLockConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutObjectLockConfigurationRequest method.
-// req, resp := client.PutObjectLockConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
-func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfigurationInput) (req *request.Request, output *PutObjectLockConfigurationOutput) {
- op := &request.Operation{
- Name: opPutObjectLockConfiguration,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?object-lock",
- }
-
- if input == nil {
- input = &PutObjectLockConfigurationInput{}
- }
-
- output = &PutObjectLockConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutObjectLockConfiguration API operation for Amazon Simple Storage Service.
-//
-// Places an Object Lock configuration on the specified bucket. The rule specified
-// in the Object Lock configuration will be applied by default to every new
-// object placed in the specified bucket. For more information, see Locking
-// Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// * The DefaultRetention settings require both a mode and a period.
-//
-// * The DefaultRetention period can be either Days or Years but you must
-// select one. You cannot specify Days and Years at the same time.
-//
-// * You can only enable Object Lock for new buckets. If you want to turn
-// on Object Lock for an existing bucket, contact AWS Support.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObjectLockConfiguration for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectLockConfiguration
-func (c *S3) PutObjectLockConfiguration(input *PutObjectLockConfigurationInput) (*PutObjectLockConfigurationOutput, error) {
- req, out := c.PutObjectLockConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutObjectLockConfigurationWithContext is the same as PutObjectLockConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectLockConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectLockConfigurationWithContext(ctx aws.Context, input *PutObjectLockConfigurationInput, opts ...request.Option) (*PutObjectLockConfigurationOutput, error) {
- req, out := c.PutObjectLockConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectRetention = "PutObjectRetention"
-
-// PutObjectRetentionRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectRetention operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutObjectRetention for more information on using the PutObjectRetention
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutObjectRetentionRequest method.
-// req, resp := client.PutObjectRetentionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
-func (c *S3) PutObjectRetentionRequest(input *PutObjectRetentionInput) (req *request.Request, output *PutObjectRetentionOutput) {
- op := &request.Operation{
- Name: opPutObjectRetention,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}?retention",
- }
-
- if input == nil {
- input = &PutObjectRetentionInput{}
- }
-
- output = &PutObjectRetentionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutObjectRetention API operation for Amazon Simple Storage Service.
-//
-// Places an Object Retention configuration on an object. For more information,
-// see Locking Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObjectRetention for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectRetention
-func (c *S3) PutObjectRetention(input *PutObjectRetentionInput) (*PutObjectRetentionOutput, error) {
- req, out := c.PutObjectRetentionRequest(input)
- return out, req.Send()
-}
-
-// PutObjectRetentionWithContext is the same as PutObjectRetention with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectRetention for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectRetentionWithContext(ctx aws.Context, input *PutObjectRetentionInput, opts ...request.Option) (*PutObjectRetentionOutput, error) {
- req, out := c.PutObjectRetentionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutObjectTagging = "PutObjectTagging"
-
-// PutObjectTaggingRequest generates a "aws/request.Request" representing the
-// client's request for the PutObjectTagging operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutObjectTagging for more information on using the PutObjectTagging
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutObjectTaggingRequest method.
-// req, resp := client.PutObjectTaggingRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
-func (c *S3) PutObjectTaggingRequest(input *PutObjectTaggingInput) (req *request.Request, output *PutObjectTaggingOutput) {
- op := &request.Operation{
- Name: opPutObjectTagging,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}?tagging",
- }
-
- if input == nil {
- input = &PutObjectTaggingInput{}
- }
-
- output = &PutObjectTaggingOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutObjectTagging API operation for Amazon Simple Storage Service.
-//
-// Sets the supplied tag-set to an object that already exists in a bucket.
-//
-// A tag is a key-value pair. You can associate tags with an object by sending
-// a PUT request against the tagging subresource that is associated with the
-// object. You can retrieve tags by sending a GET request. For more information,
-// see GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html).
-//
-// For tagging-related restrictions related to characters and encodings, see
-// Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html).
-// Note that Amazon S3 limits the maximum number of tags to 10 tags per object.
-//
-// To use this operation, you must have permission to perform the s3:PutObjectTagging
-// action. By default, the bucket owner has this permission and can grant this
-// permission to others.
-//
-// To put tags of any other version, use the versionId query parameter. You
-// also need permission for the s3:PutObjectVersionTagging action.
-//
-// For information about the Amazon S3 object tagging feature, see Object Tagging
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
-//
-// Special Errors
-//
-// * Code: InvalidTagError Cause: The tag provided was not a valid tag. This
-// error can occur if the tag did not pass input validation. For more information,
-// see Object Tagging (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-tagging.html).
-//
-// * Code: MalformedXMLError Cause: The XML provided does not match the schema.
-//
-// * Code: OperationAbortedError Cause: A conflicting conditional action
-// is currently in progress against this resource. Please try again.
-//
-// * Code: InternalError Cause: The service was unable to apply the provided
-// tag to the object.
-//
-// Related Resources
-//
-// * GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html)
-//
-// * DeleteObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutObjectTagging for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutObjectTagging
-func (c *S3) PutObjectTagging(input *PutObjectTaggingInput) (*PutObjectTaggingOutput, error) {
- req, out := c.PutObjectTaggingRequest(input)
- return out, req.Send()
-}
-
-// PutObjectTaggingWithContext is the same as PutObjectTagging with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutObjectTagging for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutObjectTaggingWithContext(ctx aws.Context, input *PutObjectTaggingInput, opts ...request.Option) (*PutObjectTaggingOutput, error) {
- req, out := c.PutObjectTaggingRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutPublicAccessBlock = "PutPublicAccessBlock"
-
-// PutPublicAccessBlockRequest generates a "aws/request.Request" representing the
-// client's request for the PutPublicAccessBlock operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutPublicAccessBlock for more information on using the PutPublicAccessBlock
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutPublicAccessBlockRequest method.
-// req, resp := client.PutPublicAccessBlockRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
-func (c *S3) PutPublicAccessBlockRequest(input *PutPublicAccessBlockInput) (req *request.Request, output *PutPublicAccessBlockOutput) {
- op := &request.Operation{
- Name: opPutPublicAccessBlock,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}?publicAccessBlock",
- }
-
- if input == nil {
- input = &PutPublicAccessBlockInput{}
- }
-
- output = &PutPublicAccessBlockOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(request.NamedHandler{
- Name: "contentMd5Handler",
- Fn: checksum.AddBodyContentMD5Handler,
- })
- return
-}
-
-// PutPublicAccessBlock API operation for Amazon Simple Storage Service.
-//
-// Creates or modifies the PublicAccessBlock configuration for an Amazon S3
-// bucket. To use this operation, you must have the s3:PutBucketPublicAccessBlock
-// permission. For more information about Amazon S3 permissions, see Specifying
-// Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html).
-//
-// When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket
-// or an object, it checks the PublicAccessBlock configuration for both the
-// bucket (or the bucket that contains the object) and the bucket owner's account.
-// If the PublicAccessBlock configurations are different between the bucket
-// and the account, Amazon S3 uses the most restrictive combination of the bucket-level
-// and account-level settings.
-//
-// For more information about when Amazon S3 considers a bucket or an object
-// public, see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status).
-//
-// Related Resources
-//
-// * GetPublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html)
-//
-// * DeletePublicAccessBlock (https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html)
-//
-// * GetBucketPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html)
-//
-// * Using Amazon S3 Block Public Access (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation PutPublicAccessBlock for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/PutPublicAccessBlock
-func (c *S3) PutPublicAccessBlock(input *PutPublicAccessBlockInput) (*PutPublicAccessBlockOutput, error) {
- req, out := c.PutPublicAccessBlockRequest(input)
- return out, req.Send()
-}
-
-// PutPublicAccessBlockWithContext is the same as PutPublicAccessBlock with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutPublicAccessBlock for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) PutPublicAccessBlockWithContext(ctx aws.Context, input *PutPublicAccessBlockInput, opts ...request.Option) (*PutPublicAccessBlockOutput, error) {
- req, out := c.PutPublicAccessBlockRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opRestoreObject = "RestoreObject"
-
-// RestoreObjectRequest generates a "aws/request.Request" representing the
-// client's request for the RestoreObject operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See RestoreObject for more information on using the RestoreObject
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the RestoreObjectRequest method.
-// req, resp := client.RestoreObjectRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
-func (c *S3) RestoreObjectRequest(input *RestoreObjectInput) (req *request.Request, output *RestoreObjectOutput) {
- op := &request.Operation{
- Name: opRestoreObject,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}/{Key+}?restore",
- }
-
- if input == nil {
- input = &RestoreObjectInput{}
- }
-
- output = &RestoreObjectOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// RestoreObject API operation for Amazon Simple Storage Service.
-//
-// Restores an archived copy of an object back into Amazon S3
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// This action performs the following types of requests:
-//
-// * select - Perform a select query on an archived object
-//
-// * restore an archive - Restore an archived object
-//
-// To use this operation, you must have permissions to perform the s3:RestoreObject
-// action. The bucket owner has this permission by default and can grant this
-// permission to others. For more information about permissions, see Permissions
-// Related to Bucket Subresource Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-actions.html#using-with-s3-actions-related-to-bucket-subresources)
-// and Managing Access Permissions to Your Amazon S3 Resources (https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html)
-// in the Amazon S3 User Guide.
-//
-// Querying Archives with Select Requests
-//
-// You use a select type of request to perform SQL queries on archived objects.
-// The archived objects that are being queried by the select request must be
-// formatted as uncompressed comma-separated values (CSV) files. You can run
-// queries and custom analytics on your archived data without having to restore
-// your data to a hotter Amazon S3 tier. For an overview about select requests,
-// see Querying Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html)
-// in the Amazon S3 User Guide.
-//
-// When making a select request, do the following:
-//
-// * Define an output location for the select query's output. This must be
-// an Amazon S3 bucket in the same AWS Region as the bucket that contains
-// the archive object that is being queried. The AWS account that initiates
-// the job must have permissions to write to the S3 bucket. You can specify
-// the storage class and encryption for the output objects stored in the
-// bucket. For more information about output, see Querying Archived Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/querying-glacier-archives.html)
-// in the Amazon S3 User Guide. For more information about the S3 structure
-// in the request body, see the following: PutObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html)
-// Managing Access with ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/S3_ACLs_UsingACLs.html)
-// in the Amazon S3 User Guide Protecting Data Using Server-Side Encryption
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
-// in the Amazon S3 User Guide
-//
-// * Define the SQL expression for the SELECT type of restoration for your
-// query in the request body's SelectParameters structure. You can use expressions
-// like the following examples. The following expression returns all records
-// from the specified object. SELECT * FROM Object Assuming that you are
-// not using any headers for data stored in the object, you can specify columns
-// with positional headers. SELECT s._1, s._2 FROM Object s WHERE s._3 >
-// 100 If you have headers and you set the fileHeaderInfo in the CSV structure
-// in the request body to USE, you can specify headers in the query. (If
-// you set the fileHeaderInfo field to IGNORE, the first row is skipped for
-// the query.) You cannot mix ordinal positions with header column names.
-// SELECT s.Id, s.FirstName, s.SSN FROM S3Object s
-//
-// For more information about using SQL with S3 Glacier Select restore, see
-// SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
-// in the Amazon S3 User Guide.
-//
-// When making a select request, you can also do the following:
-//
-// * To expedite your queries, specify the Expedited tier. For more information
-// about tiers, see "Restoring Archives," later in this topic.
-//
-// * Specify details about the data serialization format of both the input
-// object that is being queried and the serialization of the CSV-encoded
-// query results.
-//
-// The following are additional important facts about the select feature:
-//
-// * The output results are new Amazon S3 objects. Unlike archive retrievals,
-// they are stored until explicitly deleted-manually or through a lifecycle
-// policy.
-//
-// * You can issue more than one select request on the same Amazon S3 object.
-// Amazon S3 doesn't deduplicate requests, so avoid issuing duplicate requests.
-//
-// * Amazon S3 accepts a select request even if the object has already been
-// restored. A select request doesn’t return error response 409.
-//
-// Restoring objects
-//
-// Objects that you archive to the S3 Glacier or S3 Glacier Deep Archive storage
-// class, and S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep
-// Archive tiers are not accessible in real time. For objects in Archive Access
-// or Deep Archive Access tiers you must first initiate a restore request, and
-// then wait until the object is moved into the Frequent Access tier. For objects
-// in S3 Glacier or S3 Glacier Deep Archive storage classes you must first initiate
-// a restore request, and then wait until a temporary copy of the object is
-// available. To access an archived object, you must restore the object for
-// the duration (number of days) that you specify.
-//
-// To restore a specific object version, you can provide a version ID. If you
-// don't provide a version ID, Amazon S3 restores the current version.
-//
-// When restoring an archived object (or using a select request), you can specify
-// one of the following data access tier options in the Tier element of the
-// request body:
-//
-// * Expedited - Expedited retrievals allow you to quickly access your data
-// stored in the S3 Glacier storage class or S3 Intelligent-Tiering Archive
-// tier when occasional urgent requests for a subset of archives are required.
-// For all but the largest archived objects (250 MB+), data accessed using
-// Expedited retrievals is typically made available within 1–5 minutes.
-// Provisioned capacity ensures that retrieval capacity for Expedited retrievals
-// is available when you need it. Expedited retrievals and provisioned capacity
-// are not available for objects stored in the S3 Glacier Deep Archive storage
-// class or S3 Intelligent-Tiering Deep Archive tier.
-//
-// * Standard - Standard retrievals allow you to access any of your archived
-// objects within several hours. This is the default option for retrieval
-// requests that do not specify the retrieval option. Standard retrievals
-// typically finish within 3–5 hours for objects stored in the S3 Glacier
-// storage class or S3 Intelligent-Tiering Archive tier. They typically finish
-// within 12 hours for objects stored in the S3 Glacier Deep Archive storage
-// class or S3 Intelligent-Tiering Deep Archive tier. Standard retrievals
-// are free for objects stored in S3 Intelligent-Tiering.
-//
-// * Bulk - Bulk retrievals are the lowest-cost retrieval option in S3 Glacier,
-// enabling you to retrieve large amounts, even petabytes, of data inexpensively.
-// Bulk retrievals typically finish within 5–12 hours for objects stored
-// in the S3 Glacier storage class or S3 Intelligent-Tiering Archive tier.
-// They typically finish within 48 hours for objects stored in the S3 Glacier
-// Deep Archive storage class or S3 Intelligent-Tiering Deep Archive tier.
-// Bulk retrievals are free for objects stored in S3 Intelligent-Tiering.
-//
-// For more information about archive retrieval options and provisioned capacity
-// for Expedited data access, see Restoring Archived Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html)
-// in the Amazon S3 User Guide.
-//
-// You can use Amazon S3 restore speed upgrade to change the restore speed to
-// a faster speed while it is in progress. For more information, see Upgrading
-// the speed of an in-progress restore (https://docs.aws.amazon.com/AmazonS3/latest/dev/restoring-objects.html#restoring-objects-upgrade-tier.title.html)
-// in the Amazon S3 User Guide.
-//
-// To get the status of object restoration, you can send a HEAD request. Operations
-// return the x-amz-restore header, which provides information about the restoration
-// status, in the response. You can use Amazon S3 event notifications to notify
-// you when a restore is initiated or completed. For more information, see Configuring
-// Amazon S3 Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
-// in the Amazon S3 User Guide.
-//
-// After restoring an archived object, you can update the restoration period
-// by reissuing the request with a new period. Amazon S3 updates the restoration
-// period relative to the current time and charges only for the request-there
-// are no data transfer charges. You cannot update the restoration period when
-// Amazon S3 is actively processing your current restore request for the object.
-//
-// If your bucket has a lifecycle configuration with a rule that includes an
-// expiration action, the object expiration overrides the life span that you
-// specify in a restore request. For example, if you restore an object copy
-// for 10 days, but the object is scheduled to expire in 3 days, Amazon S3 deletes
-// the object in 3 days. For more information about lifecycle configuration,
-// see PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-// and Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
-// in Amazon S3 User Guide.
-//
-// Responses
-//
-// A successful action returns either the 200 OK or 202 Accepted status code.
-//
-// * If the object is not previously restored, then Amazon S3 returns 202
-// Accepted in the response.
-//
-// * If the object is previously restored, Amazon S3 returns 200 OK in the
-// response.
-//
-// Special Errors
-//
-// * Code: RestoreAlreadyInProgress Cause: Object restore is already in progress.
-// (This error does not apply to SELECT type requests.) HTTP Status Code:
-// 409 Conflict SOAP Fault Code Prefix: Client
-//
-// * Code: GlacierExpeditedRetrievalNotAvailable Cause: expedited retrievals
-// are currently not available. Try again later. (Returned if there is insufficient
-// capacity to process the Expedited request. This error applies only to
-// Expedited retrievals and not to S3 Standard or Bulk retrievals.) HTTP
-// Status Code: 503 SOAP Fault Code Prefix: N/A
-//
-// Related Resources
-//
-// * PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-//
-// * GetBucketNotificationConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html)
-//
-// * SQL Reference for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
-// in the Amazon S3 User Guide
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation RestoreObject for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeObjectAlreadyInActiveTierError "ObjectAlreadyInActiveTierError"
-// This action is not allowed against this storage tier.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/RestoreObject
-func (c *S3) RestoreObject(input *RestoreObjectInput) (*RestoreObjectOutput, error) {
- req, out := c.RestoreObjectRequest(input)
- return out, req.Send()
-}
-
-// RestoreObjectWithContext is the same as RestoreObject with the addition of
-// the ability to pass a context and additional request options.
-//
-// See RestoreObject for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) RestoreObjectWithContext(ctx aws.Context, input *RestoreObjectInput, opts ...request.Option) (*RestoreObjectOutput, error) {
- req, out := c.RestoreObjectRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opSelectObjectContent = "SelectObjectContent"
-
-// SelectObjectContentRequest generates a "aws/request.Request" representing the
-// client's request for the SelectObjectContent operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See SelectObjectContent for more information on using the SelectObjectContent
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the SelectObjectContentRequest method.
-// req, resp := client.SelectObjectContentRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
-func (c *S3) SelectObjectContentRequest(input *SelectObjectContentInput) (req *request.Request, output *SelectObjectContentOutput) {
- op := &request.Operation{
- Name: opSelectObjectContent,
- HTTPMethod: "POST",
- HTTPPath: "/{Bucket}/{Key+}?select&select-type=2",
- }
-
- if input == nil {
- input = &SelectObjectContentInput{}
- }
-
- output = &SelectObjectContentOutput{}
- req = c.newRequest(op, input, output)
-
- es := NewSelectObjectContentEventStream()
- req.Handlers.Unmarshal.PushBack(es.setStreamCloser)
- output.EventStream = es
-
- req.Handlers.Send.Swap(client.LogHTTPResponseHandler.Name, client.LogHTTPResponseHeaderHandler)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, rest.UnmarshalHandler)
- req.Handlers.Unmarshal.PushBack(es.runOutputStream)
- req.Handlers.Unmarshal.PushBack(es.runOnStreamPartClose)
- return
-}
-
-// SelectObjectContent API operation for Amazon Simple Storage Service.
-//
-// This action filters the contents of an Amazon S3 object based on a simple
-// structured query language (SQL) statement. In the request, along with the
-// SQL expression, you must also specify a data serialization format (JSON,
-// CSV, or Apache Parquet) of the object. Amazon S3 uses this format to parse
-// object data into records, and returns only records that match the specified
-// SQL expression. You must also specify the data serialization format for the
-// response.
-//
-// This action is not supported by Amazon S3 on Outposts.
-//
-// For more information about Amazon S3 Select, see Selecting Content from Objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/selecting-content-from-objects.html)
-// in the Amazon S3 User Guide.
-//
-// For more information about using SQL with Amazon S3 Select, see SQL Reference
-// for Amazon S3 Select and S3 Glacier Select (https://docs.aws.amazon.com/AmazonS3/latest/dev/s3-glacier-select-sql-reference.html)
-// in the Amazon S3 User Guide.
-//
-// Permissions
-//
-// You must have s3:GetObject permission for this operation. Amazon S3 Select
-// does not support anonymous access. For more information about permissions,
-// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html)
-// in the Amazon S3 User Guide.
-//
-// Object Data Formats
-//
-// You can use Amazon S3 Select to query objects that have the following format
-// properties:
-//
-// * CSV, JSON, and Parquet - Objects must be in CSV, JSON, or Parquet format.
-//
-// * UTF-8 - UTF-8 is the only encoding type Amazon S3 Select supports.
-//
-// * GZIP or BZIP2 - CSV and JSON files can be compressed using GZIP or BZIP2.
-// GZIP and BZIP2 are the only compression formats that Amazon S3 Select
-// supports for CSV and JSON files. Amazon S3 Select supports columnar compression
-// for Parquet using GZIP or Snappy. Amazon S3 Select does not support whole-object
-// compression for Parquet objects.
-//
-// * Server-side encryption - Amazon S3 Select supports querying objects
-// that are protected with server-side encryption. For objects that are encrypted
-// with customer-provided encryption keys (SSE-C), you must use HTTPS, and
-// you must use the headers that are documented in the GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html).
-// For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided
-// Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html)
-// in the Amazon S3 User Guide. For objects that are encrypted with Amazon
-// S3 managed encryption keys (SSE-S3) and customer master keys (CMKs) stored
-// in AWS Key Management Service (SSE-KMS), server-side encryption is handled
-// transparently, so you don't need to specify anything. For more information
-// about server-side encryption, including SSE-S3 and SSE-KMS, see Protecting
-// Data Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/serv-side-encryption.html)
-// in the Amazon S3 User Guide.
-//
-// Working with the Response Body
-//
-// Given the response size is unknown, Amazon S3 Select streams the response
-// as a series of messages and includes a Transfer-Encoding header with chunked
-// as its value in the response. For more information, see Appendix: SelectObjectContent
-// Response (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTSelectObjectAppendix.html) .
-//
-// GetObject Support
-//
-// The SelectObjectContent action does not support the following GetObject functionality.
-// For more information, see GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html).
-//
-// * Range: Although you can specify a scan range for an Amazon S3 Select
-// request (see SelectObjectContentRequest - ScanRange (https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html#AmazonS3-SelectObjectContent-request-ScanRange)
-// in the request parameters), you cannot specify the range of bytes of an
-// object to return.
-//
-// * GLACIER, DEEP_ARCHIVE and REDUCED_REDUNDANCY storage classes: You cannot
-// specify the GLACIER, DEEP_ARCHIVE, or REDUCED_REDUNDANCY storage classes.
-// For more information, about storage classes see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html#storage-class-intro)
-// in the Amazon S3 User Guide.
-//
-// Special Errors
-//
-// For a list of special errors for this operation, see List of SELECT Object
-// Content Error Codes (https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html#SelectObjectContentErrorCodeList)
-//
-// Related Resources
-//
-// * GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html)
-//
-// * GetBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html)
-//
-// * PutBucketLifecycleConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation SelectObjectContent for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/SelectObjectContent
-func (c *S3) SelectObjectContent(input *SelectObjectContentInput) (*SelectObjectContentOutput, error) {
- req, out := c.SelectObjectContentRequest(input)
- return out, req.Send()
-}
-
-// SelectObjectContentWithContext is the same as SelectObjectContent with the addition of
-// the ability to pass a context and additional request options.
-//
-// See SelectObjectContent for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) SelectObjectContentWithContext(ctx aws.Context, input *SelectObjectContentInput, opts ...request.Option) (*SelectObjectContentOutput, error) {
- req, out := c.SelectObjectContentRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-var _ awserr.Error
-
-// SelectObjectContentEventStream provides the event stream handling for the SelectObjectContent.
-//
-// For testing and mocking the event stream this type should be initialized via
-// the NewSelectObjectContentEventStream constructor function. Using the functional options
-// to pass in nested mock behavior.
-type SelectObjectContentEventStream struct {
-
- // Reader is the EventStream reader for the SelectObjectContentEventStream
- // events. This value is automatically set by the SDK when the API call is made
- // Use this member when unit testing your code with the SDK to mock out the
- // EventStream Reader.
- //
- // Must not be nil.
- Reader SelectObjectContentEventStreamReader
-
- outputReader io.ReadCloser
-
- // StreamCloser is the io.Closer for the EventStream connection. For HTTP
- // EventStream this is the response Body. The stream will be closed when
- // the Close method of the EventStream is called.
- StreamCloser io.Closer
-
- done chan struct{}
- closeOnce sync.Once
- err *eventstreamapi.OnceError
-}
-
-// NewSelectObjectContentEventStream initializes an SelectObjectContentEventStream.
-// This function should only be used for testing and mocking the SelectObjectContentEventStream
-// stream within your application.
-//
-// The Reader member must be set before reading events from the stream.
-//
-// The StreamCloser member should be set to the underlying io.Closer,
-// (e.g. http.Response.Body), that will be closed when the stream Close method
-// is called.
-//
-// es := NewSelectObjectContentEventStream(func(o *SelectObjectContentEventStream{
-// es.Reader = myMockStreamReader
-// es.StreamCloser = myMockStreamCloser
-// })
-func NewSelectObjectContentEventStream(opts ...func(*SelectObjectContentEventStream)) *SelectObjectContentEventStream {
- es := &SelectObjectContentEventStream{
- done: make(chan struct{}),
- err: eventstreamapi.NewOnceError(),
- }
-
- for _, fn := range opts {
- fn(es)
- }
-
- return es
-}
-
-func (es *SelectObjectContentEventStream) setStreamCloser(r *request.Request) {
- es.StreamCloser = r.HTTPResponse.Body
-}
-
-func (es *SelectObjectContentEventStream) runOnStreamPartClose(r *request.Request) {
- if es.done == nil {
- return
- }
- go es.waitStreamPartClose()
-
-}
-
-func (es *SelectObjectContentEventStream) waitStreamPartClose() {
- var outputErrCh <-chan struct{}
- if v, ok := es.Reader.(interface{ ErrorSet() <-chan struct{} }); ok {
- outputErrCh = v.ErrorSet()
- }
- var outputClosedCh <-chan struct{}
- if v, ok := es.Reader.(interface{ Closed() <-chan struct{} }); ok {
- outputClosedCh = v.Closed()
- }
-
- select {
- case <-es.done:
- case <-outputErrCh:
- es.err.SetError(es.Reader.Err())
- es.Close()
- case <-outputClosedCh:
- if err := es.Reader.Err(); err != nil {
- es.err.SetError(es.Reader.Err())
- }
- es.Close()
- }
-}
-
-// Events returns a channel to read events from.
-//
-// These events are:
-//
-// * ContinuationEvent
-// * EndEvent
-// * ProgressEvent
-// * RecordsEvent
-// * StatsEvent
-// * SelectObjectContentEventStreamUnknownEvent
-func (es *SelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
- return es.Reader.Events()
-}
-
-func (es *SelectObjectContentEventStream) runOutputStream(r *request.Request) {
- var opts []func(*eventstream.Decoder)
- if r.Config.Logger != nil && r.Config.LogLevel.Matches(aws.LogDebugWithEventStreamBody) {
- opts = append(opts, eventstream.DecodeWithLogger(r.Config.Logger))
- }
-
- unmarshalerForEvent := unmarshalerForSelectObjectContentEventStreamEvent{
- metadata: protocol.ResponseMetadata{
- StatusCode: r.HTTPResponse.StatusCode,
- RequestID: r.RequestID,
- },
- }.UnmarshalerForEventName
-
- decoder := eventstream.NewDecoder(r.HTTPResponse.Body, opts...)
- eventReader := eventstreamapi.NewEventReader(decoder,
- protocol.HandlerPayloadUnmarshal{
- Unmarshalers: r.Handlers.UnmarshalStream,
- },
- unmarshalerForEvent,
- )
-
- es.outputReader = r.HTTPResponse.Body
- es.Reader = newReadSelectObjectContentEventStream(eventReader)
-}
-
-// Close closes the stream. This will also cause the stream to be closed.
-// Close must be called when done using the stream API. Not calling Close
-// may result in resource leaks.
-//
-// You can use the closing of the Reader's Events channel to terminate your
-// application's read from the API's stream.
-//
-func (es *SelectObjectContentEventStream) Close() (err error) {
- es.closeOnce.Do(es.safeClose)
- return es.Err()
-}
-
-func (es *SelectObjectContentEventStream) safeClose() {
- if es.done != nil {
- close(es.done)
- }
-
- es.Reader.Close()
- if es.outputReader != nil {
- es.outputReader.Close()
- }
-
- es.StreamCloser.Close()
-}
-
-// Err returns any error that occurred while reading or writing EventStream
-// Events from the service API's response. Returns nil if there were no errors.
-func (es *SelectObjectContentEventStream) Err() error {
- if err := es.err.Err(); err != nil {
- return err
- }
- if err := es.Reader.Err(); err != nil {
- return err
- }
-
- return nil
-}
-
-const opUploadPart = "UploadPart"
-
-// UploadPartRequest generates a "aws/request.Request" representing the
-// client's request for the UploadPart operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UploadPart for more information on using the UploadPart
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UploadPartRequest method.
-// req, resp := client.UploadPartRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
-func (c *S3) UploadPartRequest(input *UploadPartInput) (req *request.Request, output *UploadPartOutput) {
- op := &request.Operation{
- Name: opUploadPart,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &UploadPartInput{}
- }
-
- output = &UploadPartOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UploadPart API operation for Amazon Simple Storage Service.
-//
-// Uploads a part in a multipart upload.
-//
-// In this operation, you provide part data in your request. However, you have
-// an option to specify your existing Amazon S3 object as a data source for
-// the part you are uploading. To upload a part from an existing object, you
-// use the UploadPartCopy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html)
-// operation.
-//
-// You must initiate a multipart upload (see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html))
-// before you can upload any part. In response to your initiate request, Amazon
-// S3 returns an upload ID, a unique identifier, that you must include in your
-// upload part request.
-//
-// Part numbers can be any number from 1 to 10,000, inclusive. A part number
-// uniquely identifies a part and also defines its position within the object
-// being created. If you upload a new part using the same part number that was
-// used with a previous part, the previously uploaded part is overwritten. Each
-// part must be at least 5 MB in size, except the last part. There is no size
-// limit on the last part of your multipart upload.
-//
-// To ensure that data is not corrupted when traversing the network, specify
-// the Content-MD5 header in the upload part request. Amazon S3 checks the part
-// data against the provided MD5 value. If they do not match, Amazon S3 returns
-// an error.
-//
-// If the upload request is signed with Signature Version 4, then AWS S3 uses
-// the x-amz-content-sha256 header as a checksum instead of Content-MD5. For
-// more information see Authenticating Requests: Using the Authorization Header
-// (AWS Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html).
-//
-// Note: After you initiate multipart upload and upload one or more parts, you
-// must either complete or abort multipart upload in order to stop getting charged
-// for storage of the uploaded parts. Only after you either complete or abort
-// multipart upload, Amazon S3 frees up the parts storage and stops charging
-// you for the parts storage.
-//
-// For more information on multipart uploads, go to Multipart Upload Overview
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html) in the
-// Amazon S3 User Guide .
-//
-// For information on the permissions required to use the multipart upload API,
-// go to Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
-// in the Amazon S3 User Guide.
-//
-// You can optionally request server-side encryption where Amazon S3 encrypts
-// your data as it writes it to disks in its data centers and decrypts it for
-// you when you access it. You have the option of providing your own encryption
-// key, or you can use the AWS managed encryption keys. If you choose to provide
-// your own encryption key, the request headers you provide in the request must
-// match the headers you used in the request to initiate the upload by using
-// CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
-// For more information, go to Using Server-Side Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingServerSideEncryption.html)
-// in the Amazon S3 User Guide.
-//
-// Server-side encryption is supported by the S3 Multipart Upload actions. Unless
-// you are using a customer-provided encryption key, you don't need to specify
-// the encryption parameters in each UploadPart request. Instead, you only need
-// to specify the server-side encryption parameters in the initial Initiate
-// Multipart request. For more information, see CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html).
-//
-// If you requested server-side encryption using a customer-provided encryption
-// key in your initiate multipart upload request, you must provide identical
-// encryption information in each part upload using the following headers.
-//
-// * x-amz-server-side-encryption-customer-algorithm
-//
-// * x-amz-server-side-encryption-customer-key
-//
-// * x-amz-server-side-encryption-customer-key-MD5
-//
-// Special Errors
-//
-// * Code: NoSuchUpload Cause: The specified multipart upload does not exist.
-// The upload ID might be invalid, or the multipart upload might have been
-// aborted or completed. HTTP Status Code: 404 Not Found SOAP Fault Code
-// Prefix: Client
-//
-// Related Resources
-//
-// * CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// * CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// * AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// * ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// * ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation UploadPart for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPart
-func (c *S3) UploadPart(input *UploadPartInput) (*UploadPartOutput, error) {
- req, out := c.UploadPartRequest(input)
- return out, req.Send()
-}
-
-// UploadPartWithContext is the same as UploadPart with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UploadPart for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) UploadPartWithContext(ctx aws.Context, input *UploadPartInput, opts ...request.Option) (*UploadPartOutput, error) {
- req, out := c.UploadPartRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUploadPartCopy = "UploadPartCopy"
-
-// UploadPartCopyRequest generates a "aws/request.Request" representing the
-// client's request for the UploadPartCopy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UploadPartCopy for more information on using the UploadPartCopy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UploadPartCopyRequest method.
-// req, resp := client.UploadPartCopyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
-func (c *S3) UploadPartCopyRequest(input *UploadPartCopyInput) (req *request.Request, output *UploadPartCopyOutput) {
- op := &request.Operation{
- Name: opUploadPartCopy,
- HTTPMethod: "PUT",
- HTTPPath: "/{Bucket}/{Key+}",
- }
-
- if input == nil {
- input = &UploadPartCopyInput{}
- }
-
- output = &UploadPartCopyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UploadPartCopy API operation for Amazon Simple Storage Service.
-//
-// Uploads a part by copying data from an existing object as data source. You
-// specify the data source by adding the request header x-amz-copy-source in
-// your request and a byte range by adding the request header x-amz-copy-source-range
-// in your request.
-//
-// The minimum allowable part size for a multipart upload is 5 MB. For more
-// information about multipart upload limits, go to Quick Facts (https://docs.aws.amazon.com/AmazonS3/latest/dev/qfacts.html)
-// in the Amazon S3 User Guide.
-//
-// Instead of using an existing object as part data, you might use the UploadPart
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) action
-// and provide data in your request.
-//
-// You must initiate a multipart upload before you can upload any part. In response
-// to your initiate request. Amazon S3 returns a unique identifier, the upload
-// ID, that you must include in your upload part request.
-//
-// For more information about using the UploadPartCopy operation, see the following:
-//
-// * For conceptual information about multipart uploads, see Uploading Objects
-// Using Multipart Upload (https://docs.aws.amazon.com/AmazonS3/latest/dev/uploadobjusingmpu.html)
-// in the Amazon S3 User Guide.
-//
-// * For information about permissions required to use the multipart upload
-// API, see Multipart Upload and Permissions (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html)
-// in the Amazon S3 User Guide.
-//
-// * For information about copying objects using a single atomic action vs.
-// the multipart upload, see Operations on Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectOperations.html)
-// in the Amazon S3 User Guide.
-//
-// * For information about using server-side encryption with customer-provided
-// encryption keys with the UploadPartCopy operation, see CopyObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html)
-// and UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html).
-//
-// Note the following additional considerations about the request headers x-amz-copy-source-if-match,
-// x-amz-copy-source-if-none-match, x-amz-copy-source-if-unmodified-since, and
-// x-amz-copy-source-if-modified-since:
-//
-// * Consideration 1 - If both of the x-amz-copy-source-if-match and x-amz-copy-source-if-unmodified-since
-// headers are present in the request as follows: x-amz-copy-source-if-match
-// condition evaluates to true, and; x-amz-copy-source-if-unmodified-since
-// condition evaluates to false; Amazon S3 returns 200 OK and copies the
-// data.
-//
-// * Consideration 2 - If both of the x-amz-copy-source-if-none-match and
-// x-amz-copy-source-if-modified-since headers are present in the request
-// as follows: x-amz-copy-source-if-none-match condition evaluates to false,
-// and; x-amz-copy-source-if-modified-since condition evaluates to true;
-// Amazon S3 returns 412 Precondition Failed response code.
-//
-// Versioning
-//
-// If your bucket has versioning enabled, you could have multiple versions of
-// the same object. By default, x-amz-copy-source identifies the current version
-// of the object to copy. If the current version is a delete marker and you
-// don't specify a versionId in the x-amz-copy-source, Amazon S3 returns a 404
-// error, because the object does not exist. If you specify versionId in the
-// x-amz-copy-source and the versionId is a delete marker, Amazon S3 returns
-// an HTTP 400 error, because you are not allowed to specify a delete marker
-// as a version for the x-amz-copy-source.
-//
-// You can optionally specify a specific version of the source object to copy
-// by adding the versionId subresource as shown in the following example:
-//
-// x-amz-copy-source: /bucket/object?versionId=version id
-//
-// Special Errors
-//
-// * Code: NoSuchUpload Cause: The specified multipart upload does not exist.
-// The upload ID might be invalid, or the multipart upload might have been
-// aborted or completed. HTTP Status Code: 404 Not Found
-//
-// * Code: InvalidRequest Cause: The specified copy source is not supported
-// as a byte-range copy source. HTTP Status Code: 400 Bad Request
-//
-// Related Resources
-//
-// * CreateMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html)
-//
-// * UploadPart (https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html)
-//
-// * CompleteMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html)
-//
-// * AbortMultipartUpload (https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html)
-//
-// * ListParts (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html)
-//
-// * ListMultipartUploads (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation UploadPartCopy for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/UploadPartCopy
-func (c *S3) UploadPartCopy(input *UploadPartCopyInput) (*UploadPartCopyOutput, error) {
- req, out := c.UploadPartCopyRequest(input)
- return out, req.Send()
-}
-
-// UploadPartCopyWithContext is the same as UploadPartCopy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UploadPartCopy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) UploadPartCopyWithContext(ctx aws.Context, input *UploadPartCopyInput, opts ...request.Option) (*UploadPartCopyOutput, error) {
- req, out := c.UploadPartCopyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opWriteGetObjectResponse = "WriteGetObjectResponse"
-
-// WriteGetObjectResponseRequest generates a "aws/request.Request" representing the
-// client's request for the WriteGetObjectResponse operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See WriteGetObjectResponse for more information on using the WriteGetObjectResponse
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the WriteGetObjectResponseRequest method.
-// req, resp := client.WriteGetObjectResponseRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse
-func (c *S3) WriteGetObjectResponseRequest(input *WriteGetObjectResponseInput) (req *request.Request, output *WriteGetObjectResponseOutput) {
- op := &request.Operation{
- Name: opWriteGetObjectResponse,
- HTTPMethod: "POST",
- HTTPPath: "/WriteGetObjectResponse",
- }
-
- if input == nil {
- input = &WriteGetObjectResponseInput{}
- }
-
- output = &WriteGetObjectResponseOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Sign.Remove(v4.SignRequestHandler)
- handler := v4.BuildNamedHandler("v4.CustomSignerHandler", v4.WithUnsignedPayload)
- req.Handlers.Sign.PushFrontNamed(handler)
- req.Handlers.Unmarshal.Swap(restxml.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("{RequestRoute}.", input.hostLabels))
- req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler)
- return
-}
-
-// WriteGetObjectResponse API operation for Amazon Simple Storage Service.
-//
-// Passes transformed objects to a GetObject operation when using Object Lambda
-// Access Points. For information about Object Lambda Access Points, see Transforming
-// objects with Object Lambda Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/transforming-objects.html)
-// in the Amazon S3 User Guide.
-//
-// This operation supports metadata that can be returned by GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html),
-// in addition to RequestRoute, RequestToken, StatusCode, ErrorCode, and ErrorMessage.
-// The GetObject response metadata is supported so that the WriteGetObjectResponse
-// caller, typically an AWS Lambda function, can provide the same metadata when
-// it internally invokes GetObject. When WriteGetObjectResponse is called by
-// a customer-owned Lambda function, the metadata returned to the end user GetObject
-// call might differ from what Amazon S3 would normally return.
-//
-// AWS provides some prebuilt Lambda functions that you can use with S3 Object
-// Lambda to detect and redact personally identifiable information (PII) and
-// decompress S3 objects. These Lambda functions are available in the AWS Serverless
-// Application Repository, and can be selected through the AWS Management Console
-// when you create your Object Lambda Access Point.
-//
-// Example 1: PII Access Control - This Lambda function uses Amazon Comprehend,
-// a natural language processing (NLP) service using machine learning to find
-// insights and relationships in text. It automatically detects personally identifiable
-// information (PII) such as names, addresses, dates, credit card numbers, and
-// social security numbers from documents in your Amazon S3 bucket.
-//
-// Example 2: PII Redaction - This Lambda function uses Amazon Comprehend, a
-// natural language processing (NLP) service using machine learning to find
-// insights and relationships in text. It automatically redacts personally identifiable
-// information (PII) such as names, addresses, dates, credit card numbers, and
-// social security numbers from documents in your Amazon S3 bucket.
-//
-// Example 3: Decompression - The Lambda function S3ObjectLambdaDecompression,
-// is equipped to decompress objects stored in S3 in one of six compressed file
-// formats including bzip2, gzip, snappy, zlib, zstandard and ZIP.
-//
-// For information on how to view and use these functions, see Using AWS built
-// Lambda functions (https://docs.aws.amazon.com/AmazonS3/latest/userguide/olap-examples.html)
-// in the Amazon S3 User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for Amazon Simple Storage Service's
-// API operation WriteGetObjectResponse for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/WriteGetObjectResponse
-func (c *S3) WriteGetObjectResponse(input *WriteGetObjectResponseInput) (*WriteGetObjectResponseOutput, error) {
- req, out := c.WriteGetObjectResponseRequest(input)
- return out, req.Send()
-}
-
-// WriteGetObjectResponseWithContext is the same as WriteGetObjectResponse with the addition of
-// the ability to pass a context and additional request options.
-//
-// See WriteGetObjectResponse for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) WriteGetObjectResponseWithContext(ctx aws.Context, input *WriteGetObjectResponseInput, opts ...request.Option) (*WriteGetObjectResponseOutput, error) {
- req, out := c.WriteGetObjectResponseRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// Specifies the days since the initiation of an incomplete multipart upload
-// that Amazon S3 will wait before permanently removing all parts of the upload.
-// For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
-// Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
-// in the Amazon S3 User Guide.
-type AbortIncompleteMultipartUpload struct {
- _ struct{} `type:"structure"`
-
- // Specifies the number of days after which Amazon S3 aborts an incomplete multipart
- // upload.
- DaysAfterInitiation *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s AbortIncompleteMultipartUpload) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AbortIncompleteMultipartUpload) GoString() string {
- return s.String()
-}
-
-// SetDaysAfterInitiation sets the DaysAfterInitiation field's value.
-func (s *AbortIncompleteMultipartUpload) SetDaysAfterInitiation(v int64) *AbortIncompleteMultipartUpload {
- s.DaysAfterInitiation = &v
- return s
-}
-
-type AbortMultipartUploadInput struct {
- _ struct{} `locationName:"AbortMultipartUploadRequest" type:"structure"`
-
- // The bucket name to which the upload was taking place.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Key of the object for which the multipart upload was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Upload ID that identifies the multipart upload.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s AbortMultipartUploadInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AbortMultipartUploadInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AbortMultipartUploadInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AbortMultipartUploadInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *AbortMultipartUploadInput) SetBucket(v string) *AbortMultipartUploadInput {
- s.Bucket = &v
- return s
-}
-
-func (s *AbortMultipartUploadInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *AbortMultipartUploadInput) SetExpectedBucketOwner(v string) *AbortMultipartUploadInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *AbortMultipartUploadInput) SetKey(v string) *AbortMultipartUploadInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *AbortMultipartUploadInput) SetRequestPayer(v string) *AbortMultipartUploadInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *AbortMultipartUploadInput) SetUploadId(v string) *AbortMultipartUploadInput {
- s.UploadId = &v
- return s
-}
-
-func (s *AbortMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *AbortMultipartUploadInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s AbortMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type AbortMultipartUploadOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation
-func (s AbortMultipartUploadOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AbortMultipartUploadOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *AbortMultipartUploadOutput) SetRequestCharged(v string) *AbortMultipartUploadOutput {
- s.RequestCharged = &v
- return s
-}
-
-// Configures the transfer acceleration state for an Amazon S3 bucket. For more
-// information, see Amazon S3 Transfer Acceleration (https://docs.aws.amazon.com/AmazonS3/latest/dev/transfer-acceleration.html)
-// in the Amazon S3 User Guide.
-type AccelerateConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies the transfer acceleration status of the bucket.
- Status *string `type:"string" enum:"BucketAccelerateStatus"`
-}
-
-// String returns the string representation
-func (s AccelerateConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccelerateConfiguration) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *AccelerateConfiguration) SetStatus(v string) *AccelerateConfiguration {
- s.Status = &v
- return s
-}
-
-// Contains the elements that set the ACL permissions for an object per grantee.
-type AccessControlPolicy struct {
- _ struct{} `type:"structure"`
-
- // A list of grants.
- Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
-
- // Container for the bucket owner's display name and ID.
- Owner *Owner `type:"structure"`
-}
-
-// String returns the string representation
-func (s AccessControlPolicy) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccessControlPolicy) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AccessControlPolicy) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AccessControlPolicy"}
- if s.Grants != nil {
- for i, v := range s.Grants {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Grants", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrants sets the Grants field's value.
-func (s *AccessControlPolicy) SetGrants(v []*Grant) *AccessControlPolicy {
- s.Grants = v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *AccessControlPolicy) SetOwner(v *Owner) *AccessControlPolicy {
- s.Owner = v
- return s
-}
-
-// A container for information about access control for replicas.
-type AccessControlTranslation struct {
- _ struct{} `type:"structure"`
-
- // Specifies the replica ownership. For default and valid values, see PUT bucket
- // replication (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
- // in the Amazon S3 API Reference.
- //
- // Owner is a required field
- Owner *string `type:"string" required:"true" enum:"OwnerOverride"`
-}
-
-// String returns the string representation
-func (s AccessControlTranslation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AccessControlTranslation) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AccessControlTranslation) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AccessControlTranslation"}
- if s.Owner == nil {
- invalidParams.Add(request.NewErrParamRequired("Owner"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetOwner sets the Owner field's value.
-func (s *AccessControlTranslation) SetOwner(v string) *AccessControlTranslation {
- s.Owner = &v
- return s
-}
-
-// A conjunction (logical AND) of predicates, which is used in evaluating a
-// metrics filter. The operator must have at least two predicates in any combination,
-// and an object must match all of the predicates for the filter to apply.
-type AnalyticsAndOperator struct {
- _ struct{} `type:"structure"`
-
- // The prefix to use when evaluating an AND predicate: The prefix that an object
- // must have to be included in the metrics results.
- Prefix *string `type:"string"`
-
- // The list of tags to use when evaluating an AND predicate.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s AnalyticsAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AnalyticsAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsAndOperator"}
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *AnalyticsAndOperator) SetPrefix(v string) *AnalyticsAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *AnalyticsAndOperator) SetTags(v []*Tag) *AnalyticsAndOperator {
- s.Tags = v
- return s
-}
-
-// Specifies the configuration and any analyses for the analytics filter of
-// an Amazon S3 bucket.
-type AnalyticsConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The filter used to describe a set of objects for analyses. A filter must
- // have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
- // If no filter is provided, all objects will be considered in any analysis.
- Filter *AnalyticsFilter `type:"structure"`
-
- // The ID that identifies the analytics configuration.
- //
- // Id is a required field
- Id *string `type:"string" required:"true"`
-
- // Contains data related to access patterns to be collected and made available
- // to analyze the tradeoffs between different storage classes.
- //
- // StorageClassAnalysis is a required field
- StorageClassAnalysis *StorageClassAnalysis `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s AnalyticsConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AnalyticsConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsConfiguration"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.StorageClassAnalysis == nil {
- invalidParams.Add(request.NewErrParamRequired("StorageClassAnalysis"))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if s.StorageClassAnalysis != nil {
- if err := s.StorageClassAnalysis.Validate(); err != nil {
- invalidParams.AddNested("StorageClassAnalysis", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *AnalyticsConfiguration) SetFilter(v *AnalyticsFilter) *AnalyticsConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *AnalyticsConfiguration) SetId(v string) *AnalyticsConfiguration {
- s.Id = &v
- return s
-}
-
-// SetStorageClassAnalysis sets the StorageClassAnalysis field's value.
-func (s *AnalyticsConfiguration) SetStorageClassAnalysis(v *StorageClassAnalysis) *AnalyticsConfiguration {
- s.StorageClassAnalysis = v
- return s
-}
-
-// Where to publish the analytics results.
-type AnalyticsExportDestination struct {
- _ struct{} `type:"structure"`
-
- // A destination signifying output to an S3 bucket.
- //
- // S3BucketDestination is a required field
- S3BucketDestination *AnalyticsS3BucketDestination `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s AnalyticsExportDestination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AnalyticsExportDestination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsExportDestination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsExportDestination"}
- if s.S3BucketDestination == nil {
- invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
- }
- if s.S3BucketDestination != nil {
- if err := s.S3BucketDestination.Validate(); err != nil {
- invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetS3BucketDestination sets the S3BucketDestination field's value.
-func (s *AnalyticsExportDestination) SetS3BucketDestination(v *AnalyticsS3BucketDestination) *AnalyticsExportDestination {
- s.S3BucketDestination = v
- return s
-}
-
-// The filter used to describe a set of objects for analyses. A filter must
-// have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator).
-// If no filter is provided, all objects will be considered in any analysis.
-type AnalyticsFilter struct {
- _ struct{} `type:"structure"`
-
- // A conjunction (logical AND) of predicates, which is used in evaluating an
- // analytics filter. The operator must have at least two predicates.
- And *AnalyticsAndOperator `type:"structure"`
-
- // The prefix to use when evaluating an analytics filter.
- Prefix *string `type:"string"`
-
- // The tag to use when evaluating an analytics filter.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation
-func (s AnalyticsFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AnalyticsFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *AnalyticsFilter) SetAnd(v *AnalyticsAndOperator) *AnalyticsFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *AnalyticsFilter) SetPrefix(v string) *AnalyticsFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *AnalyticsFilter) SetTag(v *Tag) *AnalyticsFilter {
- s.Tag = v
- return s
-}
-
-// Contains information about where to publish the analytics results.
-type AnalyticsS3BucketDestination struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the bucket to which data is exported.
- //
- // Bucket is a required field
- Bucket *string `type:"string" required:"true"`
-
- // The account ID that owns the destination S3 bucket. If no account ID is provided,
- // the owner is not validated before exporting data.
- //
- // Although this value is optional, we strongly recommend that you set it to
- // help prevent problems if the destination bucket ownership changes.
- BucketAccountId *string `type:"string"`
-
- // Specifies the file format used when exporting data to Amazon S3.
- //
- // Format is a required field
- Format *string `type:"string" required:"true" enum:"AnalyticsS3ExportFileFormat"`
-
- // The prefix to use when exporting data. The prefix is prepended to all results.
- Prefix *string `type:"string"`
-}
-
-// String returns the string representation
-func (s AnalyticsS3BucketDestination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AnalyticsS3BucketDestination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AnalyticsS3BucketDestination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AnalyticsS3BucketDestination"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Format == nil {
- invalidParams.Add(request.NewErrParamRequired("Format"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *AnalyticsS3BucketDestination) SetBucket(v string) *AnalyticsS3BucketDestination {
- s.Bucket = &v
- return s
-}
-
-func (s *AnalyticsS3BucketDestination) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketAccountId sets the BucketAccountId field's value.
-func (s *AnalyticsS3BucketDestination) SetBucketAccountId(v string) *AnalyticsS3BucketDestination {
- s.BucketAccountId = &v
- return s
-}
-
-// SetFormat sets the Format field's value.
-func (s *AnalyticsS3BucketDestination) SetFormat(v string) *AnalyticsS3BucketDestination {
- s.Format = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *AnalyticsS3BucketDestination) SetPrefix(v string) *AnalyticsS3BucketDestination {
- s.Prefix = &v
- return s
-}
-
-// In terms of implementation, a Bucket is a resource. An Amazon S3 bucket name
-// is globally unique, and the namespace is shared by all AWS accounts.
-type Bucket struct {
- _ struct{} `type:"structure"`
-
- // Date the bucket was created. This date can change when making changes to
- // your bucket, such as editing its bucket policy.
- CreationDate *time.Time `type:"timestamp"`
-
- // The name of the bucket.
- Name *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Bucket) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Bucket) GoString() string {
- return s.String()
-}
-
-// SetCreationDate sets the CreationDate field's value.
-func (s *Bucket) SetCreationDate(v time.Time) *Bucket {
- s.CreationDate = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *Bucket) SetName(v string) *Bucket {
- s.Name = &v
- return s
-}
-
-// Specifies the lifecycle configuration for objects in an Amazon S3 bucket.
-// For more information, see Object Lifecycle Management (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html)
-// in the Amazon S3 User Guide.
-type BucketLifecycleConfiguration struct {
- _ struct{} `type:"structure"`
-
- // A lifecycle rule for individual objects in an Amazon S3 bucket.
- //
- // Rules is a required field
- Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation
-func (s BucketLifecycleConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BucketLifecycleConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *BucketLifecycleConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BucketLifecycleConfiguration"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
- s.Rules = v
- return s
-}
-
-// Container for logging status information.
-type BucketLoggingStatus struct {
- _ struct{} `type:"structure"`
-
- // Describes where logs are stored and the prefix that Amazon S3 assigns to
- // all log object keys for a bucket. For more information, see PUT Bucket logging
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
- // in the Amazon S3 API Reference.
- LoggingEnabled *LoggingEnabled `type:"structure"`
-}
-
-// String returns the string representation
-func (s BucketLoggingStatus) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BucketLoggingStatus) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *BucketLoggingStatus) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BucketLoggingStatus"}
- if s.LoggingEnabled != nil {
- if err := s.LoggingEnabled.Validate(); err != nil {
- invalidParams.AddNested("LoggingEnabled", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetLoggingEnabled sets the LoggingEnabled field's value.
-func (s *BucketLoggingStatus) SetLoggingEnabled(v *LoggingEnabled) *BucketLoggingStatus {
- s.LoggingEnabled = v
- return s
-}
-
-// Describes the cross-origin access configuration for objects in an Amazon
-// S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
-// S3 User Guide.
-type CORSConfiguration struct {
- _ struct{} `type:"structure"`
-
- // A set of origins and methods (cross-origin access that you want to allow).
- // You can add up to 100 rules to the configuration.
- //
- // CORSRules is a required field
- CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation
-func (s CORSConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CORSConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CORSConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CORSConfiguration"}
- if s.CORSRules == nil {
- invalidParams.Add(request.NewErrParamRequired("CORSRules"))
- }
- if s.CORSRules != nil {
- for i, v := range s.CORSRules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CORSRules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCORSRules sets the CORSRules field's value.
-func (s *CORSConfiguration) SetCORSRules(v []*CORSRule) *CORSConfiguration {
- s.CORSRules = v
- return s
-}
-
-// Specifies a cross-origin access rule for an Amazon S3 bucket.
-type CORSRule struct {
- _ struct{} `type:"structure"`
-
- // Headers that are specified in the Access-Control-Request-Headers header.
- // These headers are allowed in a preflight OPTIONS request. In response to
- // any preflight OPTIONS request, Amazon S3 returns any requested headers that
- // are allowed.
- AllowedHeaders []*string `locationName:"AllowedHeader" type:"list" flattened:"true"`
-
- // An HTTP method that you allow the origin to execute. Valid values are GET,
- // PUT, HEAD, POST, and DELETE.
- //
- // AllowedMethods is a required field
- AllowedMethods []*string `locationName:"AllowedMethod" type:"list" flattened:"true" required:"true"`
-
- // One or more origins you want customers to be able to access the bucket from.
- //
- // AllowedOrigins is a required field
- AllowedOrigins []*string `locationName:"AllowedOrigin" type:"list" flattened:"true" required:"true"`
-
- // One or more headers in the response that you want customers to be able to
- // access from their applications (for example, from a JavaScript XMLHttpRequest
- // object).
- ExposeHeaders []*string `locationName:"ExposeHeader" type:"list" flattened:"true"`
-
- // Unique identifier for the rule. The value cannot be longer than 255 characters.
- ID *string `type:"string"`
-
- // The time in seconds that your browser is to cache the preflight response
- // for the specified resource.
- MaxAgeSeconds *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s CORSRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CORSRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CORSRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CORSRule"}
- if s.AllowedMethods == nil {
- invalidParams.Add(request.NewErrParamRequired("AllowedMethods"))
- }
- if s.AllowedOrigins == nil {
- invalidParams.Add(request.NewErrParamRequired("AllowedOrigins"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAllowedHeaders sets the AllowedHeaders field's value.
-func (s *CORSRule) SetAllowedHeaders(v []*string) *CORSRule {
- s.AllowedHeaders = v
- return s
-}
-
-// SetAllowedMethods sets the AllowedMethods field's value.
-func (s *CORSRule) SetAllowedMethods(v []*string) *CORSRule {
- s.AllowedMethods = v
- return s
-}
-
-// SetAllowedOrigins sets the AllowedOrigins field's value.
-func (s *CORSRule) SetAllowedOrigins(v []*string) *CORSRule {
- s.AllowedOrigins = v
- return s
-}
-
-// SetExposeHeaders sets the ExposeHeaders field's value.
-func (s *CORSRule) SetExposeHeaders(v []*string) *CORSRule {
- s.ExposeHeaders = v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *CORSRule) SetID(v string) *CORSRule {
- s.ID = &v
- return s
-}
-
-// SetMaxAgeSeconds sets the MaxAgeSeconds field's value.
-func (s *CORSRule) SetMaxAgeSeconds(v int64) *CORSRule {
- s.MaxAgeSeconds = &v
- return s
-}
-
-// Describes how an uncompressed comma-separated values (CSV)-formatted input
-// object is formatted.
-type CSVInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies that CSV field values may contain quoted record delimiters and
- // such records should be allowed. Default value is FALSE. Setting this value
- // to TRUE may lower performance.
- AllowQuotedRecordDelimiter *bool `type:"boolean"`
-
- // A single character used to indicate that a row should be ignored when the
- // character is present at the start of that row. You can specify any character
- // to indicate a comment line.
- Comments *string `type:"string"`
-
- // A single character used to separate individual fields in a record. You can
- // specify an arbitrary delimiter.
- FieldDelimiter *string `type:"string"`
-
- // Describes the first line of input. Valid values are:
- //
- // * NONE: First line is not a header.
- //
- // * IGNORE: First line is a header, but you can't use the header values
- // to indicate the column in an expression. You can use column position (such
- // as _1, _2, …) to indicate the column (SELECT s._1 FROM OBJECT s).
- //
- // * Use: First line is a header, and you can use the header value to identify
- // a column in an expression (SELECT "name" FROM OBJECT).
- FileHeaderInfo *string `type:"string" enum:"FileHeaderInfo"`
-
- // A single character used for escaping when the field delimiter is part of
- // the value. For example, if the value is a, b, Amazon S3 wraps this field
- // value in quotation marks, as follows: " a , b ".
- //
- // Type: String
- //
- // Default: "
- //
- // Ancestors: CSV
- QuoteCharacter *string `type:"string"`
-
- // A single character used for escaping the quotation mark character inside
- // an already escaped value. For example, the value """ a , b """ is parsed
- // as " a , b ".
- QuoteEscapeCharacter *string `type:"string"`
-
- // A single character used to separate individual records in the input. Instead
- // of the default value, you can specify an arbitrary delimiter.
- RecordDelimiter *string `type:"string"`
-}
-
-// String returns the string representation
-func (s CSVInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CSVInput) GoString() string {
- return s.String()
-}
-
-// SetAllowQuotedRecordDelimiter sets the AllowQuotedRecordDelimiter field's value.
-func (s *CSVInput) SetAllowQuotedRecordDelimiter(v bool) *CSVInput {
- s.AllowQuotedRecordDelimiter = &v
- return s
-}
-
-// SetComments sets the Comments field's value.
-func (s *CSVInput) SetComments(v string) *CSVInput {
- s.Comments = &v
- return s
-}
-
-// SetFieldDelimiter sets the FieldDelimiter field's value.
-func (s *CSVInput) SetFieldDelimiter(v string) *CSVInput {
- s.FieldDelimiter = &v
- return s
-}
-
-// SetFileHeaderInfo sets the FileHeaderInfo field's value.
-func (s *CSVInput) SetFileHeaderInfo(v string) *CSVInput {
- s.FileHeaderInfo = &v
- return s
-}
-
-// SetQuoteCharacter sets the QuoteCharacter field's value.
-func (s *CSVInput) SetQuoteCharacter(v string) *CSVInput {
- s.QuoteCharacter = &v
- return s
-}
-
-// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
-func (s *CSVInput) SetQuoteEscapeCharacter(v string) *CSVInput {
- s.QuoteEscapeCharacter = &v
- return s
-}
-
-// SetRecordDelimiter sets the RecordDelimiter field's value.
-func (s *CSVInput) SetRecordDelimiter(v string) *CSVInput {
- s.RecordDelimiter = &v
- return s
-}
-
-// Describes how uncompressed comma-separated values (CSV)-formatted results
-// are formatted.
-type CSVOutput struct {
- _ struct{} `type:"structure"`
-
- // The value used to separate individual fields in a record. You can specify
- // an arbitrary delimiter.
- FieldDelimiter *string `type:"string"`
-
- // A single character used for escaping when the field delimiter is part of
- // the value. For example, if the value is a, b, Amazon S3 wraps this field
- // value in quotation marks, as follows: " a , b ".
- QuoteCharacter *string `type:"string"`
-
- // The single character used for escaping the quote character inside an already
- // escaped value.
- QuoteEscapeCharacter *string `type:"string"`
-
- // Indicates whether to use quotation marks around output fields.
- //
- // * ALWAYS: Always use quotation marks for output fields.
- //
- // * ASNEEDED: Use quotation marks for output fields when needed.
- QuoteFields *string `type:"string" enum:"QuoteFields"`
-
- // A single character used to separate individual records in the output. Instead
- // of the default value, you can specify an arbitrary delimiter.
- RecordDelimiter *string `type:"string"`
-}
-
-// String returns the string representation
-func (s CSVOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CSVOutput) GoString() string {
- return s.String()
-}
-
-// SetFieldDelimiter sets the FieldDelimiter field's value.
-func (s *CSVOutput) SetFieldDelimiter(v string) *CSVOutput {
- s.FieldDelimiter = &v
- return s
-}
-
-// SetQuoteCharacter sets the QuoteCharacter field's value.
-func (s *CSVOutput) SetQuoteCharacter(v string) *CSVOutput {
- s.QuoteCharacter = &v
- return s
-}
-
-// SetQuoteEscapeCharacter sets the QuoteEscapeCharacter field's value.
-func (s *CSVOutput) SetQuoteEscapeCharacter(v string) *CSVOutput {
- s.QuoteEscapeCharacter = &v
- return s
-}
-
-// SetQuoteFields sets the QuoteFields field's value.
-func (s *CSVOutput) SetQuoteFields(v string) *CSVOutput {
- s.QuoteFields = &v
- return s
-}
-
-// SetRecordDelimiter sets the RecordDelimiter field's value.
-func (s *CSVOutput) SetRecordDelimiter(v string) *CSVOutput {
- s.RecordDelimiter = &v
- return s
-}
-
-// Container for specifying the AWS Lambda notification configuration.
-type CloudFunctionConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Lambda cloud function ARN that Amazon S3 can invoke when it detects events
- // of the specified type.
- CloudFunction *string `type:"string"`
-
- // The bucket event for which to send notifications.
- //
- // Deprecated: Event has been deprecated
- Event *string `deprecated:"true" type:"string" enum:"Event"`
-
- // Bucket events for which to send notifications.
- Events []*string `locationName:"Event" type:"list" flattened:"true"`
-
- // An optional unique identifier for configurations in a notification configuration.
- // If you don't provide one, Amazon S3 will assign an ID.
- Id *string `type:"string"`
-
- // The role supporting the invocation of the Lambda function
- InvocationRole *string `type:"string"`
-}
-
-// String returns the string representation
-func (s CloudFunctionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CloudFunctionConfiguration) GoString() string {
- return s.String()
-}
-
-// SetCloudFunction sets the CloudFunction field's value.
-func (s *CloudFunctionConfiguration) SetCloudFunction(v string) *CloudFunctionConfiguration {
- s.CloudFunction = &v
- return s
-}
-
-// SetEvent sets the Event field's value.
-func (s *CloudFunctionConfiguration) SetEvent(v string) *CloudFunctionConfiguration {
- s.Event = &v
- return s
-}
-
-// SetEvents sets the Events field's value.
-func (s *CloudFunctionConfiguration) SetEvents(v []*string) *CloudFunctionConfiguration {
- s.Events = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *CloudFunctionConfiguration) SetId(v string) *CloudFunctionConfiguration {
- s.Id = &v
- return s
-}
-
-// SetInvocationRole sets the InvocationRole field's value.
-func (s *CloudFunctionConfiguration) SetInvocationRole(v string) *CloudFunctionConfiguration {
- s.InvocationRole = &v
- return s
-}
-
-// Container for all (if there are any) keys between Prefix and the next occurrence
-// of the string specified by a delimiter. CommonPrefixes lists keys that act
-// like subdirectories in the directory specified by Prefix. For example, if
-// the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july,
-// the common prefix is notes/summer/.
-type CommonPrefix struct {
- _ struct{} `type:"structure"`
-
- // Container for the specified common prefix.
- Prefix *string `type:"string"`
-}
-
-// String returns the string representation
-func (s CommonPrefix) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CommonPrefix) GoString() string {
- return s.String()
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *CommonPrefix) SetPrefix(v string) *CommonPrefix {
- s.Prefix = &v
- return s
-}
-
-type CompleteMultipartUploadInput struct {
- _ struct{} `locationName:"CompleteMultipartUploadRequest" type:"structure" payload:"MultipartUpload"`
-
- // Name of the bucket to which the multipart upload was initiated.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Object key for which the multipart upload was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // The container for the multipart upload request information.
- MultipartUpload *CompletedMultipartUpload `locationName:"CompleteMultipartUpload" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // ID for the initiated multipart upload.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s CompleteMultipartUploadInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CompleteMultipartUploadInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CompleteMultipartUploadInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CompleteMultipartUploadInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CompleteMultipartUploadInput) SetBucket(v string) *CompleteMultipartUploadInput {
- s.Bucket = &v
- return s
-}
-
-func (s *CompleteMultipartUploadInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *CompleteMultipartUploadInput) SetExpectedBucketOwner(v string) *CompleteMultipartUploadInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CompleteMultipartUploadInput) SetKey(v string) *CompleteMultipartUploadInput {
- s.Key = &v
- return s
-}
-
-// SetMultipartUpload sets the MultipartUpload field's value.
-func (s *CompleteMultipartUploadInput) SetMultipartUpload(v *CompletedMultipartUpload) *CompleteMultipartUploadInput {
- s.MultipartUpload = v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *CompleteMultipartUploadInput) SetRequestPayer(v string) *CompleteMultipartUploadInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *CompleteMultipartUploadInput) SetUploadId(v string) *CompleteMultipartUploadInput {
- s.UploadId = &v
- return s
-}
-
-func (s *CompleteMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *CompleteMultipartUploadInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s CompleteMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type CompleteMultipartUploadOutput struct {
- _ struct{} `type:"structure"`
-
- // The name of the bucket that contains the newly created object.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- Bucket *string `type:"string"`
-
- // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Entity tag that identifies the newly created object's data. Objects with
- // different object data will have different entity tags. The entity tag is
- // an opaque string. The entity tag may or may not be an MD5 digest of the object
- // data. If the entity tag is not an MD5 digest of the object data, it will
- // contain one or more nonhexadecimal characters and/or will consist of less
- // than 32 or more than 32 hexadecimal digits.
- ETag *string `type:"string"`
-
- // If the object expiration is configured, this will contain the expiration
- // date (expiry-date) and rule ID (rule-id). The value of rule-id is URL encoded.
- Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
-
- // The object key of the newly created object.
- Key *string `min:"1" type:"string"`
-
- // The URI that identifies the newly created object.
- Location *string `type:"string"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) that was used for the
- // object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // If you specified server-side encryption either with an Amazon S3-managed
- // encryption key or an AWS KMS customer master key (CMK) in your initiate multipart
- // upload request, the response includes this header. It confirms the encryption
- // algorithm that Amazon S3 used to encrypt the object.
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // Version ID of the newly created object, in case the bucket has versioning
- // turned on.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation
-func (s CompleteMultipartUploadOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CompleteMultipartUploadOutput) GoString() string {
- return s.String()
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CompleteMultipartUploadOutput) SetBucket(v string) *CompleteMultipartUploadOutput {
- s.Bucket = &v
- return s
-}
-
-func (s *CompleteMultipartUploadOutput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CompleteMultipartUploadOutput) SetBucketKeyEnabled(v bool) *CompleteMultipartUploadOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *CompleteMultipartUploadOutput) SetETag(v string) *CompleteMultipartUploadOutput {
- s.ETag = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *CompleteMultipartUploadOutput) SetExpiration(v string) *CompleteMultipartUploadOutput {
- s.Expiration = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CompleteMultipartUploadOutput) SetKey(v string) *CompleteMultipartUploadOutput {
- s.Key = &v
- return s
-}
-
-// SetLocation sets the Location field's value.
-func (s *CompleteMultipartUploadOutput) SetLocation(v string) *CompleteMultipartUploadOutput {
- s.Location = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *CompleteMultipartUploadOutput) SetRequestCharged(v string) *CompleteMultipartUploadOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CompleteMultipartUploadOutput) SetSSEKMSKeyId(v string) *CompleteMultipartUploadOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CompleteMultipartUploadOutput) SetServerSideEncryption(v string) *CompleteMultipartUploadOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *CompleteMultipartUploadOutput) SetVersionId(v string) *CompleteMultipartUploadOutput {
- s.VersionId = &v
- return s
-}
-
-// The container for the completed multipart upload details.
-type CompletedMultipartUpload struct {
- _ struct{} `type:"structure"`
-
- // Array of CompletedPart data types.
- Parts []*CompletedPart `locationName:"Part" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s CompletedMultipartUpload) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CompletedMultipartUpload) GoString() string {
- return s.String()
-}
-
-// SetParts sets the Parts field's value.
-func (s *CompletedMultipartUpload) SetParts(v []*CompletedPart) *CompletedMultipartUpload {
- s.Parts = v
- return s
-}
-
-// Details of the parts that were uploaded.
-type CompletedPart struct {
- _ struct{} `type:"structure"`
-
- // Entity tag returned when the part was uploaded.
- ETag *string `type:"string"`
-
- // Part number that identifies the part. This is a positive integer between
- // 1 and 10,000.
- PartNumber *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s CompletedPart) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CompletedPart) GoString() string {
- return s.String()
-}
-
-// SetETag sets the ETag field's value.
-func (s *CompletedPart) SetETag(v string) *CompletedPart {
- s.ETag = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *CompletedPart) SetPartNumber(v int64) *CompletedPart {
- s.PartNumber = &v
- return s
-}
-
-// A container for describing a condition that must be met for the specified
-// redirect to apply. For example, 1. If request is for pages in the /docs folder,
-// redirect to the /documents folder. 2. If request results in HTTP error 4xx,
-// redirect request to another host where you might process the error.
-type Condition struct {
- _ struct{} `type:"structure"`
-
- // The HTTP error code when the redirect is applied. In the event of an error,
- // if the error code equals this value, then the specified redirect is applied.
- // Required when parent element Condition is specified and sibling KeyPrefixEquals
- // is not specified. If both are specified, then both must be true for the redirect
- // to be applied.
- HttpErrorCodeReturnedEquals *string `type:"string"`
-
- // The object key name prefix when the redirect is applied. For example, to
- // redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html.
- // To redirect request for all pages with the prefix docs/, the key prefix will
- // be /docs, which identifies all objects in the docs/ folder. Required when
- // the parent element Condition is specified and sibling HttpErrorCodeReturnedEquals
- // is not specified. If both conditions are specified, both must be true for
- // the redirect to be applied.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- KeyPrefixEquals *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Condition) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Condition) GoString() string {
- return s.String()
-}
-
-// SetHttpErrorCodeReturnedEquals sets the HttpErrorCodeReturnedEquals field's value.
-func (s *Condition) SetHttpErrorCodeReturnedEquals(v string) *Condition {
- s.HttpErrorCodeReturnedEquals = &v
- return s
-}
-
-// SetKeyPrefixEquals sets the KeyPrefixEquals field's value.
-func (s *Condition) SetKeyPrefixEquals(v string) *Condition {
- s.KeyPrefixEquals = &v
- return s
-}
-
-type ContinuationEvent struct {
- _ struct{} `locationName:"ContinuationEvent" type:"structure"`
-}
-
-// String returns the string representation
-func (s ContinuationEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ContinuationEvent) GoString() string {
- return s.String()
-}
-
-// The ContinuationEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *ContinuationEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the ContinuationEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *ContinuationEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-func (s *ContinuationEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
- msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
- return msg, err
-}
-
-type CopyObjectInput struct {
- _ struct{} `locationName:"CopyObjectRequest" type:"structure"`
-
- // The canned ACL to apply to the object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
-
- // The name of the destination bucket.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
- // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
- // SSE-KMS.
- //
- // Specifying this header with a COPY action doesn’t affect bucket-level settings
- // for S3 Bucket Key.
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // Specifies presentational information for the object.
- ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
-
- // Specifies what content encodings have been applied to the object and thus
- // what decoding mechanisms must be applied to obtain the media-type referenced
- // by the Content-Type header field.
- ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // Specifies the source object for the copy operation. You specify the value
- // in one of two formats, depending on whether you want to access the source
- // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
- //
- // * For objects not accessed through an access point, specify the name of
- // the source bucket and the key of the source object, separated by a slash
- // (/). For example, to copy the object reports/january.pdf from the bucket
- // awsexamplebucket, use awsexamplebucket/reports/january.pdf. The value
- // must be URL encoded.
- //
- // * For objects accessed through access points, specify the Amazon Resource
- // Name (ARN) of the object as accessed through the access point, in the
- // format arn:aws:s3:::accesspoint//object/.
- // For example, to copy the object reports/january.pdf through access point
- // my-access-point owned by account 123456789012 in Region us-west-2, use
- // the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
- // The value must be URL encoded. Amazon S3 supports copy operations using
- // access points only when the source and destination buckets are in the
- // same AWS Region. Alternatively, for objects accessed through Amazon S3
- // on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:::outpost//object/.
- // For example, to copy the object reports/january.pdf through outpost my-outpost
- // owned by account 123456789012 in Region us-west-2, use the URL encoding
- // of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
- // The value must be URL encoded.
- //
- // To copy a specific version of an object, append ?versionId= to
- // the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
- // If you don't specify a version ID, Amazon S3 copies the latest version of
- // the source object.
- //
- // CopySource is a required field
- CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
-
- // Copies the object if its entity tag (ETag) matches the specified tag.
- CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
-
- // Copies the object if it has been modified since the specified time.
- CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
-
- // Copies the object if its entity tag (ETag) is different than the specified
- // ETag.
- CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
-
- // Copies the object if it hasn't been modified since the specified time.
- CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
-
- // Specifies the algorithm to use when decrypting the source object (for example,
- // AES256).
- CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
- // the source object. The encryption key provided in this header must be one
- // that was used when the source object was created.
- CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
-
- // The account ID of the expected destination bucket owner. If the destination
- // bucket is owned by a different account, the request will fail with an HTTP
- // 403 (Access Denied) error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The account ID of the expected source bucket owner. If the source bucket
- // is owned by a different account, the request will fail with an HTTP 403 (Access
- // Denied) error.
- ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
-
- // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to read the object data and its metadata.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the object ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to write the ACL for the applicable object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-
- // The key of the destination object.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // Specifies whether the metadata is copied from the source object or replaced
- // with metadata provided in the request.
- MetadataDirective *string `location:"header" locationName:"x-amz-metadata-directive" type:"string" enum:"MetadataDirective"`
-
- // Specifies whether you want to apply a Legal Hold to the copied object.
- ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
-
- // The Object Lock mode that you want to apply to the copied object.
- ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
-
- // The date and time when you want the copied object's Object Lock to expire.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
- // data. This value is used to store the object and then it is discarded; Amazon
- // S3 does not store the encryption key. The key must be appropriate for use
- // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // Specifies the AWS KMS Encryption Context to use for object encryption. The
- // value of this header is a base64-encoded UTF-8 string holding JSON with the
- // encryption context key-value pairs.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // Specifies the AWS KMS key ID to use for object encryption. All GET and PUT
- // requests for an object protected by AWS KMS will fail if not made via SSL
- // or using SigV4. For information about configuring using any of the officially
- // supported AWS SDKs and AWS CLI, see Specifying the Signature Version in Request
- // Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
- // in the Amazon S3 User Guide.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing this object in Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // By default, Amazon S3 uses the STANDARD Storage Class to store newly created
- // objects. The STANDARD storage class provides high durability and high availability.
- // Depending on performance needs, you can specify a different Storage Class.
- // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
- // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
- // in the Amazon S3 User Guide.
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
-
- // The tag-set for the object destination object this value must be used in
- // conjunction with the TaggingDirective. The tag-set must be encoded as URL
- // Query parameters.
- Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
-
- // Specifies whether the object tag-set are copied from the source object or
- // replaced with tag-set provided in the request.
- TaggingDirective *string `location:"header" locationName:"x-amz-tagging-directive" type:"string" enum:"TaggingDirective"`
-
- // If the bucket is configured as a website, redirects requests for this object
- // to another object in the same bucket or to an external URL. Amazon S3 stores
- // the value of this header in the object metadata.
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation
-func (s CopyObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CopyObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CopyObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CopyObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.CopySource == nil {
- invalidParams.Add(request.NewErrParamRequired("CopySource"))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *CopyObjectInput) SetACL(v string) *CopyObjectInput {
- s.ACL = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CopyObjectInput) SetBucket(v string) *CopyObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *CopyObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CopyObjectInput) SetBucketKeyEnabled(v bool) *CopyObjectInput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *CopyObjectInput) SetCacheControl(v string) *CopyObjectInput {
- s.CacheControl = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *CopyObjectInput) SetContentDisposition(v string) *CopyObjectInput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *CopyObjectInput) SetContentEncoding(v string) *CopyObjectInput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *CopyObjectInput) SetContentLanguage(v string) *CopyObjectInput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *CopyObjectInput) SetContentType(v string) *CopyObjectInput {
- s.ContentType = &v
- return s
-}
-
-// SetCopySource sets the CopySource field's value.
-func (s *CopyObjectInput) SetCopySource(v string) *CopyObjectInput {
- s.CopySource = &v
- return s
-}
-
-// SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
-func (s *CopyObjectInput) SetCopySourceIfMatch(v string) *CopyObjectInput {
- s.CopySourceIfMatch = &v
- return s
-}
-
-// SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
-func (s *CopyObjectInput) SetCopySourceIfModifiedSince(v time.Time) *CopyObjectInput {
- s.CopySourceIfModifiedSince = &v
- return s
-}
-
-// SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
-func (s *CopyObjectInput) SetCopySourceIfNoneMatch(v string) *CopyObjectInput {
- s.CopySourceIfNoneMatch = &v
- return s
-}
-
-// SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
-func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
- s.CopySourceIfUnmodifiedSince = &v
- return s
-}
-
-// SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
-func (s *CopyObjectInput) SetCopySourceSSECustomerAlgorithm(v string) *CopyObjectInput {
- s.CopySourceSSECustomerAlgorithm = &v
- return s
-}
-
-// SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
-func (s *CopyObjectInput) SetCopySourceSSECustomerKey(v string) *CopyObjectInput {
- s.CopySourceSSECustomerKey = &v
- return s
-}
-
-func (s *CopyObjectInput) getCopySourceSSECustomerKey() (v string) {
- if s.CopySourceSSECustomerKey == nil {
- return v
- }
- return *s.CopySourceSSECustomerKey
-}
-
-// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
-func (s *CopyObjectInput) SetCopySourceSSECustomerKeyMD5(v string) *CopyObjectInput {
- s.CopySourceSSECustomerKeyMD5 = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *CopyObjectInput) SetExpectedBucketOwner(v string) *CopyObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field's value.
-func (s *CopyObjectInput) SetExpectedSourceBucketOwner(v string) *CopyObjectInput {
- s.ExpectedSourceBucketOwner = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *CopyObjectInput) SetExpires(v time.Time) *CopyObjectInput {
- s.Expires = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *CopyObjectInput) SetGrantFullControl(v string) *CopyObjectInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *CopyObjectInput) SetGrantRead(v string) *CopyObjectInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *CopyObjectInput) SetGrantReadACP(v string) *CopyObjectInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *CopyObjectInput) SetGrantWriteACP(v string) *CopyObjectInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CopyObjectInput) SetKey(v string) *CopyObjectInput {
- s.Key = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *CopyObjectInput) SetMetadata(v map[string]*string) *CopyObjectInput {
- s.Metadata = v
- return s
-}
-
-// SetMetadataDirective sets the MetadataDirective field's value.
-func (s *CopyObjectInput) SetMetadataDirective(v string) *CopyObjectInput {
- s.MetadataDirective = &v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *CopyObjectInput) SetObjectLockLegalHoldStatus(v string) *CopyObjectInput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *CopyObjectInput) SetObjectLockMode(v string) *CopyObjectInput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *CopyObjectInput) SetObjectLockRetainUntilDate(v time.Time) *CopyObjectInput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *CopyObjectInput) SetRequestPayer(v string) *CopyObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CopyObjectInput) SetSSECustomerAlgorithm(v string) *CopyObjectInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *CopyObjectInput) SetSSECustomerKey(v string) *CopyObjectInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *CopyObjectInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CopyObjectInput) SetSSECustomerKeyMD5(v string) *CopyObjectInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *CopyObjectInput) SetSSEKMSEncryptionContext(v string) *CopyObjectInput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CopyObjectInput) SetSSEKMSKeyId(v string) *CopyObjectInput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CopyObjectInput) SetServerSideEncryption(v string) *CopyObjectInput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *CopyObjectInput) SetStorageClass(v string) *CopyObjectInput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *CopyObjectInput) SetTagging(v string) *CopyObjectInput {
- s.Tagging = &v
- return s
-}
-
-// SetTaggingDirective sets the TaggingDirective field's value.
-func (s *CopyObjectInput) SetTaggingDirective(v string) *CopyObjectInput {
- s.TaggingDirective = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *CopyObjectInput) SetWebsiteRedirectLocation(v string) *CopyObjectInput {
- s.WebsiteRedirectLocation = &v
- return s
-}
-
-func (s *CopyObjectInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *CopyObjectInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s CopyObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type CopyObjectOutput struct {
- _ struct{} `type:"structure" payload:"CopyObjectResult"`
-
- // Indicates whether the copied object uses an S3 Bucket Key for server-side
- // encryption with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Container for all response elements.
- CopyObjectResult *CopyObjectResult `type:"structure"`
-
- // Version of the copied object in the destination bucket.
- CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
-
- // If the object expiration is configured, the response includes this header.
- Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the AWS KMS Encryption Context to use for object encryption.
- // The value of this header is a base64-encoded UTF-8 string holding JSON with
- // the encryption context key-value pairs.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) that was used for the
- // object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing this object in Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // Version ID of the newly created copy.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation
-func (s CopyObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CopyObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CopyObjectOutput) SetBucketKeyEnabled(v bool) *CopyObjectOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCopyObjectResult sets the CopyObjectResult field's value.
-func (s *CopyObjectOutput) SetCopyObjectResult(v *CopyObjectResult) *CopyObjectOutput {
- s.CopyObjectResult = v
- return s
-}
-
-// SetCopySourceVersionId sets the CopySourceVersionId field's value.
-func (s *CopyObjectOutput) SetCopySourceVersionId(v string) *CopyObjectOutput {
- s.CopySourceVersionId = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *CopyObjectOutput) SetExpiration(v string) *CopyObjectOutput {
- s.Expiration = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *CopyObjectOutput) SetRequestCharged(v string) *CopyObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CopyObjectOutput) SetSSECustomerAlgorithm(v string) *CopyObjectOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CopyObjectOutput) SetSSECustomerKeyMD5(v string) *CopyObjectOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *CopyObjectOutput) SetSSEKMSEncryptionContext(v string) *CopyObjectOutput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CopyObjectOutput) SetSSEKMSKeyId(v string) *CopyObjectOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CopyObjectOutput) SetServerSideEncryption(v string) *CopyObjectOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *CopyObjectOutput) SetVersionId(v string) *CopyObjectOutput {
- s.VersionId = &v
- return s
-}
-
-// Container for all response elements.
-type CopyObjectResult struct {
- _ struct{} `type:"structure"`
-
- // Returns the ETag of the new object. The ETag reflects only changes to the
- // contents of an object, not its metadata. The source and destination ETag
- // is identical for a successfully copied non-multipart object.
- ETag *string `type:"string"`
-
- // Creation date of the object.
- LastModified *time.Time `type:"timestamp"`
-}
-
-// String returns the string representation
-func (s CopyObjectResult) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CopyObjectResult) GoString() string {
- return s.String()
-}
-
-// SetETag sets the ETag field's value.
-func (s *CopyObjectResult) SetETag(v string) *CopyObjectResult {
- s.ETag = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *CopyObjectResult) SetLastModified(v time.Time) *CopyObjectResult {
- s.LastModified = &v
- return s
-}
-
-// Container for all response elements.
-type CopyPartResult struct {
- _ struct{} `type:"structure"`
-
- // Entity tag of the object.
- ETag *string `type:"string"`
-
- // Date and time at which the object was uploaded.
- LastModified *time.Time `type:"timestamp"`
-}
-
-// String returns the string representation
-func (s CopyPartResult) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CopyPartResult) GoString() string {
- return s.String()
-}
-
-// SetETag sets the ETag field's value.
-func (s *CopyPartResult) SetETag(v string) *CopyPartResult {
- s.ETag = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *CopyPartResult) SetLastModified(v time.Time) *CopyPartResult {
- s.LastModified = &v
- return s
-}
-
-// The configuration information for the bucket.
-type CreateBucketConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies the Region where the bucket will be created. If you don't specify
- // a Region, the bucket is created in the US East (N. Virginia) Region (us-east-1).
- LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
-}
-
-// String returns the string representation
-func (s CreateBucketConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateBucketConfiguration) GoString() string {
- return s.String()
-}
-
-// SetLocationConstraint sets the LocationConstraint field's value.
-func (s *CreateBucketConfiguration) SetLocationConstraint(v string) *CreateBucketConfiguration {
- s.LocationConstraint = &v
- return s
-}
-
-type CreateBucketInput struct {
- _ struct{} `locationName:"CreateBucketRequest" type:"structure" payload:"CreateBucketConfiguration"`
-
- // The canned ACL to apply to the bucket.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
-
- // The name of the bucket to create.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The configuration information for the bucket.
- CreateBucketConfiguration *CreateBucketConfiguration `locationName:"CreateBucketConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // Allows grantee the read, write, read ACP, and write ACP permissions on the
- // bucket.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to list the objects in the bucket.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the bucket ACL.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to create new objects in the bucket.
- //
- // For the bucket and object owners of existing objects, also allows deletions
- // and overwrites of those objects.
- GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
-
- // Allows grantee to write the ACL for the applicable bucket.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-
- // Specifies whether you want S3 Object Lock to be enabled for the new bucket.
- ObjectLockEnabledForBucket *bool `location:"header" locationName:"x-amz-bucket-object-lock-enabled" type:"boolean"`
-}
-
-// String returns the string representation
-func (s CreateBucketInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateBucketInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateBucketInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateBucketInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *CreateBucketInput) SetACL(v string) *CreateBucketInput {
- s.ACL = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CreateBucketInput) SetBucket(v string) *CreateBucketInput {
- s.Bucket = &v
- return s
-}
-
-func (s *CreateBucketInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetCreateBucketConfiguration sets the CreateBucketConfiguration field's value.
-func (s *CreateBucketInput) SetCreateBucketConfiguration(v *CreateBucketConfiguration) *CreateBucketInput {
- s.CreateBucketConfiguration = v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *CreateBucketInput) SetGrantFullControl(v string) *CreateBucketInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *CreateBucketInput) SetGrantRead(v string) *CreateBucketInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *CreateBucketInput) SetGrantReadACP(v string) *CreateBucketInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWrite sets the GrantWrite field's value.
-func (s *CreateBucketInput) SetGrantWrite(v string) *CreateBucketInput {
- s.GrantWrite = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *CreateBucketInput) SetGrantWriteACP(v string) *CreateBucketInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetObjectLockEnabledForBucket sets the ObjectLockEnabledForBucket field's value.
-func (s *CreateBucketInput) SetObjectLockEnabledForBucket(v bool) *CreateBucketInput {
- s.ObjectLockEnabledForBucket = &v
- return s
-}
-
-type CreateBucketOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the Region where the bucket will be created. If you are creating
- // a bucket on the US East (N. Virginia) Region (us-east-1), you do not need
- // to specify the location.
- Location *string `location:"header" locationName:"Location" type:"string"`
-}
-
-// String returns the string representation
-func (s CreateBucketOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateBucketOutput) GoString() string {
- return s.String()
-}
-
-// SetLocation sets the Location field's value.
-func (s *CreateBucketOutput) SetLocation(v string) *CreateBucketOutput {
- s.Location = &v
- return s
-}
-
-type CreateMultipartUploadInput struct {
- _ struct{} `locationName:"CreateMultipartUploadRequest" type:"structure"`
-
- // The canned ACL to apply to the object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
-
- // The name of the bucket to which to initiate the upload
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
- // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
- // SSE-KMS.
- //
- // Specifying this header with an object action doesn’t affect bucket-level
- // settings for S3 Bucket Key.
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // Specifies presentational information for the object.
- ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
-
- // Specifies what content encodings have been applied to the object and thus
- // what decoding mechanisms must be applied to obtain the media-type referenced
- // by the Content-Type header field.
- ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
-
- // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to read the object data and its metadata.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the object ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to write the ACL for the applicable object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-
- // Object key for which the multipart upload is to be initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // Specifies whether you want to apply a Legal Hold to the uploaded object.
- ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
-
- // Specifies the Object Lock mode that you want to apply to the uploaded object.
- ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
-
- // Specifies the date and time when you want the Object Lock to expire.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
- // data. This value is used to store the object and then it is discarded; Amazon
- // S3 does not store the encryption key. The key must be appropriate for use
- // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // Specifies the AWS KMS Encryption Context to use for object encryption. The
- // value of this header is a base64-encoded UTF-8 string holding JSON with the
- // encryption context key-value pairs.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // Specifies the ID of the symmetric customer managed AWS KMS CMK to use for
- // object encryption. All GET and PUT requests for an object protected by AWS
- // KMS will fail if not made via SSL or using SigV4. For information about configuring
- // using any of the officially supported AWS SDKs and AWS CLI, see Specifying
- // the Signature Version in Request Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingAWSSDK.html#specify-signature-version)
- // in the Amazon S3 User Guide.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing this object in Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // By default, Amazon S3 uses the STANDARD Storage Class to store newly created
- // objects. The STANDARD storage class provides high durability and high availability.
- // Depending on performance needs, you can specify a different Storage Class.
- // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
- // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
- // in the Amazon S3 User Guide.
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
-
- // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
- Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
-
- // If the bucket is configured as a website, redirects requests for this object
- // to another object in the same bucket or to an external URL. Amazon S3 stores
- // the value of this header in the object metadata.
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation
-func (s CreateMultipartUploadInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateMultipartUploadInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateMultipartUploadInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateMultipartUploadInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *CreateMultipartUploadInput) SetACL(v string) *CreateMultipartUploadInput {
- s.ACL = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CreateMultipartUploadInput) SetBucket(v string) *CreateMultipartUploadInput {
- s.Bucket = &v
- return s
-}
-
-func (s *CreateMultipartUploadInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CreateMultipartUploadInput) SetBucketKeyEnabled(v bool) *CreateMultipartUploadInput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *CreateMultipartUploadInput) SetCacheControl(v string) *CreateMultipartUploadInput {
- s.CacheControl = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *CreateMultipartUploadInput) SetContentDisposition(v string) *CreateMultipartUploadInput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *CreateMultipartUploadInput) SetContentEncoding(v string) *CreateMultipartUploadInput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *CreateMultipartUploadInput) SetContentLanguage(v string) *CreateMultipartUploadInput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *CreateMultipartUploadInput) SetContentType(v string) *CreateMultipartUploadInput {
- s.ContentType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *CreateMultipartUploadInput) SetExpectedBucketOwner(v string) *CreateMultipartUploadInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *CreateMultipartUploadInput) SetExpires(v time.Time) *CreateMultipartUploadInput {
- s.Expires = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *CreateMultipartUploadInput) SetGrantFullControl(v string) *CreateMultipartUploadInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *CreateMultipartUploadInput) SetGrantRead(v string) *CreateMultipartUploadInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *CreateMultipartUploadInput) SetGrantReadACP(v string) *CreateMultipartUploadInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *CreateMultipartUploadInput) SetGrantWriteACP(v string) *CreateMultipartUploadInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CreateMultipartUploadInput) SetKey(v string) *CreateMultipartUploadInput {
- s.Key = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *CreateMultipartUploadInput) SetMetadata(v map[string]*string) *CreateMultipartUploadInput {
- s.Metadata = v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *CreateMultipartUploadInput) SetObjectLockLegalHoldStatus(v string) *CreateMultipartUploadInput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *CreateMultipartUploadInput) SetObjectLockMode(v string) *CreateMultipartUploadInput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *CreateMultipartUploadInput) SetObjectLockRetainUntilDate(v time.Time) *CreateMultipartUploadInput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *CreateMultipartUploadInput) SetRequestPayer(v string) *CreateMultipartUploadInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CreateMultipartUploadInput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *CreateMultipartUploadInput) SetSSECustomerKey(v string) *CreateMultipartUploadInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *CreateMultipartUploadInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CreateMultipartUploadInput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *CreateMultipartUploadInput) SetSSEKMSEncryptionContext(v string) *CreateMultipartUploadInput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CreateMultipartUploadInput) SetSSEKMSKeyId(v string) *CreateMultipartUploadInput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CreateMultipartUploadInput) SetServerSideEncryption(v string) *CreateMultipartUploadInput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *CreateMultipartUploadInput) SetStorageClass(v string) *CreateMultipartUploadInput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *CreateMultipartUploadInput) SetTagging(v string) *CreateMultipartUploadInput {
- s.Tagging = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *CreateMultipartUploadInput) SetWebsiteRedirectLocation(v string) *CreateMultipartUploadInput {
- s.WebsiteRedirectLocation = &v
- return s
-}
-
-func (s *CreateMultipartUploadInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *CreateMultipartUploadInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s CreateMultipartUploadInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type CreateMultipartUploadOutput struct {
- _ struct{} `type:"structure"`
-
- // If the bucket has a lifecycle rule configured with an action to abort incomplete
- // multipart uploads and the prefix in the lifecycle rule matches the object
- // name in the request, the response includes this header. The header indicates
- // when the initiated multipart upload becomes eligible for an abort operation.
- // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
- // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
- //
- // The response also includes the x-amz-abort-rule-id header that provides the
- // ID of the lifecycle configuration rule that defines this action.
- AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
-
- // This header is returned along with the x-amz-abort-date header. It identifies
- // the applicable lifecycle configuration rule that defines the action to abort
- // incomplete multipart uploads.
- AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
-
- // The name of the bucket to which the multipart upload was initiated.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- Bucket *string `locationName:"Bucket" type:"string"`
-
- // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Object key for which the multipart upload was initiated.
- Key *string `min:"1" type:"string"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the AWS KMS Encryption Context to use for object encryption.
- // The value of this header is a base64-encoded UTF-8 string holding JSON with
- // the encryption context key-value pairs.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) that was used for the
- // object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing this object in Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // ID for the initiated multipart upload.
- UploadId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s CreateMultipartUploadOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateMultipartUploadOutput) GoString() string {
- return s.String()
-}
-
-// SetAbortDate sets the AbortDate field's value.
-func (s *CreateMultipartUploadOutput) SetAbortDate(v time.Time) *CreateMultipartUploadOutput {
- s.AbortDate = &v
- return s
-}
-
-// SetAbortRuleId sets the AbortRuleId field's value.
-func (s *CreateMultipartUploadOutput) SetAbortRuleId(v string) *CreateMultipartUploadOutput {
- s.AbortRuleId = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *CreateMultipartUploadOutput) SetBucket(v string) *CreateMultipartUploadOutput {
- s.Bucket = &v
- return s
-}
-
-func (s *CreateMultipartUploadOutput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *CreateMultipartUploadOutput) SetBucketKeyEnabled(v bool) *CreateMultipartUploadOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *CreateMultipartUploadOutput) SetKey(v string) *CreateMultipartUploadOutput {
- s.Key = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *CreateMultipartUploadOutput) SetRequestCharged(v string) *CreateMultipartUploadOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *CreateMultipartUploadOutput) SetSSECustomerAlgorithm(v string) *CreateMultipartUploadOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *CreateMultipartUploadOutput) SetSSECustomerKeyMD5(v string) *CreateMultipartUploadOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *CreateMultipartUploadOutput) SetSSEKMSEncryptionContext(v string) *CreateMultipartUploadOutput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *CreateMultipartUploadOutput) SetSSEKMSKeyId(v string) *CreateMultipartUploadOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *CreateMultipartUploadOutput) SetServerSideEncryption(v string) *CreateMultipartUploadOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *CreateMultipartUploadOutput) SetUploadId(v string) *CreateMultipartUploadOutput {
- s.UploadId = &v
- return s
-}
-
-// The container element for specifying the default Object Lock retention settings
-// for new objects placed in the specified bucket.
-//
-// * The DefaultRetention settings require both a mode and a period.
-//
-// * The DefaultRetention period can be either Days or Years but you must
-// select one. You cannot specify Days and Years at the same time.
-type DefaultRetention struct {
- _ struct{} `type:"structure"`
-
- // The number of days that you want to specify for the default retention period.
- // Must be used with Mode.
- Days *int64 `type:"integer"`
-
- // The default Object Lock retention mode you want to apply to new objects placed
- // in the specified bucket. Must be used with either Days or Years.
- Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
-
- // The number of years that you want to specify for the default retention period.
- // Must be used with Mode.
- Years *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s DefaultRetention) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DefaultRetention) GoString() string {
- return s.String()
-}
-
-// SetDays sets the Days field's value.
-func (s *DefaultRetention) SetDays(v int64) *DefaultRetention {
- s.Days = &v
- return s
-}
-
-// SetMode sets the Mode field's value.
-func (s *DefaultRetention) SetMode(v string) *DefaultRetention {
- s.Mode = &v
- return s
-}
-
-// SetYears sets the Years field's value.
-func (s *DefaultRetention) SetYears(v int64) *DefaultRetention {
- s.Years = &v
- return s
-}
-
-// Container for the objects to delete.
-type Delete struct {
- _ struct{} `type:"structure"`
-
- // The objects to delete.
- //
- // Objects is a required field
- Objects []*ObjectIdentifier `locationName:"Object" type:"list" flattened:"true" required:"true"`
-
- // Element to enable quiet mode for the request. When you add this element,
- // you must set its value to true.
- Quiet *bool `type:"boolean"`
-}
-
-// String returns the string representation
-func (s Delete) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Delete) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Delete) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Delete"}
- if s.Objects == nil {
- invalidParams.Add(request.NewErrParamRequired("Objects"))
- }
- if s.Objects != nil {
- for i, v := range s.Objects {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Objects", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetObjects sets the Objects field's value.
-func (s *Delete) SetObjects(v []*ObjectIdentifier) *Delete {
- s.Objects = v
- return s
-}
-
-// SetQuiet sets the Quiet field's value.
-func (s *Delete) SetQuiet(v bool) *Delete {
- s.Quiet = &v
- return s
-}
-
-type DeleteBucketAnalyticsConfigurationInput struct {
- _ struct{} `locationName:"DeleteBucketAnalyticsConfigurationRequest" type:"structure"`
-
- // The name of the bucket from which an analytics configuration is deleted.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID that identifies the analytics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeleteBucketAnalyticsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketAnalyticsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketAnalyticsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketAnalyticsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketAnalyticsConfigurationInput) SetBucket(v string) *DeleteBucketAnalyticsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketAnalyticsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketAnalyticsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteBucketAnalyticsConfigurationInput) SetId(v string) *DeleteBucketAnalyticsConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *DeleteBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketAnalyticsConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketAnalyticsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketAnalyticsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketCorsInput struct {
- _ struct{} `locationName:"DeleteBucketCorsRequest" type:"structure"`
-
- // Specifies the bucket whose cors configuration is being deleted.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketCorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketCorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketCorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketCorsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketCorsInput) SetBucket(v string) *DeleteBucketCorsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketCorsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketCorsInput) SetExpectedBucketOwner(v string) *DeleteBucketCorsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketCorsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketCorsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketCorsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketCorsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketCorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketCorsOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketEncryptionInput struct {
- _ struct{} `locationName:"DeleteBucketEncryptionRequest" type:"structure"`
-
- // The name of the bucket containing the server-side encryption configuration
- // to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketEncryptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketEncryptionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketEncryptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketEncryptionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketEncryptionInput) SetBucket(v string) *DeleteBucketEncryptionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketEncryptionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketEncryptionInput) SetExpectedBucketOwner(v string) *DeleteBucketEncryptionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketEncryptionInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketEncryptionOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketEncryptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketEncryptionOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketInput struct {
- _ struct{} `locationName:"DeleteBucketRequest" type:"structure"`
-
- // Specifies the bucket being deleted.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketInput) SetBucket(v string) *DeleteBucketInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketInput) SetExpectedBucketOwner(v string) *DeleteBucketInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketIntelligentTieringConfigurationInput struct {
- _ struct{} `locationName:"DeleteBucketIntelligentTieringConfigurationRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose configuration you want to modify or
- // retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ID used to identify the S3 Intelligent-Tiering configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeleteBucketIntelligentTieringConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketIntelligentTieringConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketIntelligentTieringConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketIntelligentTieringConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketIntelligentTieringConfigurationInput) SetBucket(v string) *DeleteBucketIntelligentTieringConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteBucketIntelligentTieringConfigurationInput) SetId(v string) *DeleteBucketIntelligentTieringConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *DeleteBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketIntelligentTieringConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketIntelligentTieringConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketIntelligentTieringConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketInventoryConfigurationInput struct {
- _ struct{} `locationName:"DeleteBucketInventoryConfigurationRequest" type:"structure"`
-
- // The name of the bucket containing the inventory configuration to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the inventory configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeleteBucketInventoryConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketInventoryConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketInventoryConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketInventoryConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketInventoryConfigurationInput) SetBucket(v string) *DeleteBucketInventoryConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketInventoryConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketInventoryConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteBucketInventoryConfigurationInput) SetId(v string) *DeleteBucketInventoryConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *DeleteBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketInventoryConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketInventoryConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketInventoryConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketInventoryConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketLifecycleInput struct {
- _ struct{} `locationName:"DeleteBucketLifecycleRequest" type:"structure"`
-
- // The bucket name of the lifecycle to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketLifecycleInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketLifecycleInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketLifecycleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketLifecycleInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketLifecycleInput) SetBucket(v string) *DeleteBucketLifecycleInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketLifecycleInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketLifecycleInput) SetExpectedBucketOwner(v string) *DeleteBucketLifecycleInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketLifecycleInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketLifecycleOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketLifecycleOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketLifecycleOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketMetricsConfigurationInput struct {
- _ struct{} `locationName:"DeleteBucketMetricsConfigurationRequest" type:"structure"`
-
- // The name of the bucket containing the metrics configuration to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the metrics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeleteBucketMetricsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketMetricsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketMetricsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketMetricsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketMetricsConfigurationInput) SetBucket(v string) *DeleteBucketMetricsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketMetricsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *DeleteBucketMetricsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteBucketMetricsConfigurationInput) SetId(v string) *DeleteBucketMetricsConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *DeleteBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketMetricsConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketMetricsConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketMetricsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketMetricsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketOwnershipControlsInput struct {
- _ struct{} `locationName:"DeleteBucketOwnershipControlsRequest" type:"structure"`
-
- // The Amazon S3 bucket whose OwnershipControls you want to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketOwnershipControlsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketOwnershipControlsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketOwnershipControlsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketOwnershipControlsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketOwnershipControlsInput) SetBucket(v string) *DeleteBucketOwnershipControlsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketOwnershipControlsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *DeleteBucketOwnershipControlsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketOwnershipControlsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketOwnershipControlsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketOwnershipControlsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketOwnershipControlsOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketPolicyInput struct {
- _ struct{} `locationName:"DeleteBucketPolicyRequest" type:"structure"`
-
- // The bucket name.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketPolicyInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketPolicyInput) SetBucket(v string) *DeleteBucketPolicyInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketPolicyInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketPolicyInput) SetExpectedBucketOwner(v string) *DeleteBucketPolicyInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketPolicyInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketPolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketPolicyOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketReplicationInput struct {
- _ struct{} `locationName:"DeleteBucketReplicationRequest" type:"structure"`
-
- // The bucket name.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketReplicationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketReplicationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketReplicationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketReplicationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketReplicationInput) SetBucket(v string) *DeleteBucketReplicationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketReplicationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketReplicationInput) SetExpectedBucketOwner(v string) *DeleteBucketReplicationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketReplicationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketReplicationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketReplicationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketReplicationOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketTaggingInput struct {
- _ struct{} `locationName:"DeleteBucketTaggingRequest" type:"structure"`
-
- // The bucket that has the tag set to be removed.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketTaggingInput) SetBucket(v string) *DeleteBucketTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketTaggingInput) SetExpectedBucketOwner(v string) *DeleteBucketTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketTaggingInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketTaggingOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketTaggingOutput) GoString() string {
- return s.String()
-}
-
-type DeleteBucketWebsiteInput struct {
- _ struct{} `locationName:"DeleteBucketWebsiteRequest" type:"structure"`
-
- // The bucket name for which you want to remove the website configuration.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteBucketWebsiteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketWebsiteInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteBucketWebsiteInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteBucketWebsiteInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteBucketWebsiteInput) SetBucket(v string) *DeleteBucketWebsiteInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteBucketWebsiteInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteBucketWebsiteInput) SetExpectedBucketOwner(v string) *DeleteBucketWebsiteInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeleteBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteBucketWebsiteInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteBucketWebsiteOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteBucketWebsiteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteBucketWebsiteOutput) GoString() string {
- return s.String()
-}
-
-// Information about the delete marker.
-type DeleteMarkerEntry struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether the object is (true) or is not (false) the latest version
- // of an object.
- IsLatest *bool `type:"boolean"`
-
- // The object key.
- Key *string `min:"1" type:"string"`
-
- // Date and time the object was last modified.
- LastModified *time.Time `type:"timestamp"`
-
- // The account that created the delete marker.>
- Owner *Owner `type:"structure"`
-
- // Version ID of an object.
- VersionId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteMarkerEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteMarkerEntry) GoString() string {
- return s.String()
-}
-
-// SetIsLatest sets the IsLatest field's value.
-func (s *DeleteMarkerEntry) SetIsLatest(v bool) *DeleteMarkerEntry {
- s.IsLatest = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *DeleteMarkerEntry) SetKey(v string) *DeleteMarkerEntry {
- s.Key = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *DeleteMarkerEntry) SetLastModified(v time.Time) *DeleteMarkerEntry {
- s.LastModified = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *DeleteMarkerEntry) SetOwner(v *Owner) *DeleteMarkerEntry {
- s.Owner = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteMarkerEntry) SetVersionId(v string) *DeleteMarkerEntry {
- s.VersionId = &v
- return s
-}
-
-// Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
-// in your replication configuration, you must also include a DeleteMarkerReplication
-// element. If your Filter includes a Tag element, the DeleteMarkerReplication
-// Status must be set to Disabled, because Amazon S3 does not support replicating
-// delete markers for tag-based rules. For an example configuration, see Basic
-// Rule Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
-//
-// For more information about delete marker replication, see Basic Rule Configuration
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
-//
-// If you are using an earlier version of the replication configuration, Amazon
-// S3 handles replication of delete markers differently. For more information,
-// see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
-type DeleteMarkerReplication struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether to replicate delete markers.
- //
- // Indicates whether to replicate delete markers.
- Status *string `type:"string" enum:"DeleteMarkerReplicationStatus"`
-}
-
-// String returns the string representation
-func (s DeleteMarkerReplication) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteMarkerReplication) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *DeleteMarkerReplication) SetStatus(v string) *DeleteMarkerReplication {
- s.Status = &v
- return s
-}
-
-type DeleteObjectInput struct {
- _ struct{} `locationName:"DeleteObjectRequest" type:"structure"`
-
- // The bucket name of the bucket containing the object.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates whether S3 Object Lock should bypass Governance-mode restrictions
- // to process this operation.
- BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Key name of the object to delete.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // The concatenation of the authentication device's serial number, a space,
- // and the value that is displayed on your authentication device. Required to
- // permanently delete a versioned object if versioning is configured with MFA
- // delete enabled.
- MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteObjectInput) SetBucket(v string) *DeleteObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
-func (s *DeleteObjectInput) SetBypassGovernanceRetention(v bool) *DeleteObjectInput {
- s.BypassGovernanceRetention = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteObjectInput) SetExpectedBucketOwner(v string) *DeleteObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *DeleteObjectInput) SetKey(v string) *DeleteObjectInput {
- s.Key = &v
- return s
-}
-
-// SetMFA sets the MFA field's value.
-func (s *DeleteObjectInput) SetMFA(v string) *DeleteObjectInput {
- s.MFA = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *DeleteObjectInput) SetRequestPayer(v string) *DeleteObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteObjectInput) SetVersionId(v string) *DeleteObjectInput {
- s.VersionId = &v
- return s
-}
-
-func (s *DeleteObjectInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteObjectInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteObjectOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether the versioned object that was permanently deleted was (true)
- // or was not (false) a delete marker.
- DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // Returns the version ID of the delete marker created as a result of the DELETE
- // operation.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *DeleteObjectOutput) SetDeleteMarker(v bool) *DeleteObjectOutput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *DeleteObjectOutput) SetRequestCharged(v string) *DeleteObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteObjectOutput) SetVersionId(v string) *DeleteObjectOutput {
- s.VersionId = &v
- return s
-}
-
-type DeleteObjectTaggingInput struct {
- _ struct{} `locationName:"DeleteObjectTaggingRequest" type:"structure"`
-
- // The bucket name containing the objects from which to remove the tags.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key that identifies the object in the bucket from which to remove all
- // tags.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // The versionId of the object that the tag-set will be removed from.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteObjectTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteObjectTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteObjectTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteObjectTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteObjectTaggingInput) SetBucket(v string) *DeleteObjectTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteObjectTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteObjectTaggingInput) SetExpectedBucketOwner(v string) *DeleteObjectTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *DeleteObjectTaggingInput) SetKey(v string) *DeleteObjectTaggingInput {
- s.Key = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteObjectTaggingInput) SetVersionId(v string) *DeleteObjectTaggingInput {
- s.VersionId = &v
- return s
-}
-
-func (s *DeleteObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteObjectTaggingInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteObjectTaggingOutput struct {
- _ struct{} `type:"structure"`
-
- // The versionId of the object the tag-set was removed from.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteObjectTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteObjectTaggingOutput) GoString() string {
- return s.String()
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeleteObjectTaggingOutput) SetVersionId(v string) *DeleteObjectTaggingOutput {
- s.VersionId = &v
- return s
-}
-
-type DeleteObjectsInput struct {
- _ struct{} `locationName:"DeleteObjectsRequest" type:"structure" payload:"Delete"`
-
- // The bucket name containing the objects to delete.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies whether you want to delete this object even if it has a Governance-type
- // Object Lock in place. You must have sufficient permissions to perform this
- // operation.
- BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
-
- // Container for the request.
- //
- // Delete is a required field
- Delete *Delete `locationName:"Delete" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The concatenation of the authentication device's serial number, a space,
- // and the value that is displayed on your authentication device. Required to
- // permanently delete a versioned object if versioning is configured with MFA
- // delete enabled.
- MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-}
-
-// String returns the string representation
-func (s DeleteObjectsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteObjectsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteObjectsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteObjectsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Delete == nil {
- invalidParams.Add(request.NewErrParamRequired("Delete"))
- }
- if s.Delete != nil {
- if err := s.Delete.Validate(); err != nil {
- invalidParams.AddNested("Delete", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeleteObjectsInput) SetBucket(v string) *DeleteObjectsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeleteObjectsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
-func (s *DeleteObjectsInput) SetBypassGovernanceRetention(v bool) *DeleteObjectsInput {
- s.BypassGovernanceRetention = &v
- return s
-}
-
-// SetDelete sets the Delete field's value.
-func (s *DeleteObjectsInput) SetDelete(v *Delete) *DeleteObjectsInput {
- s.Delete = v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeleteObjectsInput) SetExpectedBucketOwner(v string) *DeleteObjectsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetMFA sets the MFA field's value.
-func (s *DeleteObjectsInput) SetMFA(v string) *DeleteObjectsInput {
- s.MFA = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *DeleteObjectsInput) SetRequestPayer(v string) *DeleteObjectsInput {
- s.RequestPayer = &v
- return s
-}
-
-func (s *DeleteObjectsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeleteObjectsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeleteObjectsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeleteObjectsOutput struct {
- _ struct{} `type:"structure"`
-
- // Container element for a successful delete. It identifies the object that
- // was successfully deleted.
- Deleted []*DeletedObject `type:"list" flattened:"true"`
-
- // Container for a failed delete action that describes the object that Amazon
- // S3 attempted to delete and the error it encountered.
- Errors []*Error `locationName:"Error" type:"list" flattened:"true"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation
-func (s DeleteObjectsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteObjectsOutput) GoString() string {
- return s.String()
-}
-
-// SetDeleted sets the Deleted field's value.
-func (s *DeleteObjectsOutput) SetDeleted(v []*DeletedObject) *DeleteObjectsOutput {
- s.Deleted = v
- return s
-}
-
-// SetErrors sets the Errors field's value.
-func (s *DeleteObjectsOutput) SetErrors(v []*Error) *DeleteObjectsOutput {
- s.Errors = v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *DeleteObjectsOutput) SetRequestCharged(v string) *DeleteObjectsOutput {
- s.RequestCharged = &v
- return s
-}
-
-type DeletePublicAccessBlockInput struct {
- _ struct{} `locationName:"DeletePublicAccessBlockRequest" type:"structure"`
-
- // The Amazon S3 bucket whose PublicAccessBlock configuration you want to delete.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s DeletePublicAccessBlockInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletePublicAccessBlockInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeletePublicAccessBlockInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeletePublicAccessBlockInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *DeletePublicAccessBlockInput) SetBucket(v string) *DeletePublicAccessBlockInput {
- s.Bucket = &v
- return s
-}
-
-func (s *DeletePublicAccessBlockInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *DeletePublicAccessBlockInput) SetExpectedBucketOwner(v string) *DeletePublicAccessBlockInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *DeletePublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *DeletePublicAccessBlockInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s DeletePublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type DeletePublicAccessBlockOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeletePublicAccessBlockOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletePublicAccessBlockOutput) GoString() string {
- return s.String()
-}
-
-// Information about the deleted object.
-type DeletedObject struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether the versioned object that was permanently deleted was (true)
- // or was not (false) a delete marker. In a simple DELETE, this header indicates
- // whether (true) or not (false) a delete marker was created.
- DeleteMarker *bool `type:"boolean"`
-
- // The version ID of the delete marker created as a result of the DELETE operation.
- // If you delete a specific object version, the value returned by this header
- // is the version ID of the object version deleted.
- DeleteMarkerVersionId *string `type:"string"`
-
- // The name of the deleted object.
- Key *string `min:"1" type:"string"`
-
- // The version ID of the deleted object.
- VersionId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s DeletedObject) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletedObject) GoString() string {
- return s.String()
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *DeletedObject) SetDeleteMarker(v bool) *DeletedObject {
- s.DeleteMarker = &v
- return s
-}
-
-// SetDeleteMarkerVersionId sets the DeleteMarkerVersionId field's value.
-func (s *DeletedObject) SetDeleteMarkerVersionId(v string) *DeletedObject {
- s.DeleteMarkerVersionId = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *DeletedObject) SetKey(v string) *DeletedObject {
- s.Key = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *DeletedObject) SetVersionId(v string) *DeletedObject {
- s.VersionId = &v
- return s
-}
-
-// Specifies information about where to publish analysis or configuration results
-// for an Amazon S3 bucket and S3 Replication Time Control (S3 RTC).
-type Destination struct {
- _ struct{} `type:"structure"`
-
- // Specify this only in a cross-account scenario (where source and destination
- // bucket owners are not the same), and you want to change replica ownership
- // to the AWS account that owns the destination bucket. If this is not specified
- // in the replication configuration, the replicas are owned by same AWS account
- // that owns the source object.
- AccessControlTranslation *AccessControlTranslation `type:"structure"`
-
- // Destination bucket owner account ID. In a cross-account scenario, if you
- // direct Amazon S3 to change replica ownership to the AWS account that owns
- // the destination bucket by specifying the AccessControlTranslation property,
- // this is the account ID of the destination bucket owner. For more information,
- // see Replication Additional Configuration: Changing the Replica Owner (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-change-owner.html)
- // in the Amazon S3 User Guide.
- Account *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the bucket where you want Amazon S3 to
- // store the results.
- //
- // Bucket is a required field
- Bucket *string `type:"string" required:"true"`
-
- // A container that provides information about encryption. If SourceSelectionCriteria
- // is specified, you must specify this element.
- EncryptionConfiguration *EncryptionConfiguration `type:"structure"`
-
- // A container specifying replication metrics-related settings enabling replication
- // metrics and events.
- Metrics *Metrics `type:"structure"`
-
- // A container specifying S3 Replication Time Control (S3 RTC), including whether
- // S3 RTC is enabled and the time when all objects and operations on objects
- // must be replicated. Must be specified together with a Metrics block.
- ReplicationTime *ReplicationTime `type:"structure"`
-
- // The storage class to use when replicating objects, such as S3 Standard or
- // reduced redundancy. By default, Amazon S3 uses the storage class of the source
- // object to create the object replica.
- //
- // For valid values, see the StorageClass element of the PUT Bucket replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTreplication.html)
- // action in the Amazon S3 API Reference.
- StorageClass *string `type:"string" enum:"StorageClass"`
-}
-
-// String returns the string representation
-func (s Destination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Destination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Destination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Destination"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.AccessControlTranslation != nil {
- if err := s.AccessControlTranslation.Validate(); err != nil {
- invalidParams.AddNested("AccessControlTranslation", err.(request.ErrInvalidParams))
- }
- }
- if s.Metrics != nil {
- if err := s.Metrics.Validate(); err != nil {
- invalidParams.AddNested("Metrics", err.(request.ErrInvalidParams))
- }
- }
- if s.ReplicationTime != nil {
- if err := s.ReplicationTime.Validate(); err != nil {
- invalidParams.AddNested("ReplicationTime", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessControlTranslation sets the AccessControlTranslation field's value.
-func (s *Destination) SetAccessControlTranslation(v *AccessControlTranslation) *Destination {
- s.AccessControlTranslation = v
- return s
-}
-
-// SetAccount sets the Account field's value.
-func (s *Destination) SetAccount(v string) *Destination {
- s.Account = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *Destination) SetBucket(v string) *Destination {
- s.Bucket = &v
- return s
-}
-
-func (s *Destination) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetEncryptionConfiguration sets the EncryptionConfiguration field's value.
-func (s *Destination) SetEncryptionConfiguration(v *EncryptionConfiguration) *Destination {
- s.EncryptionConfiguration = v
- return s
-}
-
-// SetMetrics sets the Metrics field's value.
-func (s *Destination) SetMetrics(v *Metrics) *Destination {
- s.Metrics = v
- return s
-}
-
-// SetReplicationTime sets the ReplicationTime field's value.
-func (s *Destination) SetReplicationTime(v *ReplicationTime) *Destination {
- s.ReplicationTime = v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *Destination) SetStorageClass(v string) *Destination {
- s.StorageClass = &v
- return s
-}
-
-// Contains the type of server-side encryption used.
-type Encryption struct {
- _ struct{} `type:"structure"`
-
- // The server-side encryption algorithm used when storing job results in Amazon
- // S3 (for example, AES256, aws:kms).
- //
- // EncryptionType is a required field
- EncryptionType *string `type:"string" required:"true" enum:"ServerSideEncryption"`
-
- // If the encryption type is aws:kms, this optional value can be used to specify
- // the encryption context for the restore results.
- KMSContext *string `type:"string"`
-
- // If the encryption type is aws:kms, this optional value specifies the ID of
- // the symmetric customer managed AWS KMS CMK to use for encryption of job results.
- // Amazon S3 only supports symmetric CMKs. For more information, see Using symmetric
- // and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
- // in the AWS Key Management Service Developer Guide.
- KMSKeyId *string `type:"string" sensitive:"true"`
-}
-
-// String returns the string representation
-func (s Encryption) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Encryption) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Encryption) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Encryption"}
- if s.EncryptionType == nil {
- invalidParams.Add(request.NewErrParamRequired("EncryptionType"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncryptionType sets the EncryptionType field's value.
-func (s *Encryption) SetEncryptionType(v string) *Encryption {
- s.EncryptionType = &v
- return s
-}
-
-// SetKMSContext sets the KMSContext field's value.
-func (s *Encryption) SetKMSContext(v string) *Encryption {
- s.KMSContext = &v
- return s
-}
-
-// SetKMSKeyId sets the KMSKeyId field's value.
-func (s *Encryption) SetKMSKeyId(v string) *Encryption {
- s.KMSKeyId = &v
- return s
-}
-
-// Specifies encryption-related information for an Amazon S3 bucket that is
-// a destination for replicated objects.
-type EncryptionConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies the ID (Key ARN or Alias ARN) of the customer managed AWS KMS key
- // stored in AWS Key Management Service (KMS) for the destination bucket. Amazon
- // S3 uses this key to encrypt replica objects. Amazon S3 only supports symmetric,
- // customer managed KMS keys. For more information, see Using symmetric and
- // asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
- // in the AWS Key Management Service Developer Guide.
- ReplicaKmsKeyID *string `type:"string"`
-}
-
-// String returns the string representation
-func (s EncryptionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EncryptionConfiguration) GoString() string {
- return s.String()
-}
-
-// SetReplicaKmsKeyID sets the ReplicaKmsKeyID field's value.
-func (s *EncryptionConfiguration) SetReplicaKmsKeyID(v string) *EncryptionConfiguration {
- s.ReplicaKmsKeyID = &v
- return s
-}
-
-// A message that indicates the request is complete and no more messages will
-// be sent. You should not assume that the request is complete until the client
-// receives an EndEvent.
-type EndEvent struct {
- _ struct{} `locationName:"EndEvent" type:"structure"`
-}
-
-// String returns the string representation
-func (s EndEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s EndEvent) GoString() string {
- return s.String()
-}
-
-// The EndEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *EndEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the EndEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *EndEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-func (s *EndEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
- msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
- return msg, err
-}
-
-// Container for all error elements.
-type Error struct {
- _ struct{} `type:"structure"`
-
- // The error code is a string that uniquely identifies an error condition. It
- // is meant to be read and understood by programs that detect and handle errors
- // by type.
- //
- // Amazon S3 error codes
- //
- // * Code: AccessDenied Description: Access Denied HTTP Status Code: 403
- // Forbidden SOAP Fault Code Prefix: Client
- //
- // * Code: AccountProblem Description: There is a problem with your AWS account
- // that prevents the action from completing successfully. Contact AWS Support
- // for further assistance. HTTP Status Code: 403 Forbidden SOAP Fault Code
- // Prefix: Client
- //
- // * Code: AllAccessDisabled Description: All access to this Amazon S3 resource
- // has been disabled. Contact AWS Support for further assistance. HTTP Status
- // Code: 403 Forbidden SOAP Fault Code Prefix: Client
- //
- // * Code: AmbiguousGrantByEmailAddress Description: The email address you
- // provided is associated with more than one account. HTTP Status Code: 400
- // Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: AuthorizationHeaderMalformed Description: The authorization header
- // you provided is invalid. HTTP Status Code: 400 Bad Request HTTP Status
- // Code: N/A
- //
- // * Code: BadDigest Description: The Content-MD5 you specified did not match
- // what we received. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
- // Client
- //
- // * Code: BucketAlreadyExists Description: The requested bucket name is
- // not available. The bucket namespace is shared by all users of the system.
- // Please select a different name and try again. HTTP Status Code: 409 Conflict
- // SOAP Fault Code Prefix: Client
- //
- // * Code: BucketAlreadyOwnedByYou Description: The bucket you tried to create
- // already exists, and you own it. Amazon S3 returns this error in all AWS
- // Regions except in the North Virginia Region. For legacy compatibility,
- // if you re-create an existing bucket that you already own in the North
- // Virginia Region, Amazon S3 returns 200 OK and resets the bucket access
- // control lists (ACLs). Code: 409 Conflict (in all Regions except the North
- // Virginia Region) SOAP Fault Code Prefix: Client
- //
- // * Code: BucketNotEmpty Description: The bucket you tried to delete is
- // not empty. HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client
- //
- // * Code: CredentialsNotSupported Description: This request does not support
- // credentials. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
- // Client
- //
- // * Code: CrossLocationLoggingProhibited Description: Cross-location logging
- // not allowed. Buckets in one geographic location cannot log information
- // to a bucket in another location. HTTP Status Code: 403 Forbidden SOAP
- // Fault Code Prefix: Client
- //
- // * Code: EntityTooSmall Description: Your proposed upload is smaller than
- // the minimum allowed object size. HTTP Status Code: 400 Bad Request SOAP
- // Fault Code Prefix: Client
- //
- // * Code: EntityTooLarge Description: Your proposed upload exceeds the maximum
- // allowed object size. HTTP Status Code: 400 Bad Request SOAP Fault Code
- // Prefix: Client
- //
- // * Code: ExpiredToken Description: The provided token has expired. HTTP
- // Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: IllegalVersioningConfigurationException Description: Indicates
- // that the versioning configuration specified in the request is invalid.
- // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: IncompleteBody Description: You did not provide the number of
- // bytes specified by the Content-Length HTTP header HTTP Status Code: 400
- // Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: IncorrectNumberOfFilesInPostRequest Description: POST requires
- // exactly one file upload per request. HTTP Status Code: 400 Bad Request
- // SOAP Fault Code Prefix: Client
- //
- // * Code: InlineDataTooLarge Description: Inline data exceeds the maximum
- // allowed size. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
- // Client
- //
- // * Code: InternalError Description: We encountered an internal error. Please
- // try again. HTTP Status Code: 500 Internal Server Error SOAP Fault Code
- // Prefix: Server
- //
- // * Code: InvalidAccessKeyId Description: The AWS access key ID you provided
- // does not exist in our records. HTTP Status Code: 403 Forbidden SOAP Fault
- // Code Prefix: Client
- //
- // * Code: InvalidAddressingHeader Description: You must specify the Anonymous
- // role. HTTP Status Code: N/A SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidArgument Description: Invalid Argument HTTP Status Code:
- // 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidBucketName Description: The specified bucket is not valid.
- // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidBucketState Description: The request is not valid with
- // the current state of the bucket. HTTP Status Code: 409 Conflict SOAP Fault
- // Code Prefix: Client
- //
- // * Code: InvalidDigest Description: The Content-MD5 you specified is not
- // valid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidEncryptionAlgorithmError Description: The encryption request
- // you specified is not valid. The valid value is AES256. HTTP Status Code:
- // 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidLocationConstraint Description: The specified location
- // constraint is not valid. For more information about Regions, see How to
- // Select a Region for Your Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro).
- // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidObjectState Description: The action is not valid for the
- // current state of the object. HTTP Status Code: 403 Forbidden SOAP Fault
- // Code Prefix: Client
- //
- // * Code: InvalidPart Description: One or more of the specified parts could
- // not be found. The part might not have been uploaded, or the specified
- // entity tag might not have matched the part's entity tag. HTTP Status Code:
- // 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidPartOrder Description: The list of parts was not in ascending
- // order. Parts list must be specified in order by part number. HTTP Status
- // Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidPayer Description: All access to this object has been disabled.
- // Please contact AWS Support for further assistance. HTTP Status Code: 403
- // Forbidden SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidPolicyDocument Description: The content of the form does
- // not meet the conditions specified in the policy document. HTTP Status
- // Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidRange Description: The requested range cannot be satisfied.
- // HTTP Status Code: 416 Requested Range Not Satisfiable SOAP Fault Code
- // Prefix: Client
- //
- // * Code: InvalidRequest Description: Please use AWS4-HMAC-SHA256. HTTP
- // Status Code: 400 Bad Request Code: N/A
- //
- // * Code: InvalidRequest Description: SOAP requests must be made over an
- // HTTPS connection. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
- // Client
- //
- // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
- // not supported for buckets with non-DNS compliant names. HTTP Status Code:
- // 400 Bad Request Code: N/A
- //
- // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
- // not supported for buckets with periods (.) in their names. HTTP Status
- // Code: 400 Bad Request Code: N/A
- //
- // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate endpoint
- // only supports virtual style requests. HTTP Status Code: 400 Bad Request
- // Code: N/A
- //
- // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate is not
- // configured on this bucket. HTTP Status Code: 400 Bad Request Code: N/A
- //
- // * Code: InvalidRequest Description: Amazon S3 Transfer Accelerate is disabled
- // on this bucket. HTTP Status Code: 400 Bad Request Code: N/A
- //
- // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration is
- // not supported on this bucket. Contact AWS Support for more information.
- // HTTP Status Code: 400 Bad Request Code: N/A
- //
- // * Code: InvalidRequest Description: Amazon S3 Transfer Acceleration cannot
- // be enabled on this bucket. Contact AWS Support for more information. HTTP
- // Status Code: 400 Bad Request Code: N/A
- //
- // * Code: InvalidSecurity Description: The provided security credentials
- // are not valid. HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix:
- // Client
- //
- // * Code: InvalidSOAPRequest Description: The SOAP request body is invalid.
- // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidStorageClass Description: The storage class you specified
- // is not valid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
- // Client
- //
- // * Code: InvalidTargetBucketForLogging Description: The target bucket for
- // logging does not exist, is not owned by you, or does not have the appropriate
- // grants for the log-delivery group. HTTP Status Code: 400 Bad Request SOAP
- // Fault Code Prefix: Client
- //
- // * Code: InvalidToken Description: The provided token is malformed or otherwise
- // invalid. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: InvalidURI Description: Couldn't parse the specified URI. HTTP
- // Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: KeyTooLongError Description: Your key is too long. HTTP Status
- // Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: MalformedACLError Description: The XML you provided was not well-formed
- // or did not validate against our published schema. HTTP Status Code: 400
- // Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: MalformedPOSTRequest Description: The body of your POST request
- // is not well-formed multipart/form-data. HTTP Status Code: 400 Bad Request
- // SOAP Fault Code Prefix: Client
- //
- // * Code: MalformedXML Description: This happens when the user sends malformed
- // XML (XML that doesn't conform to the published XSD) for the configuration.
- // The error message is, "The XML you provided was not well-formed or did
- // not validate against our published schema." HTTP Status Code: 400 Bad
- // Request SOAP Fault Code Prefix: Client
- //
- // * Code: MaxMessageLengthExceeded Description: Your request was too big.
- // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: MaxPostPreDataLengthExceededError Description: Your POST request
- // fields preceding the upload file were too large. HTTP Status Code: 400
- // Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: MetadataTooLarge Description: Your metadata headers exceed the
- // maximum allowed metadata size. HTTP Status Code: 400 Bad Request SOAP
- // Fault Code Prefix: Client
- //
- // * Code: MethodNotAllowed Description: The specified method is not allowed
- // against this resource. HTTP Status Code: 405 Method Not Allowed SOAP Fault
- // Code Prefix: Client
- //
- // * Code: MissingAttachment Description: A SOAP attachment was expected,
- // but none were found. HTTP Status Code: N/A SOAP Fault Code Prefix: Client
- //
- // * Code: MissingContentLength Description: You must provide the Content-Length
- // HTTP header. HTTP Status Code: 411 Length Required SOAP Fault Code Prefix:
- // Client
- //
- // * Code: MissingRequestBodyError Description: This happens when the user
- // sends an empty XML document as a request. The error message is, "Request
- // body is empty." HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix:
- // Client
- //
- // * Code: MissingSecurityElement Description: The SOAP 1.1 request is missing
- // a security element. HTTP Status Code: 400 Bad Request SOAP Fault Code
- // Prefix: Client
- //
- // * Code: MissingSecurityHeader Description: Your request is missing a required
- // header. HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: NoLoggingStatusForKey Description: There is no such thing as a
- // logging status subresource for a key. HTTP Status Code: 400 Bad Request
- // SOAP Fault Code Prefix: Client
- //
- // * Code: NoSuchBucket Description: The specified bucket does not exist.
- // HTTP Status Code: 404 Not Found SOAP Fault Code Prefix: Client
- //
- // * Code: NoSuchBucketPolicy Description: The specified bucket does not
- // have a bucket policy. HTTP Status Code: 404 Not Found SOAP Fault Code
- // Prefix: Client
- //
- // * Code: NoSuchKey Description: The specified key does not exist. HTTP
- // Status Code: 404 Not Found SOAP Fault Code Prefix: Client
- //
- // * Code: NoSuchLifecycleConfiguration Description: The lifecycle configuration
- // does not exist. HTTP Status Code: 404 Not Found SOAP Fault Code Prefix:
- // Client
- //
- // * Code: NoSuchUpload Description: The specified multipart upload does
- // not exist. The upload ID might be invalid, or the multipart upload might
- // have been aborted or completed. HTTP Status Code: 404 Not Found SOAP Fault
- // Code Prefix: Client
- //
- // * Code: NoSuchVersion Description: Indicates that the version ID specified
- // in the request does not match an existing version. HTTP Status Code: 404
- // Not Found SOAP Fault Code Prefix: Client
- //
- // * Code: NotImplemented Description: A header you provided implies functionality
- // that is not implemented. HTTP Status Code: 501 Not Implemented SOAP Fault
- // Code Prefix: Server
- //
- // * Code: NotSignedUp Description: Your account is not signed up for the
- // Amazon S3 service. You must sign up before you can use Amazon S3. You
- // can sign up at the following URL: https://aws.amazon.com/s3 HTTP Status
- // Code: 403 Forbidden SOAP Fault Code Prefix: Client
- //
- // * Code: OperationAborted Description: A conflicting conditional action
- // is currently in progress against this resource. Try again. HTTP Status
- // Code: 409 Conflict SOAP Fault Code Prefix: Client
- //
- // * Code: PermanentRedirect Description: The bucket you are attempting to
- // access must be addressed using the specified endpoint. Send all future
- // requests to this endpoint. HTTP Status Code: 301 Moved Permanently SOAP
- // Fault Code Prefix: Client
- //
- // * Code: PreconditionFailed Description: At least one of the preconditions
- // you specified did not hold. HTTP Status Code: 412 Precondition Failed
- // SOAP Fault Code Prefix: Client
- //
- // * Code: Redirect Description: Temporary redirect. HTTP Status Code: 307
- // Moved Temporarily SOAP Fault Code Prefix: Client
- //
- // * Code: RestoreAlreadyInProgress Description: Object restore is already
- // in progress. HTTP Status Code: 409 Conflict SOAP Fault Code Prefix: Client
- //
- // * Code: RequestIsNotMultiPartContent Description: Bucket POST must be
- // of the enclosure-type multipart/form-data. HTTP Status Code: 400 Bad Request
- // SOAP Fault Code Prefix: Client
- //
- // * Code: RequestTimeout Description: Your socket connection to the server
- // was not read from or written to within the timeout period. HTTP Status
- // Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: RequestTimeTooSkewed Description: The difference between the request
- // time and the server's time is too large. HTTP Status Code: 403 Forbidden
- // SOAP Fault Code Prefix: Client
- //
- // * Code: RequestTorrentOfBucketError Description: Requesting the torrent
- // file of a bucket is not permitted. HTTP Status Code: 400 Bad Request SOAP
- // Fault Code Prefix: Client
- //
- // * Code: SignatureDoesNotMatch Description: The request signature we calculated
- // does not match the signature you provided. Check your AWS secret access
- // key and signing method. For more information, see REST Authentication
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html)
- // and SOAP Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/SOAPAuthentication.html)
- // for details. HTTP Status Code: 403 Forbidden SOAP Fault Code Prefix: Client
- //
- // * Code: ServiceUnavailable Description: Reduce your request rate. HTTP
- // Status Code: 503 Service Unavailable SOAP Fault Code Prefix: Server
- //
- // * Code: SlowDown Description: Reduce your request rate. HTTP Status Code:
- // 503 Slow Down SOAP Fault Code Prefix: Server
- //
- // * Code: TemporaryRedirect Description: You are being redirected to the
- // bucket while DNS updates. HTTP Status Code: 307 Moved Temporarily SOAP
- // Fault Code Prefix: Client
- //
- // * Code: TokenRefreshRequired Description: The provided token must be refreshed.
- // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: TooManyBuckets Description: You have attempted to create more
- // buckets than allowed. HTTP Status Code: 400 Bad Request SOAP Fault Code
- // Prefix: Client
- //
- // * Code: UnexpectedContent Description: This request does not support content.
- // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: UnresolvableGrantByEmailAddress Description: The email address
- // you provided does not match any account on record. HTTP Status Code: 400
- // Bad Request SOAP Fault Code Prefix: Client
- //
- // * Code: UserKeyMustBeSpecified Description: The bucket POST must contain
- // the specified field name. If it is specified, check the order of the fields.
- // HTTP Status Code: 400 Bad Request SOAP Fault Code Prefix: Client
- Code *string `type:"string"`
-
- // The error key.
- Key *string `min:"1" type:"string"`
-
- // The error message contains a generic description of the error condition in
- // English. It is intended for a human audience. Simple programs display the
- // message directly to the end user if they encounter an error condition they
- // don't know how or don't care to handle. Sophisticated programs with more
- // exhaustive error handling and proper internationalization are more likely
- // to ignore the error message.
- Message *string `type:"string"`
-
- // The version ID of the error.
- VersionId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Error) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Error) GoString() string {
- return s.String()
-}
-
-// SetCode sets the Code field's value.
-func (s *Error) SetCode(v string) *Error {
- s.Code = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *Error) SetKey(v string) *Error {
- s.Key = &v
- return s
-}
-
-// SetMessage sets the Message field's value.
-func (s *Error) SetMessage(v string) *Error {
- s.Message = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *Error) SetVersionId(v string) *Error {
- s.VersionId = &v
- return s
-}
-
-// The error information.
-type ErrorDocument struct {
- _ struct{} `type:"structure"`
-
- // The object key name to use when a 4XX class error occurs.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s ErrorDocument) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ErrorDocument) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ErrorDocument) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ErrorDocument"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKey sets the Key field's value.
-func (s *ErrorDocument) SetKey(v string) *ErrorDocument {
- s.Key = &v
- return s
-}
-
-// Optional configuration to replicate existing source bucket objects. For more
-// information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
-// in the Amazon S3 User Guide.
-type ExistingObjectReplication struct {
- _ struct{} `type:"structure"`
-
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ExistingObjectReplicationStatus"`
-}
-
-// String returns the string representation
-func (s ExistingObjectReplication) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ExistingObjectReplication) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ExistingObjectReplication) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ExistingObjectReplication"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStatus sets the Status field's value.
-func (s *ExistingObjectReplication) SetStatus(v string) *ExistingObjectReplication {
- s.Status = &v
- return s
-}
-
-// Specifies the Amazon S3 object key name to filter on and whether to filter
-// on the suffix or prefix of the key name.
-type FilterRule struct {
- _ struct{} `type:"structure"`
-
- // The object key name prefix or suffix identifying one or more objects to which
- // the filtering rule applies. The maximum length is 1,024 characters. Overlapping
- // prefixes and suffixes are not supported. For more information, see Configuring
- // Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- Name *string `type:"string" enum:"FilterRuleName"`
-
- // The value that the filter searches for in object key names.
- Value *string `type:"string"`
-}
-
-// String returns the string representation
-func (s FilterRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s FilterRule) GoString() string {
- return s.String()
-}
-
-// SetName sets the Name field's value.
-func (s *FilterRule) SetName(v string) *FilterRule {
- s.Name = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *FilterRule) SetValue(v string) *FilterRule {
- s.Value = &v
- return s
-}
-
-type GetBucketAccelerateConfigurationInput struct {
- _ struct{} `locationName:"GetBucketAccelerateConfigurationRequest" type:"structure"`
-
- // The name of the bucket for which the accelerate configuration is retrieved.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketAccelerateConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketAccelerateConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketAccelerateConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketAccelerateConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketAccelerateConfigurationInput) SetBucket(v string) *GetBucketAccelerateConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketAccelerateConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketAccelerateConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketAccelerateConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketAccelerateConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketAccelerateConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketAccelerateConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketAccelerateConfigurationOutput struct {
- _ struct{} `type:"structure"`
-
- // The accelerate configuration of the bucket.
- Status *string `type:"string" enum:"BucketAccelerateStatus"`
-}
-
-// String returns the string representation
-func (s GetBucketAccelerateConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketAccelerateConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *GetBucketAccelerateConfigurationOutput) SetStatus(v string) *GetBucketAccelerateConfigurationOutput {
- s.Status = &v
- return s
-}
-
-type GetBucketAclInput struct {
- _ struct{} `locationName:"GetBucketAclRequest" type:"structure"`
-
- // Specifies the S3 bucket whose ACL is being requested.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketAclInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketAclInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketAclInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketAclInput) SetBucket(v string) *GetBucketAclInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketAclInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketAclInput) SetExpectedBucketOwner(v string) *GetBucketAclInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketAclInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketAclInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketAclInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketAclOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of grants.
- Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
-
- // Container for the bucket owner's display name and ID.
- Owner *Owner `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketAclOutput) GoString() string {
- return s.String()
-}
-
-// SetGrants sets the Grants field's value.
-func (s *GetBucketAclOutput) SetGrants(v []*Grant) *GetBucketAclOutput {
- s.Grants = v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *GetBucketAclOutput) SetOwner(v *Owner) *GetBucketAclOutput {
- s.Owner = v
- return s
-}
-
-type GetBucketAnalyticsConfigurationInput struct {
- _ struct{} `locationName:"GetBucketAnalyticsConfigurationRequest" type:"structure"`
-
- // The name of the bucket from which an analytics configuration is retrieved.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID that identifies the analytics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s GetBucketAnalyticsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketAnalyticsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketAnalyticsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketAnalyticsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketAnalyticsConfigurationInput) SetBucket(v string) *GetBucketAnalyticsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketAnalyticsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketAnalyticsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *GetBucketAnalyticsConfigurationInput) SetId(v string) *GetBucketAnalyticsConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *GetBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketAnalyticsConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"AnalyticsConfiguration"`
-
- // The configuration and any analyses for the analytics filter.
- AnalyticsConfiguration *AnalyticsConfiguration `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketAnalyticsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketAnalyticsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
-func (s *GetBucketAnalyticsConfigurationOutput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *GetBucketAnalyticsConfigurationOutput {
- s.AnalyticsConfiguration = v
- return s
-}
-
-type GetBucketCorsInput struct {
- _ struct{} `locationName:"GetBucketCorsRequest" type:"structure"`
-
- // The bucket name for which to get the cors configuration.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketCorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketCorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketCorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketCorsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketCorsInput) SetBucket(v string) *GetBucketCorsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketCorsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketCorsInput) SetExpectedBucketOwner(v string) *GetBucketCorsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketCorsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketCorsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketCorsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketCorsOutput struct {
- _ struct{} `type:"structure"`
-
- // A set of origins and methods (cross-origin access that you want to allow).
- // You can add up to 100 rules to the configuration.
- CORSRules []*CORSRule `locationName:"CORSRule" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s GetBucketCorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketCorsOutput) GoString() string {
- return s.String()
-}
-
-// SetCORSRules sets the CORSRules field's value.
-func (s *GetBucketCorsOutput) SetCORSRules(v []*CORSRule) *GetBucketCorsOutput {
- s.CORSRules = v
- return s
-}
-
-type GetBucketEncryptionInput struct {
- _ struct{} `locationName:"GetBucketEncryptionRequest" type:"structure"`
-
- // The name of the bucket from which the server-side encryption configuration
- // is retrieved.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketEncryptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketEncryptionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketEncryptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketEncryptionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketEncryptionInput) SetBucket(v string) *GetBucketEncryptionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketEncryptionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketEncryptionInput) SetExpectedBucketOwner(v string) *GetBucketEncryptionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketEncryptionInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketEncryptionOutput struct {
- _ struct{} `type:"structure" payload:"ServerSideEncryptionConfiguration"`
-
- // Specifies the default server-side-encryption configuration.
- ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketEncryptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketEncryptionOutput) GoString() string {
- return s.String()
-}
-
-// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
-func (s *GetBucketEncryptionOutput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *GetBucketEncryptionOutput {
- s.ServerSideEncryptionConfiguration = v
- return s
-}
-
-type GetBucketIntelligentTieringConfigurationInput struct {
- _ struct{} `locationName:"GetBucketIntelligentTieringConfigurationRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose configuration you want to modify or
- // retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ID used to identify the S3 Intelligent-Tiering configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s GetBucketIntelligentTieringConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketIntelligentTieringConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketIntelligentTieringConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketIntelligentTieringConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketIntelligentTieringConfigurationInput) SetBucket(v string) *GetBucketIntelligentTieringConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetId sets the Id field's value.
-func (s *GetBucketIntelligentTieringConfigurationInput) SetId(v string) *GetBucketIntelligentTieringConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *GetBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketIntelligentTieringConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"IntelligentTieringConfiguration"`
-
- // Container for S3 Intelligent-Tiering configuration.
- IntelligentTieringConfiguration *IntelligentTieringConfiguration `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketIntelligentTieringConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketIntelligentTieringConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetIntelligentTieringConfiguration sets the IntelligentTieringConfiguration field's value.
-func (s *GetBucketIntelligentTieringConfigurationOutput) SetIntelligentTieringConfiguration(v *IntelligentTieringConfiguration) *GetBucketIntelligentTieringConfigurationOutput {
- s.IntelligentTieringConfiguration = v
- return s
-}
-
-type GetBucketInventoryConfigurationInput struct {
- _ struct{} `locationName:"GetBucketInventoryConfigurationRequest" type:"structure"`
-
- // The name of the bucket containing the inventory configuration to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the inventory configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s GetBucketInventoryConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketInventoryConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketInventoryConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketInventoryConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketInventoryConfigurationInput) SetBucket(v string) *GetBucketInventoryConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketInventoryConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketInventoryConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *GetBucketInventoryConfigurationInput) SetId(v string) *GetBucketInventoryConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *GetBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketInventoryConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketInventoryConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"InventoryConfiguration"`
-
- // Specifies the inventory configuration.
- InventoryConfiguration *InventoryConfiguration `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketInventoryConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketInventoryConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetInventoryConfiguration sets the InventoryConfiguration field's value.
-func (s *GetBucketInventoryConfigurationOutput) SetInventoryConfiguration(v *InventoryConfiguration) *GetBucketInventoryConfigurationOutput {
- s.InventoryConfiguration = v
- return s
-}
-
-type GetBucketLifecycleConfigurationInput struct {
- _ struct{} `locationName:"GetBucketLifecycleConfigurationRequest" type:"structure"`
-
- // The name of the bucket for which to get the lifecycle information.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketLifecycleConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketLifecycleConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketLifecycleConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketLifecycleConfigurationInput) SetBucket(v string) *GetBucketLifecycleConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketLifecycleConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketLifecycleConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketLifecycleConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketLifecycleConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketLifecycleConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketLifecycleConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketLifecycleConfigurationOutput struct {
- _ struct{} `type:"structure"`
-
- // Container for a lifecycle rule.
- Rules []*LifecycleRule `locationName:"Rule" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s GetBucketLifecycleConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketLifecycleConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetRules sets the Rules field's value.
-func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
- s.Rules = v
- return s
-}
-
-type GetBucketLifecycleInput struct {
- _ struct{} `locationName:"GetBucketLifecycleRequest" type:"structure"`
-
- // The name of the bucket for which to get the lifecycle information.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketLifecycleInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketLifecycleInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketLifecycleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketLifecycleInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketLifecycleInput) SetBucket(v string) *GetBucketLifecycleInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketLifecycleInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketLifecycleInput) SetExpectedBucketOwner(v string) *GetBucketLifecycleInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketLifecycleInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketLifecycleOutput struct {
- _ struct{} `type:"structure"`
-
- // Container for a lifecycle rule.
- Rules []*Rule `locationName:"Rule" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s GetBucketLifecycleOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketLifecycleOutput) GoString() string {
- return s.String()
-}
-
-// SetRules sets the Rules field's value.
-func (s *GetBucketLifecycleOutput) SetRules(v []*Rule) *GetBucketLifecycleOutput {
- s.Rules = v
- return s
-}
-
-type GetBucketLocationInput struct {
- _ struct{} `locationName:"GetBucketLocationRequest" type:"structure"`
-
- // The name of the bucket for which to get the location.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketLocationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketLocationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketLocationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketLocationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketLocationInput) SetBucket(v string) *GetBucketLocationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketLocationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketLocationInput) SetExpectedBucketOwner(v string) *GetBucketLocationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketLocationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketLocationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketLocationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketLocationOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the Region where the bucket resides. For a list of all the Amazon
- // S3 supported location constraints by Region, see Regions and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region).
- // Buckets in Region us-east-1 have a LocationConstraint of null.
- LocationConstraint *string `type:"string" enum:"BucketLocationConstraint"`
-}
-
-// String returns the string representation
-func (s GetBucketLocationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketLocationOutput) GoString() string {
- return s.String()
-}
-
-// SetLocationConstraint sets the LocationConstraint field's value.
-func (s *GetBucketLocationOutput) SetLocationConstraint(v string) *GetBucketLocationOutput {
- s.LocationConstraint = &v
- return s
-}
-
-type GetBucketLoggingInput struct {
- _ struct{} `locationName:"GetBucketLoggingRequest" type:"structure"`
-
- // The bucket name for which to get the logging information.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketLoggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketLoggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketLoggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketLoggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketLoggingInput) SetBucket(v string) *GetBucketLoggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketLoggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketLoggingInput) SetExpectedBucketOwner(v string) *GetBucketLoggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketLoggingInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketLoggingInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketLoggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketLoggingOutput struct {
- _ struct{} `type:"structure"`
-
- // Describes where logs are stored and the prefix that Amazon S3 assigns to
- // all log object keys for a bucket. For more information, see PUT Bucket logging
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
- // in the Amazon S3 API Reference.
- LoggingEnabled *LoggingEnabled `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketLoggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketLoggingOutput) GoString() string {
- return s.String()
-}
-
-// SetLoggingEnabled sets the LoggingEnabled field's value.
-func (s *GetBucketLoggingOutput) SetLoggingEnabled(v *LoggingEnabled) *GetBucketLoggingOutput {
- s.LoggingEnabled = v
- return s
-}
-
-type GetBucketMetricsConfigurationInput struct {
- _ struct{} `locationName:"GetBucketMetricsConfigurationRequest" type:"structure"`
-
- // The name of the bucket containing the metrics configuration to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the metrics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s GetBucketMetricsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketMetricsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketMetricsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketMetricsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketMetricsConfigurationInput) SetBucket(v string) *GetBucketMetricsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketMetricsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *GetBucketMetricsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *GetBucketMetricsConfigurationInput) SetId(v string) *GetBucketMetricsConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *GetBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketMetricsConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketMetricsConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"MetricsConfiguration"`
-
- // Specifies the metrics configuration.
- MetricsConfiguration *MetricsConfiguration `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketMetricsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketMetricsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetMetricsConfiguration sets the MetricsConfiguration field's value.
-func (s *GetBucketMetricsConfigurationOutput) SetMetricsConfiguration(v *MetricsConfiguration) *GetBucketMetricsConfigurationOutput {
- s.MetricsConfiguration = v
- return s
-}
-
-type GetBucketNotificationConfigurationRequest struct {
- _ struct{} `locationName:"GetBucketNotificationConfigurationRequest" type:"structure"`
-
- // The name of the bucket for which to get the notification configuration.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketNotificationConfigurationRequest) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketNotificationConfigurationRequest) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketNotificationConfigurationRequest) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketNotificationConfigurationRequest"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketNotificationConfigurationRequest) SetBucket(v string) *GetBucketNotificationConfigurationRequest {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketNotificationConfigurationRequest) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketNotificationConfigurationRequest) SetExpectedBucketOwner(v string) *GetBucketNotificationConfigurationRequest {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketNotificationConfigurationRequest) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketNotificationConfigurationRequest) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketNotificationConfigurationRequest) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketOwnershipControlsInput struct {
- _ struct{} `locationName:"GetBucketOwnershipControlsRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose OwnershipControls you want to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketOwnershipControlsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketOwnershipControlsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketOwnershipControlsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketOwnershipControlsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketOwnershipControlsInput) SetBucket(v string) *GetBucketOwnershipControlsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketOwnershipControlsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *GetBucketOwnershipControlsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketOwnershipControlsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketOwnershipControlsOutput struct {
- _ struct{} `type:"structure" payload:"OwnershipControls"`
-
- // The OwnershipControls (BucketOwnerPreferred or ObjectWriter) currently in
- // effect for this Amazon S3 bucket.
- OwnershipControls *OwnershipControls `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketOwnershipControlsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketOwnershipControlsOutput) GoString() string {
- return s.String()
-}
-
-// SetOwnershipControls sets the OwnershipControls field's value.
-func (s *GetBucketOwnershipControlsOutput) SetOwnershipControls(v *OwnershipControls) *GetBucketOwnershipControlsOutput {
- s.OwnershipControls = v
- return s
-}
-
-type GetBucketPolicyInput struct {
- _ struct{} `locationName:"GetBucketPolicyRequest" type:"structure"`
-
- // The bucket name for which to get the bucket policy.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketPolicyInput) SetBucket(v string) *GetBucketPolicyInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketPolicyInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketPolicyInput) SetExpectedBucketOwner(v string) *GetBucketPolicyInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketPolicyInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketPolicyOutput struct {
- _ struct{} `type:"structure" payload:"Policy"`
-
- // The bucket policy as a JSON document.
- Policy *string `type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketPolicyOutput) GoString() string {
- return s.String()
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *GetBucketPolicyOutput) SetPolicy(v string) *GetBucketPolicyOutput {
- s.Policy = &v
- return s
-}
-
-type GetBucketPolicyStatusInput struct {
- _ struct{} `locationName:"GetBucketPolicyStatusRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose policy status you want to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketPolicyStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketPolicyStatusInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketPolicyStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketPolicyStatusInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketPolicyStatusInput) SetBucket(v string) *GetBucketPolicyStatusInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketPolicyStatusInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketPolicyStatusInput) SetExpectedBucketOwner(v string) *GetBucketPolicyStatusInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketPolicyStatusInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketPolicyStatusInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketPolicyStatusInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketPolicyStatusOutput struct {
- _ struct{} `type:"structure" payload:"PolicyStatus"`
-
- // The policy status for the specified bucket.
- PolicyStatus *PolicyStatus `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketPolicyStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketPolicyStatusOutput) GoString() string {
- return s.String()
-}
-
-// SetPolicyStatus sets the PolicyStatus field's value.
-func (s *GetBucketPolicyStatusOutput) SetPolicyStatus(v *PolicyStatus) *GetBucketPolicyStatusOutput {
- s.PolicyStatus = v
- return s
-}
-
-type GetBucketReplicationInput struct {
- _ struct{} `locationName:"GetBucketReplicationRequest" type:"structure"`
-
- // The bucket name for which to get the replication information.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketReplicationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketReplicationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketReplicationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketReplicationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketReplicationInput) SetBucket(v string) *GetBucketReplicationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketReplicationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketReplicationInput) SetExpectedBucketOwner(v string) *GetBucketReplicationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketReplicationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketReplicationOutput struct {
- _ struct{} `type:"structure" payload:"ReplicationConfiguration"`
-
- // A container for replication rules. You can add up to 1,000 rules. The maximum
- // size of a replication configuration is 2 MB.
- ReplicationConfiguration *ReplicationConfiguration `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetBucketReplicationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketReplicationOutput) GoString() string {
- return s.String()
-}
-
-// SetReplicationConfiguration sets the ReplicationConfiguration field's value.
-func (s *GetBucketReplicationOutput) SetReplicationConfiguration(v *ReplicationConfiguration) *GetBucketReplicationOutput {
- s.ReplicationConfiguration = v
- return s
-}
-
-type GetBucketRequestPaymentInput struct {
- _ struct{} `locationName:"GetBucketRequestPaymentRequest" type:"structure"`
-
- // The name of the bucket for which to get the payment request configuration
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketRequestPaymentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketRequestPaymentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketRequestPaymentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketRequestPaymentInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketRequestPaymentInput) SetBucket(v string) *GetBucketRequestPaymentInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketRequestPaymentInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketRequestPaymentInput) SetExpectedBucketOwner(v string) *GetBucketRequestPaymentInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketRequestPaymentInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketRequestPaymentInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketRequestPaymentInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketRequestPaymentOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies who pays for the download and request fees.
- Payer *string `type:"string" enum:"Payer"`
-}
-
-// String returns the string representation
-func (s GetBucketRequestPaymentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketRequestPaymentOutput) GoString() string {
- return s.String()
-}
-
-// SetPayer sets the Payer field's value.
-func (s *GetBucketRequestPaymentOutput) SetPayer(v string) *GetBucketRequestPaymentOutput {
- s.Payer = &v
- return s
-}
-
-type GetBucketTaggingInput struct {
- _ struct{} `locationName:"GetBucketTaggingRequest" type:"structure"`
-
- // The name of the bucket for which to get the tagging information.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketTaggingInput) SetBucket(v string) *GetBucketTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketTaggingInput) SetExpectedBucketOwner(v string) *GetBucketTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketTaggingInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketTaggingOutput struct {
- _ struct{} `type:"structure"`
-
- // Contains the tag set.
- //
- // TagSet is a required field
- TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s GetBucketTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketTaggingOutput) GoString() string {
- return s.String()
-}
-
-// SetTagSet sets the TagSet field's value.
-func (s *GetBucketTaggingOutput) SetTagSet(v []*Tag) *GetBucketTaggingOutput {
- s.TagSet = v
- return s
-}
-
-type GetBucketVersioningInput struct {
- _ struct{} `locationName:"GetBucketVersioningRequest" type:"structure"`
-
- // The name of the bucket for which to get the versioning information.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketVersioningInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketVersioningInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketVersioningInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketVersioningInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketVersioningInput) SetBucket(v string) *GetBucketVersioningInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketVersioningInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketVersioningInput) SetExpectedBucketOwner(v string) *GetBucketVersioningInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketVersioningInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketVersioningInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketVersioningInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketVersioningOutput struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether MFA delete is enabled in the bucket versioning configuration.
- // This element is only returned if the bucket has been configured with MFA
- // delete. If the bucket has never been so configured, this element is not returned.
- MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADeleteStatus"`
-
- // The versioning state of the bucket.
- Status *string `type:"string" enum:"BucketVersioningStatus"`
-}
-
-// String returns the string representation
-func (s GetBucketVersioningOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketVersioningOutput) GoString() string {
- return s.String()
-}
-
-// SetMFADelete sets the MFADelete field's value.
-func (s *GetBucketVersioningOutput) SetMFADelete(v string) *GetBucketVersioningOutput {
- s.MFADelete = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *GetBucketVersioningOutput) SetStatus(v string) *GetBucketVersioningOutput {
- s.Status = &v
- return s
-}
-
-type GetBucketWebsiteInput struct {
- _ struct{} `locationName:"GetBucketWebsiteRequest" type:"structure"`
-
- // The bucket name for which to get the website configuration.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetBucketWebsiteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketWebsiteInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetBucketWebsiteInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetBucketWebsiteInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetBucketWebsiteInput) SetBucket(v string) *GetBucketWebsiteInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetBucketWebsiteInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetBucketWebsiteInput) SetExpectedBucketOwner(v string) *GetBucketWebsiteInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetBucketWebsiteInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetBucketWebsiteOutput struct {
- _ struct{} `type:"structure"`
-
- // The object key name of the website error document to use for 4XX class errors.
- ErrorDocument *ErrorDocument `type:"structure"`
-
- // The name of the index document for the website (for example index.html).
- IndexDocument *IndexDocument `type:"structure"`
-
- // Specifies the redirect behavior of all requests to a website endpoint of
- // an Amazon S3 bucket.
- RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
-
- // Rules that define when a redirect is applied and the redirect behavior.
- RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
-}
-
-// String returns the string representation
-func (s GetBucketWebsiteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetBucketWebsiteOutput) GoString() string {
- return s.String()
-}
-
-// SetErrorDocument sets the ErrorDocument field's value.
-func (s *GetBucketWebsiteOutput) SetErrorDocument(v *ErrorDocument) *GetBucketWebsiteOutput {
- s.ErrorDocument = v
- return s
-}
-
-// SetIndexDocument sets the IndexDocument field's value.
-func (s *GetBucketWebsiteOutput) SetIndexDocument(v *IndexDocument) *GetBucketWebsiteOutput {
- s.IndexDocument = v
- return s
-}
-
-// SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
-func (s *GetBucketWebsiteOutput) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *GetBucketWebsiteOutput {
- s.RedirectAllRequestsTo = v
- return s
-}
-
-// SetRoutingRules sets the RoutingRules field's value.
-func (s *GetBucketWebsiteOutput) SetRoutingRules(v []*RoutingRule) *GetBucketWebsiteOutput {
- s.RoutingRules = v
- return s
-}
-
-type GetObjectAclInput struct {
- _ struct{} `locationName:"GetObjectAclRequest" type:"structure"`
-
- // The bucket name that contains the object for which to get the ACL information.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key of the object for which to get the ACL information.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s GetObjectAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectAclInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectAclInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectAclInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectAclInput) SetBucket(v string) *GetObjectAclInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectAclInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectAclInput) SetExpectedBucketOwner(v string) *GetObjectAclInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectAclInput) SetKey(v string) *GetObjectAclInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectAclInput) SetRequestPayer(v string) *GetObjectAclInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectAclInput) SetVersionId(v string) *GetObjectAclInput {
- s.VersionId = &v
- return s
-}
-
-func (s *GetObjectAclInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetObjectAclInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectAclInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectAclOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of grants.
- Grants []*Grant `locationName:"AccessControlList" locationNameList:"Grant" type:"list"`
-
- // Container for the bucket owner's display name and ID.
- Owner *Owner `type:"structure"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation
-func (s GetObjectAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectAclOutput) GoString() string {
- return s.String()
-}
-
-// SetGrants sets the Grants field's value.
-func (s *GetObjectAclOutput) SetGrants(v []*Grant) *GetObjectAclOutput {
- s.Grants = v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *GetObjectAclOutput) SetOwner(v *Owner) *GetObjectAclOutput {
- s.Owner = v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *GetObjectAclOutput) SetRequestCharged(v string) *GetObjectAclOutput {
- s.RequestCharged = &v
- return s
-}
-
-type GetObjectInput struct {
- _ struct{} `locationName:"GetObjectRequest" type:"structure"`
-
- // The bucket name containing the object.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Return the object only if its entity tag (ETag) is the same as the one specified,
- // otherwise return a 412 (precondition failed).
- IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
-
- // Return the object only if it has been modified since the specified time,
- // otherwise return a 304 (not modified).
- IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
-
- // Return the object only if its entity tag (ETag) is different from the one
- // specified, otherwise return a 304 (not modified).
- IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
-
- // Return the object only if it has not been modified since the specified time,
- // otherwise return a 412 (precondition failed).
- IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
-
- // Key of the object to get.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Part number of the object being read. This is a positive integer between
- // 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified.
- // Useful for downloading just a part of an object.
- PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
-
- // Downloads the specified range bytes of an object. For more information about
- // the HTTP Range header, see https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
- // (https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35).
- //
- // Amazon S3 doesn't support retrieving multiple ranges of data per GET request.
- Range *string `location:"header" locationName:"Range" type:"string"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Sets the Cache-Control header of the response.
- ResponseCacheControl *string `location:"querystring" locationName:"response-cache-control" type:"string"`
-
- // Sets the Content-Disposition header of the response
- ResponseContentDisposition *string `location:"querystring" locationName:"response-content-disposition" type:"string"`
-
- // Sets the Content-Encoding header of the response.
- ResponseContentEncoding *string `location:"querystring" locationName:"response-content-encoding" type:"string"`
-
- // Sets the Content-Language header of the response.
- ResponseContentLanguage *string `location:"querystring" locationName:"response-content-language" type:"string"`
-
- // Sets the Content-Type header of the response.
- ResponseContentType *string `location:"querystring" locationName:"response-content-type" type:"string"`
-
- // Sets the Expires header of the response.
- ResponseExpires *time.Time `location:"querystring" locationName:"response-expires" type:"timestamp" timestampFormat:"rfc822"`
-
- // Specifies the algorithm to use to when decrypting the object (for example,
- // AES256).
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 used to encrypt
- // the data. This value is used to decrypt the object when recovering it and
- // must match the one used when storing the data. The key must be appropriate
- // for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s GetObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectInput) SetBucket(v string) *GetObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectInput) SetExpectedBucketOwner(v string) *GetObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetIfMatch sets the IfMatch field's value.
-func (s *GetObjectInput) SetIfMatch(v string) *GetObjectInput {
- s.IfMatch = &v
- return s
-}
-
-// SetIfModifiedSince sets the IfModifiedSince field's value.
-func (s *GetObjectInput) SetIfModifiedSince(v time.Time) *GetObjectInput {
- s.IfModifiedSince = &v
- return s
-}
-
-// SetIfNoneMatch sets the IfNoneMatch field's value.
-func (s *GetObjectInput) SetIfNoneMatch(v string) *GetObjectInput {
- s.IfNoneMatch = &v
- return s
-}
-
-// SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
-func (s *GetObjectInput) SetIfUnmodifiedSince(v time.Time) *GetObjectInput {
- s.IfUnmodifiedSince = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectInput) SetKey(v string) *GetObjectInput {
- s.Key = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *GetObjectInput) SetPartNumber(v int64) *GetObjectInput {
- s.PartNumber = &v
- return s
-}
-
-// SetRange sets the Range field's value.
-func (s *GetObjectInput) SetRange(v string) *GetObjectInput {
- s.Range = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectInput) SetRequestPayer(v string) *GetObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetResponseCacheControl sets the ResponseCacheControl field's value.
-func (s *GetObjectInput) SetResponseCacheControl(v string) *GetObjectInput {
- s.ResponseCacheControl = &v
- return s
-}
-
-// SetResponseContentDisposition sets the ResponseContentDisposition field's value.
-func (s *GetObjectInput) SetResponseContentDisposition(v string) *GetObjectInput {
- s.ResponseContentDisposition = &v
- return s
-}
-
-// SetResponseContentEncoding sets the ResponseContentEncoding field's value.
-func (s *GetObjectInput) SetResponseContentEncoding(v string) *GetObjectInput {
- s.ResponseContentEncoding = &v
- return s
-}
-
-// SetResponseContentLanguage sets the ResponseContentLanguage field's value.
-func (s *GetObjectInput) SetResponseContentLanguage(v string) *GetObjectInput {
- s.ResponseContentLanguage = &v
- return s
-}
-
-// SetResponseContentType sets the ResponseContentType field's value.
-func (s *GetObjectInput) SetResponseContentType(v string) *GetObjectInput {
- s.ResponseContentType = &v
- return s
-}
-
-// SetResponseExpires sets the ResponseExpires field's value.
-func (s *GetObjectInput) SetResponseExpires(v time.Time) *GetObjectInput {
- s.ResponseExpires = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *GetObjectInput) SetSSECustomerAlgorithm(v string) *GetObjectInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *GetObjectInput) SetSSECustomerKey(v string) *GetObjectInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *GetObjectInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *GetObjectInput) SetSSECustomerKeyMD5(v string) *GetObjectInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectInput) SetVersionId(v string) *GetObjectInput {
- s.VersionId = &v
- return s
-}
-
-func (s *GetObjectInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetObjectInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectLegalHoldInput struct {
- _ struct{} `locationName:"GetObjectLegalHoldRequest" type:"structure"`
-
- // The bucket name containing the object whose Legal Hold status you want to
- // retrieve.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key name for the object whose Legal Hold status you want to retrieve.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The version ID of the object whose Legal Hold status you want to retrieve.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s GetObjectLegalHoldInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectLegalHoldInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectLegalHoldInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectLegalHoldInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectLegalHoldInput) SetBucket(v string) *GetObjectLegalHoldInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectLegalHoldInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectLegalHoldInput) SetExpectedBucketOwner(v string) *GetObjectLegalHoldInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectLegalHoldInput) SetKey(v string) *GetObjectLegalHoldInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectLegalHoldInput) SetRequestPayer(v string) *GetObjectLegalHoldInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectLegalHoldInput) SetVersionId(v string) *GetObjectLegalHoldInput {
- s.VersionId = &v
- return s
-}
-
-func (s *GetObjectLegalHoldInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetObjectLegalHoldInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectLegalHoldInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectLegalHoldOutput struct {
- _ struct{} `type:"structure" payload:"LegalHold"`
-
- // The current Legal Hold status for the specified object.
- LegalHold *ObjectLockLegalHold `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetObjectLegalHoldOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectLegalHoldOutput) GoString() string {
- return s.String()
-}
-
-// SetLegalHold sets the LegalHold field's value.
-func (s *GetObjectLegalHoldOutput) SetLegalHold(v *ObjectLockLegalHold) *GetObjectLegalHoldOutput {
- s.LegalHold = v
- return s
-}
-
-type GetObjectLockConfigurationInput struct {
- _ struct{} `locationName:"GetObjectLockConfigurationRequest" type:"structure"`
-
- // The bucket whose Object Lock configuration you want to retrieve.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetObjectLockConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectLockConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectLockConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectLockConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectLockConfigurationInput) SetBucket(v string) *GetObjectLockConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectLockConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *GetObjectLockConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetObjectLockConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetObjectLockConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectLockConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectLockConfigurationOutput struct {
- _ struct{} `type:"structure" payload:"ObjectLockConfiguration"`
-
- // The specified bucket's Object Lock configuration.
- ObjectLockConfiguration *ObjectLockConfiguration `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetObjectLockConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectLockConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
-func (s *GetObjectLockConfigurationOutput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *GetObjectLockConfigurationOutput {
- s.ObjectLockConfiguration = v
- return s
-}
-
-type GetObjectOutput struct {
- _ struct{} `type:"structure" payload:"Body"`
-
- // Indicates that a range of bytes was specified.
- AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
-
- // Object data.
- Body io.ReadCloser `type:"blob"`
-
- // Indicates whether the object uses an S3 Bucket Key for server-side encryption
- // with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // Specifies presentational information for the object.
- ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
-
- // Specifies what content encodings have been applied to the object and thus
- // what decoding mechanisms must be applied to obtain the media-type referenced
- // by the Content-Type header field.
- ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
-
- // Size of the body in bytes.
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // The portion of the object returned in the response.
- ContentRange *string `location:"header" locationName:"Content-Range" type:"string"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // Specifies whether the object retrieved was (true) or was not (false) a Delete
- // Marker. If false, this response header does not appear in the response.
- DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
-
- // An ETag is an opaque identifier assigned by a web server to a specific version
- // of a resource found at a URL.
- ETag *string `location:"header" locationName:"ETag" type:"string"`
-
- // If the object expiration is configured (see PUT Bucket lifecycle), the response
- // includes this header. It includes the expiry-date and rule-id key-value pairs
- // providing object expiration information. The value of the rule-id is URL
- // encoded.
- Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *string `location:"header" locationName:"Expires" type:"string"`
-
- // Creation date of the object.
- LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
-
- // A map of metadata to store with the object in S3.
- //
- // By default unmarshaled keys are written as a map keys in following canonicalized format:
- // the first letter and any letter following a hyphen will be capitalized, and the rest as lowercase.
- // Set `aws.Config.LowerCaseHeaderMaps` to `true` to write unmarshaled keys to the map as lowercase.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // This is set to the number of metadata entries not returned in x-amz-meta
- // headers. This can happen if you create metadata using an API like SOAP that
- // supports more flexible metadata than the REST API. For example, using SOAP,
- // you can create metadata whose values are not legal HTTP headers.
- MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
-
- // Indicates whether this object has an active legal hold. This field is only
- // returned if you have permission to view an object's legal hold status.
- ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
-
- // The Object Lock mode currently in place for this object.
- ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
-
- // The date and time when this object's Object Lock will expire.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // The count of parts this object has.
- PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
-
- // Amazon S3 can return this if your request involves a bucket that is either
- // a source or destination in a replication rule.
- ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // Provides information about object restoration action and expiration time
- // of the restored object copy.
- Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) that was used for the
- // object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing this object in Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // Provides storage class information of the object. Amazon S3 returns this
- // header for all objects except for S3 Standard storage class objects.
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
-
- // The number of tags, if any, on the object.
- TagCount *int64 `location:"header" locationName:"x-amz-tagging-count" type:"integer"`
-
- // Version of the object.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-
- // If the bucket is configured as a website, redirects requests for this object
- // to another object in the same bucket or to an external URL. Amazon S3 stores
- // the value of this header in the object metadata.
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation
-func (s GetObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetAcceptRanges sets the AcceptRanges field's value.
-func (s *GetObjectOutput) SetAcceptRanges(v string) *GetObjectOutput {
- s.AcceptRanges = &v
- return s
-}
-
-// SetBody sets the Body field's value.
-func (s *GetObjectOutput) SetBody(v io.ReadCloser) *GetObjectOutput {
- s.Body = v
- return s
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *GetObjectOutput) SetBucketKeyEnabled(v bool) *GetObjectOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *GetObjectOutput) SetCacheControl(v string) *GetObjectOutput {
- s.CacheControl = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *GetObjectOutput) SetContentDisposition(v string) *GetObjectOutput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *GetObjectOutput) SetContentEncoding(v string) *GetObjectOutput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *GetObjectOutput) SetContentLanguage(v string) *GetObjectOutput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *GetObjectOutput) SetContentLength(v int64) *GetObjectOutput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentRange sets the ContentRange field's value.
-func (s *GetObjectOutput) SetContentRange(v string) *GetObjectOutput {
- s.ContentRange = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *GetObjectOutput) SetContentType(v string) *GetObjectOutput {
- s.ContentType = &v
- return s
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *GetObjectOutput) SetDeleteMarker(v bool) *GetObjectOutput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *GetObjectOutput) SetETag(v string) *GetObjectOutput {
- s.ETag = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *GetObjectOutput) SetExpiration(v string) *GetObjectOutput {
- s.Expiration = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *GetObjectOutput) SetExpires(v string) *GetObjectOutput {
- s.Expires = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *GetObjectOutput) SetLastModified(v time.Time) *GetObjectOutput {
- s.LastModified = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
- s.Metadata = v
- return s
-}
-
-// SetMissingMeta sets the MissingMeta field's value.
-func (s *GetObjectOutput) SetMissingMeta(v int64) *GetObjectOutput {
- s.MissingMeta = &v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *GetObjectOutput) SetObjectLockLegalHoldStatus(v string) *GetObjectOutput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *GetObjectOutput) SetObjectLockMode(v string) *GetObjectOutput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *GetObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *GetObjectOutput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetPartsCount sets the PartsCount field's value.
-func (s *GetObjectOutput) SetPartsCount(v int64) *GetObjectOutput {
- s.PartsCount = &v
- return s
-}
-
-// SetReplicationStatus sets the ReplicationStatus field's value.
-func (s *GetObjectOutput) SetReplicationStatus(v string) *GetObjectOutput {
- s.ReplicationStatus = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *GetObjectOutput) SetRequestCharged(v string) *GetObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetRestore sets the Restore field's value.
-func (s *GetObjectOutput) SetRestore(v string) *GetObjectOutput {
- s.Restore = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *GetObjectOutput) SetSSECustomerAlgorithm(v string) *GetObjectOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *GetObjectOutput) SetSSECustomerKeyMD5(v string) *GetObjectOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *GetObjectOutput) SetSSEKMSKeyId(v string) *GetObjectOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *GetObjectOutput) SetServerSideEncryption(v string) *GetObjectOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *GetObjectOutput) SetStorageClass(v string) *GetObjectOutput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagCount sets the TagCount field's value.
-func (s *GetObjectOutput) SetTagCount(v int64) *GetObjectOutput {
- s.TagCount = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectOutput) SetVersionId(v string) *GetObjectOutput {
- s.VersionId = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *GetObjectOutput) SetWebsiteRedirectLocation(v string) *GetObjectOutput {
- s.WebsiteRedirectLocation = &v
- return s
-}
-
-type GetObjectRetentionInput struct {
- _ struct{} `locationName:"GetObjectRetentionRequest" type:"structure"`
-
- // The bucket name containing the object whose retention settings you want to
- // retrieve.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key name for the object whose retention settings you want to retrieve.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The version ID for the object whose retention settings you want to retrieve.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s GetObjectRetentionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectRetentionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectRetentionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectRetentionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectRetentionInput) SetBucket(v string) *GetObjectRetentionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectRetentionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectRetentionInput) SetExpectedBucketOwner(v string) *GetObjectRetentionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectRetentionInput) SetKey(v string) *GetObjectRetentionInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectRetentionInput) SetRequestPayer(v string) *GetObjectRetentionInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectRetentionInput) SetVersionId(v string) *GetObjectRetentionInput {
- s.VersionId = &v
- return s
-}
-
-func (s *GetObjectRetentionInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetObjectRetentionInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectRetentionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectRetentionOutput struct {
- _ struct{} `type:"structure" payload:"Retention"`
-
- // The container element for an object's retention settings.
- Retention *ObjectLockRetention `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetObjectRetentionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectRetentionOutput) GoString() string {
- return s.String()
-}
-
-// SetRetention sets the Retention field's value.
-func (s *GetObjectRetentionOutput) SetRetention(v *ObjectLockRetention) *GetObjectRetentionOutput {
- s.Retention = v
- return s
-}
-
-type GetObjectTaggingInput struct {
- _ struct{} `locationName:"GetObjectTaggingRequest" type:"structure"`
-
- // The bucket name containing the object for which to get the tagging information.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Object key for which to get the tagging information.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The versionId of the object for which to get the tagging information.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s GetObjectTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectTaggingInput) SetBucket(v string) *GetObjectTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectTaggingInput) SetExpectedBucketOwner(v string) *GetObjectTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectTaggingInput) SetKey(v string) *GetObjectTaggingInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectTaggingInput) SetRequestPayer(v string) *GetObjectTaggingInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectTaggingInput) SetVersionId(v string) *GetObjectTaggingInput {
- s.VersionId = &v
- return s
-}
-
-func (s *GetObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetObjectTaggingInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectTaggingOutput struct {
- _ struct{} `type:"structure"`
-
- // Contains the tag set.
- //
- // TagSet is a required field
- TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
-
- // The versionId of the object for which you got the tagging information.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation
-func (s GetObjectTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectTaggingOutput) GoString() string {
- return s.String()
-}
-
-// SetTagSet sets the TagSet field's value.
-func (s *GetObjectTaggingOutput) SetTagSet(v []*Tag) *GetObjectTaggingOutput {
- s.TagSet = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *GetObjectTaggingOutput) SetVersionId(v string) *GetObjectTaggingOutput {
- s.VersionId = &v
- return s
-}
-
-type GetObjectTorrentInput struct {
- _ struct{} `locationName:"GetObjectTorrentRequest" type:"structure"`
-
- // The name of the bucket containing the object for which to get the torrent
- // files.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The object key for which to get the information.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-}
-
-// String returns the string representation
-func (s GetObjectTorrentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectTorrentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetObjectTorrentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetObjectTorrentInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetObjectTorrentInput) SetBucket(v string) *GetObjectTorrentInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetObjectTorrentInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetObjectTorrentInput) SetExpectedBucketOwner(v string) *GetObjectTorrentInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *GetObjectTorrentInput) SetKey(v string) *GetObjectTorrentInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *GetObjectTorrentInput) SetRequestPayer(v string) *GetObjectTorrentInput {
- s.RequestPayer = &v
- return s
-}
-
-func (s *GetObjectTorrentInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetObjectTorrentInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetObjectTorrentInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetObjectTorrentOutput struct {
- _ struct{} `type:"structure" payload:"Body"`
-
- // A Bencoded dictionary as defined by the BitTorrent specification
- Body io.ReadCloser `type:"blob"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation
-func (s GetObjectTorrentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetObjectTorrentOutput) GoString() string {
- return s.String()
-}
-
-// SetBody sets the Body field's value.
-func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
- s.Body = v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *GetObjectTorrentOutput) SetRequestCharged(v string) *GetObjectTorrentOutput {
- s.RequestCharged = &v
- return s
-}
-
-type GetPublicAccessBlockInput struct {
- _ struct{} `locationName:"GetPublicAccessBlockRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
- // want to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s GetPublicAccessBlockInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetPublicAccessBlockInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetPublicAccessBlockInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetPublicAccessBlockInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *GetPublicAccessBlockInput) SetBucket(v string) *GetPublicAccessBlockInput {
- s.Bucket = &v
- return s
-}
-
-func (s *GetPublicAccessBlockInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *GetPublicAccessBlockInput) SetExpectedBucketOwner(v string) *GetPublicAccessBlockInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *GetPublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *GetPublicAccessBlockInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s GetPublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type GetPublicAccessBlockOutput struct {
- _ struct{} `type:"structure" payload:"PublicAccessBlockConfiguration"`
-
- // The PublicAccessBlock configuration currently in effect for this Amazon S3
- // bucket.
- PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `type:"structure"`
-}
-
-// String returns the string representation
-func (s GetPublicAccessBlockOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GetPublicAccessBlockOutput) GoString() string {
- return s.String()
-}
-
-// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
-func (s *GetPublicAccessBlockOutput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *GetPublicAccessBlockOutput {
- s.PublicAccessBlockConfiguration = v
- return s
-}
-
-// Container for S3 Glacier job parameters.
-type GlacierJobParameters struct {
- _ struct{} `type:"structure"`
-
- // Retrieval tier at which the restore will be processed.
- //
- // Tier is a required field
- Tier *string `type:"string" required:"true" enum:"Tier"`
-}
-
-// String returns the string representation
-func (s GlacierJobParameters) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s GlacierJobParameters) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GlacierJobParameters) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GlacierJobParameters"}
- if s.Tier == nil {
- invalidParams.Add(request.NewErrParamRequired("Tier"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTier sets the Tier field's value.
-func (s *GlacierJobParameters) SetTier(v string) *GlacierJobParameters {
- s.Tier = &v
- return s
-}
-
-// Container for grant information.
-type Grant struct {
- _ struct{} `type:"structure"`
-
- // The person being granted permissions.
- Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
-
- // Specifies the permission given to the grantee.
- Permission *string `type:"string" enum:"Permission"`
-}
-
-// String returns the string representation
-func (s Grant) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Grant) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Grant) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Grant"}
- if s.Grantee != nil {
- if err := s.Grantee.Validate(); err != nil {
- invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantee sets the Grantee field's value.
-func (s *Grant) SetGrantee(v *Grantee) *Grant {
- s.Grantee = v
- return s
-}
-
-// SetPermission sets the Permission field's value.
-func (s *Grant) SetPermission(v string) *Grant {
- s.Permission = &v
- return s
-}
-
-// Container for the person being granted permissions.
-type Grantee struct {
- _ struct{} `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
-
- // Screen name of the grantee.
- DisplayName *string `type:"string"`
-
- // Email address of the grantee.
- //
- // Using email addresses to specify a grantee is only supported in the following
- // AWS Regions:
- //
- // * US East (N. Virginia)
- //
- // * US West (N. California)
- //
- // * US West (Oregon)
- //
- // * Asia Pacific (Singapore)
- //
- // * Asia Pacific (Sydney)
- //
- // * Asia Pacific (Tokyo)
- //
- // * Europe (Ireland)
- //
- // * South America (São Paulo)
- //
- // For a list of all the Amazon S3 supported Regions and endpoints, see Regions
- // and Endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
- // in the AWS General Reference.
- EmailAddress *string `type:"string"`
-
- // The canonical user ID of the grantee.
- ID *string `type:"string"`
-
- // Type of grantee
- //
- // Type is a required field
- Type *string `locationName:"xsi:type" type:"string" xmlAttribute:"true" required:"true" enum:"Type"`
-
- // URI of the grantee group.
- URI *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Grantee) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Grantee) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Grantee) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Grantee"}
- if s.Type == nil {
- invalidParams.Add(request.NewErrParamRequired("Type"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDisplayName sets the DisplayName field's value.
-func (s *Grantee) SetDisplayName(v string) *Grantee {
- s.DisplayName = &v
- return s
-}
-
-// SetEmailAddress sets the EmailAddress field's value.
-func (s *Grantee) SetEmailAddress(v string) *Grantee {
- s.EmailAddress = &v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *Grantee) SetID(v string) *Grantee {
- s.ID = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *Grantee) SetType(v string) *Grantee {
- s.Type = &v
- return s
-}
-
-// SetURI sets the URI field's value.
-func (s *Grantee) SetURI(v string) *Grantee {
- s.URI = &v
- return s
-}
-
-type HeadBucketInput struct {
- _ struct{} `locationName:"HeadBucketRequest" type:"structure"`
-
- // The bucket name.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s HeadBucketInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HeadBucketInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *HeadBucketInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "HeadBucketInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *HeadBucketInput) SetBucket(v string) *HeadBucketInput {
- s.Bucket = &v
- return s
-}
-
-func (s *HeadBucketInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *HeadBucketInput) SetExpectedBucketOwner(v string) *HeadBucketInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *HeadBucketInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *HeadBucketInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s HeadBucketInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type HeadBucketOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s HeadBucketOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HeadBucketOutput) GoString() string {
- return s.String()
-}
-
-type HeadObjectInput struct {
- _ struct{} `locationName:"HeadObjectRequest" type:"structure"`
-
- // The name of the bucket containing the object.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Return the object only if its entity tag (ETag) is the same as the one specified,
- // otherwise return a 412 (precondition failed).
- IfMatch *string `location:"header" locationName:"If-Match" type:"string"`
-
- // Return the object only if it has been modified since the specified time,
- // otherwise return a 304 (not modified).
- IfModifiedSince *time.Time `location:"header" locationName:"If-Modified-Since" type:"timestamp"`
-
- // Return the object only if its entity tag (ETag) is different from the one
- // specified, otherwise return a 304 (not modified).
- IfNoneMatch *string `location:"header" locationName:"If-None-Match" type:"string"`
-
- // Return the object only if it has not been modified since the specified time,
- // otherwise return a 412 (precondition failed).
- IfUnmodifiedSince *time.Time `location:"header" locationName:"If-Unmodified-Since" type:"timestamp"`
-
- // The object key.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Part number of the object being read. This is a positive integer between
- // 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified.
- // Useful querying about the size of the part and the number of parts in this
- // object.
- PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer"`
-
- // Downloads the specified range bytes of an object. For more information about
- // the HTTP Range header, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35).
- //
- // Amazon S3 doesn't support retrieving multiple ranges of data per GET request.
- Range *string `location:"header" locationName:"Range" type:"string"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
- // data. This value is used to store the object and then it is discarded; Amazon
- // S3 does not store the encryption key. The key must be appropriate for use
- // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s HeadObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HeadObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *HeadObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "HeadObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *HeadObjectInput) SetBucket(v string) *HeadObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *HeadObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *HeadObjectInput) SetExpectedBucketOwner(v string) *HeadObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetIfMatch sets the IfMatch field's value.
-func (s *HeadObjectInput) SetIfMatch(v string) *HeadObjectInput {
- s.IfMatch = &v
- return s
-}
-
-// SetIfModifiedSince sets the IfModifiedSince field's value.
-func (s *HeadObjectInput) SetIfModifiedSince(v time.Time) *HeadObjectInput {
- s.IfModifiedSince = &v
- return s
-}
-
-// SetIfNoneMatch sets the IfNoneMatch field's value.
-func (s *HeadObjectInput) SetIfNoneMatch(v string) *HeadObjectInput {
- s.IfNoneMatch = &v
- return s
-}
-
-// SetIfUnmodifiedSince sets the IfUnmodifiedSince field's value.
-func (s *HeadObjectInput) SetIfUnmodifiedSince(v time.Time) *HeadObjectInput {
- s.IfUnmodifiedSince = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *HeadObjectInput) SetKey(v string) *HeadObjectInput {
- s.Key = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *HeadObjectInput) SetPartNumber(v int64) *HeadObjectInput {
- s.PartNumber = &v
- return s
-}
-
-// SetRange sets the Range field's value.
-func (s *HeadObjectInput) SetRange(v string) *HeadObjectInput {
- s.Range = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *HeadObjectInput) SetRequestPayer(v string) *HeadObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *HeadObjectInput) SetSSECustomerAlgorithm(v string) *HeadObjectInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *HeadObjectInput) SetSSECustomerKey(v string) *HeadObjectInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *HeadObjectInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *HeadObjectInput) SetSSECustomerKeyMD5(v string) *HeadObjectInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *HeadObjectInput) SetVersionId(v string) *HeadObjectInput {
- s.VersionId = &v
- return s
-}
-
-func (s *HeadObjectInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *HeadObjectInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s HeadObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type HeadObjectOutput struct {
- _ struct{} `type:"structure"`
-
- // Indicates that a range of bytes was specified.
- AcceptRanges *string `location:"header" locationName:"accept-ranges" type:"string"`
-
- // The archive state of the head object.
- ArchiveStatus *string `location:"header" locationName:"x-amz-archive-status" type:"string" enum:"ArchiveStatus"`
-
- // Indicates whether the object uses an S3 Bucket Key for server-side encryption
- // with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // Specifies presentational information for the object.
- ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
-
- // Specifies what content encodings have been applied to the object and thus
- // what decoding mechanisms must be applied to obtain the media-type referenced
- // by the Content-Type header field.
- ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
-
- // Size of the body in bytes.
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // Specifies whether the object retrieved was (true) or was not (false) a Delete
- // Marker. If false, this response header does not appear in the response.
- DeleteMarker *bool `location:"header" locationName:"x-amz-delete-marker" type:"boolean"`
-
- // An ETag is an opaque identifier assigned by a web server to a specific version
- // of a resource found at a URL.
- ETag *string `location:"header" locationName:"ETag" type:"string"`
-
- // If the object expiration is configured (see PUT Bucket lifecycle), the response
- // includes this header. It includes the expiry-date and rule-id key-value pairs
- // providing object expiration information. The value of the rule-id is URL
- // encoded.
- Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *string `location:"header" locationName:"Expires" type:"string"`
-
- // Creation date of the object.
- LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"`
-
- // A map of metadata to store with the object in S3.
- //
- // By default unmarshaled keys are written as a map keys in following canonicalized format:
- // the first letter and any letter following a hyphen will be capitalized, and the rest as lowercase.
- // Set `aws.Config.LowerCaseHeaderMaps` to `true` to write unmarshaled keys to the map as lowercase.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // This is set to the number of metadata entries not returned in x-amz-meta
- // headers. This can happen if you create metadata using an API like SOAP that
- // supports more flexible metadata than the REST API. For example, using SOAP,
- // you can create metadata whose values are not legal HTTP headers.
- MissingMeta *int64 `location:"header" locationName:"x-amz-missing-meta" type:"integer"`
-
- // Specifies whether a legal hold is in effect for this object. This header
- // is only returned if the requester has the s3:GetObjectLegalHold permission.
- // This header is not returned if the specified version of this object has never
- // had a legal hold applied. For more information about S3 Object Lock, see
- // Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
- ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
-
- // The Object Lock mode, if any, that's in effect for this object. This header
- // is only returned if the requester has the s3:GetObjectRetention permission.
- // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
- ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
-
- // The date and time when the Object Lock retention period expires. This header
- // is only returned if the requester has the s3:GetObjectRetention permission.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // The count of parts this object has.
- PartsCount *int64 `location:"header" locationName:"x-amz-mp-parts-count" type:"integer"`
-
- // Amazon S3 can return this header if your request involves a bucket that is
- // either a source or a destination in a replication rule.
- //
- // In replication, you have a source bucket on which you configure replication
- // and destination bucket or buckets where Amazon S3 stores object replicas.
- // When you request an object (GetObject) or object metadata (HeadObject) from
- // these buckets, Amazon S3 will return the x-amz-replication-status header
- // in the response as follows:
- //
- // * If requesting an object from the source bucket — Amazon S3 will return
- // the x-amz-replication-status header if the object in your request is eligible
- // for replication. For example, suppose that in your replication configuration,
- // you specify object prefix TaxDocs requesting Amazon S3 to replicate objects
- // with key prefix TaxDocs. Any objects you upload with this key name prefix,
- // for example TaxDocs/document1.pdf, are eligible for replication. For any
- // object request with this key name prefix, Amazon S3 will return the x-amz-replication-status
- // header with value PENDING, COMPLETED or FAILED indicating object replication
- // status.
- //
- // * If requesting an object from a destination bucket — Amazon S3 will
- // return the x-amz-replication-status header with value REPLICA if the object
- // in your request is a replica that Amazon S3 created and there is no replica
- // modification replication in progress.
- //
- // * When replicating objects to multiple destination buckets the x-amz-replication-status
- // header acts differently. The header of the source object will only return
- // a value of COMPLETED when replication is successful to all destinations.
- // The header will remain at value PENDING until replication has completed
- // for all destinations. If one or more destinations fails replication the
- // header will return FAILED.
- //
- // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html).
- ReplicationStatus *string `location:"header" locationName:"x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // If the object is an archived object (an object whose storage class is GLACIER),
- // the response includes this header if either the archive restoration is in
- // progress (see RestoreObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html)
- // or an archive copy is already restored.
- //
- // If an archive copy is already restored, the header value indicates when Amazon
- // S3 is scheduled to delete the object copy. For example:
- //
- // x-amz-restore: ongoing-request="false", expiry-date="Fri, 21 Dec 2012 00:00:00
- // GMT"
- //
- // If the object restoration is in progress, the header returns the value ongoing-request="true".
- //
- // For more information about archiving objects, see Transitioning Objects:
- // General Considerations (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html#lifecycle-transition-general-considerations).
- Restore *string `location:"header" locationName:"x-amz-restore" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) that was used for the
- // object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // If the object is stored using server-side encryption either with an AWS KMS
- // customer master key (CMK) or an Amazon S3-managed encryption key, the response
- // includes this header with the value of the server-side encryption algorithm
- // used when storing this object in Amazon S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // Provides storage class information of the object. Amazon S3 returns this
- // header for all objects except for S3 Standard storage class objects.
- //
- // For more information, see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html).
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
-
- // Version of the object.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-
- // If the bucket is configured as a website, redirects requests for this object
- // to another object in the same bucket or to an external URL. Amazon S3 stores
- // the value of this header in the object metadata.
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation
-func (s HeadObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s HeadObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetAcceptRanges sets the AcceptRanges field's value.
-func (s *HeadObjectOutput) SetAcceptRanges(v string) *HeadObjectOutput {
- s.AcceptRanges = &v
- return s
-}
-
-// SetArchiveStatus sets the ArchiveStatus field's value.
-func (s *HeadObjectOutput) SetArchiveStatus(v string) *HeadObjectOutput {
- s.ArchiveStatus = &v
- return s
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *HeadObjectOutput) SetBucketKeyEnabled(v bool) *HeadObjectOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *HeadObjectOutput) SetCacheControl(v string) *HeadObjectOutput {
- s.CacheControl = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *HeadObjectOutput) SetContentDisposition(v string) *HeadObjectOutput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *HeadObjectOutput) SetContentEncoding(v string) *HeadObjectOutput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *HeadObjectOutput) SetContentLanguage(v string) *HeadObjectOutput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *HeadObjectOutput) SetContentLength(v int64) *HeadObjectOutput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *HeadObjectOutput) SetContentType(v string) *HeadObjectOutput {
- s.ContentType = &v
- return s
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *HeadObjectOutput) SetDeleteMarker(v bool) *HeadObjectOutput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *HeadObjectOutput) SetETag(v string) *HeadObjectOutput {
- s.ETag = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *HeadObjectOutput) SetExpiration(v string) *HeadObjectOutput {
- s.Expiration = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *HeadObjectOutput) SetExpires(v string) *HeadObjectOutput {
- s.Expires = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *HeadObjectOutput) SetLastModified(v time.Time) *HeadObjectOutput {
- s.LastModified = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *HeadObjectOutput) SetMetadata(v map[string]*string) *HeadObjectOutput {
- s.Metadata = v
- return s
-}
-
-// SetMissingMeta sets the MissingMeta field's value.
-func (s *HeadObjectOutput) SetMissingMeta(v int64) *HeadObjectOutput {
- s.MissingMeta = &v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *HeadObjectOutput) SetObjectLockLegalHoldStatus(v string) *HeadObjectOutput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *HeadObjectOutput) SetObjectLockMode(v string) *HeadObjectOutput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *HeadObjectOutput) SetObjectLockRetainUntilDate(v time.Time) *HeadObjectOutput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetPartsCount sets the PartsCount field's value.
-func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
- s.PartsCount = &v
- return s
-}
-
-// SetReplicationStatus sets the ReplicationStatus field's value.
-func (s *HeadObjectOutput) SetReplicationStatus(v string) *HeadObjectOutput {
- s.ReplicationStatus = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *HeadObjectOutput) SetRequestCharged(v string) *HeadObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetRestore sets the Restore field's value.
-func (s *HeadObjectOutput) SetRestore(v string) *HeadObjectOutput {
- s.Restore = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *HeadObjectOutput) SetSSECustomerAlgorithm(v string) *HeadObjectOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *HeadObjectOutput) SetSSECustomerKeyMD5(v string) *HeadObjectOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *HeadObjectOutput) SetSSEKMSKeyId(v string) *HeadObjectOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *HeadObjectOutput) SetServerSideEncryption(v string) *HeadObjectOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *HeadObjectOutput) SetStorageClass(v string) *HeadObjectOutput {
- s.StorageClass = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *HeadObjectOutput) SetVersionId(v string) *HeadObjectOutput {
- s.VersionId = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *HeadObjectOutput) SetWebsiteRedirectLocation(v string) *HeadObjectOutput {
- s.WebsiteRedirectLocation = &v
- return s
-}
-
-// Container for the Suffix element.
-type IndexDocument struct {
- _ struct{} `type:"structure"`
-
- // A suffix that is appended to a request that is for a directory on the website
- // endpoint (for example,if the suffix is index.html and you make a request
- // to samplebucket/images/ the data that is returned will be for the object
- // with the key name images/index.html) The suffix must not be empty and must
- // not include a slash character.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Suffix is a required field
- Suffix *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s IndexDocument) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IndexDocument) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *IndexDocument) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IndexDocument"}
- if s.Suffix == nil {
- invalidParams.Add(request.NewErrParamRequired("Suffix"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetSuffix sets the Suffix field's value.
-func (s *IndexDocument) SetSuffix(v string) *IndexDocument {
- s.Suffix = &v
- return s
-}
-
-// Container element that identifies who initiated the multipart upload.
-type Initiator struct {
- _ struct{} `type:"structure"`
-
- // Name of the Principal.
- DisplayName *string `type:"string"`
-
- // If the principal is an AWS account, it provides the Canonical User ID. If
- // the principal is an IAM User, it provides a user ARN value.
- ID *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Initiator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Initiator) GoString() string {
- return s.String()
-}
-
-// SetDisplayName sets the DisplayName field's value.
-func (s *Initiator) SetDisplayName(v string) *Initiator {
- s.DisplayName = &v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *Initiator) SetID(v string) *Initiator {
- s.ID = &v
- return s
-}
-
-// Describes the serialization format of the object.
-type InputSerialization struct {
- _ struct{} `type:"structure"`
-
- // Describes the serialization of a CSV-encoded object.
- CSV *CSVInput `type:"structure"`
-
- // Specifies object's compression format. Valid values: NONE, GZIP, BZIP2. Default
- // Value: NONE.
- CompressionType *string `type:"string" enum:"CompressionType"`
-
- // Specifies JSON as object's input serialization format.
- JSON *JSONInput `type:"structure"`
-
- // Specifies Parquet as object's input serialization format.
- Parquet *ParquetInput `type:"structure"`
-}
-
-// String returns the string representation
-func (s InputSerialization) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InputSerialization) GoString() string {
- return s.String()
-}
-
-// SetCSV sets the CSV field's value.
-func (s *InputSerialization) SetCSV(v *CSVInput) *InputSerialization {
- s.CSV = v
- return s
-}
-
-// SetCompressionType sets the CompressionType field's value.
-func (s *InputSerialization) SetCompressionType(v string) *InputSerialization {
- s.CompressionType = &v
- return s
-}
-
-// SetJSON sets the JSON field's value.
-func (s *InputSerialization) SetJSON(v *JSONInput) *InputSerialization {
- s.JSON = v
- return s
-}
-
-// SetParquet sets the Parquet field's value.
-func (s *InputSerialization) SetParquet(v *ParquetInput) *InputSerialization {
- s.Parquet = v
- return s
-}
-
-// A container for specifying S3 Intelligent-Tiering filters. The filters determine
-// the subset of objects to which the rule applies.
-type IntelligentTieringAndOperator struct {
- _ struct{} `type:"structure"`
-
- // An object key name prefix that identifies the subset of objects to which
- // the configuration applies.
- Prefix *string `type:"string"`
-
- // All of these tags must exist in the object's tag set in order for the configuration
- // to apply.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s IntelligentTieringAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IntelligentTieringAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *IntelligentTieringAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringAndOperator"}
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *IntelligentTieringAndOperator) SetPrefix(v string) *IntelligentTieringAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *IntelligentTieringAndOperator) SetTags(v []*Tag) *IntelligentTieringAndOperator {
- s.Tags = v
- return s
-}
-
-// Specifies the S3 Intelligent-Tiering configuration for an Amazon S3 bucket.
-//
-// For information about the S3 Intelligent-Tiering storage class, see Storage
-// class for automatically optimizing frequently and infrequently accessed objects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access).
-type IntelligentTieringConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies a bucket filter. The configuration only includes objects that meet
- // the filter's criteria.
- Filter *IntelligentTieringFilter `type:"structure"`
-
- // The ID used to identify the S3 Intelligent-Tiering configuration.
- //
- // Id is a required field
- Id *string `type:"string" required:"true"`
-
- // Specifies the status of the configuration.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"IntelligentTieringStatus"`
-
- // Specifies the S3 Intelligent-Tiering storage class tier of the configuration.
- //
- // Tierings is a required field
- Tierings []*Tiering `locationName:"Tiering" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation
-func (s IntelligentTieringConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IntelligentTieringConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *IntelligentTieringConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringConfiguration"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
- if s.Tierings == nil {
- invalidParams.Add(request.NewErrParamRequired("Tierings"))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if s.Tierings != nil {
- for i, v := range s.Tierings {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tierings", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *IntelligentTieringConfiguration) SetFilter(v *IntelligentTieringFilter) *IntelligentTieringConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *IntelligentTieringConfiguration) SetId(v string) *IntelligentTieringConfiguration {
- s.Id = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *IntelligentTieringConfiguration) SetStatus(v string) *IntelligentTieringConfiguration {
- s.Status = &v
- return s
-}
-
-// SetTierings sets the Tierings field's value.
-func (s *IntelligentTieringConfiguration) SetTierings(v []*Tiering) *IntelligentTieringConfiguration {
- s.Tierings = v
- return s
-}
-
-// The Filter is used to identify objects that the S3 Intelligent-Tiering configuration
-// applies to.
-type IntelligentTieringFilter struct {
- _ struct{} `type:"structure"`
-
- // A conjunction (logical AND) of predicates, which is used in evaluating a
- // metrics filter. The operator must have at least two predicates, and an object
- // must match all of the predicates in order for the filter to apply.
- And *IntelligentTieringAndOperator `type:"structure"`
-
- // An object key name prefix that identifies the subset of objects to which
- // the rule applies.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- Prefix *string `type:"string"`
-
- // A container of a key value name pair.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation
-func (s IntelligentTieringFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s IntelligentTieringFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *IntelligentTieringFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "IntelligentTieringFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *IntelligentTieringFilter) SetAnd(v *IntelligentTieringAndOperator) *IntelligentTieringFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *IntelligentTieringFilter) SetPrefix(v string) *IntelligentTieringFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *IntelligentTieringFilter) SetTag(v *Tag) *IntelligentTieringFilter {
- s.Tag = v
- return s
-}
-
-// Specifies the inventory configuration for an Amazon S3 bucket. For more information,
-// see GET Bucket inventory (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html)
-// in the Amazon S3 API Reference.
-type InventoryConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Contains information about where to publish the inventory results.
- //
- // Destination is a required field
- Destination *InventoryDestination `type:"structure" required:"true"`
-
- // Specifies an inventory filter. The inventory only includes objects that meet
- // the filter's criteria.
- Filter *InventoryFilter `type:"structure"`
-
- // The ID used to identify the inventory configuration.
- //
- // Id is a required field
- Id *string `type:"string" required:"true"`
-
- // Object versions to include in the inventory list. If set to All, the list
- // includes all the object versions, which adds the version-related fields VersionId,
- // IsLatest, and DeleteMarker to the list. If set to Current, the list does
- // not contain these version-related fields.
- //
- // IncludedObjectVersions is a required field
- IncludedObjectVersions *string `type:"string" required:"true" enum:"InventoryIncludedObjectVersions"`
-
- // Specifies whether the inventory is enabled or disabled. If set to True, an
- // inventory list is generated. If set to False, no inventory list is generated.
- //
- // IsEnabled is a required field
- IsEnabled *bool `type:"boolean" required:"true"`
-
- // Contains the optional fields that are included in the inventory results.
- OptionalFields []*string `locationNameList:"Field" type:"list"`
-
- // Specifies the schedule for generating inventory results.
- //
- // Schedule is a required field
- Schedule *InventorySchedule `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s InventoryConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InventoryConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryConfiguration"}
- if s.Destination == nil {
- invalidParams.Add(request.NewErrParamRequired("Destination"))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.IncludedObjectVersions == nil {
- invalidParams.Add(request.NewErrParamRequired("IncludedObjectVersions"))
- }
- if s.IsEnabled == nil {
- invalidParams.Add(request.NewErrParamRequired("IsEnabled"))
- }
- if s.Schedule == nil {
- invalidParams.Add(request.NewErrParamRequired("Schedule"))
- }
- if s.Destination != nil {
- if err := s.Destination.Validate(); err != nil {
- invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
- }
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if s.Schedule != nil {
- if err := s.Schedule.Validate(); err != nil {
- invalidParams.AddNested("Schedule", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDestination sets the Destination field's value.
-func (s *InventoryConfiguration) SetDestination(v *InventoryDestination) *InventoryConfiguration {
- s.Destination = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *InventoryConfiguration) SetFilter(v *InventoryFilter) *InventoryConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *InventoryConfiguration) SetId(v string) *InventoryConfiguration {
- s.Id = &v
- return s
-}
-
-// SetIncludedObjectVersions sets the IncludedObjectVersions field's value.
-func (s *InventoryConfiguration) SetIncludedObjectVersions(v string) *InventoryConfiguration {
- s.IncludedObjectVersions = &v
- return s
-}
-
-// SetIsEnabled sets the IsEnabled field's value.
-func (s *InventoryConfiguration) SetIsEnabled(v bool) *InventoryConfiguration {
- s.IsEnabled = &v
- return s
-}
-
-// SetOptionalFields sets the OptionalFields field's value.
-func (s *InventoryConfiguration) SetOptionalFields(v []*string) *InventoryConfiguration {
- s.OptionalFields = v
- return s
-}
-
-// SetSchedule sets the Schedule field's value.
-func (s *InventoryConfiguration) SetSchedule(v *InventorySchedule) *InventoryConfiguration {
- s.Schedule = v
- return s
-}
-
-// Specifies the inventory configuration for an Amazon S3 bucket.
-type InventoryDestination struct {
- _ struct{} `type:"structure"`
-
- // Contains the bucket name, file format, bucket owner (optional), and prefix
- // (optional) where inventory results are published.
- //
- // S3BucketDestination is a required field
- S3BucketDestination *InventoryS3BucketDestination `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s InventoryDestination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InventoryDestination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryDestination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryDestination"}
- if s.S3BucketDestination == nil {
- invalidParams.Add(request.NewErrParamRequired("S3BucketDestination"))
- }
- if s.S3BucketDestination != nil {
- if err := s.S3BucketDestination.Validate(); err != nil {
- invalidParams.AddNested("S3BucketDestination", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetS3BucketDestination sets the S3BucketDestination field's value.
-func (s *InventoryDestination) SetS3BucketDestination(v *InventoryS3BucketDestination) *InventoryDestination {
- s.S3BucketDestination = v
- return s
-}
-
-// Contains the type of server-side encryption used to encrypt the inventory
-// results.
-type InventoryEncryption struct {
- _ struct{} `type:"structure"`
-
- // Specifies the use of SSE-KMS to encrypt delivered inventory reports.
- SSEKMS *SSEKMS `locationName:"SSE-KMS" type:"structure"`
-
- // Specifies the use of SSE-S3 to encrypt delivered inventory reports.
- SSES3 *SSES3 `locationName:"SSE-S3" type:"structure"`
-}
-
-// String returns the string representation
-func (s InventoryEncryption) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InventoryEncryption) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryEncryption) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryEncryption"}
- if s.SSEKMS != nil {
- if err := s.SSEKMS.Validate(); err != nil {
- invalidParams.AddNested("SSEKMS", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetSSEKMS sets the SSEKMS field's value.
-func (s *InventoryEncryption) SetSSEKMS(v *SSEKMS) *InventoryEncryption {
- s.SSEKMS = v
- return s
-}
-
-// SetSSES3 sets the SSES3 field's value.
-func (s *InventoryEncryption) SetSSES3(v *SSES3) *InventoryEncryption {
- s.SSES3 = v
- return s
-}
-
-// Specifies an inventory filter. The inventory only includes objects that meet
-// the filter's criteria.
-type InventoryFilter struct {
- _ struct{} `type:"structure"`
-
- // The prefix that an object must have to be included in the inventory results.
- //
- // Prefix is a required field
- Prefix *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s InventoryFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InventoryFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryFilter"}
- if s.Prefix == nil {
- invalidParams.Add(request.NewErrParamRequired("Prefix"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *InventoryFilter) SetPrefix(v string) *InventoryFilter {
- s.Prefix = &v
- return s
-}
-
-// Contains the bucket name, file format, bucket owner (optional), and prefix
-// (optional) where inventory results are published.
-type InventoryS3BucketDestination struct {
- _ struct{} `type:"structure"`
-
- // The account ID that owns the destination S3 bucket. If no account ID is provided,
- // the owner is not validated before exporting data.
- //
- // Although this value is optional, we strongly recommend that you set it to
- // help prevent problems if the destination bucket ownership changes.
- AccountId *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the bucket where inventory results will
- // be published.
- //
- // Bucket is a required field
- Bucket *string `type:"string" required:"true"`
-
- // Contains the type of server-side encryption used to encrypt the inventory
- // results.
- Encryption *InventoryEncryption `type:"structure"`
-
- // Specifies the output format of the inventory results.
- //
- // Format is a required field
- Format *string `type:"string" required:"true" enum:"InventoryFormat"`
-
- // The prefix that is prepended to all inventory results.
- Prefix *string `type:"string"`
-}
-
-// String returns the string representation
-func (s InventoryS3BucketDestination) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InventoryS3BucketDestination) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventoryS3BucketDestination) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventoryS3BucketDestination"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Format == nil {
- invalidParams.Add(request.NewErrParamRequired("Format"))
- }
- if s.Encryption != nil {
- if err := s.Encryption.Validate(); err != nil {
- invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *InventoryS3BucketDestination) SetAccountId(v string) *InventoryS3BucketDestination {
- s.AccountId = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *InventoryS3BucketDestination) SetBucket(v string) *InventoryS3BucketDestination {
- s.Bucket = &v
- return s
-}
-
-func (s *InventoryS3BucketDestination) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetEncryption sets the Encryption field's value.
-func (s *InventoryS3BucketDestination) SetEncryption(v *InventoryEncryption) *InventoryS3BucketDestination {
- s.Encryption = v
- return s
-}
-
-// SetFormat sets the Format field's value.
-func (s *InventoryS3BucketDestination) SetFormat(v string) *InventoryS3BucketDestination {
- s.Format = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *InventoryS3BucketDestination) SetPrefix(v string) *InventoryS3BucketDestination {
- s.Prefix = &v
- return s
-}
-
-// Specifies the schedule for generating inventory results.
-type InventorySchedule struct {
- _ struct{} `type:"structure"`
-
- // Specifies how frequently inventory results are produced.
- //
- // Frequency is a required field
- Frequency *string `type:"string" required:"true" enum:"InventoryFrequency"`
-}
-
-// String returns the string representation
-func (s InventorySchedule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s InventorySchedule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *InventorySchedule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "InventorySchedule"}
- if s.Frequency == nil {
- invalidParams.Add(request.NewErrParamRequired("Frequency"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFrequency sets the Frequency field's value.
-func (s *InventorySchedule) SetFrequency(v string) *InventorySchedule {
- s.Frequency = &v
- return s
-}
-
-// Specifies JSON as object's input serialization format.
-type JSONInput struct {
- _ struct{} `type:"structure"`
-
- // The type of JSON. Valid values: Document, Lines.
- Type *string `type:"string" enum:"JSONType"`
-}
-
-// String returns the string representation
-func (s JSONInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s JSONInput) GoString() string {
- return s.String()
-}
-
-// SetType sets the Type field's value.
-func (s *JSONInput) SetType(v string) *JSONInput {
- s.Type = &v
- return s
-}
-
-// Specifies JSON as request's output serialization format.
-type JSONOutput struct {
- _ struct{} `type:"structure"`
-
- // The value used to separate individual records in the output. If no value
- // is specified, Amazon S3 uses a newline character ('\n').
- RecordDelimiter *string `type:"string"`
-}
-
-// String returns the string representation
-func (s JSONOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s JSONOutput) GoString() string {
- return s.String()
-}
-
-// SetRecordDelimiter sets the RecordDelimiter field's value.
-func (s *JSONOutput) SetRecordDelimiter(v string) *JSONOutput {
- s.RecordDelimiter = &v
- return s
-}
-
-// A container for object key name prefix and suffix filtering rules.
-type KeyFilter struct {
- _ struct{} `type:"structure"`
-
- // A list of containers for the key-value pair that defines the criteria for
- // the filter rule.
- FilterRules []*FilterRule `locationName:"FilterRule" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s KeyFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s KeyFilter) GoString() string {
- return s.String()
-}
-
-// SetFilterRules sets the FilterRules field's value.
-func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
- s.FilterRules = v
- return s
-}
-
-// A container for specifying the configuration for AWS Lambda notifications.
-type LambdaFunctionConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The Amazon S3 bucket event for which to invoke the AWS Lambda function. For
- // more information, see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- //
- // Events is a required field
- Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
-
- // Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- Filter *NotificationConfigurationFilter `type:"structure"`
-
- // An optional unique identifier for configurations in a notification configuration.
- // If you don't provide one, Amazon S3 will assign an ID.
- Id *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the AWS Lambda function that Amazon S3
- // invokes when the specified event type occurs.
- //
- // LambdaFunctionArn is a required field
- LambdaFunctionArn *string `locationName:"CloudFunction" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s LambdaFunctionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LambdaFunctionConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LambdaFunctionConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LambdaFunctionConfiguration"}
- if s.Events == nil {
- invalidParams.Add(request.NewErrParamRequired("Events"))
- }
- if s.LambdaFunctionArn == nil {
- invalidParams.Add(request.NewErrParamRequired("LambdaFunctionArn"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEvents sets the Events field's value.
-func (s *LambdaFunctionConfiguration) SetEvents(v []*string) *LambdaFunctionConfiguration {
- s.Events = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *LambdaFunctionConfiguration) SetFilter(v *NotificationConfigurationFilter) *LambdaFunctionConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *LambdaFunctionConfiguration) SetId(v string) *LambdaFunctionConfiguration {
- s.Id = &v
- return s
-}
-
-// SetLambdaFunctionArn sets the LambdaFunctionArn field's value.
-func (s *LambdaFunctionConfiguration) SetLambdaFunctionArn(v string) *LambdaFunctionConfiguration {
- s.LambdaFunctionArn = &v
- return s
-}
-
-// Container for lifecycle rules. You can add as many as 1000 rules.
-type LifecycleConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies lifecycle configuration rules for an Amazon S3 bucket.
- //
- // Rules is a required field
- Rules []*Rule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation
-func (s LifecycleConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LifecycleConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LifecycleConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LifecycleConfiguration"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *LifecycleConfiguration) SetRules(v []*Rule) *LifecycleConfiguration {
- s.Rules = v
- return s
-}
-
-// Container for the expiration for the lifecycle of the object.
-type LifecycleExpiration struct {
- _ struct{} `type:"structure"`
-
- // Indicates at what date the object is to be moved or deleted. Should be in
- // GMT ISO 8601 Format.
- Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // Indicates the lifetime, in days, of the objects that are subject to the rule.
- // The value must be a non-zero positive integer.
- Days *int64 `type:"integer"`
-
- // Indicates whether Amazon S3 will remove a delete marker with no noncurrent
- // versions. If set to true, the delete marker will be expired; if set to false
- // the policy takes no action. This cannot be specified with Days or Date in
- // a Lifecycle Expiration Policy.
- ExpiredObjectDeleteMarker *bool `type:"boolean"`
-}
-
-// String returns the string representation
-func (s LifecycleExpiration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LifecycleExpiration) GoString() string {
- return s.String()
-}
-
-// SetDate sets the Date field's value.
-func (s *LifecycleExpiration) SetDate(v time.Time) *LifecycleExpiration {
- s.Date = &v
- return s
-}
-
-// SetDays sets the Days field's value.
-func (s *LifecycleExpiration) SetDays(v int64) *LifecycleExpiration {
- s.Days = &v
- return s
-}
-
-// SetExpiredObjectDeleteMarker sets the ExpiredObjectDeleteMarker field's value.
-func (s *LifecycleExpiration) SetExpiredObjectDeleteMarker(v bool) *LifecycleExpiration {
- s.ExpiredObjectDeleteMarker = &v
- return s
-}
-
-// A lifecycle rule for individual objects in an Amazon S3 bucket.
-type LifecycleRule struct {
- _ struct{} `type:"structure"`
-
- // Specifies the days since the initiation of an incomplete multipart upload
- // that Amazon S3 will wait before permanently removing all parts of the upload.
- // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
- // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
- // in the Amazon S3 User Guide.
- AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
-
- // Specifies the expiration for the lifecycle of the object in the form of date,
- // days and, whether the object has a delete marker.
- Expiration *LifecycleExpiration `type:"structure"`
-
- // The Filter is used to identify objects that a Lifecycle Rule applies to.
- // A Filter must have exactly one of Prefix, Tag, or And specified. Filter is
- // required if the LifecycleRule does not containt a Prefix element.
- Filter *LifecycleRuleFilter `type:"structure"`
-
- // Unique identifier for the rule. The value cannot be longer than 255 characters.
- ID *string `type:"string"`
-
- // Specifies when noncurrent object versions expire. Upon expiration, Amazon
- // S3 permanently deletes the noncurrent object versions. You set this lifecycle
- // configuration action on a bucket that has versioning enabled (or suspended)
- // to request that Amazon S3 delete noncurrent object versions at a specific
- // period in the object's lifetime.
- NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
-
- // Specifies the transition rule for the lifecycle rule that describes when
- // noncurrent objects transition to a specific storage class. If your bucket
- // is versioning-enabled (or versioning is suspended), you can set this action
- // to request that Amazon S3 transition noncurrent object versions to a specific
- // storage class at a set period in the object's lifetime.
- NoncurrentVersionTransitions []*NoncurrentVersionTransition `locationName:"NoncurrentVersionTransition" type:"list" flattened:"true"`
-
- // Prefix identifying one or more objects to which the rule applies. This is
- // no longer used; use Filter instead.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Deprecated: Prefix has been deprecated
- Prefix *string `deprecated:"true" type:"string"`
-
- // If 'Enabled', the rule is currently being applied. If 'Disabled', the rule
- // is not currently being applied.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
-
- // Specifies when an Amazon S3 object transitions to a specified storage class.
- Transitions []*Transition `locationName:"Transition" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s LifecycleRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LifecycleRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LifecycleRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LifecycleRule"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
-func (s *LifecycleRule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *LifecycleRule {
- s.AbortIncompleteMultipartUpload = v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *LifecycleRule) SetExpiration(v *LifecycleExpiration) *LifecycleRule {
- s.Expiration = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *LifecycleRule) SetFilter(v *LifecycleRuleFilter) *LifecycleRule {
- s.Filter = v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *LifecycleRule) SetID(v string) *LifecycleRule {
- s.ID = &v
- return s
-}
-
-// SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
-func (s *LifecycleRule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *LifecycleRule {
- s.NoncurrentVersionExpiration = v
- return s
-}
-
-// SetNoncurrentVersionTransitions sets the NoncurrentVersionTransitions field's value.
-func (s *LifecycleRule) SetNoncurrentVersionTransitions(v []*NoncurrentVersionTransition) *LifecycleRule {
- s.NoncurrentVersionTransitions = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *LifecycleRule) SetPrefix(v string) *LifecycleRule {
- s.Prefix = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *LifecycleRule) SetStatus(v string) *LifecycleRule {
- s.Status = &v
- return s
-}
-
-// SetTransitions sets the Transitions field's value.
-func (s *LifecycleRule) SetTransitions(v []*Transition) *LifecycleRule {
- s.Transitions = v
- return s
-}
-
-// This is used in a Lifecycle Rule Filter to apply a logical AND to two or
-// more predicates. The Lifecycle Rule will apply to any object matching all
-// of the predicates configured inside the And operator.
-type LifecycleRuleAndOperator struct {
- _ struct{} `type:"structure"`
-
- // Prefix identifying one or more objects to which the rule applies.
- Prefix *string `type:"string"`
-
- // All of these tags must exist in the object's tag set in order for the rule
- // to apply.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s LifecycleRuleAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LifecycleRuleAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LifecycleRuleAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleAndOperator"}
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *LifecycleRuleAndOperator) SetPrefix(v string) *LifecycleRuleAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *LifecycleRuleAndOperator) SetTags(v []*Tag) *LifecycleRuleAndOperator {
- s.Tags = v
- return s
-}
-
-// The Filter is used to identify objects that a Lifecycle Rule applies to.
-// A Filter must have exactly one of Prefix, Tag, or And specified.
-type LifecycleRuleFilter struct {
- _ struct{} `type:"structure"`
-
- // This is used in a Lifecycle Rule Filter to apply a logical AND to two or
- // more predicates. The Lifecycle Rule will apply to any object matching all
- // of the predicates configured inside the And operator.
- And *LifecycleRuleAndOperator `type:"structure"`
-
- // Prefix identifying one or more objects to which the rule applies.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- Prefix *string `type:"string"`
-
- // This tag must exist in the object's tag set in order for the rule to apply.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation
-func (s LifecycleRuleFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LifecycleRuleFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LifecycleRuleFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LifecycleRuleFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *LifecycleRuleFilter) SetAnd(v *LifecycleRuleAndOperator) *LifecycleRuleFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *LifecycleRuleFilter) SetPrefix(v string) *LifecycleRuleFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
- s.Tag = v
- return s
-}
-
-type ListBucketAnalyticsConfigurationsInput struct {
- _ struct{} `locationName:"ListBucketAnalyticsConfigurationsRequest" type:"structure"`
-
- // The name of the bucket from which analytics configurations are retrieved.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ContinuationToken that represents a placeholder from where this request
- // should begin.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s ListBucketAnalyticsConfigurationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketAnalyticsConfigurationsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListBucketAnalyticsConfigurationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBucketAnalyticsConfigurationsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListBucketAnalyticsConfigurationsInput) SetBucket(v string) *ListBucketAnalyticsConfigurationsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListBucketAnalyticsConfigurationsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketAnalyticsConfigurationsInput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsInput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListBucketAnalyticsConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketAnalyticsConfigurationsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *ListBucketAnalyticsConfigurationsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListBucketAnalyticsConfigurationsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListBucketAnalyticsConfigurationsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListBucketAnalyticsConfigurationsOutput struct {
- _ struct{} `type:"structure"`
-
- // The list of analytics configurations for a bucket.
- AnalyticsConfigurationList []*AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"list" flattened:"true"`
-
- // The marker that is used as a starting point for this analytics configuration
- // list response. This value is present if it was sent in the request.
- ContinuationToken *string `type:"string"`
-
- // Indicates whether the returned list of analytics configurations is complete.
- // A value of true indicates that the list is not complete and the NextContinuationToken
- // will be provided for a subsequent request.
- IsTruncated *bool `type:"boolean"`
-
- // NextContinuationToken is sent when isTruncated is true, which indicates that
- // there are more analytics configurations to list. The next request must include
- // this NextContinuationToken. The token is obfuscated and is not a usable value.
- NextContinuationToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListBucketAnalyticsConfigurationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketAnalyticsConfigurationsOutput) GoString() string {
- return s.String()
-}
-
-// SetAnalyticsConfigurationList sets the AnalyticsConfigurationList field's value.
-func (s *ListBucketAnalyticsConfigurationsOutput) SetAnalyticsConfigurationList(v []*AnalyticsConfiguration) *ListBucketAnalyticsConfigurationsOutput {
- s.AnalyticsConfigurationList = v
- return s
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketAnalyticsConfigurationsOutput) SetContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListBucketAnalyticsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketAnalyticsConfigurationsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListBucketAnalyticsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketAnalyticsConfigurationsOutput {
- s.NextContinuationToken = &v
- return s
-}
-
-type ListBucketIntelligentTieringConfigurationsInput struct {
- _ struct{} `locationName:"ListBucketIntelligentTieringConfigurationsRequest" type:"structure"`
-
- // The name of the Amazon S3 bucket whose configuration you want to modify or
- // retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ContinuationToken that represents a placeholder from where this request
- // should begin.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-}
-
-// String returns the string representation
-func (s ListBucketIntelligentTieringConfigurationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketIntelligentTieringConfigurationsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListBucketIntelligentTieringConfigurationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBucketIntelligentTieringConfigurationsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListBucketIntelligentTieringConfigurationsInput) SetBucket(v string) *ListBucketIntelligentTieringConfigurationsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListBucketIntelligentTieringConfigurationsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketIntelligentTieringConfigurationsInput) SetContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsInput {
- s.ContinuationToken = &v
- return s
-}
-
-func (s *ListBucketIntelligentTieringConfigurationsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListBucketIntelligentTieringConfigurationsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListBucketIntelligentTieringConfigurationsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListBucketIntelligentTieringConfigurationsOutput struct {
- _ struct{} `type:"structure"`
-
- // The ContinuationToken that represents a placeholder from where this request
- // should begin.
- ContinuationToken *string `type:"string"`
-
- // The list of S3 Intelligent-Tiering configurations for a bucket.
- IntelligentTieringConfigurationList []*IntelligentTieringConfiguration `locationName:"IntelligentTieringConfiguration" type:"list" flattened:"true"`
-
- // Indicates whether the returned list of analytics configurations is complete.
- // A value of true indicates that the list is not complete and the NextContinuationToken
- // will be provided for a subsequent request.
- IsTruncated *bool `type:"boolean"`
-
- // The marker used to continue this inventory configuration listing. Use the
- // NextContinuationToken from this response to continue the listing in a subsequent
- // request. The continuation token is an opaque value that Amazon S3 understands.
- NextContinuationToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListBucketIntelligentTieringConfigurationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketIntelligentTieringConfigurationsOutput) GoString() string {
- return s.String()
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketIntelligentTieringConfigurationsOutput) SetContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsOutput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetIntelligentTieringConfigurationList sets the IntelligentTieringConfigurationList field's value.
-func (s *ListBucketIntelligentTieringConfigurationsOutput) SetIntelligentTieringConfigurationList(v []*IntelligentTieringConfiguration) *ListBucketIntelligentTieringConfigurationsOutput {
- s.IntelligentTieringConfigurationList = v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListBucketIntelligentTieringConfigurationsOutput) SetIsTruncated(v bool) *ListBucketIntelligentTieringConfigurationsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListBucketIntelligentTieringConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketIntelligentTieringConfigurationsOutput {
- s.NextContinuationToken = &v
- return s
-}
-
-type ListBucketInventoryConfigurationsInput struct {
- _ struct{} `locationName:"ListBucketInventoryConfigurationsRequest" type:"structure"`
-
- // The name of the bucket containing the inventory configurations to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The marker used to continue an inventory configuration listing that has been
- // truncated. Use the NextContinuationToken from a previously truncated list
- // response to continue the listing. The continuation token is an opaque value
- // that Amazon S3 understands.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s ListBucketInventoryConfigurationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketInventoryConfigurationsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListBucketInventoryConfigurationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBucketInventoryConfigurationsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListBucketInventoryConfigurationsInput) SetBucket(v string) *ListBucketInventoryConfigurationsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListBucketInventoryConfigurationsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketInventoryConfigurationsInput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsInput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListBucketInventoryConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketInventoryConfigurationsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *ListBucketInventoryConfigurationsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListBucketInventoryConfigurationsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListBucketInventoryConfigurationsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListBucketInventoryConfigurationsOutput struct {
- _ struct{} `type:"structure"`
-
- // If sent in the request, the marker that is used as a starting point for this
- // inventory configuration list response.
- ContinuationToken *string `type:"string"`
-
- // The list of inventory configurations for a bucket.
- InventoryConfigurationList []*InventoryConfiguration `locationName:"InventoryConfiguration" type:"list" flattened:"true"`
-
- // Tells whether the returned list of inventory configurations is complete.
- // A value of true indicates that the list is not complete and the NextContinuationToken
- // is provided for a subsequent request.
- IsTruncated *bool `type:"boolean"`
-
- // The marker used to continue this inventory configuration listing. Use the
- // NextContinuationToken from this response to continue the listing in a subsequent
- // request. The continuation token is an opaque value that Amazon S3 understands.
- NextContinuationToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListBucketInventoryConfigurationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketInventoryConfigurationsOutput) GoString() string {
- return s.String()
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketInventoryConfigurationsOutput) SetContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetInventoryConfigurationList sets the InventoryConfigurationList field's value.
-func (s *ListBucketInventoryConfigurationsOutput) SetInventoryConfigurationList(v []*InventoryConfiguration) *ListBucketInventoryConfigurationsOutput {
- s.InventoryConfigurationList = v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListBucketInventoryConfigurationsOutput) SetIsTruncated(v bool) *ListBucketInventoryConfigurationsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListBucketInventoryConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketInventoryConfigurationsOutput {
- s.NextContinuationToken = &v
- return s
-}
-
-type ListBucketMetricsConfigurationsInput struct {
- _ struct{} `locationName:"ListBucketMetricsConfigurationsRequest" type:"structure"`
-
- // The name of the bucket containing the metrics configurations to retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The marker that is used to continue a metrics configuration listing that
- // has been truncated. Use the NextContinuationToken from a previously truncated
- // list response to continue the listing. The continuation token is an opaque
- // value that Amazon S3 understands.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s ListBucketMetricsConfigurationsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketMetricsConfigurationsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListBucketMetricsConfigurationsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListBucketMetricsConfigurationsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListBucketMetricsConfigurationsInput) SetBucket(v string) *ListBucketMetricsConfigurationsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListBucketMetricsConfigurationsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketMetricsConfigurationsInput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsInput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListBucketMetricsConfigurationsInput) SetExpectedBucketOwner(v string) *ListBucketMetricsConfigurationsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *ListBucketMetricsConfigurationsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListBucketMetricsConfigurationsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListBucketMetricsConfigurationsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListBucketMetricsConfigurationsOutput struct {
- _ struct{} `type:"structure"`
-
- // The marker that is used as a starting point for this metrics configuration
- // list response. This value is present if it was sent in the request.
- ContinuationToken *string `type:"string"`
-
- // Indicates whether the returned list of metrics configurations is complete.
- // A value of true indicates that the list is not complete and the NextContinuationToken
- // will be provided for a subsequent request.
- IsTruncated *bool `type:"boolean"`
-
- // The list of metrics configurations for a bucket.
- MetricsConfigurationList []*MetricsConfiguration `locationName:"MetricsConfiguration" type:"list" flattened:"true"`
-
- // The marker used to continue a metrics configuration listing that has been
- // truncated. Use the NextContinuationToken from a previously truncated list
- // response to continue the listing. The continuation token is an opaque value
- // that Amazon S3 understands.
- NextContinuationToken *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListBucketMetricsConfigurationsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketMetricsConfigurationsOutput) GoString() string {
- return s.String()
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListBucketMetricsConfigurationsOutput) SetContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
- s.ContinuationToken = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListBucketMetricsConfigurationsOutput) SetIsTruncated(v bool) *ListBucketMetricsConfigurationsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetMetricsConfigurationList sets the MetricsConfigurationList field's value.
-func (s *ListBucketMetricsConfigurationsOutput) SetMetricsConfigurationList(v []*MetricsConfiguration) *ListBucketMetricsConfigurationsOutput {
- s.MetricsConfigurationList = v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListBucketMetricsConfigurationsOutput) SetNextContinuationToken(v string) *ListBucketMetricsConfigurationsOutput {
- s.NextContinuationToken = &v
- return s
-}
-
-type ListBucketsInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s ListBucketsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketsInput) GoString() string {
- return s.String()
-}
-
-type ListBucketsOutput struct {
- _ struct{} `type:"structure"`
-
- // The list of buckets owned by the requestor.
- Buckets []*Bucket `locationNameList:"Bucket" type:"list"`
-
- // The owner of the buckets listed.
- Owner *Owner `type:"structure"`
-}
-
-// String returns the string representation
-func (s ListBucketsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListBucketsOutput) GoString() string {
- return s.String()
-}
-
-// SetBuckets sets the Buckets field's value.
-func (s *ListBucketsOutput) SetBuckets(v []*Bucket) *ListBucketsOutput {
- s.Buckets = v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *ListBucketsOutput) SetOwner(v *Owner) *ListBucketsOutput {
- s.Owner = v
- return s
-}
-
-type ListMultipartUploadsInput struct {
- _ struct{} `locationName:"ListMultipartUploadsRequest" type:"structure"`
-
- // The name of the bucket to which the multipart upload was initiated.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Character you use to group keys.
- //
- // All keys that contain the same string between the prefix, if specified, and
- // the first occurrence of the delimiter after the prefix are grouped under
- // a single result element, CommonPrefixes. If you don't specify the prefix
- // parameter, then the substring starts at the beginning of the key. The keys
- // that are grouped under CommonPrefixes result element are not returned elsewhere
- // in the response.
- Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
-
- // Requests Amazon S3 to encode the object keys in the response and specifies
- // the encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters
- // with an ASCII value from 0 to 10. For characters that are not supported in
- // XML 1.0, you can add this parameter to request that Amazon S3 encode the
- // keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Together with upload-id-marker, this parameter specifies the multipart upload
- // after which listing should begin.
- //
- // If upload-id-marker is not specified, only the keys lexicographically greater
- // than the specified key-marker will be included in the list.
- //
- // If upload-id-marker is specified, any multipart uploads for a key equal to
- // the key-marker might also be included, provided those multipart uploads have
- // upload IDs lexicographically greater than the specified upload-id-marker.
- KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
-
- // Sets the maximum number of multipart uploads, from 1 to 1,000, to return
- // in the response body. 1,000 is the maximum number of uploads that can be
- // returned in a response.
- MaxUploads *int64 `location:"querystring" locationName:"max-uploads" type:"integer"`
-
- // Lists in-progress uploads only for those keys that begin with the specified
- // prefix. You can use prefixes to separate a bucket into different grouping
- // of keys. (You can think of using prefix to make groups in the same way you'd
- // use a folder in a file system.)
- Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
-
- // Together with key-marker, specifies the multipart upload after which listing
- // should begin. If key-marker is not specified, the upload-id-marker parameter
- // is ignored. Otherwise, any multipart uploads for a key equal to the key-marker
- // might be included in the list only if they have an upload ID lexicographically
- // greater than the specified upload-id-marker.
- UploadIdMarker *string `location:"querystring" locationName:"upload-id-marker" type:"string"`
-}
-
-// String returns the string representation
-func (s ListMultipartUploadsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListMultipartUploadsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListMultipartUploadsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListMultipartUploadsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListMultipartUploadsInput) SetBucket(v string) *ListMultipartUploadsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListMultipartUploadsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListMultipartUploadsInput) SetDelimiter(v string) *ListMultipartUploadsInput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListMultipartUploadsInput) SetEncodingType(v string) *ListMultipartUploadsInput {
- s.EncodingType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListMultipartUploadsInput) SetExpectedBucketOwner(v string) *ListMultipartUploadsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKeyMarker sets the KeyMarker field's value.
-func (s *ListMultipartUploadsInput) SetKeyMarker(v string) *ListMultipartUploadsInput {
- s.KeyMarker = &v
- return s
-}
-
-// SetMaxUploads sets the MaxUploads field's value.
-func (s *ListMultipartUploadsInput) SetMaxUploads(v int64) *ListMultipartUploadsInput {
- s.MaxUploads = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListMultipartUploadsInput) SetPrefix(v string) *ListMultipartUploadsInput {
- s.Prefix = &v
- return s
-}
-
-// SetUploadIdMarker sets the UploadIdMarker field's value.
-func (s *ListMultipartUploadsInput) SetUploadIdMarker(v string) *ListMultipartUploadsInput {
- s.UploadIdMarker = &v
- return s
-}
-
-func (s *ListMultipartUploadsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListMultipartUploadsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListMultipartUploadsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListMultipartUploadsOutput struct {
- _ struct{} `type:"structure"`
-
- // The name of the bucket to which the multipart upload was initiated.
- Bucket *string `type:"string"`
-
- // If you specify a delimiter in the request, then the result returns each distinct
- // key prefix containing the delimiter in a CommonPrefixes element. The distinct
- // key prefixes are returned in the Prefix child element.
- CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
-
- // Contains the delimiter you specified in the request. If you don't specify
- // a delimiter in your request, this element is absent from the response.
- Delimiter *string `type:"string"`
-
- // Encoding type used by Amazon S3 to encode object keys in the response.
- //
- // If you specify encoding-type request parameter, Amazon S3 includes this element
- // in the response, and returns encoded key name values in the following response
- // elements:
- //
- // Delimiter, KeyMarker, Prefix, NextKeyMarker, Key.
- EncodingType *string `type:"string" enum:"EncodingType"`
-
- // Indicates whether the returned list of multipart uploads is truncated. A
- // value of true indicates that the list was truncated. The list can be truncated
- // if the number of multipart uploads exceeds the limit allowed or specified
- // by max uploads.
- IsTruncated *bool `type:"boolean"`
-
- // The key at or after which the listing began.
- KeyMarker *string `type:"string"`
-
- // Maximum number of multipart uploads that could have been included in the
- // response.
- MaxUploads *int64 `type:"integer"`
-
- // When a list is truncated, this element specifies the value that should be
- // used for the key-marker request parameter in a subsequent request.
- NextKeyMarker *string `type:"string"`
-
- // When a list is truncated, this element specifies the value that should be
- // used for the upload-id-marker request parameter in a subsequent request.
- NextUploadIdMarker *string `type:"string"`
-
- // When a prefix is provided in the request, this field contains the specified
- // prefix. The result contains only keys starting with the specified prefix.
- Prefix *string `type:"string"`
-
- // Upload ID after which listing began.
- UploadIdMarker *string `type:"string"`
-
- // Container for elements related to a particular multipart upload. A response
- // can contain zero or more Upload elements.
- Uploads []*MultipartUpload `locationName:"Upload" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s ListMultipartUploadsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListMultipartUploadsOutput) GoString() string {
- return s.String()
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListMultipartUploadsOutput) SetBucket(v string) *ListMultipartUploadsOutput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListMultipartUploadsOutput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetCommonPrefixes sets the CommonPrefixes field's value.
-func (s *ListMultipartUploadsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListMultipartUploadsOutput {
- s.CommonPrefixes = v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListMultipartUploadsOutput) SetDelimiter(v string) *ListMultipartUploadsOutput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListMultipartUploadsOutput) SetEncodingType(v string) *ListMultipartUploadsOutput {
- s.EncodingType = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListMultipartUploadsOutput) SetIsTruncated(v bool) *ListMultipartUploadsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetKeyMarker sets the KeyMarker field's value.
-func (s *ListMultipartUploadsOutput) SetKeyMarker(v string) *ListMultipartUploadsOutput {
- s.KeyMarker = &v
- return s
-}
-
-// SetMaxUploads sets the MaxUploads field's value.
-func (s *ListMultipartUploadsOutput) SetMaxUploads(v int64) *ListMultipartUploadsOutput {
- s.MaxUploads = &v
- return s
-}
-
-// SetNextKeyMarker sets the NextKeyMarker field's value.
-func (s *ListMultipartUploadsOutput) SetNextKeyMarker(v string) *ListMultipartUploadsOutput {
- s.NextKeyMarker = &v
- return s
-}
-
-// SetNextUploadIdMarker sets the NextUploadIdMarker field's value.
-func (s *ListMultipartUploadsOutput) SetNextUploadIdMarker(v string) *ListMultipartUploadsOutput {
- s.NextUploadIdMarker = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListMultipartUploadsOutput) SetPrefix(v string) *ListMultipartUploadsOutput {
- s.Prefix = &v
- return s
-}
-
-// SetUploadIdMarker sets the UploadIdMarker field's value.
-func (s *ListMultipartUploadsOutput) SetUploadIdMarker(v string) *ListMultipartUploadsOutput {
- s.UploadIdMarker = &v
- return s
-}
-
-// SetUploads sets the Uploads field's value.
-func (s *ListMultipartUploadsOutput) SetUploads(v []*MultipartUpload) *ListMultipartUploadsOutput {
- s.Uploads = v
- return s
-}
-
-type ListObjectVersionsInput struct {
- _ struct{} `locationName:"ListObjectVersionsRequest" type:"structure"`
-
- // The bucket name that contains the objects.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // A delimiter is a character that you specify to group keys. All keys that
- // contain the same string between the prefix and the first occurrence of the
- // delimiter are grouped under a single result element in CommonPrefixes. These
- // groups are counted as one result against the max-keys limitation. These keys
- // are not returned elsewhere in the response.
- Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
-
- // Requests Amazon S3 to encode the object keys in the response and specifies
- // the encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters
- // with an ASCII value from 0 to 10. For characters that are not supported in
- // XML 1.0, you can add this parameter to request that Amazon S3 encode the
- // keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Specifies the key to start with when listing objects in a bucket.
- KeyMarker *string `location:"querystring" locationName:"key-marker" type:"string"`
-
- // Sets the maximum number of keys returned in the response. By default the
- // action returns up to 1,000 key names. The response might contain fewer keys
- // but will never contain more. If additional keys satisfy the search criteria,
- // but were not returned because max-keys was exceeded, the response contains
- // true. To return the additional keys, see key-marker
- // and version-id-marker.
- MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
-
- // Use this parameter to select only those keys that begin with the specified
- // prefix. You can use prefixes to separate a bucket into different groupings
- // of keys. (You can think of using prefix to make groups in the same way you'd
- // use a folder in a file system.) You can use prefix with delimiter to roll
- // up numerous objects into a single result under CommonPrefixes.
- Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
-
- // Specifies the object version you want to start listing from.
- VersionIdMarker *string `location:"querystring" locationName:"version-id-marker" type:"string"`
-}
-
-// String returns the string representation
-func (s ListObjectVersionsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListObjectVersionsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListObjectVersionsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListObjectVersionsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListObjectVersionsInput) SetBucket(v string) *ListObjectVersionsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListObjectVersionsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectVersionsInput) SetDelimiter(v string) *ListObjectVersionsInput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectVersionsInput) SetEncodingType(v string) *ListObjectVersionsInput {
- s.EncodingType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListObjectVersionsInput) SetExpectedBucketOwner(v string) *ListObjectVersionsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKeyMarker sets the KeyMarker field's value.
-func (s *ListObjectVersionsInput) SetKeyMarker(v string) *ListObjectVersionsInput {
- s.KeyMarker = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectVersionsInput) SetMaxKeys(v int64) *ListObjectVersionsInput {
- s.MaxKeys = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectVersionsInput) SetPrefix(v string) *ListObjectVersionsInput {
- s.Prefix = &v
- return s
-}
-
-// SetVersionIdMarker sets the VersionIdMarker field's value.
-func (s *ListObjectVersionsInput) SetVersionIdMarker(v string) *ListObjectVersionsInput {
- s.VersionIdMarker = &v
- return s
-}
-
-func (s *ListObjectVersionsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListObjectVersionsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListObjectVersionsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListObjectVersionsOutput struct {
- _ struct{} `type:"structure"`
-
- // All of the keys rolled up into a common prefix count as a single return when
- // calculating the number of returns.
- CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
-
- // Container for an object that is a delete marker.
- DeleteMarkers []*DeleteMarkerEntry `locationName:"DeleteMarker" type:"list" flattened:"true"`
-
- // The delimiter grouping the included keys. A delimiter is a character that
- // you specify to group keys. All keys that contain the same string between
- // the prefix and the first occurrence of the delimiter are grouped under a
- // single result element in CommonPrefixes. These groups are counted as one
- // result against the max-keys limitation. These keys are not returned elsewhere
- // in the response.
- Delimiter *string `type:"string"`
-
- // Encoding type used by Amazon S3 to encode object key names in the XML response.
- //
- // If you specify encoding-type request parameter, Amazon S3 includes this element
- // in the response, and returns encoded key name values in the following response
- // elements:
- //
- // KeyMarker, NextKeyMarker, Prefix, Key, and Delimiter.
- EncodingType *string `type:"string" enum:"EncodingType"`
-
- // A flag that indicates whether Amazon S3 returned all of the results that
- // satisfied the search criteria. If your results were truncated, you can make
- // a follow-up paginated request using the NextKeyMarker and NextVersionIdMarker
- // response parameters as a starting place in another request to return the
- // rest of the results.
- IsTruncated *bool `type:"boolean"`
-
- // Marks the last key returned in a truncated response.
- KeyMarker *string `type:"string"`
-
- // Specifies the maximum number of objects to return.
- MaxKeys *int64 `type:"integer"`
-
- // The bucket name.
- Name *string `type:"string"`
-
- // When the number of responses exceeds the value of MaxKeys, NextKeyMarker
- // specifies the first key not returned that satisfies the search criteria.
- // Use this value for the key-marker request parameter in a subsequent request.
- NextKeyMarker *string `type:"string"`
-
- // When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker
- // specifies the first object version not returned that satisfies the search
- // criteria. Use this value for the version-id-marker request parameter in a
- // subsequent request.
- NextVersionIdMarker *string `type:"string"`
-
- // Selects objects that start with the value supplied by this parameter.
- Prefix *string `type:"string"`
-
- // Marks the last version of the key returned in a truncated response.
- VersionIdMarker *string `type:"string"`
-
- // Container for version information.
- Versions []*ObjectVersion `locationName:"Version" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s ListObjectVersionsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListObjectVersionsOutput) GoString() string {
- return s.String()
-}
-
-// SetCommonPrefixes sets the CommonPrefixes field's value.
-func (s *ListObjectVersionsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectVersionsOutput {
- s.CommonPrefixes = v
- return s
-}
-
-// SetDeleteMarkers sets the DeleteMarkers field's value.
-func (s *ListObjectVersionsOutput) SetDeleteMarkers(v []*DeleteMarkerEntry) *ListObjectVersionsOutput {
- s.DeleteMarkers = v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectVersionsOutput) SetDelimiter(v string) *ListObjectVersionsOutput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectVersionsOutput) SetEncodingType(v string) *ListObjectVersionsOutput {
- s.EncodingType = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListObjectVersionsOutput) SetIsTruncated(v bool) *ListObjectVersionsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetKeyMarker sets the KeyMarker field's value.
-func (s *ListObjectVersionsOutput) SetKeyMarker(v string) *ListObjectVersionsOutput {
- s.KeyMarker = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectVersionsOutput) SetMaxKeys(v int64) *ListObjectVersionsOutput {
- s.MaxKeys = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *ListObjectVersionsOutput) SetName(v string) *ListObjectVersionsOutput {
- s.Name = &v
- return s
-}
-
-// SetNextKeyMarker sets the NextKeyMarker field's value.
-func (s *ListObjectVersionsOutput) SetNextKeyMarker(v string) *ListObjectVersionsOutput {
- s.NextKeyMarker = &v
- return s
-}
-
-// SetNextVersionIdMarker sets the NextVersionIdMarker field's value.
-func (s *ListObjectVersionsOutput) SetNextVersionIdMarker(v string) *ListObjectVersionsOutput {
- s.NextVersionIdMarker = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectVersionsOutput) SetPrefix(v string) *ListObjectVersionsOutput {
- s.Prefix = &v
- return s
-}
-
-// SetVersionIdMarker sets the VersionIdMarker field's value.
-func (s *ListObjectVersionsOutput) SetVersionIdMarker(v string) *ListObjectVersionsOutput {
- s.VersionIdMarker = &v
- return s
-}
-
-// SetVersions sets the Versions field's value.
-func (s *ListObjectVersionsOutput) SetVersions(v []*ObjectVersion) *ListObjectVersionsOutput {
- s.Versions = v
- return s
-}
-
-type ListObjectsInput struct {
- _ struct{} `locationName:"ListObjectsRequest" type:"structure"`
-
- // The name of the bucket containing the objects.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // A delimiter is a character you use to group keys.
- Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
-
- // Requests Amazon S3 to encode the object keys in the response and specifies
- // the encoding method to use. An object key may contain any Unicode character;
- // however, XML 1.0 parser cannot parse some characters, such as characters
- // with an ASCII value from 0 to 10. For characters that are not supported in
- // XML 1.0, you can add this parameter to request that Amazon S3 encode the
- // keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Specifies the key to start with when listing objects in a bucket.
- Marker *string `location:"querystring" locationName:"marker" type:"string"`
-
- // Sets the maximum number of keys returned in the response. By default the
- // action returns up to 1,000 key names. The response might contain fewer keys
- // but will never contain more.
- MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
-
- // Limits the response to keys that begin with the specified prefix.
- Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
-
- // Confirms that the requester knows that she or he will be charged for the
- // list objects request. Bucket owners need not specify this parameter in their
- // requests.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-}
-
-// String returns the string representation
-func (s ListObjectsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListObjectsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListObjectsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListObjectsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListObjectsInput) SetBucket(v string) *ListObjectsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListObjectsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectsInput) SetDelimiter(v string) *ListObjectsInput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectsInput) SetEncodingType(v string) *ListObjectsInput {
- s.EncodingType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListObjectsInput) SetExpectedBucketOwner(v string) *ListObjectsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListObjectsInput) SetMarker(v string) *ListObjectsInput {
- s.Marker = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectsInput) SetMaxKeys(v int64) *ListObjectsInput {
- s.MaxKeys = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectsInput) SetPrefix(v string) *ListObjectsInput {
- s.Prefix = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *ListObjectsInput) SetRequestPayer(v string) *ListObjectsInput {
- s.RequestPayer = &v
- return s
-}
-
-func (s *ListObjectsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListObjectsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListObjectsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListObjectsOutput struct {
- _ struct{} `type:"structure"`
-
- // All of the keys (up to 1,000) rolled up in a common prefix count as a single
- // return when calculating the number of returns.
- //
- // A response can contain CommonPrefixes only if you specify a delimiter.
- //
- // CommonPrefixes contains all (if there are any) keys between Prefix and the
- // next occurrence of the string specified by the delimiter.
- //
- // CommonPrefixes lists keys that act like subdirectories in the directory specified
- // by Prefix.
- //
- // For example, if the prefix is notes/ and the delimiter is a slash (/) as
- // in notes/summer/july, the common prefix is notes/summer/. All of the keys
- // that roll up into a common prefix count as a single return when calculating
- // the number of returns.
- CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
-
- // Metadata about each object returned.
- Contents []*Object `type:"list" flattened:"true"`
-
- // Causes keys that contain the same string between the prefix and the first
- // occurrence of the delimiter to be rolled up into a single result element
- // in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere
- // in the response. Each rolled-up result counts as only one return against
- // the MaxKeys value.
- Delimiter *string `type:"string"`
-
- // Encoding type used by Amazon S3 to encode object keys in the response.
- EncodingType *string `type:"string" enum:"EncodingType"`
-
- // A flag that indicates whether Amazon S3 returned all of the results that
- // satisfied the search criteria.
- IsTruncated *bool `type:"boolean"`
-
- // Indicates where in the bucket listing begins. Marker is included in the response
- // if it was sent with the request.
- Marker *string `type:"string"`
-
- // The maximum number of keys returned in the response body.
- MaxKeys *int64 `type:"integer"`
-
- // The bucket name.
- Name *string `type:"string"`
-
- // When response is truncated (the IsTruncated element value in the response
- // is true), you can use the key name in this field as marker in the subsequent
- // request to get next set of objects. Amazon S3 lists objects in alphabetical
- // order Note: This element is returned only if you have delimiter request parameter
- // specified. If response does not include the NextMarker and it is truncated,
- // you can use the value of the last Key in the response as the marker in the
- // subsequent request to get the next set of object keys.
- NextMarker *string `type:"string"`
-
- // Keys that begin with the indicated prefix.
- Prefix *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListObjectsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListObjectsOutput) GoString() string {
- return s.String()
-}
-
-// SetCommonPrefixes sets the CommonPrefixes field's value.
-func (s *ListObjectsOutput) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsOutput {
- s.CommonPrefixes = v
- return s
-}
-
-// SetContents sets the Contents field's value.
-func (s *ListObjectsOutput) SetContents(v []*Object) *ListObjectsOutput {
- s.Contents = v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectsOutput) SetDelimiter(v string) *ListObjectsOutput {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectsOutput) SetEncodingType(v string) *ListObjectsOutput {
- s.EncodingType = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListObjectsOutput) SetIsTruncated(v bool) *ListObjectsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListObjectsOutput) SetMarker(v string) *ListObjectsOutput {
- s.Marker = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectsOutput) SetMaxKeys(v int64) *ListObjectsOutput {
- s.MaxKeys = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *ListObjectsOutput) SetName(v string) *ListObjectsOutput {
- s.Name = &v
- return s
-}
-
-// SetNextMarker sets the NextMarker field's value.
-func (s *ListObjectsOutput) SetNextMarker(v string) *ListObjectsOutput {
- s.NextMarker = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectsOutput) SetPrefix(v string) *ListObjectsOutput {
- s.Prefix = &v
- return s
-}
-
-type ListObjectsV2Input struct {
- _ struct{} `locationName:"ListObjectsV2Request" type:"structure"`
-
- // Bucket name to list.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // ContinuationToken indicates Amazon S3 that the list is being continued on
- // this bucket with a token. ContinuationToken is obfuscated and is not a real
- // key.
- ContinuationToken *string `location:"querystring" locationName:"continuation-token" type:"string"`
-
- // A delimiter is a character you use to group keys.
- Delimiter *string `location:"querystring" locationName:"delimiter" type:"string"`
-
- // Encoding type used by Amazon S3 to encode object keys in the response.
- EncodingType *string `location:"querystring" locationName:"encoding-type" type:"string" enum:"EncodingType"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The owner field is not present in listV2 by default, if you want to return
- // owner field with each key in the result then set the fetch owner field to
- // true.
- FetchOwner *bool `location:"querystring" locationName:"fetch-owner" type:"boolean"`
-
- // Sets the maximum number of keys returned in the response. By default the
- // action returns up to 1,000 key names. The response might contain fewer keys
- // but will never contain more.
- MaxKeys *int64 `location:"querystring" locationName:"max-keys" type:"integer"`
-
- // Limits the response to keys that begin with the specified prefix.
- Prefix *string `location:"querystring" locationName:"prefix" type:"string"`
-
- // Confirms that the requester knows that she or he will be charged for the
- // list objects request in V2 style. Bucket owners need not specify this parameter
- // in their requests.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // StartAfter is where you want Amazon S3 to start listing from. Amazon S3 starts
- // listing after this specified key. StartAfter can be any key in the bucket.
- StartAfter *string `location:"querystring" locationName:"start-after" type:"string"`
-}
-
-// String returns the string representation
-func (s ListObjectsV2Input) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListObjectsV2Input) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListObjectsV2Input) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListObjectsV2Input"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListObjectsV2Input) SetBucket(v string) *ListObjectsV2Input {
- s.Bucket = &v
- return s
-}
-
-func (s *ListObjectsV2Input) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListObjectsV2Input) SetContinuationToken(v string) *ListObjectsV2Input {
- s.ContinuationToken = &v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectsV2Input) SetDelimiter(v string) *ListObjectsV2Input {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectsV2Input) SetEncodingType(v string) *ListObjectsV2Input {
- s.EncodingType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListObjectsV2Input) SetExpectedBucketOwner(v string) *ListObjectsV2Input {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetFetchOwner sets the FetchOwner field's value.
-func (s *ListObjectsV2Input) SetFetchOwner(v bool) *ListObjectsV2Input {
- s.FetchOwner = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectsV2Input) SetMaxKeys(v int64) *ListObjectsV2Input {
- s.MaxKeys = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectsV2Input) SetPrefix(v string) *ListObjectsV2Input {
- s.Prefix = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *ListObjectsV2Input) SetRequestPayer(v string) *ListObjectsV2Input {
- s.RequestPayer = &v
- return s
-}
-
-// SetStartAfter sets the StartAfter field's value.
-func (s *ListObjectsV2Input) SetStartAfter(v string) *ListObjectsV2Input {
- s.StartAfter = &v
- return s
-}
-
-func (s *ListObjectsV2Input) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListObjectsV2Input) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListObjectsV2Input) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListObjectsV2Output struct {
- _ struct{} `type:"structure"`
-
- // All of the keys (up to 1,000) rolled up into a common prefix count as a single
- // return when calculating the number of returns.
- //
- // A response can contain CommonPrefixes only if you specify a delimiter.
- //
- // CommonPrefixes contains all (if there are any) keys between Prefix and the
- // next occurrence of the string specified by a delimiter.
- //
- // CommonPrefixes lists keys that act like subdirectories in the directory specified
- // by Prefix.
- //
- // For example, if the prefix is notes/ and the delimiter is a slash (/) as
- // in notes/summer/july, the common prefix is notes/summer/. All of the keys
- // that roll up into a common prefix count as a single return when calculating
- // the number of returns.
- CommonPrefixes []*CommonPrefix `type:"list" flattened:"true"`
-
- // Metadata about each object returned.
- Contents []*Object `type:"list" flattened:"true"`
-
- // If ContinuationToken was sent with the request, it is included in the response.
- ContinuationToken *string `type:"string"`
-
- // Causes keys that contain the same string between the prefix and the first
- // occurrence of the delimiter to be rolled up into a single result element
- // in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere
- // in the response. Each rolled-up result counts as only one return against
- // the MaxKeys value.
- Delimiter *string `type:"string"`
-
- // Encoding type used by Amazon S3 to encode object key names in the XML response.
- //
- // If you specify the encoding-type request parameter, Amazon S3 includes this
- // element in the response, and returns encoded key name values in the following
- // response elements:
- //
- // Delimiter, Prefix, Key, and StartAfter.
- EncodingType *string `type:"string" enum:"EncodingType"`
-
- // Set to false if all of the results were returned. Set to true if more keys
- // are available to return. If the number of results exceeds that specified
- // by MaxKeys, all of the results might not be returned.
- IsTruncated *bool `type:"boolean"`
-
- // KeyCount is the number of keys returned with this request. KeyCount will
- // always be less than or equals to MaxKeys field. Say you ask for 50 keys,
- // your result will include less than equals 50 keys
- KeyCount *int64 `type:"integer"`
-
- // Sets the maximum number of keys returned in the response. By default the
- // action returns up to 1,000 key names. The response might contain fewer keys
- // but will never contain more.
- MaxKeys *int64 `type:"integer"`
-
- // The bucket name.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- Name *string `type:"string"`
-
- // NextContinuationToken is sent when isTruncated is true, which means there
- // are more keys in the bucket that can be listed. The next list requests to
- // Amazon S3 can be continued with this NextContinuationToken. NextContinuationToken
- // is obfuscated and is not a real key
- NextContinuationToken *string `type:"string"`
-
- // Keys that begin with the indicated prefix.
- Prefix *string `type:"string"`
-
- // If StartAfter was sent with the request, it is included in the response.
- StartAfter *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListObjectsV2Output) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListObjectsV2Output) GoString() string {
- return s.String()
-}
-
-// SetCommonPrefixes sets the CommonPrefixes field's value.
-func (s *ListObjectsV2Output) SetCommonPrefixes(v []*CommonPrefix) *ListObjectsV2Output {
- s.CommonPrefixes = v
- return s
-}
-
-// SetContents sets the Contents field's value.
-func (s *ListObjectsV2Output) SetContents(v []*Object) *ListObjectsV2Output {
- s.Contents = v
- return s
-}
-
-// SetContinuationToken sets the ContinuationToken field's value.
-func (s *ListObjectsV2Output) SetContinuationToken(v string) *ListObjectsV2Output {
- s.ContinuationToken = &v
- return s
-}
-
-// SetDelimiter sets the Delimiter field's value.
-func (s *ListObjectsV2Output) SetDelimiter(v string) *ListObjectsV2Output {
- s.Delimiter = &v
- return s
-}
-
-// SetEncodingType sets the EncodingType field's value.
-func (s *ListObjectsV2Output) SetEncodingType(v string) *ListObjectsV2Output {
- s.EncodingType = &v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListObjectsV2Output) SetIsTruncated(v bool) *ListObjectsV2Output {
- s.IsTruncated = &v
- return s
-}
-
-// SetKeyCount sets the KeyCount field's value.
-func (s *ListObjectsV2Output) SetKeyCount(v int64) *ListObjectsV2Output {
- s.KeyCount = &v
- return s
-}
-
-// SetMaxKeys sets the MaxKeys field's value.
-func (s *ListObjectsV2Output) SetMaxKeys(v int64) *ListObjectsV2Output {
- s.MaxKeys = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *ListObjectsV2Output) SetName(v string) *ListObjectsV2Output {
- s.Name = &v
- return s
-}
-
-// SetNextContinuationToken sets the NextContinuationToken field's value.
-func (s *ListObjectsV2Output) SetNextContinuationToken(v string) *ListObjectsV2Output {
- s.NextContinuationToken = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ListObjectsV2Output) SetPrefix(v string) *ListObjectsV2Output {
- s.Prefix = &v
- return s
-}
-
-// SetStartAfter sets the StartAfter field's value.
-func (s *ListObjectsV2Output) SetStartAfter(v string) *ListObjectsV2Output {
- s.StartAfter = &v
- return s
-}
-
-type ListPartsInput struct {
- _ struct{} `locationName:"ListPartsRequest" type:"structure"`
-
- // The name of the bucket to which the parts are being uploaded.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Object key for which the multipart upload was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Sets the maximum number of parts to return.
- MaxParts *int64 `location:"querystring" locationName:"max-parts" type:"integer"`
-
- // Specifies the part after which listing should begin. Only parts with higher
- // part numbers will be listed.
- PartNumberMarker *int64 `location:"querystring" locationName:"part-number-marker" type:"integer"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Upload ID identifying the multipart upload whose parts are being listed.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s ListPartsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListPartsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListPartsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListPartsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListPartsInput) SetBucket(v string) *ListPartsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListPartsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *ListPartsInput) SetExpectedBucketOwner(v string) *ListPartsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *ListPartsInput) SetKey(v string) *ListPartsInput {
- s.Key = &v
- return s
-}
-
-// SetMaxParts sets the MaxParts field's value.
-func (s *ListPartsInput) SetMaxParts(v int64) *ListPartsInput {
- s.MaxParts = &v
- return s
-}
-
-// SetPartNumberMarker sets the PartNumberMarker field's value.
-func (s *ListPartsInput) SetPartNumberMarker(v int64) *ListPartsInput {
- s.PartNumberMarker = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *ListPartsInput) SetRequestPayer(v string) *ListPartsInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *ListPartsInput) SetUploadId(v string) *ListPartsInput {
- s.UploadId = &v
- return s
-}
-
-func (s *ListPartsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *ListPartsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s ListPartsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type ListPartsOutput struct {
- _ struct{} `type:"structure"`
-
- // If the bucket has a lifecycle rule configured with an action to abort incomplete
- // multipart uploads and the prefix in the lifecycle rule matches the object
- // name in the request, then the response includes this header indicating when
- // the initiated multipart upload will become eligible for abort operation.
- // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
- // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config).
- //
- // The response will also include the x-amz-abort-rule-id header that will provide
- // the ID of the lifecycle configuration rule that defines this action.
- AbortDate *time.Time `location:"header" locationName:"x-amz-abort-date" type:"timestamp"`
-
- // This header is returned along with the x-amz-abort-date header. It identifies
- // applicable lifecycle configuration rule that defines the action to abort
- // incomplete multipart uploads.
- AbortRuleId *string `location:"header" locationName:"x-amz-abort-rule-id" type:"string"`
-
- // The name of the bucket to which the multipart upload was initiated.
- Bucket *string `type:"string"`
-
- // Container element that identifies who initiated the multipart upload. If
- // the initiator is an AWS account, this element provides the same information
- // as the Owner element. If the initiator is an IAM User, this element provides
- // the user ARN and display name.
- Initiator *Initiator `type:"structure"`
-
- // Indicates whether the returned list of parts is truncated. A true value indicates
- // that the list was truncated. A list can be truncated if the number of parts
- // exceeds the limit returned in the MaxParts element.
- IsTruncated *bool `type:"boolean"`
-
- // Object key for which the multipart upload was initiated.
- Key *string `min:"1" type:"string"`
-
- // Maximum number of parts that were allowed in the response.
- MaxParts *int64 `type:"integer"`
-
- // When a list is truncated, this element specifies the last part in the list,
- // as well as the value to use for the part-number-marker request parameter
- // in a subsequent request.
- NextPartNumberMarker *int64 `type:"integer"`
-
- // Container element that identifies the object owner, after the object is created.
- // If multipart upload is initiated by an IAM user, this element provides the
- // parent account ID and display name.
- Owner *Owner `type:"structure"`
-
- // When a list is truncated, this element specifies the last part in the list,
- // as well as the value to use for the part-number-marker request parameter
- // in a subsequent request.
- PartNumberMarker *int64 `type:"integer"`
-
- // Container for elements related to a particular part. A response can contain
- // zero or more Part elements.
- Parts []*Part `locationName:"Part" type:"list" flattened:"true"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // Class of storage (STANDARD or REDUCED_REDUNDANCY) used to store the uploaded
- // object.
- StorageClass *string `type:"string" enum:"StorageClass"`
-
- // Upload ID identifying the multipart upload whose parts are being listed.
- UploadId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ListPartsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ListPartsOutput) GoString() string {
- return s.String()
-}
-
-// SetAbortDate sets the AbortDate field's value.
-func (s *ListPartsOutput) SetAbortDate(v time.Time) *ListPartsOutput {
- s.AbortDate = &v
- return s
-}
-
-// SetAbortRuleId sets the AbortRuleId field's value.
-func (s *ListPartsOutput) SetAbortRuleId(v string) *ListPartsOutput {
- s.AbortRuleId = &v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *ListPartsOutput) SetBucket(v string) *ListPartsOutput {
- s.Bucket = &v
- return s
-}
-
-func (s *ListPartsOutput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetInitiator sets the Initiator field's value.
-func (s *ListPartsOutput) SetInitiator(v *Initiator) *ListPartsOutput {
- s.Initiator = v
- return s
-}
-
-// SetIsTruncated sets the IsTruncated field's value.
-func (s *ListPartsOutput) SetIsTruncated(v bool) *ListPartsOutput {
- s.IsTruncated = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *ListPartsOutput) SetKey(v string) *ListPartsOutput {
- s.Key = &v
- return s
-}
-
-// SetMaxParts sets the MaxParts field's value.
-func (s *ListPartsOutput) SetMaxParts(v int64) *ListPartsOutput {
- s.MaxParts = &v
- return s
-}
-
-// SetNextPartNumberMarker sets the NextPartNumberMarker field's value.
-func (s *ListPartsOutput) SetNextPartNumberMarker(v int64) *ListPartsOutput {
- s.NextPartNumberMarker = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *ListPartsOutput) SetOwner(v *Owner) *ListPartsOutput {
- s.Owner = v
- return s
-}
-
-// SetPartNumberMarker sets the PartNumberMarker field's value.
-func (s *ListPartsOutput) SetPartNumberMarker(v int64) *ListPartsOutput {
- s.PartNumberMarker = &v
- return s
-}
-
-// SetParts sets the Parts field's value.
-func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
- s.Parts = v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *ListPartsOutput) SetRequestCharged(v string) *ListPartsOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *ListPartsOutput) SetStorageClass(v string) *ListPartsOutput {
- s.StorageClass = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *ListPartsOutput) SetUploadId(v string) *ListPartsOutput {
- s.UploadId = &v
- return s
-}
-
-// Describes an Amazon S3 location that will receive the results of the restore
-// request.
-type Location struct {
- _ struct{} `type:"structure"`
-
- // A list of grants that control access to the staged results.
- AccessControlList []*Grant `locationNameList:"Grant" type:"list"`
-
- // The name of the bucket where the restore results will be placed.
- //
- // BucketName is a required field
- BucketName *string `type:"string" required:"true"`
-
- // The canned ACL to apply to the restore results.
- CannedACL *string `type:"string" enum:"ObjectCannedACL"`
-
- // Contains the type of server-side encryption used.
- Encryption *Encryption `type:"structure"`
-
- // The prefix that is prepended to the restore results for this request.
- //
- // Prefix is a required field
- Prefix *string `type:"string" required:"true"`
-
- // The class of storage used to store the restore results.
- StorageClass *string `type:"string" enum:"StorageClass"`
-
- // The tag-set that is applied to the restore results.
- Tagging *Tagging `type:"structure"`
-
- // A list of metadata to store with the restore results in S3.
- UserMetadata []*MetadataEntry `locationNameList:"MetadataEntry" type:"list"`
-}
-
-// String returns the string representation
-func (s Location) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Location) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Location) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Location"}
- if s.BucketName == nil {
- invalidParams.Add(request.NewErrParamRequired("BucketName"))
- }
- if s.Prefix == nil {
- invalidParams.Add(request.NewErrParamRequired("Prefix"))
- }
- if s.AccessControlList != nil {
- for i, v := range s.AccessControlList {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AccessControlList", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Encryption != nil {
- if err := s.Encryption.Validate(); err != nil {
- invalidParams.AddNested("Encryption", err.(request.ErrInvalidParams))
- }
- }
- if s.Tagging != nil {
- if err := s.Tagging.Validate(); err != nil {
- invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessControlList sets the AccessControlList field's value.
-func (s *Location) SetAccessControlList(v []*Grant) *Location {
- s.AccessControlList = v
- return s
-}
-
-// SetBucketName sets the BucketName field's value.
-func (s *Location) SetBucketName(v string) *Location {
- s.BucketName = &v
- return s
-}
-
-// SetCannedACL sets the CannedACL field's value.
-func (s *Location) SetCannedACL(v string) *Location {
- s.CannedACL = &v
- return s
-}
-
-// SetEncryption sets the Encryption field's value.
-func (s *Location) SetEncryption(v *Encryption) *Location {
- s.Encryption = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *Location) SetPrefix(v string) *Location {
- s.Prefix = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *Location) SetStorageClass(v string) *Location {
- s.StorageClass = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *Location) SetTagging(v *Tagging) *Location {
- s.Tagging = v
- return s
-}
-
-// SetUserMetadata sets the UserMetadata field's value.
-func (s *Location) SetUserMetadata(v []*MetadataEntry) *Location {
- s.UserMetadata = v
- return s
-}
-
-// Describes where logs are stored and the prefix that Amazon S3 assigns to
-// all log object keys for a bucket. For more information, see PUT Bucket logging
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlogging.html)
-// in the Amazon S3 API Reference.
-type LoggingEnabled struct {
- _ struct{} `type:"structure"`
-
- // Specifies the bucket where you want Amazon S3 to store server access logs.
- // You can have your logs delivered to any bucket that you own, including the
- // same bucket that is being logged. You can also configure multiple buckets
- // to deliver their logs to the same target bucket. In this case, you should
- // choose a different TargetPrefix for each source bucket so that the delivered
- // log files can be distinguished by key.
- //
- // TargetBucket is a required field
- TargetBucket *string `type:"string" required:"true"`
-
- // Container for granting information.
- TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"`
-
- // A prefix for all log object keys. If you store log files from multiple Amazon
- // S3 buckets in a single bucket, you can use a prefix to distinguish which
- // log files came from which bucket.
- //
- // TargetPrefix is a required field
- TargetPrefix *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s LoggingEnabled) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s LoggingEnabled) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LoggingEnabled) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LoggingEnabled"}
- if s.TargetBucket == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetBucket"))
- }
- if s.TargetPrefix == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetPrefix"))
- }
- if s.TargetGrants != nil {
- for i, v := range s.TargetGrants {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TargetGrants", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTargetBucket sets the TargetBucket field's value.
-func (s *LoggingEnabled) SetTargetBucket(v string) *LoggingEnabled {
- s.TargetBucket = &v
- return s
-}
-
-// SetTargetGrants sets the TargetGrants field's value.
-func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled {
- s.TargetGrants = v
- return s
-}
-
-// SetTargetPrefix sets the TargetPrefix field's value.
-func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
- s.TargetPrefix = &v
- return s
-}
-
-// A metadata key-value pair to store with an object.
-type MetadataEntry struct {
- _ struct{} `type:"structure"`
-
- // Name of the Object.
- Name *string `type:"string"`
-
- // Value of the Object.
- Value *string `type:"string"`
-}
-
-// String returns the string representation
-func (s MetadataEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MetadataEntry) GoString() string {
- return s.String()
-}
-
-// SetName sets the Name field's value.
-func (s *MetadataEntry) SetName(v string) *MetadataEntry {
- s.Name = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *MetadataEntry) SetValue(v string) *MetadataEntry {
- s.Value = &v
- return s
-}
-
-// A container specifying replication metrics-related settings enabling replication
-// metrics and events.
-type Metrics struct {
- _ struct{} `type:"structure"`
-
- // A container specifying the time threshold for emitting the s3:Replication:OperationMissedThreshold
- // event.
- EventThreshold *ReplicationTimeValue `type:"structure"`
-
- // Specifies whether the replication metrics are enabled.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"MetricsStatus"`
-}
-
-// String returns the string representation
-func (s Metrics) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Metrics) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Metrics) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Metrics"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEventThreshold sets the EventThreshold field's value.
-func (s *Metrics) SetEventThreshold(v *ReplicationTimeValue) *Metrics {
- s.EventThreshold = v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *Metrics) SetStatus(v string) *Metrics {
- s.Status = &v
- return s
-}
-
-// A conjunction (logical AND) of predicates, which is used in evaluating a
-// metrics filter. The operator must have at least two predicates, and an object
-// must match all of the predicates in order for the filter to apply.
-type MetricsAndOperator struct {
- _ struct{} `type:"structure"`
-
- // The prefix used when evaluating an AND predicate.
- Prefix *string `type:"string"`
-
- // The list of tags used when evaluating an AND predicate.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s MetricsAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MetricsAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *MetricsAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MetricsAndOperator"}
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *MetricsAndOperator) SetPrefix(v string) *MetricsAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *MetricsAndOperator) SetTags(v []*Tag) *MetricsAndOperator {
- s.Tags = v
- return s
-}
-
-// Specifies a metrics configuration for the CloudWatch request metrics (specified
-// by the metrics configuration ID) from an Amazon S3 bucket. If you're updating
-// an existing metrics configuration, note that this is a full replacement of
-// the existing metrics configuration. If you don't include the elements you
-// want to keep, they are erased. For more information, see PUT Bucket metrics
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTMetricConfiguration.html)
-// in the Amazon S3 API Reference.
-type MetricsConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies a metrics configuration filter. The metrics configuration will
- // only include objects that meet the filter's criteria. A filter must be a
- // prefix, a tag, or a conjunction (MetricsAndOperator).
- Filter *MetricsFilter `type:"structure"`
-
- // The ID used to identify the metrics configuration.
- //
- // Id is a required field
- Id *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s MetricsConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MetricsConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *MetricsConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MetricsConfiguration"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFilter sets the Filter field's value.
-func (s *MetricsConfiguration) SetFilter(v *MetricsFilter) *MetricsConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *MetricsConfiguration) SetId(v string) *MetricsConfiguration {
- s.Id = &v
- return s
-}
-
-// Specifies a metrics configuration filter. The metrics configuration only
-// includes objects that meet the filter's criteria. A filter must be a prefix,
-// a tag, or a conjunction (MetricsAndOperator).
-type MetricsFilter struct {
- _ struct{} `type:"structure"`
-
- // A conjunction (logical AND) of predicates, which is used in evaluating a
- // metrics filter. The operator must have at least two predicates, and an object
- // must match all of the predicates in order for the filter to apply.
- And *MetricsAndOperator `type:"structure"`
-
- // The prefix used when evaluating a metrics filter.
- Prefix *string `type:"string"`
-
- // The tag used when evaluating a metrics filter.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation
-func (s MetricsFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MetricsFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *MetricsFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "MetricsFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
- s.Tag = v
- return s
-}
-
-// Container for the MultipartUpload for the Amazon S3 object.
-type MultipartUpload struct {
- _ struct{} `type:"structure"`
-
- // Date and time at which the multipart upload was initiated.
- Initiated *time.Time `type:"timestamp"`
-
- // Identifies who initiated the multipart upload.
- Initiator *Initiator `type:"structure"`
-
- // Key of the object for which the multipart upload was initiated.
- Key *string `min:"1" type:"string"`
-
- // Specifies the owner of the object that is part of the multipart upload.
- Owner *Owner `type:"structure"`
-
- // The class of storage used to store the object.
- StorageClass *string `type:"string" enum:"StorageClass"`
-
- // Upload ID that identifies the multipart upload.
- UploadId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s MultipartUpload) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s MultipartUpload) GoString() string {
- return s.String()
-}
-
-// SetInitiated sets the Initiated field's value.
-func (s *MultipartUpload) SetInitiated(v time.Time) *MultipartUpload {
- s.Initiated = &v
- return s
-}
-
-// SetInitiator sets the Initiator field's value.
-func (s *MultipartUpload) SetInitiator(v *Initiator) *MultipartUpload {
- s.Initiator = v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *MultipartUpload) SetKey(v string) *MultipartUpload {
- s.Key = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *MultipartUpload) SetOwner(v *Owner) *MultipartUpload {
- s.Owner = v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *MultipartUpload) SetStorageClass(v string) *MultipartUpload {
- s.StorageClass = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload {
- s.UploadId = &v
- return s
-}
-
-// Specifies when noncurrent object versions expire. Upon expiration, Amazon
-// S3 permanently deletes the noncurrent object versions. You set this lifecycle
-// configuration action on a bucket that has versioning enabled (or suspended)
-// to request that Amazon S3 delete noncurrent object versions at a specific
-// period in the object's lifetime.
-type NoncurrentVersionExpiration struct {
- _ struct{} `type:"structure"`
-
- // Specifies the number of days an object is noncurrent before Amazon S3 can
- // perform the associated action. For information about the noncurrent days
- // calculations, see How Amazon S3 Calculates When an Object Became Noncurrent
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
- // in the Amazon S3 User Guide.
- NoncurrentDays *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s NoncurrentVersionExpiration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NoncurrentVersionExpiration) GoString() string {
- return s.String()
-}
-
-// SetNoncurrentDays sets the NoncurrentDays field's value.
-func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVersionExpiration {
- s.NoncurrentDays = &v
- return s
-}
-
-// Container for the transition rule that describes when noncurrent objects
-// transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER,
-// or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled (or versioning
-// is suspended), you can set this action to request that Amazon S3 transition
-// noncurrent object versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,
-// GLACIER, or DEEP_ARCHIVE storage class at a specific period in the object's
-// lifetime.
-type NoncurrentVersionTransition struct {
- _ struct{} `type:"structure"`
-
- // Specifies the number of days an object is noncurrent before Amazon S3 can
- // perform the associated action. For information about the noncurrent days
- // calculations, see How Amazon S3 Calculates How Long an Object Has Been Noncurrent
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations)
- // in the Amazon S3 User Guide.
- NoncurrentDays *int64 `type:"integer"`
-
- // The class of storage used to store the object.
- StorageClass *string `type:"string" enum:"TransitionStorageClass"`
-}
-
-// String returns the string representation
-func (s NoncurrentVersionTransition) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NoncurrentVersionTransition) GoString() string {
- return s.String()
-}
-
-// SetNoncurrentDays sets the NoncurrentDays field's value.
-func (s *NoncurrentVersionTransition) SetNoncurrentDays(v int64) *NoncurrentVersionTransition {
- s.NoncurrentDays = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *NoncurrentVersionTransition) SetStorageClass(v string) *NoncurrentVersionTransition {
- s.StorageClass = &v
- return s
-}
-
-// A container for specifying the notification configuration of the bucket.
-// If this element is empty, notifications are turned off for the bucket.
-type NotificationConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Describes the AWS Lambda functions to invoke and the events for which to
- // invoke them.
- LambdaFunctionConfigurations []*LambdaFunctionConfiguration `locationName:"CloudFunctionConfiguration" type:"list" flattened:"true"`
-
- // The Amazon Simple Queue Service queues to publish messages to and the events
- // for which to publish messages.
- QueueConfigurations []*QueueConfiguration `locationName:"QueueConfiguration" type:"list" flattened:"true"`
-
- // The topic to which notifications are sent and the events for which notifications
- // are generated.
- TopicConfigurations []*TopicConfiguration `locationName:"TopicConfiguration" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s NotificationConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NotificationConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *NotificationConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "NotificationConfiguration"}
- if s.LambdaFunctionConfigurations != nil {
- for i, v := range s.LambdaFunctionConfigurations {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "LambdaFunctionConfigurations", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.QueueConfigurations != nil {
- for i, v := range s.QueueConfigurations {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "QueueConfigurations", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.TopicConfigurations != nil {
- for i, v := range s.TopicConfigurations {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TopicConfigurations", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetLambdaFunctionConfigurations sets the LambdaFunctionConfigurations field's value.
-func (s *NotificationConfiguration) SetLambdaFunctionConfigurations(v []*LambdaFunctionConfiguration) *NotificationConfiguration {
- s.LambdaFunctionConfigurations = v
- return s
-}
-
-// SetQueueConfigurations sets the QueueConfigurations field's value.
-func (s *NotificationConfiguration) SetQueueConfigurations(v []*QueueConfiguration) *NotificationConfiguration {
- s.QueueConfigurations = v
- return s
-}
-
-// SetTopicConfigurations sets the TopicConfigurations field's value.
-func (s *NotificationConfiguration) SetTopicConfigurations(v []*TopicConfiguration) *NotificationConfiguration {
- s.TopicConfigurations = v
- return s
-}
-
-type NotificationConfigurationDeprecated struct {
- _ struct{} `type:"structure"`
-
- // Container for specifying the AWS Lambda notification configuration.
- CloudFunctionConfiguration *CloudFunctionConfiguration `type:"structure"`
-
- // This data type is deprecated. This data type specifies the configuration
- // for publishing messages to an Amazon Simple Queue Service (Amazon SQS) queue
- // when Amazon S3 detects specified events.
- QueueConfiguration *QueueConfigurationDeprecated `type:"structure"`
-
- // This data type is deprecated. A container for specifying the configuration
- // for publication of messages to an Amazon Simple Notification Service (Amazon
- // SNS) topic when Amazon S3 detects specified events.
- TopicConfiguration *TopicConfigurationDeprecated `type:"structure"`
-}
-
-// String returns the string representation
-func (s NotificationConfigurationDeprecated) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NotificationConfigurationDeprecated) GoString() string {
- return s.String()
-}
-
-// SetCloudFunctionConfiguration sets the CloudFunctionConfiguration field's value.
-func (s *NotificationConfigurationDeprecated) SetCloudFunctionConfiguration(v *CloudFunctionConfiguration) *NotificationConfigurationDeprecated {
- s.CloudFunctionConfiguration = v
- return s
-}
-
-// SetQueueConfiguration sets the QueueConfiguration field's value.
-func (s *NotificationConfigurationDeprecated) SetQueueConfiguration(v *QueueConfigurationDeprecated) *NotificationConfigurationDeprecated {
- s.QueueConfiguration = v
- return s
-}
-
-// SetTopicConfiguration sets the TopicConfiguration field's value.
-func (s *NotificationConfigurationDeprecated) SetTopicConfiguration(v *TopicConfigurationDeprecated) *NotificationConfigurationDeprecated {
- s.TopicConfiguration = v
- return s
-}
-
-// Specifies object key name filtering rules. For information about key name
-// filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
-// in the Amazon S3 User Guide.
-type NotificationConfigurationFilter struct {
- _ struct{} `type:"structure"`
-
- // A container for object key name prefix and suffix filtering rules.
- Key *KeyFilter `locationName:"S3Key" type:"structure"`
-}
-
-// String returns the string representation
-func (s NotificationConfigurationFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s NotificationConfigurationFilter) GoString() string {
- return s.String()
-}
-
-// SetKey sets the Key field's value.
-func (s *NotificationConfigurationFilter) SetKey(v *KeyFilter) *NotificationConfigurationFilter {
- s.Key = v
- return s
-}
-
-// An object consists of data and its descriptive metadata.
-type Object struct {
- _ struct{} `type:"structure"`
-
- // The entity tag is a hash of the object. The ETag reflects changes only to
- // the contents of an object, not its metadata. The ETag may or may not be an
- // MD5 digest of the object data. Whether or not it is depends on how the object
- // was created and how it is encrypted as described below:
- //
- // * Objects created by the PUT Object, POST Object, or Copy operation, or
- // through the AWS Management Console, and are encrypted by SSE-S3 or plaintext,
- // have ETags that are an MD5 digest of their object data.
- //
- // * Objects created by the PUT Object, POST Object, or Copy operation, or
- // through the AWS Management Console, and are encrypted by SSE-C or SSE-KMS,
- // have ETags that are not an MD5 digest of their object data.
- //
- // * If an object is created by either the Multipart Upload or Part Copy
- // operation, the ETag is not an MD5 digest, regardless of the method of
- // encryption.
- ETag *string `type:"string"`
-
- // The name that you assign to an object. You use the object key to retrieve
- // the object.
- Key *string `min:"1" type:"string"`
-
- // Creation date of the object.
- LastModified *time.Time `type:"timestamp"`
-
- // The owner of the object
- Owner *Owner `type:"structure"`
-
- // Size in bytes of the object
- Size *int64 `type:"integer"`
-
- // The class of storage used to store the object.
- StorageClass *string `type:"string" enum:"ObjectStorageClass"`
-}
-
-// String returns the string representation
-func (s Object) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Object) GoString() string {
- return s.String()
-}
-
-// SetETag sets the ETag field's value.
-func (s *Object) SetETag(v string) *Object {
- s.ETag = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *Object) SetKey(v string) *Object {
- s.Key = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *Object) SetLastModified(v time.Time) *Object {
- s.LastModified = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *Object) SetOwner(v *Owner) *Object {
- s.Owner = v
- return s
-}
-
-// SetSize sets the Size field's value.
-func (s *Object) SetSize(v int64) *Object {
- s.Size = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *Object) SetStorageClass(v string) *Object {
- s.StorageClass = &v
- return s
-}
-
-// Object Identifier is unique value to identify objects.
-type ObjectIdentifier struct {
- _ struct{} `type:"structure"`
-
- // Key name of the object.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-
- // VersionId for the specific version of the object to delete.
- VersionId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ObjectIdentifier) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ObjectIdentifier) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ObjectIdentifier) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ObjectIdentifier"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKey sets the Key field's value.
-func (s *ObjectIdentifier) SetKey(v string) *ObjectIdentifier {
- s.Key = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *ObjectIdentifier) SetVersionId(v string) *ObjectIdentifier {
- s.VersionId = &v
- return s
-}
-
-// The container element for Object Lock configuration parameters.
-type ObjectLockConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether this bucket has an Object Lock configuration enabled. Enable
- // ObjectLockEnabled when you apply ObjectLockConfiguration to a bucket.
- ObjectLockEnabled *string `type:"string" enum:"ObjectLockEnabled"`
-
- // Specifies the Object Lock rule for the specified object. Enable the this
- // rule when you apply ObjectLockConfiguration to a bucket. Bucket settings
- // require both a mode and a period. The period can be either Days or Years
- // but you must select one. You cannot specify Days and Years at the same time.
- Rule *ObjectLockRule `type:"structure"`
-}
-
-// String returns the string representation
-func (s ObjectLockConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ObjectLockConfiguration) GoString() string {
- return s.String()
-}
-
-// SetObjectLockEnabled sets the ObjectLockEnabled field's value.
-func (s *ObjectLockConfiguration) SetObjectLockEnabled(v string) *ObjectLockConfiguration {
- s.ObjectLockEnabled = &v
- return s
-}
-
-// SetRule sets the Rule field's value.
-func (s *ObjectLockConfiguration) SetRule(v *ObjectLockRule) *ObjectLockConfiguration {
- s.Rule = v
- return s
-}
-
-// A Legal Hold configuration for an object.
-type ObjectLockLegalHold struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether the specified object has a Legal Hold in place.
- Status *string `type:"string" enum:"ObjectLockLegalHoldStatus"`
-}
-
-// String returns the string representation
-func (s ObjectLockLegalHold) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ObjectLockLegalHold) GoString() string {
- return s.String()
-}
-
-// SetStatus sets the Status field's value.
-func (s *ObjectLockLegalHold) SetStatus(v string) *ObjectLockLegalHold {
- s.Status = &v
- return s
-}
-
-// A Retention configuration for an object.
-type ObjectLockRetention struct {
- _ struct{} `type:"structure"`
-
- // Indicates the Retention mode for the specified object.
- Mode *string `type:"string" enum:"ObjectLockRetentionMode"`
-
- // The date on which this Object Lock Retention will expire.
- RetainUntilDate *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-}
-
-// String returns the string representation
-func (s ObjectLockRetention) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ObjectLockRetention) GoString() string {
- return s.String()
-}
-
-// SetMode sets the Mode field's value.
-func (s *ObjectLockRetention) SetMode(v string) *ObjectLockRetention {
- s.Mode = &v
- return s
-}
-
-// SetRetainUntilDate sets the RetainUntilDate field's value.
-func (s *ObjectLockRetention) SetRetainUntilDate(v time.Time) *ObjectLockRetention {
- s.RetainUntilDate = &v
- return s
-}
-
-// The container element for an Object Lock rule.
-type ObjectLockRule struct {
- _ struct{} `type:"structure"`
-
- // The default Object Lock retention mode and period that you want to apply
- // to new objects placed in the specified bucket. Bucket settings require both
- // a mode and a period. The period can be either Days or Years but you must
- // select one. You cannot specify Days and Years at the same time.
- DefaultRetention *DefaultRetention `type:"structure"`
-}
-
-// String returns the string representation
-func (s ObjectLockRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ObjectLockRule) GoString() string {
- return s.String()
-}
-
-// SetDefaultRetention sets the DefaultRetention field's value.
-func (s *ObjectLockRule) SetDefaultRetention(v *DefaultRetention) *ObjectLockRule {
- s.DefaultRetention = v
- return s
-}
-
-// The version of an object.
-type ObjectVersion struct {
- _ struct{} `type:"structure"`
-
- // The entity tag is an MD5 hash of that version of the object.
- ETag *string `type:"string"`
-
- // Specifies whether the object is (true) or is not (false) the latest version
- // of an object.
- IsLatest *bool `type:"boolean"`
-
- // The object key.
- Key *string `min:"1" type:"string"`
-
- // Date and time the object was last modified.
- LastModified *time.Time `type:"timestamp"`
-
- // Specifies the owner of the object.
- Owner *Owner `type:"structure"`
-
- // Size in bytes of the object.
- Size *int64 `type:"integer"`
-
- // The class of storage used to store the object.
- StorageClass *string `type:"string" enum:"ObjectVersionStorageClass"`
-
- // Version ID of an object.
- VersionId *string `type:"string"`
-}
-
-// String returns the string representation
-func (s ObjectVersion) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ObjectVersion) GoString() string {
- return s.String()
-}
-
-// SetETag sets the ETag field's value.
-func (s *ObjectVersion) SetETag(v string) *ObjectVersion {
- s.ETag = &v
- return s
-}
-
-// SetIsLatest sets the IsLatest field's value.
-func (s *ObjectVersion) SetIsLatest(v bool) *ObjectVersion {
- s.IsLatest = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *ObjectVersion) SetKey(v string) *ObjectVersion {
- s.Key = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *ObjectVersion) SetLastModified(v time.Time) *ObjectVersion {
- s.LastModified = &v
- return s
-}
-
-// SetOwner sets the Owner field's value.
-func (s *ObjectVersion) SetOwner(v *Owner) *ObjectVersion {
- s.Owner = v
- return s
-}
-
-// SetSize sets the Size field's value.
-func (s *ObjectVersion) SetSize(v int64) *ObjectVersion {
- s.Size = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *ObjectVersion) SetStorageClass(v string) *ObjectVersion {
- s.StorageClass = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *ObjectVersion) SetVersionId(v string) *ObjectVersion {
- s.VersionId = &v
- return s
-}
-
-// Describes the location where the restore job's output is stored.
-type OutputLocation struct {
- _ struct{} `type:"structure"`
-
- // Describes an S3 location that will receive the results of the restore request.
- S3 *Location `type:"structure"`
-}
-
-// String returns the string representation
-func (s OutputLocation) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OutputLocation) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *OutputLocation) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "OutputLocation"}
- if s.S3 != nil {
- if err := s.S3.Validate(); err != nil {
- invalidParams.AddNested("S3", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetS3 sets the S3 field's value.
-func (s *OutputLocation) SetS3(v *Location) *OutputLocation {
- s.S3 = v
- return s
-}
-
-// Describes how results of the Select job are serialized.
-type OutputSerialization struct {
- _ struct{} `type:"structure"`
-
- // Describes the serialization of CSV-encoded Select results.
- CSV *CSVOutput `type:"structure"`
-
- // Specifies JSON as request's output serialization format.
- JSON *JSONOutput `type:"structure"`
-}
-
-// String returns the string representation
-func (s OutputSerialization) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OutputSerialization) GoString() string {
- return s.String()
-}
-
-// SetCSV sets the CSV field's value.
-func (s *OutputSerialization) SetCSV(v *CSVOutput) *OutputSerialization {
- s.CSV = v
- return s
-}
-
-// SetJSON sets the JSON field's value.
-func (s *OutputSerialization) SetJSON(v *JSONOutput) *OutputSerialization {
- s.JSON = v
- return s
-}
-
-// Container for the owner's display name and ID.
-type Owner struct {
- _ struct{} `type:"structure"`
-
- // Container for the display name of the owner.
- DisplayName *string `type:"string"`
-
- // Container for the ID of the owner.
- ID *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Owner) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Owner) GoString() string {
- return s.String()
-}
-
-// SetDisplayName sets the DisplayName field's value.
-func (s *Owner) SetDisplayName(v string) *Owner {
- s.DisplayName = &v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *Owner) SetID(v string) *Owner {
- s.ID = &v
- return s
-}
-
-// The container element for a bucket's ownership controls.
-type OwnershipControls struct {
- _ struct{} `type:"structure"`
-
- // The container element for an ownership control rule.
- //
- // Rules is a required field
- Rules []*OwnershipControlsRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation
-func (s OwnershipControls) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OwnershipControls) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *OwnershipControls) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "OwnershipControls"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *OwnershipControls) SetRules(v []*OwnershipControlsRule) *OwnershipControls {
- s.Rules = v
- return s
-}
-
-// The container element for an ownership control rule.
-type OwnershipControlsRule struct {
- _ struct{} `type:"structure"`
-
- // The container element for object ownership for a bucket's ownership controls.
- //
- // BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
- // the bucket owner if the objects are uploaded with the bucket-owner-full-control
- // canned ACL.
- //
- // ObjectWriter - The uploading account will own the object if the object is
- // uploaded with the bucket-owner-full-control canned ACL.
- //
- // ObjectOwnership is a required field
- ObjectOwnership *string `type:"string" required:"true" enum:"ObjectOwnership"`
-}
-
-// String returns the string representation
-func (s OwnershipControlsRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s OwnershipControlsRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *OwnershipControlsRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "OwnershipControlsRule"}
- if s.ObjectOwnership == nil {
- invalidParams.Add(request.NewErrParamRequired("ObjectOwnership"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetObjectOwnership sets the ObjectOwnership field's value.
-func (s *OwnershipControlsRule) SetObjectOwnership(v string) *OwnershipControlsRule {
- s.ObjectOwnership = &v
- return s
-}
-
-// Container for Parquet.
-type ParquetInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s ParquetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ParquetInput) GoString() string {
- return s.String()
-}
-
-// Container for elements related to a part.
-type Part struct {
- _ struct{} `type:"structure"`
-
- // Entity tag returned when the part was uploaded.
- ETag *string `type:"string"`
-
- // Date and time at which the part was uploaded.
- LastModified *time.Time `type:"timestamp"`
-
- // Part number identifying the part. This is a positive integer between 1 and
- // 10,000.
- PartNumber *int64 `type:"integer"`
-
- // Size in bytes of the uploaded part data.
- Size *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s Part) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Part) GoString() string {
- return s.String()
-}
-
-// SetETag sets the ETag field's value.
-func (s *Part) SetETag(v string) *Part {
- s.ETag = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *Part) SetLastModified(v time.Time) *Part {
- s.LastModified = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *Part) SetPartNumber(v int64) *Part {
- s.PartNumber = &v
- return s
-}
-
-// SetSize sets the Size field's value.
-func (s *Part) SetSize(v int64) *Part {
- s.Size = &v
- return s
-}
-
-// The container element for a bucket's policy status.
-type PolicyStatus struct {
- _ struct{} `type:"structure"`
-
- // The policy status for this bucket. TRUE indicates that this bucket is public.
- // FALSE indicates that the bucket is not public.
- IsPublic *bool `locationName:"IsPublic" type:"boolean"`
-}
-
-// String returns the string representation
-func (s PolicyStatus) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PolicyStatus) GoString() string {
- return s.String()
-}
-
-// SetIsPublic sets the IsPublic field's value.
-func (s *PolicyStatus) SetIsPublic(v bool) *PolicyStatus {
- s.IsPublic = &v
- return s
-}
-
-// This data type contains information about progress of an operation.
-type Progress struct {
- _ struct{} `type:"structure"`
-
- // The current number of uncompressed object bytes processed.
- BytesProcessed *int64 `type:"long"`
-
- // The current number of bytes of records payload data returned.
- BytesReturned *int64 `type:"long"`
-
- // The current number of object bytes scanned.
- BytesScanned *int64 `type:"long"`
-}
-
-// String returns the string representation
-func (s Progress) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Progress) GoString() string {
- return s.String()
-}
-
-// SetBytesProcessed sets the BytesProcessed field's value.
-func (s *Progress) SetBytesProcessed(v int64) *Progress {
- s.BytesProcessed = &v
- return s
-}
-
-// SetBytesReturned sets the BytesReturned field's value.
-func (s *Progress) SetBytesReturned(v int64) *Progress {
- s.BytesReturned = &v
- return s
-}
-
-// SetBytesScanned sets the BytesScanned field's value.
-func (s *Progress) SetBytesScanned(v int64) *Progress {
- s.BytesScanned = &v
- return s
-}
-
-// This data type contains information about the progress event of an operation.
-type ProgressEvent struct {
- _ struct{} `locationName:"ProgressEvent" type:"structure" payload:"Details"`
-
- // The Progress event details.
- Details *Progress `locationName:"Details" type:"structure"`
-}
-
-// String returns the string representation
-func (s ProgressEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ProgressEvent) GoString() string {
- return s.String()
-}
-
-// SetDetails sets the Details field's value.
-func (s *ProgressEvent) SetDetails(v *Progress) *ProgressEvent {
- s.Details = v
- return s
-}
-
-// The ProgressEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *ProgressEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the ProgressEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *ProgressEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- if err := payloadUnmarshaler.UnmarshalPayload(
- bytes.NewReader(msg.Payload), s,
- ); err != nil {
- return err
- }
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-func (s *ProgressEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
- msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
- var buf bytes.Buffer
- if err = pm.MarshalPayload(&buf, s); err != nil {
- return eventstream.Message{}, err
- }
- msg.Payload = buf.Bytes()
- return msg, err
-}
-
-// The PublicAccessBlock configuration that you want to apply to this Amazon
-// S3 bucket. You can enable the configuration options in any combination. For
-// more information about when Amazon S3 considers a bucket or object public,
-// see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
-// in the Amazon S3 User Guide.
-type PublicAccessBlockConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether Amazon S3 should block public access control lists (ACLs)
- // for this bucket and objects in this bucket. Setting this element to TRUE
- // causes the following behavior:
- //
- // * PUT Bucket acl and PUT Object acl calls fail if the specified ACL is
- // public.
- //
- // * PUT Object calls fail if the request includes a public ACL.
- //
- // * PUT Bucket calls fail if the request includes a public ACL.
- //
- // Enabling this setting doesn't affect existing policies or ACLs.
- BlockPublicAcls *bool `locationName:"BlockPublicAcls" type:"boolean"`
-
- // Specifies whether Amazon S3 should block public bucket policies for this
- // bucket. Setting this element to TRUE causes Amazon S3 to reject calls to
- // PUT Bucket policy if the specified bucket policy allows public access.
- //
- // Enabling this setting doesn't affect existing bucket policies.
- BlockPublicPolicy *bool `locationName:"BlockPublicPolicy" type:"boolean"`
-
- // Specifies whether Amazon S3 should ignore public ACLs for this bucket and
- // objects in this bucket. Setting this element to TRUE causes Amazon S3 to
- // ignore all public ACLs on this bucket and objects in this bucket.
- //
- // Enabling this setting doesn't affect the persistence of any existing ACLs
- // and doesn't prevent new public ACLs from being set.
- IgnorePublicAcls *bool `locationName:"IgnorePublicAcls" type:"boolean"`
-
- // Specifies whether Amazon S3 should restrict public bucket policies for this
- // bucket. Setting this element to TRUE restricts access to this bucket to only
- // AWS service principals and authorized users within this account if the bucket
- // has a public policy.
- //
- // Enabling this setting doesn't affect previously stored bucket policies, except
- // that public and cross-account access within any public bucket policy, including
- // non-public delegation to specific accounts, is blocked.
- RestrictPublicBuckets *bool `locationName:"RestrictPublicBuckets" type:"boolean"`
-}
-
-// String returns the string representation
-func (s PublicAccessBlockConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PublicAccessBlockConfiguration) GoString() string {
- return s.String()
-}
-
-// SetBlockPublicAcls sets the BlockPublicAcls field's value.
-func (s *PublicAccessBlockConfiguration) SetBlockPublicAcls(v bool) *PublicAccessBlockConfiguration {
- s.BlockPublicAcls = &v
- return s
-}
-
-// SetBlockPublicPolicy sets the BlockPublicPolicy field's value.
-func (s *PublicAccessBlockConfiguration) SetBlockPublicPolicy(v bool) *PublicAccessBlockConfiguration {
- s.BlockPublicPolicy = &v
- return s
-}
-
-// SetIgnorePublicAcls sets the IgnorePublicAcls field's value.
-func (s *PublicAccessBlockConfiguration) SetIgnorePublicAcls(v bool) *PublicAccessBlockConfiguration {
- s.IgnorePublicAcls = &v
- return s
-}
-
-// SetRestrictPublicBuckets sets the RestrictPublicBuckets field's value.
-func (s *PublicAccessBlockConfiguration) SetRestrictPublicBuckets(v bool) *PublicAccessBlockConfiguration {
- s.RestrictPublicBuckets = &v
- return s
-}
-
-type PutBucketAccelerateConfigurationInput struct {
- _ struct{} `locationName:"PutBucketAccelerateConfigurationRequest" type:"structure" payload:"AccelerateConfiguration"`
-
- // Container for setting the transfer acceleration state.
- //
- // AccelerateConfiguration is a required field
- AccelerateConfiguration *AccelerateConfiguration `locationName:"AccelerateConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The name of the bucket for which the accelerate configuration is set.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s PutBucketAccelerateConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketAccelerateConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketAccelerateConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketAccelerateConfigurationInput"}
- if s.AccelerateConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("AccelerateConfiguration"))
- }
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccelerateConfiguration sets the AccelerateConfiguration field's value.
-func (s *PutBucketAccelerateConfigurationInput) SetAccelerateConfiguration(v *AccelerateConfiguration) *PutBucketAccelerateConfigurationInput {
- s.AccelerateConfiguration = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketAccelerateConfigurationInput) SetBucket(v string) *PutBucketAccelerateConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketAccelerateConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketAccelerateConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketAccelerateConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *PutBucketAccelerateConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketAccelerateConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketAccelerateConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketAccelerateConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketAccelerateConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketAccelerateConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketAclInput struct {
- _ struct{} `locationName:"PutBucketAclRequest" type:"structure" payload:"AccessControlPolicy"`
-
- // The canned ACL to apply to the bucket.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"BucketCannedACL"`
-
- // Contains the elements that set the ACL permissions for an object per grantee.
- AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The bucket to which to apply the ACL.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Allows grantee the read, write, read ACP, and write ACP permissions on the
- // bucket.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to list the objects in the bucket.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the bucket ACL.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to create new objects in the bucket.
- //
- // For the bucket and object owners of existing objects, also allows deletions
- // and overwrites of those objects.
- GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
-
- // Allows grantee to write the ACL for the applicable bucket.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-}
-
-// String returns the string representation
-func (s PutBucketAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketAclInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketAclInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketAclInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.AccessControlPolicy != nil {
- if err := s.AccessControlPolicy.Validate(); err != nil {
- invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *PutBucketAclInput) SetACL(v string) *PutBucketAclInput {
- s.ACL = &v
- return s
-}
-
-// SetAccessControlPolicy sets the AccessControlPolicy field's value.
-func (s *PutBucketAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutBucketAclInput {
- s.AccessControlPolicy = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketAclInput) SetBucket(v string) *PutBucketAclInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketAclInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketAclInput) SetExpectedBucketOwner(v string) *PutBucketAclInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *PutBucketAclInput) SetGrantFullControl(v string) *PutBucketAclInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *PutBucketAclInput) SetGrantRead(v string) *PutBucketAclInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *PutBucketAclInput) SetGrantReadACP(v string) *PutBucketAclInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWrite sets the GrantWrite field's value.
-func (s *PutBucketAclInput) SetGrantWrite(v string) *PutBucketAclInput {
- s.GrantWrite = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *PutBucketAclInput) SetGrantWriteACP(v string) *PutBucketAclInput {
- s.GrantWriteACP = &v
- return s
-}
-
-func (s *PutBucketAclInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketAclInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketAclInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketAclOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketAclOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketAnalyticsConfigurationInput struct {
- _ struct{} `locationName:"PutBucketAnalyticsConfigurationRequest" type:"structure" payload:"AnalyticsConfiguration"`
-
- // The configuration and any analyses for the analytics filter.
- //
- // AnalyticsConfiguration is a required field
- AnalyticsConfiguration *AnalyticsConfiguration `locationName:"AnalyticsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The name of the bucket to which an analytics configuration is stored.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID that identifies the analytics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s PutBucketAnalyticsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketAnalyticsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketAnalyticsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketAnalyticsConfigurationInput"}
- if s.AnalyticsConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("AnalyticsConfiguration"))
- }
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.AnalyticsConfiguration != nil {
- if err := s.AnalyticsConfiguration.Validate(); err != nil {
- invalidParams.AddNested("AnalyticsConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnalyticsConfiguration sets the AnalyticsConfiguration field's value.
-func (s *PutBucketAnalyticsConfigurationInput) SetAnalyticsConfiguration(v *AnalyticsConfiguration) *PutBucketAnalyticsConfigurationInput {
- s.AnalyticsConfiguration = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketAnalyticsConfigurationInput) SetBucket(v string) *PutBucketAnalyticsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketAnalyticsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketAnalyticsConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketAnalyticsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *PutBucketAnalyticsConfigurationInput) SetId(v string) *PutBucketAnalyticsConfigurationInput {
- s.Id = &v
- return s
-}
-
-func (s *PutBucketAnalyticsConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketAnalyticsConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketAnalyticsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketAnalyticsConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketAnalyticsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketAnalyticsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketCorsInput struct {
- _ struct{} `locationName:"PutBucketCorsRequest" type:"structure" payload:"CORSConfiguration"`
-
- // Specifies the bucket impacted by the corsconfiguration.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Describes the cross-origin access configuration for objects in an Amazon
- // S3 bucket. For more information, see Enabling Cross-Origin Resource Sharing
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html) in the Amazon
- // S3 User Guide.
- //
- // CORSConfiguration is a required field
- CORSConfiguration *CORSConfiguration `locationName:"CORSConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s PutBucketCorsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketCorsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketCorsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketCorsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.CORSConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("CORSConfiguration"))
- }
- if s.CORSConfiguration != nil {
- if err := s.CORSConfiguration.Validate(); err != nil {
- invalidParams.AddNested("CORSConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketCorsInput) SetBucket(v string) *PutBucketCorsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketCorsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetCORSConfiguration sets the CORSConfiguration field's value.
-func (s *PutBucketCorsInput) SetCORSConfiguration(v *CORSConfiguration) *PutBucketCorsInput {
- s.CORSConfiguration = v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketCorsInput) SetExpectedBucketOwner(v string) *PutBucketCorsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *PutBucketCorsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketCorsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketCorsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketCorsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketCorsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketCorsOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketEncryptionInput struct {
- _ struct{} `locationName:"PutBucketEncryptionRequest" type:"structure" payload:"ServerSideEncryptionConfiguration"`
-
- // Specifies default encryption for a bucket using server-side encryption with
- // Amazon S3-managed keys (SSE-S3) or customer master keys stored in AWS KMS
- // (SSE-KMS). For information about the Amazon S3 default encryption feature,
- // see Amazon S3 Default Bucket Encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Specifies the default server-side-encryption configuration.
- //
- // ServerSideEncryptionConfiguration is a required field
- ServerSideEncryptionConfiguration *ServerSideEncryptionConfiguration `locationName:"ServerSideEncryptionConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketEncryptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketEncryptionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketEncryptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketEncryptionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.ServerSideEncryptionConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("ServerSideEncryptionConfiguration"))
- }
- if s.ServerSideEncryptionConfiguration != nil {
- if err := s.ServerSideEncryptionConfiguration.Validate(); err != nil {
- invalidParams.AddNested("ServerSideEncryptionConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketEncryptionInput) SetBucket(v string) *PutBucketEncryptionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketEncryptionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketEncryptionInput) SetExpectedBucketOwner(v string) *PutBucketEncryptionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetServerSideEncryptionConfiguration sets the ServerSideEncryptionConfiguration field's value.
-func (s *PutBucketEncryptionInput) SetServerSideEncryptionConfiguration(v *ServerSideEncryptionConfiguration) *PutBucketEncryptionInput {
- s.ServerSideEncryptionConfiguration = v
- return s
-}
-
-func (s *PutBucketEncryptionInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketEncryptionInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketEncryptionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketEncryptionOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketEncryptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketEncryptionOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketIntelligentTieringConfigurationInput struct {
- _ struct{} `locationName:"PutBucketIntelligentTieringConfigurationRequest" type:"structure" payload:"IntelligentTieringConfiguration"`
-
- // The name of the Amazon S3 bucket whose configuration you want to modify or
- // retrieve.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The ID used to identify the S3 Intelligent-Tiering configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-
- // Container for S3 Intelligent-Tiering configuration.
- //
- // IntelligentTieringConfiguration is a required field
- IntelligentTieringConfiguration *IntelligentTieringConfiguration `locationName:"IntelligentTieringConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketIntelligentTieringConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketIntelligentTieringConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketIntelligentTieringConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketIntelligentTieringConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.IntelligentTieringConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("IntelligentTieringConfiguration"))
- }
- if s.IntelligentTieringConfiguration != nil {
- if err := s.IntelligentTieringConfiguration.Validate(); err != nil {
- invalidParams.AddNested("IntelligentTieringConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketIntelligentTieringConfigurationInput) SetBucket(v string) *PutBucketIntelligentTieringConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketIntelligentTieringConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetId sets the Id field's value.
-func (s *PutBucketIntelligentTieringConfigurationInput) SetId(v string) *PutBucketIntelligentTieringConfigurationInput {
- s.Id = &v
- return s
-}
-
-// SetIntelligentTieringConfiguration sets the IntelligentTieringConfiguration field's value.
-func (s *PutBucketIntelligentTieringConfigurationInput) SetIntelligentTieringConfiguration(v *IntelligentTieringConfiguration) *PutBucketIntelligentTieringConfigurationInput {
- s.IntelligentTieringConfiguration = v
- return s
-}
-
-func (s *PutBucketIntelligentTieringConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketIntelligentTieringConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketIntelligentTieringConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketIntelligentTieringConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketIntelligentTieringConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketIntelligentTieringConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketInventoryConfigurationInput struct {
- _ struct{} `locationName:"PutBucketInventoryConfigurationRequest" type:"structure" payload:"InventoryConfiguration"`
-
- // The name of the bucket where the inventory configuration will be stored.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the inventory configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-
- // Specifies the inventory configuration.
- //
- // InventoryConfiguration is a required field
- InventoryConfiguration *InventoryConfiguration `locationName:"InventoryConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketInventoryConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketInventoryConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketInventoryConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketInventoryConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.InventoryConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("InventoryConfiguration"))
- }
- if s.InventoryConfiguration != nil {
- if err := s.InventoryConfiguration.Validate(); err != nil {
- invalidParams.AddNested("InventoryConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketInventoryConfigurationInput) SetBucket(v string) *PutBucketInventoryConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketInventoryConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketInventoryConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketInventoryConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *PutBucketInventoryConfigurationInput) SetId(v string) *PutBucketInventoryConfigurationInput {
- s.Id = &v
- return s
-}
-
-// SetInventoryConfiguration sets the InventoryConfiguration field's value.
-func (s *PutBucketInventoryConfigurationInput) SetInventoryConfiguration(v *InventoryConfiguration) *PutBucketInventoryConfigurationInput {
- s.InventoryConfiguration = v
- return s
-}
-
-func (s *PutBucketInventoryConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketInventoryConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketInventoryConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketInventoryConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketInventoryConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketInventoryConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketLifecycleConfigurationInput struct {
- _ struct{} `locationName:"PutBucketLifecycleConfigurationRequest" type:"structure" payload:"LifecycleConfiguration"`
-
- // The name of the bucket for which to set the configuration.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Container for lifecycle rules. You can add as many as 1,000 rules.
- LifecycleConfiguration *BucketLifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketLifecycleConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketLifecycleConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketLifecycleConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.LifecycleConfiguration != nil {
- if err := s.LifecycleConfiguration.Validate(); err != nil {
- invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketLifecycleConfigurationInput) SetBucket(v string) *PutBucketLifecycleConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketLifecycleConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketLifecycleConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketLifecycleConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
-func (s *PutBucketLifecycleConfigurationInput) SetLifecycleConfiguration(v *BucketLifecycleConfiguration) *PutBucketLifecycleConfigurationInput {
- s.LifecycleConfiguration = v
- return s
-}
-
-func (s *PutBucketLifecycleConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketLifecycleConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketLifecycleConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketLifecycleConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketLifecycleConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketLifecycleConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketLifecycleInput struct {
- _ struct{} `locationName:"PutBucketLifecycleRequest" type:"structure" payload:"LifecycleConfiguration"`
-
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Container for lifecycle rules. You can add as many as 1000 rules.
- LifecycleConfiguration *LifecycleConfiguration `locationName:"LifecycleConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketLifecycleInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketLifecycleInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketLifecycleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketLifecycleInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.LifecycleConfiguration != nil {
- if err := s.LifecycleConfiguration.Validate(); err != nil {
- invalidParams.AddNested("LifecycleConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketLifecycleInput) SetBucket(v string) *PutBucketLifecycleInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketLifecycleInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketLifecycleInput) SetExpectedBucketOwner(v string) *PutBucketLifecycleInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetLifecycleConfiguration sets the LifecycleConfiguration field's value.
-func (s *PutBucketLifecycleInput) SetLifecycleConfiguration(v *LifecycleConfiguration) *PutBucketLifecycleInput {
- s.LifecycleConfiguration = v
- return s
-}
-
-func (s *PutBucketLifecycleInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketLifecycleInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketLifecycleInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketLifecycleOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketLifecycleOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketLifecycleOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketLoggingInput struct {
- _ struct{} `locationName:"PutBucketLoggingRequest" type:"structure" payload:"BucketLoggingStatus"`
-
- // The name of the bucket for which to set the logging parameters.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Container for logging status information.
- //
- // BucketLoggingStatus is a required field
- BucketLoggingStatus *BucketLoggingStatus `locationName:"BucketLoggingStatus" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-}
-
-// String returns the string representation
-func (s PutBucketLoggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketLoggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketLoggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketLoggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.BucketLoggingStatus == nil {
- invalidParams.Add(request.NewErrParamRequired("BucketLoggingStatus"))
- }
- if s.BucketLoggingStatus != nil {
- if err := s.BucketLoggingStatus.Validate(); err != nil {
- invalidParams.AddNested("BucketLoggingStatus", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketLoggingInput) SetBucket(v string) *PutBucketLoggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketLoggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketLoggingStatus sets the BucketLoggingStatus field's value.
-func (s *PutBucketLoggingInput) SetBucketLoggingStatus(v *BucketLoggingStatus) *PutBucketLoggingInput {
- s.BucketLoggingStatus = v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketLoggingInput) SetExpectedBucketOwner(v string) *PutBucketLoggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-func (s *PutBucketLoggingInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketLoggingInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketLoggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketLoggingOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketLoggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketLoggingOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketMetricsConfigurationInput struct {
- _ struct{} `locationName:"PutBucketMetricsConfigurationRequest" type:"structure" payload:"MetricsConfiguration"`
-
- // The name of the bucket for which the metrics configuration is set.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The ID used to identify the metrics configuration.
- //
- // Id is a required field
- Id *string `location:"querystring" locationName:"id" type:"string" required:"true"`
-
- // Specifies the metrics configuration.
- //
- // MetricsConfiguration is a required field
- MetricsConfiguration *MetricsConfiguration `locationName:"MetricsConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketMetricsConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketMetricsConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketMetricsConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketMetricsConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.MetricsConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("MetricsConfiguration"))
- }
- if s.MetricsConfiguration != nil {
- if err := s.MetricsConfiguration.Validate(); err != nil {
- invalidParams.AddNested("MetricsConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketMetricsConfigurationInput) SetBucket(v string) *PutBucketMetricsConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketMetricsConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketMetricsConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketMetricsConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *PutBucketMetricsConfigurationInput) SetId(v string) *PutBucketMetricsConfigurationInput {
- s.Id = &v
- return s
-}
-
-// SetMetricsConfiguration sets the MetricsConfiguration field's value.
-func (s *PutBucketMetricsConfigurationInput) SetMetricsConfiguration(v *MetricsConfiguration) *PutBucketMetricsConfigurationInput {
- s.MetricsConfiguration = v
- return s
-}
-
-func (s *PutBucketMetricsConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketMetricsConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketMetricsConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketMetricsConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketMetricsConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketMetricsConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketNotificationConfigurationInput struct {
- _ struct{} `locationName:"PutBucketNotificationConfigurationRequest" type:"structure" payload:"NotificationConfiguration"`
-
- // The name of the bucket.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // A container for specifying the notification configuration of the bucket.
- // If this element is empty, notifications are turned off for the bucket.
- //
- // NotificationConfiguration is a required field
- NotificationConfiguration *NotificationConfiguration `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketNotificationConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketNotificationConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketNotificationConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.NotificationConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
- }
- if s.NotificationConfiguration != nil {
- if err := s.NotificationConfiguration.Validate(); err != nil {
- invalidParams.AddNested("NotificationConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketNotificationConfigurationInput) SetBucket(v string) *PutBucketNotificationConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketNotificationConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketNotificationConfigurationInput) SetExpectedBucketOwner(v string) *PutBucketNotificationConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetNotificationConfiguration sets the NotificationConfiguration field's value.
-func (s *PutBucketNotificationConfigurationInput) SetNotificationConfiguration(v *NotificationConfiguration) *PutBucketNotificationConfigurationInput {
- s.NotificationConfiguration = v
- return s
-}
-
-func (s *PutBucketNotificationConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketNotificationConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketNotificationConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketNotificationConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketNotificationConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketNotificationConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketNotificationInput struct {
- _ struct{} `locationName:"PutBucketNotificationRequest" type:"structure" payload:"NotificationConfiguration"`
-
- // The name of the bucket.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The container for the configuration.
- //
- // NotificationConfiguration is a required field
- NotificationConfiguration *NotificationConfigurationDeprecated `locationName:"NotificationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketNotificationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketNotificationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketNotificationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketNotificationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.NotificationConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("NotificationConfiguration"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketNotificationInput) SetBucket(v string) *PutBucketNotificationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketNotificationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketNotificationInput) SetExpectedBucketOwner(v string) *PutBucketNotificationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetNotificationConfiguration sets the NotificationConfiguration field's value.
-func (s *PutBucketNotificationInput) SetNotificationConfiguration(v *NotificationConfigurationDeprecated) *PutBucketNotificationInput {
- s.NotificationConfiguration = v
- return s
-}
-
-func (s *PutBucketNotificationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketNotificationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketNotificationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketNotificationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketNotificationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketNotificationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketOwnershipControlsInput struct {
- _ struct{} `locationName:"PutBucketOwnershipControlsRequest" type:"structure" payload:"OwnershipControls"`
-
- // The name of the Amazon S3 bucket whose OwnershipControls you want to set.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The OwnershipControls (BucketOwnerPreferred or ObjectWriter) that you want
- // to apply to this Amazon S3 bucket.
- //
- // OwnershipControls is a required field
- OwnershipControls *OwnershipControls `locationName:"OwnershipControls" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketOwnershipControlsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketOwnershipControlsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketOwnershipControlsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketOwnershipControlsInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.OwnershipControls == nil {
- invalidParams.Add(request.NewErrParamRequired("OwnershipControls"))
- }
- if s.OwnershipControls != nil {
- if err := s.OwnershipControls.Validate(); err != nil {
- invalidParams.AddNested("OwnershipControls", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketOwnershipControlsInput) SetBucket(v string) *PutBucketOwnershipControlsInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketOwnershipControlsInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketOwnershipControlsInput) SetExpectedBucketOwner(v string) *PutBucketOwnershipControlsInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetOwnershipControls sets the OwnershipControls field's value.
-func (s *PutBucketOwnershipControlsInput) SetOwnershipControls(v *OwnershipControls) *PutBucketOwnershipControlsInput {
- s.OwnershipControls = v
- return s
-}
-
-func (s *PutBucketOwnershipControlsInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketOwnershipControlsInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketOwnershipControlsInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketOwnershipControlsOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketOwnershipControlsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketOwnershipControlsOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketPolicyInput struct {
- _ struct{} `locationName:"PutBucketPolicyRequest" type:"structure" payload:"Policy"`
-
- // The name of the bucket.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Set this parameter to true to confirm that you want to remove your permissions
- // to change this bucket policy in the future.
- ConfirmRemoveSelfBucketAccess *bool `location:"header" locationName:"x-amz-confirm-remove-self-bucket-access" type:"boolean"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The bucket policy as a JSON document.
- //
- // Policy is a required field
- Policy *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s PutBucketPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketPolicyInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Policy == nil {
- invalidParams.Add(request.NewErrParamRequired("Policy"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketPolicyInput) SetBucket(v string) *PutBucketPolicyInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketPolicyInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetConfirmRemoveSelfBucketAccess sets the ConfirmRemoveSelfBucketAccess field's value.
-func (s *PutBucketPolicyInput) SetConfirmRemoveSelfBucketAccess(v bool) *PutBucketPolicyInput {
- s.ConfirmRemoveSelfBucketAccess = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketPolicyInput) SetExpectedBucketOwner(v string) *PutBucketPolicyInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *PutBucketPolicyInput) SetPolicy(v string) *PutBucketPolicyInput {
- s.Policy = &v
- return s
-}
-
-func (s *PutBucketPolicyInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketPolicyInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketPolicyInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketPolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketPolicyOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketReplicationInput struct {
- _ struct{} `locationName:"PutBucketReplicationRequest" type:"structure" payload:"ReplicationConfiguration"`
-
- // The name of the bucket
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // A container for replication rules. You can add up to 1,000 rules. The maximum
- // size of a replication configuration is 2 MB.
- //
- // ReplicationConfiguration is a required field
- ReplicationConfiguration *ReplicationConfiguration `locationName:"ReplicationConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // A token to allow Object Lock to be enabled for an existing bucket.
- Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
-}
-
-// String returns the string representation
-func (s PutBucketReplicationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketReplicationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketReplicationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketReplicationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.ReplicationConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("ReplicationConfiguration"))
- }
- if s.ReplicationConfiguration != nil {
- if err := s.ReplicationConfiguration.Validate(); err != nil {
- invalidParams.AddNested("ReplicationConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketReplicationInput) SetBucket(v string) *PutBucketReplicationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketReplicationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketReplicationInput) SetExpectedBucketOwner(v string) *PutBucketReplicationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetReplicationConfiguration sets the ReplicationConfiguration field's value.
-func (s *PutBucketReplicationInput) SetReplicationConfiguration(v *ReplicationConfiguration) *PutBucketReplicationInput {
- s.ReplicationConfiguration = v
- return s
-}
-
-// SetToken sets the Token field's value.
-func (s *PutBucketReplicationInput) SetToken(v string) *PutBucketReplicationInput {
- s.Token = &v
- return s
-}
-
-func (s *PutBucketReplicationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketReplicationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketReplicationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketReplicationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketReplicationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketReplicationOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketRequestPaymentInput struct {
- _ struct{} `locationName:"PutBucketRequestPaymentRequest" type:"structure" payload:"RequestPaymentConfiguration"`
-
- // The bucket name.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Container for Payer.
- //
- // RequestPaymentConfiguration is a required field
- RequestPaymentConfiguration *RequestPaymentConfiguration `locationName:"RequestPaymentConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketRequestPaymentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketRequestPaymentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketRequestPaymentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketRequestPaymentInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.RequestPaymentConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("RequestPaymentConfiguration"))
- }
- if s.RequestPaymentConfiguration != nil {
- if err := s.RequestPaymentConfiguration.Validate(); err != nil {
- invalidParams.AddNested("RequestPaymentConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketRequestPaymentInput) SetBucket(v string) *PutBucketRequestPaymentInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketRequestPaymentInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketRequestPaymentInput) SetExpectedBucketOwner(v string) *PutBucketRequestPaymentInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetRequestPaymentConfiguration sets the RequestPaymentConfiguration field's value.
-func (s *PutBucketRequestPaymentInput) SetRequestPaymentConfiguration(v *RequestPaymentConfiguration) *PutBucketRequestPaymentInput {
- s.RequestPaymentConfiguration = v
- return s
-}
-
-func (s *PutBucketRequestPaymentInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketRequestPaymentInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketRequestPaymentInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketRequestPaymentOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketRequestPaymentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketRequestPaymentOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketTaggingInput struct {
- _ struct{} `locationName:"PutBucketTaggingRequest" type:"structure" payload:"Tagging"`
-
- // The bucket name.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Container for the TagSet and Tag elements.
- //
- // Tagging is a required field
- Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Tagging == nil {
- invalidParams.Add(request.NewErrParamRequired("Tagging"))
- }
- if s.Tagging != nil {
- if err := s.Tagging.Validate(); err != nil {
- invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketTaggingInput) SetBucket(v string) *PutBucketTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketTaggingInput) SetExpectedBucketOwner(v string) *PutBucketTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *PutBucketTaggingInput) SetTagging(v *Tagging) *PutBucketTaggingInput {
- s.Tagging = v
- return s
-}
-
-func (s *PutBucketTaggingInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketTaggingInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketTaggingOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketTaggingOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketVersioningInput struct {
- _ struct{} `locationName:"PutBucketVersioningRequest" type:"structure" payload:"VersioningConfiguration"`
-
- // The bucket name.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The concatenation of the authentication device's serial number, a space,
- // and the value that is displayed on your authentication device.
- MFA *string `location:"header" locationName:"x-amz-mfa" type:"string"`
-
- // Container for setting the versioning state.
- //
- // VersioningConfiguration is a required field
- VersioningConfiguration *VersioningConfiguration `locationName:"VersioningConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketVersioningInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketVersioningInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketVersioningInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketVersioningInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.VersioningConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("VersioningConfiguration"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketVersioningInput) SetBucket(v string) *PutBucketVersioningInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketVersioningInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketVersioningInput) SetExpectedBucketOwner(v string) *PutBucketVersioningInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetMFA sets the MFA field's value.
-func (s *PutBucketVersioningInput) SetMFA(v string) *PutBucketVersioningInput {
- s.MFA = &v
- return s
-}
-
-// SetVersioningConfiguration sets the VersioningConfiguration field's value.
-func (s *PutBucketVersioningInput) SetVersioningConfiguration(v *VersioningConfiguration) *PutBucketVersioningInput {
- s.VersioningConfiguration = v
- return s
-}
-
-func (s *PutBucketVersioningInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketVersioningInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketVersioningInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketVersioningOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketVersioningOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketVersioningOutput) GoString() string {
- return s.String()
-}
-
-type PutBucketWebsiteInput struct {
- _ struct{} `locationName:"PutBucketWebsiteRequest" type:"structure" payload:"WebsiteConfiguration"`
-
- // The bucket name.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Container for the request.
- //
- // WebsiteConfiguration is a required field
- WebsiteConfiguration *WebsiteConfiguration `locationName:"WebsiteConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutBucketWebsiteInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketWebsiteInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutBucketWebsiteInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutBucketWebsiteInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.WebsiteConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("WebsiteConfiguration"))
- }
- if s.WebsiteConfiguration != nil {
- if err := s.WebsiteConfiguration.Validate(); err != nil {
- invalidParams.AddNested("WebsiteConfiguration", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutBucketWebsiteInput) SetBucket(v string) *PutBucketWebsiteInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutBucketWebsiteInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutBucketWebsiteInput) SetExpectedBucketOwner(v string) *PutBucketWebsiteInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetWebsiteConfiguration sets the WebsiteConfiguration field's value.
-func (s *PutBucketWebsiteInput) SetWebsiteConfiguration(v *WebsiteConfiguration) *PutBucketWebsiteInput {
- s.WebsiteConfiguration = v
- return s
-}
-
-func (s *PutBucketWebsiteInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutBucketWebsiteInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutBucketWebsiteInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutBucketWebsiteOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutBucketWebsiteOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutBucketWebsiteOutput) GoString() string {
- return s.String()
-}
-
-type PutObjectAclInput struct {
- _ struct{} `locationName:"PutObjectAclRequest" type:"structure" payload:"AccessControlPolicy"`
-
- // The canned ACL to apply to the object. For more information, see Canned ACL
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
-
- // Contains the elements that set the ACL permissions for an object per grantee.
- AccessControlPolicy *AccessControlPolicy `locationName:"AccessControlPolicy" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The bucket name that contains the object to which you want to attach the
- // ACL.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Allows grantee the read, write, read ACP, and write ACP permissions on the
- // bucket.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to list the objects in the bucket.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the bucket ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to create new objects in the bucket.
- //
- // For the bucket and object owners of existing objects, also allows deletions
- // and overwrites of those objects.
- GrantWrite *string `location:"header" locationName:"x-amz-grant-write" type:"string"`
-
- // Allows grantee to write the ACL for the applicable bucket.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-
- // Key for which the PUT action was initiated.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s PutObjectAclInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectAclInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectAclInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectAclInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.AccessControlPolicy != nil {
- if err := s.AccessControlPolicy.Validate(); err != nil {
- invalidParams.AddNested("AccessControlPolicy", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *PutObjectAclInput) SetACL(v string) *PutObjectAclInput {
- s.ACL = &v
- return s
-}
-
-// SetAccessControlPolicy sets the AccessControlPolicy field's value.
-func (s *PutObjectAclInput) SetAccessControlPolicy(v *AccessControlPolicy) *PutObjectAclInput {
- s.AccessControlPolicy = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectAclInput) SetBucket(v string) *PutObjectAclInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectAclInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectAclInput) SetExpectedBucketOwner(v string) *PutObjectAclInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *PutObjectAclInput) SetGrantFullControl(v string) *PutObjectAclInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *PutObjectAclInput) SetGrantRead(v string) *PutObjectAclInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *PutObjectAclInput) SetGrantReadACP(v string) *PutObjectAclInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWrite sets the GrantWrite field's value.
-func (s *PutObjectAclInput) SetGrantWrite(v string) *PutObjectAclInput {
- s.GrantWrite = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *PutObjectAclInput) SetGrantWriteACP(v string) *PutObjectAclInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectAclInput) SetKey(v string) *PutObjectAclInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectAclInput) SetRequestPayer(v string) *PutObjectAclInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectAclInput) SetVersionId(v string) *PutObjectAclInput {
- s.VersionId = &v
- return s
-}
-
-func (s *PutObjectAclInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutObjectAclInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectAclInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectAclOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation
-func (s PutObjectAclOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectAclOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectAclOutput) SetRequestCharged(v string) *PutObjectAclOutput {
- s.RequestCharged = &v
- return s
-}
-
-type PutObjectInput struct {
- _ struct{} `locationName:"PutObjectRequest" type:"structure" payload:"Body"`
-
- // The canned ACL to apply to the object. For more information, see Canned ACL
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#CannedACL).
- //
- // This action is not supported by Amazon S3 on Outposts.
- ACL *string `location:"header" locationName:"x-amz-acl" type:"string" enum:"ObjectCannedACL"`
-
- // Object data.
- Body io.ReadSeeker `type:"blob"`
-
- // The bucket name to which the PUT action was initiated.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption
- // with server-side encryption using AWS KMS (SSE-KMS). Setting this header
- // to true causes Amazon S3 to use an S3 Bucket Key for object encryption with
- // SSE-KMS.
- //
- // Specifying this header with a PUT action doesn’t affect bucket-level settings
- // for S3 Bucket Key.
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Can be used to specify caching behavior along the request/reply chain. For
- // more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9).
- CacheControl *string `location:"header" locationName:"Cache-Control" type:"string"`
-
- // Specifies presentational information for the object. For more information,
- // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1).
- ContentDisposition *string `location:"header" locationName:"Content-Disposition" type:"string"`
-
- // Specifies what content encodings have been applied to the object and thus
- // what decoding mechanisms must be applied to obtain the media-type referenced
- // by the Content-Type header field. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11).
- ContentEncoding *string `location:"header" locationName:"Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"Content-Language" type:"string"`
-
- // Size of the body in bytes. This parameter is useful when the size of the
- // body cannot be determined automatically. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13
- // (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13).
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // The base64-encoded 128-bit MD5 digest of the message (without the headers)
- // according to RFC 1864. This header can be used as a message integrity check
- // to verify that the data is the same data that was originally sent. Although
- // it is optional, we recommend using the Content-MD5 mechanism as an end-to-end
- // integrity check. For more information about REST request authentication,
- // see REST Authentication (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html).
- ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
-
- // A standard MIME type describing the format of the contents. For more information,
- // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17).
- ContentType *string `location:"header" locationName:"Content-Type" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The date and time at which the object is no longer cacheable. For more information,
- // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21).
- Expires *time.Time `location:"header" locationName:"Expires" type:"timestamp"`
-
- // Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantFullControl *string `location:"header" locationName:"x-amz-grant-full-control" type:"string"`
-
- // Allows grantee to read the object data and its metadata.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantRead *string `location:"header" locationName:"x-amz-grant-read" type:"string"`
-
- // Allows grantee to read the object ACL.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantReadACP *string `location:"header" locationName:"x-amz-grant-read-acp" type:"string"`
-
- // Allows grantee to write the ACL for the applicable object.
- //
- // This action is not supported by Amazon S3 on Outposts.
- GrantWriteACP *string `location:"header" locationName:"x-amz-grant-write-acp" type:"string"`
-
- // Object key for which the PUT action was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // Specifies whether a legal hold will be applied to this object. For more information
- // about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lock.html).
- ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
-
- // The Object Lock mode that you want to apply to this object.
- ObjectLockMode *string `location:"header" locationName:"x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
-
- // The date and time when you want this object's Object Lock to expire. Must
- // be formatted as a timestamp parameter.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
- // data. This value is used to store the object and then it is discarded; Amazon
- // S3 does not store the encryption key. The key must be appropriate for use
- // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // Specifies the AWS KMS Encryption Context to use for object encryption. The
- // value of this header is a base64-encoded UTF-8 string holding JSON with the
- // encryption context key-value pairs.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If x-amz-server-side-encryption is present and has the value of aws:kms,
- // this header specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetrical customer managed customer master key (CMK) that was used for
- // the object. If you specify x-amz-server-side-encryption:aws:kms, but do not
- // providex-amz-server-side-encryption-aws-kms-key-id, Amazon S3 uses the AWS
- // managed CMK in AWS to protect the data. If the KMS key does not exist in
- // the same account issuing the command, you must use the full ARN and not just
- // the ID.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing this object in Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // By default, Amazon S3 uses the STANDARD Storage Class to store newly created
- // objects. The STANDARD storage class provides high durability and high availability.
- // Depending on performance needs, you can specify a different Storage Class.
- // Amazon S3 on Outposts only uses the OUTPOSTS Storage Class. For more information,
- // see Storage Classes (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html)
- // in the Amazon S3 User Guide.
- StorageClass *string `location:"header" locationName:"x-amz-storage-class" type:"string" enum:"StorageClass"`
-
- // The tag-set for the object. The tag-set must be encoded as URL Query parameters.
- // (For example, "Key1=Value1")
- Tagging *string `location:"header" locationName:"x-amz-tagging" type:"string"`
-
- // If the bucket is configured as a website, redirects requests for this object
- // to another object in the same bucket or to an external URL. Amazon S3 stores
- // the value of this header in the object metadata. For information about object
- // metadata, see Object Key and Metadata (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html).
- //
- // In the following example, the request header sets the redirect to an object
- // (anotherPage.html) in the same bucket:
- //
- // x-amz-website-redirect-location: /anotherPage.html
- //
- // In the following example, the request header sets the object redirect to
- // another website:
- //
- // x-amz-website-redirect-location: http://www.example.com/
- //
- // For more information about website hosting in Amazon S3, see Hosting Websites
- // on Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
- // and How to Configure Website Page Redirects (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html).
- WebsiteRedirectLocation *string `location:"header" locationName:"x-amz-website-redirect-location" type:"string"`
-}
-
-// String returns the string representation
-func (s PutObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetACL sets the ACL field's value.
-func (s *PutObjectInput) SetACL(v string) *PutObjectInput {
- s.ACL = &v
- return s
-}
-
-// SetBody sets the Body field's value.
-func (s *PutObjectInput) SetBody(v io.ReadSeeker) *PutObjectInput {
- s.Body = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectInput) SetBucket(v string) *PutObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *PutObjectInput) SetBucketKeyEnabled(v bool) *PutObjectInput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *PutObjectInput) SetCacheControl(v string) *PutObjectInput {
- s.CacheControl = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *PutObjectInput) SetContentDisposition(v string) *PutObjectInput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *PutObjectInput) SetContentEncoding(v string) *PutObjectInput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *PutObjectInput) SetContentLanguage(v string) *PutObjectInput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *PutObjectInput) SetContentLength(v int64) *PutObjectInput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentMD5 sets the ContentMD5 field's value.
-func (s *PutObjectInput) SetContentMD5(v string) *PutObjectInput {
- s.ContentMD5 = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *PutObjectInput) SetContentType(v string) *PutObjectInput {
- s.ContentType = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectInput) SetExpectedBucketOwner(v string) *PutObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *PutObjectInput) SetExpires(v time.Time) *PutObjectInput {
- s.Expires = &v
- return s
-}
-
-// SetGrantFullControl sets the GrantFullControl field's value.
-func (s *PutObjectInput) SetGrantFullControl(v string) *PutObjectInput {
- s.GrantFullControl = &v
- return s
-}
-
-// SetGrantRead sets the GrantRead field's value.
-func (s *PutObjectInput) SetGrantRead(v string) *PutObjectInput {
- s.GrantRead = &v
- return s
-}
-
-// SetGrantReadACP sets the GrantReadACP field's value.
-func (s *PutObjectInput) SetGrantReadACP(v string) *PutObjectInput {
- s.GrantReadACP = &v
- return s
-}
-
-// SetGrantWriteACP sets the GrantWriteACP field's value.
-func (s *PutObjectInput) SetGrantWriteACP(v string) *PutObjectInput {
- s.GrantWriteACP = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectInput) SetKey(v string) *PutObjectInput {
- s.Key = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
- s.Metadata = v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *PutObjectInput) SetObjectLockLegalHoldStatus(v string) *PutObjectInput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *PutObjectInput) SetObjectLockMode(v string) *PutObjectInput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *PutObjectInput) SetObjectLockRetainUntilDate(v time.Time) *PutObjectInput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectInput) SetRequestPayer(v string) *PutObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *PutObjectInput) SetSSECustomerAlgorithm(v string) *PutObjectInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *PutObjectInput) SetSSECustomerKey(v string) *PutObjectInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *PutObjectInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *PutObjectInput) SetSSECustomerKeyMD5(v string) *PutObjectInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *PutObjectInput) SetSSEKMSEncryptionContext(v string) *PutObjectInput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *PutObjectInput) SetSSEKMSKeyId(v string) *PutObjectInput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *PutObjectInput) SetServerSideEncryption(v string) *PutObjectInput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *PutObjectInput) SetStorageClass(v string) *PutObjectInput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *PutObjectInput) SetTagging(v string) *PutObjectInput {
- s.Tagging = &v
- return s
-}
-
-// SetWebsiteRedirectLocation sets the WebsiteRedirectLocation field's value.
-func (s *PutObjectInput) SetWebsiteRedirectLocation(v string) *PutObjectInput {
- s.WebsiteRedirectLocation = &v
- return s
-}
-
-func (s *PutObjectInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutObjectInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectLegalHoldInput struct {
- _ struct{} `locationName:"PutObjectLegalHoldRequest" type:"structure" payload:"LegalHold"`
-
- // The bucket name containing the object that you want to place a Legal Hold
- // on.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key name for the object that you want to place a Legal Hold on.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Container element for the Legal Hold configuration you want to apply to the
- // specified object.
- LegalHold *ObjectLockLegalHold `locationName:"LegalHold" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The version ID of the object that you want to place a Legal Hold on.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s PutObjectLegalHoldInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectLegalHoldInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectLegalHoldInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectLegalHoldInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectLegalHoldInput) SetBucket(v string) *PutObjectLegalHoldInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectLegalHoldInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectLegalHoldInput) SetExpectedBucketOwner(v string) *PutObjectLegalHoldInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectLegalHoldInput) SetKey(v string) *PutObjectLegalHoldInput {
- s.Key = &v
- return s
-}
-
-// SetLegalHold sets the LegalHold field's value.
-func (s *PutObjectLegalHoldInput) SetLegalHold(v *ObjectLockLegalHold) *PutObjectLegalHoldInput {
- s.LegalHold = v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectLegalHoldInput) SetRequestPayer(v string) *PutObjectLegalHoldInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectLegalHoldInput) SetVersionId(v string) *PutObjectLegalHoldInput {
- s.VersionId = &v
- return s
-}
-
-func (s *PutObjectLegalHoldInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutObjectLegalHoldInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectLegalHoldInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectLegalHoldOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation
-func (s PutObjectLegalHoldOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectLegalHoldOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectLegalHoldOutput) SetRequestCharged(v string) *PutObjectLegalHoldOutput {
- s.RequestCharged = &v
- return s
-}
-
-type PutObjectLockConfigurationInput struct {
- _ struct{} `locationName:"PutObjectLockConfigurationRequest" type:"structure" payload:"ObjectLockConfiguration"`
-
- // The bucket whose Object Lock configuration you want to create or replace.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The Object Lock configuration that you want to apply to the specified bucket.
- ObjectLockConfiguration *ObjectLockConfiguration `locationName:"ObjectLockConfiguration" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // A token to allow Object Lock to be enabled for an existing bucket.
- Token *string `location:"header" locationName:"x-amz-bucket-object-lock-token" type:"string"`
-}
-
-// String returns the string representation
-func (s PutObjectLockConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectLockConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectLockConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectLockConfigurationInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectLockConfigurationInput) SetBucket(v string) *PutObjectLockConfigurationInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectLockConfigurationInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectLockConfigurationInput) SetExpectedBucketOwner(v string) *PutObjectLockConfigurationInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetObjectLockConfiguration sets the ObjectLockConfiguration field's value.
-func (s *PutObjectLockConfigurationInput) SetObjectLockConfiguration(v *ObjectLockConfiguration) *PutObjectLockConfigurationInput {
- s.ObjectLockConfiguration = v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectLockConfigurationInput) SetRequestPayer(v string) *PutObjectLockConfigurationInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetToken sets the Token field's value.
-func (s *PutObjectLockConfigurationInput) SetToken(v string) *PutObjectLockConfigurationInput {
- s.Token = &v
- return s
-}
-
-func (s *PutObjectLockConfigurationInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutObjectLockConfigurationInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectLockConfigurationInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectLockConfigurationOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation
-func (s PutObjectLockConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectLockConfigurationOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectLockConfigurationOutput) SetRequestCharged(v string) *PutObjectLockConfigurationOutput {
- s.RequestCharged = &v
- return s
-}
-
-type PutObjectOutput struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether the uploaded object uses an S3 Bucket Key for server-side
- // encryption with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Entity tag for the uploaded object.
- ETag *string `location:"header" locationName:"ETag" type:"string"`
-
- // If the expiration is configured for the object (see PutBucketLifecycleConfiguration
- // (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html)),
- // the response includes this header. It includes the expiry-date and rule-id
- // key-value pairs that provide information about object expiration. The value
- // of the rule-id is URL encoded.
- Expiration *string `location:"header" locationName:"x-amz-expiration" type:"string"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the AWS KMS Encryption Context to use for object encryption.
- // The value of this header is a base64-encoded UTF-8 string holding JSON with
- // the encryption context key-value pairs.
- SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"`
-
- // If x-amz-server-side-encryption is present and has the value of aws:kms,
- // this header specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) that was used for the
- // object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // If you specified server-side encryption either with an AWS KMS customer master
- // key (CMK) or Amazon S3-managed encryption key in your PUT request, the response
- // includes this header. It confirms the encryption algorithm that Amazon S3
- // used to encrypt the object.
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // Version of the object.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation
-func (s PutObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *PutObjectOutput) SetBucketKeyEnabled(v bool) *PutObjectOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *PutObjectOutput) SetETag(v string) *PutObjectOutput {
- s.ETag = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *PutObjectOutput) SetExpiration(v string) *PutObjectOutput {
- s.Expiration = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectOutput) SetRequestCharged(v string) *PutObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *PutObjectOutput) SetSSECustomerAlgorithm(v string) *PutObjectOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *PutObjectOutput) SetSSECustomerKeyMD5(v string) *PutObjectOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSEncryptionContext sets the SSEKMSEncryptionContext field's value.
-func (s *PutObjectOutput) SetSSEKMSEncryptionContext(v string) *PutObjectOutput {
- s.SSEKMSEncryptionContext = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *PutObjectOutput) SetSSEKMSKeyId(v string) *PutObjectOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *PutObjectOutput) SetServerSideEncryption(v string) *PutObjectOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectOutput) SetVersionId(v string) *PutObjectOutput {
- s.VersionId = &v
- return s
-}
-
-type PutObjectRetentionInput struct {
- _ struct{} `locationName:"PutObjectRetentionRequest" type:"structure" payload:"Retention"`
-
- // The bucket name that contains the object you want to apply this Object Retention
- // configuration to.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Indicates whether this action should bypass Governance-mode restrictions.
- BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The key name for the object that you want to apply this Object Retention
- // configuration to.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // The container element for the Object Retention configuration.
- Retention *ObjectLockRetention `locationName:"Retention" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The version ID for the object that you want to apply this Object Retention
- // configuration to.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s PutObjectRetentionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectRetentionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectRetentionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectRetentionInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectRetentionInput) SetBucket(v string) *PutObjectRetentionInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectRetentionInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetBypassGovernanceRetention sets the BypassGovernanceRetention field's value.
-func (s *PutObjectRetentionInput) SetBypassGovernanceRetention(v bool) *PutObjectRetentionInput {
- s.BypassGovernanceRetention = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectRetentionInput) SetExpectedBucketOwner(v string) *PutObjectRetentionInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectRetentionInput) SetKey(v string) *PutObjectRetentionInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectRetentionInput) SetRequestPayer(v string) *PutObjectRetentionInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetRetention sets the Retention field's value.
-func (s *PutObjectRetentionInput) SetRetention(v *ObjectLockRetention) *PutObjectRetentionInput {
- s.Retention = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectRetentionInput) SetVersionId(v string) *PutObjectRetentionInput {
- s.VersionId = &v
- return s
-}
-
-func (s *PutObjectRetentionInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutObjectRetentionInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectRetentionInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectRetentionOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-}
-
-// String returns the string representation
-func (s PutObjectRetentionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectRetentionOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *PutObjectRetentionOutput) SetRequestCharged(v string) *PutObjectRetentionOutput {
- s.RequestCharged = &v
- return s
-}
-
-type PutObjectTaggingInput struct {
- _ struct{} `locationName:"PutObjectTaggingRequest" type:"structure" payload:"Tagging"`
-
- // The bucket name containing the object.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Name of the object key.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Container for the TagSet and Tag elements
- //
- // Tagging is a required field
- Tagging *Tagging `locationName:"Tagging" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The versionId of the object that the tag-set will be added to.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s PutObjectTaggingInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectTaggingInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutObjectTaggingInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutObjectTaggingInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.Tagging == nil {
- invalidParams.Add(request.NewErrParamRequired("Tagging"))
- }
- if s.Tagging != nil {
- if err := s.Tagging.Validate(); err != nil {
- invalidParams.AddNested("Tagging", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutObjectTaggingInput) SetBucket(v string) *PutObjectTaggingInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutObjectTaggingInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutObjectTaggingInput) SetExpectedBucketOwner(v string) *PutObjectTaggingInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *PutObjectTaggingInput) SetKey(v string) *PutObjectTaggingInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *PutObjectTaggingInput) SetRequestPayer(v string) *PutObjectTaggingInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetTagging sets the Tagging field's value.
-func (s *PutObjectTaggingInput) SetTagging(v *Tagging) *PutObjectTaggingInput {
- s.Tagging = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectTaggingInput) SetVersionId(v string) *PutObjectTaggingInput {
- s.VersionId = &v
- return s
-}
-
-func (s *PutObjectTaggingInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutObjectTaggingInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutObjectTaggingInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutObjectTaggingOutput struct {
- _ struct{} `type:"structure"`
-
- // The versionId of the object the tag-set was added to.
- VersionId *string `location:"header" locationName:"x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation
-func (s PutObjectTaggingOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutObjectTaggingOutput) GoString() string {
- return s.String()
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *PutObjectTaggingOutput) SetVersionId(v string) *PutObjectTaggingOutput {
- s.VersionId = &v
- return s
-}
-
-type PutPublicAccessBlockInput struct {
- _ struct{} `locationName:"PutPublicAccessBlockRequest" type:"structure" payload:"PublicAccessBlockConfiguration"`
-
- // The name of the Amazon S3 bucket whose PublicAccessBlock configuration you
- // want to set.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The PublicAccessBlock configuration that you want to apply to this Amazon
- // S3 bucket. You can enable the configuration options in any combination. For
- // more information about when Amazon S3 considers a bucket or object public,
- // see The Meaning of "Public" (https://docs.aws.amazon.com/AmazonS3/latest/dev/access-control-block-public-access.html#access-control-block-public-access-policy-status)
- // in the Amazon S3 User Guide.
- //
- // PublicAccessBlockConfiguration is a required field
- PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `locationName:"PublicAccessBlockConfiguration" type:"structure" required:"true" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-}
-
-// String returns the string representation
-func (s PutPublicAccessBlockInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutPublicAccessBlockInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutPublicAccessBlockInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutPublicAccessBlockInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.PublicAccessBlockConfiguration == nil {
- invalidParams.Add(request.NewErrParamRequired("PublicAccessBlockConfiguration"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *PutPublicAccessBlockInput) SetBucket(v string) *PutPublicAccessBlockInput {
- s.Bucket = &v
- return s
-}
-
-func (s *PutPublicAccessBlockInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *PutPublicAccessBlockInput) SetExpectedBucketOwner(v string) *PutPublicAccessBlockInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetPublicAccessBlockConfiguration sets the PublicAccessBlockConfiguration field's value.
-func (s *PutPublicAccessBlockInput) SetPublicAccessBlockConfiguration(v *PublicAccessBlockConfiguration) *PutPublicAccessBlockInput {
- s.PublicAccessBlockConfiguration = v
- return s
-}
-
-func (s *PutPublicAccessBlockInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *PutPublicAccessBlockInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s PutPublicAccessBlockInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type PutPublicAccessBlockOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s PutPublicAccessBlockOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s PutPublicAccessBlockOutput) GoString() string {
- return s.String()
-}
-
-// Specifies the configuration for publishing messages to an Amazon Simple Queue
-// Service (Amazon SQS) queue when Amazon S3 detects specified events.
-type QueueConfiguration struct {
- _ struct{} `type:"structure"`
-
- // A collection of bucket events for which to send notifications
- //
- // Events is a required field
- Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
-
- // Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- Filter *NotificationConfigurationFilter `type:"structure"`
-
- // An optional unique identifier for configurations in a notification configuration.
- // If you don't provide one, Amazon S3 will assign an ID.
- Id *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3
- // publishes a message when it detects events of the specified type.
- //
- // QueueArn is a required field
- QueueArn *string `locationName:"Queue" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s QueueConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s QueueConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *QueueConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "QueueConfiguration"}
- if s.Events == nil {
- invalidParams.Add(request.NewErrParamRequired("Events"))
- }
- if s.QueueArn == nil {
- invalidParams.Add(request.NewErrParamRequired("QueueArn"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEvents sets the Events field's value.
-func (s *QueueConfiguration) SetEvents(v []*string) *QueueConfiguration {
- s.Events = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *QueueConfiguration) SetFilter(v *NotificationConfigurationFilter) *QueueConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *QueueConfiguration) SetId(v string) *QueueConfiguration {
- s.Id = &v
- return s
-}
-
-// SetQueueArn sets the QueueArn field's value.
-func (s *QueueConfiguration) SetQueueArn(v string) *QueueConfiguration {
- s.QueueArn = &v
- return s
-}
-
-// This data type is deprecated. Use QueueConfiguration (https://docs.aws.amazon.com/AmazonS3/latest/API/API_QueueConfiguration.html)
-// for the same purposes. This data type specifies the configuration for publishing
-// messages to an Amazon Simple Queue Service (Amazon SQS) queue when Amazon
-// S3 detects specified events.
-type QueueConfigurationDeprecated struct {
- _ struct{} `type:"structure"`
-
- // The bucket event for which to send notifications.
- //
- // Deprecated: Event has been deprecated
- Event *string `deprecated:"true" type:"string" enum:"Event"`
-
- // A collection of bucket events for which to send notifications.
- Events []*string `locationName:"Event" type:"list" flattened:"true"`
-
- // An optional unique identifier for configurations in a notification configuration.
- // If you don't provide one, Amazon S3 will assign an ID.
- Id *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the Amazon SQS queue to which Amazon S3
- // publishes a message when it detects events of the specified type.
- Queue *string `type:"string"`
-}
-
-// String returns the string representation
-func (s QueueConfigurationDeprecated) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s QueueConfigurationDeprecated) GoString() string {
- return s.String()
-}
-
-// SetEvent sets the Event field's value.
-func (s *QueueConfigurationDeprecated) SetEvent(v string) *QueueConfigurationDeprecated {
- s.Event = &v
- return s
-}
-
-// SetEvents sets the Events field's value.
-func (s *QueueConfigurationDeprecated) SetEvents(v []*string) *QueueConfigurationDeprecated {
- s.Events = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *QueueConfigurationDeprecated) SetId(v string) *QueueConfigurationDeprecated {
- s.Id = &v
- return s
-}
-
-// SetQueue sets the Queue field's value.
-func (s *QueueConfigurationDeprecated) SetQueue(v string) *QueueConfigurationDeprecated {
- s.Queue = &v
- return s
-}
-
-// The container for the records event.
-type RecordsEvent struct {
- _ struct{} `locationName:"RecordsEvent" type:"structure" payload:"Payload"`
-
- // The byte array of partial, one or more result records.
- //
- // Payload is automatically base64 encoded/decoded by the SDK.
- Payload []byte `type:"blob"`
-}
-
-// String returns the string representation
-func (s RecordsEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RecordsEvent) GoString() string {
- return s.String()
-}
-
-// SetPayload sets the Payload field's value.
-func (s *RecordsEvent) SetPayload(v []byte) *RecordsEvent {
- s.Payload = v
- return s
-}
-
-// The RecordsEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *RecordsEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the RecordsEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *RecordsEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- s.Payload = make([]byte, len(msg.Payload))
- copy(s.Payload, msg.Payload)
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-func (s *RecordsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
- msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
- msg.Headers.Set(":content-type", eventstream.StringValue("application/octet-stream"))
- msg.Payload = s.Payload
- return msg, err
-}
-
-// Specifies how requests are redirected. In the event of an error, you can
-// specify a different error code to return.
-type Redirect struct {
- _ struct{} `type:"structure"`
-
- // The host name to use in the redirect request.
- HostName *string `type:"string"`
-
- // The HTTP redirect code to use on the response. Not required if one of the
- // siblings is present.
- HttpRedirectCode *string `type:"string"`
-
- // Protocol to use when redirecting requests. The default is the protocol that
- // is used in the original request.
- Protocol *string `type:"string" enum:"Protocol"`
-
- // The object key prefix to use in the redirect request. For example, to redirect
- // requests for all pages with prefix docs/ (objects in the docs/ folder) to
- // documents/, you can set a condition block with KeyPrefixEquals set to docs/
- // and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required
- // if one of the siblings is present. Can be present only if ReplaceKeyWith
- // is not provided.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- ReplaceKeyPrefixWith *string `type:"string"`
-
- // The specific object key to use in the redirect request. For example, redirect
- // request to error.html. Not required if one of the siblings is present. Can
- // be present only if ReplaceKeyPrefixWith is not provided.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- ReplaceKeyWith *string `type:"string"`
-}
-
-// String returns the string representation
-func (s Redirect) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Redirect) GoString() string {
- return s.String()
-}
-
-// SetHostName sets the HostName field's value.
-func (s *Redirect) SetHostName(v string) *Redirect {
- s.HostName = &v
- return s
-}
-
-// SetHttpRedirectCode sets the HttpRedirectCode field's value.
-func (s *Redirect) SetHttpRedirectCode(v string) *Redirect {
- s.HttpRedirectCode = &v
- return s
-}
-
-// SetProtocol sets the Protocol field's value.
-func (s *Redirect) SetProtocol(v string) *Redirect {
- s.Protocol = &v
- return s
-}
-
-// SetReplaceKeyPrefixWith sets the ReplaceKeyPrefixWith field's value.
-func (s *Redirect) SetReplaceKeyPrefixWith(v string) *Redirect {
- s.ReplaceKeyPrefixWith = &v
- return s
-}
-
-// SetReplaceKeyWith sets the ReplaceKeyWith field's value.
-func (s *Redirect) SetReplaceKeyWith(v string) *Redirect {
- s.ReplaceKeyWith = &v
- return s
-}
-
-// Specifies the redirect behavior of all requests to a website endpoint of
-// an Amazon S3 bucket.
-type RedirectAllRequestsTo struct {
- _ struct{} `type:"structure"`
-
- // Name of the host where requests are redirected.
- //
- // HostName is a required field
- HostName *string `type:"string" required:"true"`
-
- // Protocol to use when redirecting requests. The default is the protocol that
- // is used in the original request.
- Protocol *string `type:"string" enum:"Protocol"`
-}
-
-// String returns the string representation
-func (s RedirectAllRequestsTo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RedirectAllRequestsTo) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RedirectAllRequestsTo) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RedirectAllRequestsTo"}
- if s.HostName == nil {
- invalidParams.Add(request.NewErrParamRequired("HostName"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetHostName sets the HostName field's value.
-func (s *RedirectAllRequestsTo) SetHostName(v string) *RedirectAllRequestsTo {
- s.HostName = &v
- return s
-}
-
-// SetProtocol sets the Protocol field's value.
-func (s *RedirectAllRequestsTo) SetProtocol(v string) *RedirectAllRequestsTo {
- s.Protocol = &v
- return s
-}
-
-// A filter that you can specify for selection for modifications on replicas.
-// Amazon S3 doesn't replicate replica modifications by default. In the latest
-// version of replication configuration (when Filter is specified), you can
-// specify this element and set the status to Enabled to replicate modifications
-// on replicas.
-//
-// If you don't specify the Filter element, Amazon S3 assumes that the replication
-// configuration is the earlier version, V1. In the earlier version, this element
-// is not allowed.
-type ReplicaModifications struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether Amazon S3 replicates modifications on replicas.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ReplicaModificationsStatus"`
-}
-
-// String returns the string representation
-func (s ReplicaModifications) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplicaModifications) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicaModifications) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicaModifications"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStatus sets the Status field's value.
-func (s *ReplicaModifications) SetStatus(v string) *ReplicaModifications {
- s.Status = &v
- return s
-}
-
-// A container for replication rules. You can add up to 1,000 rules. The maximum
-// size of a replication configuration is 2 MB.
-type ReplicationConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the AWS Identity and Access Management
- // (IAM) role that Amazon S3 assumes when replicating objects. For more information,
- // see How to Set Up Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-how-setup.html)
- // in the Amazon S3 User Guide.
- //
- // Role is a required field
- Role *string `type:"string" required:"true"`
-
- // A container for one or more replication rules. A replication configuration
- // must have at least one rule and can contain a maximum of 1,000 rules.
- //
- // Rules is a required field
- Rules []*ReplicationRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation
-func (s ReplicationConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplicationConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationConfiguration"}
- if s.Role == nil {
- invalidParams.Add(request.NewErrParamRequired("Role"))
- }
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRole sets the Role field's value.
-func (s *ReplicationConfiguration) SetRole(v string) *ReplicationConfiguration {
- s.Role = &v
- return s
-}
-
-// SetRules sets the Rules field's value.
-func (s *ReplicationConfiguration) SetRules(v []*ReplicationRule) *ReplicationConfiguration {
- s.Rules = v
- return s
-}
-
-// Specifies which Amazon S3 objects to replicate and where to store the replicas.
-type ReplicationRule struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether Amazon S3 replicates delete markers. If you specify a Filter
- // in your replication configuration, you must also include a DeleteMarkerReplication
- // element. If your Filter includes a Tag element, the DeleteMarkerReplication
- // Status must be set to Disabled, because Amazon S3 does not support replicating
- // delete markers for tag-based rules. For an example configuration, see Basic
- // Rule Configuration (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
- //
- // For more information about delete marker replication, see Basic Rule Configuration
- // (https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
- //
- // If you are using an earlier version of the replication configuration, Amazon
- // S3 handles replication of delete markers differently. For more information,
- // see Backward Compatibility (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
- DeleteMarkerReplication *DeleteMarkerReplication `type:"structure"`
-
- // A container for information about the replication destination and its configurations
- // including enabling the S3 Replication Time Control (S3 RTC).
- //
- // Destination is a required field
- Destination *Destination `type:"structure" required:"true"`
-
- // Optional configuration to replicate existing source bucket objects. For more
- // information, see Replicating Existing Objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-what-is-isnot-replicated.html#existing-object-replication)
- // in the Amazon S3 User Guide.
- ExistingObjectReplication *ExistingObjectReplication `type:"structure"`
-
- // A filter that identifies the subset of objects to which the replication rule
- // applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
- Filter *ReplicationRuleFilter `type:"structure"`
-
- // A unique identifier for the rule. The maximum value is 255 characters.
- ID *string `type:"string"`
-
- // An object key name prefix that identifies the object or objects to which
- // the rule applies. The maximum prefix length is 1,024 characters. To include
- // all objects in a bucket, specify an empty string.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Deprecated: Prefix has been deprecated
- Prefix *string `deprecated:"true" type:"string"`
-
- // The priority indicates which rule has precedence whenever two or more replication
- // rules conflict. Amazon S3 will attempt to replicate objects according to
- // all replication rules. However, if there are two or more rules with the same
- // destination bucket, then objects will be replicated according to the rule
- // with the highest priority. The higher the number, the higher the priority.
- //
- // For more information, see Replication (https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html)
- // in the Amazon S3 User Guide.
- Priority *int64 `type:"integer"`
-
- // A container that describes additional filters for identifying the source
- // objects that you want to replicate. You can choose to enable or disable the
- // replication of these objects. Currently, Amazon S3 supports only the filter
- // that you can specify for objects created with server-side encryption using
- // a customer master key (CMK) stored in AWS Key Management Service (SSE-KMS).
- SourceSelectionCriteria *SourceSelectionCriteria `type:"structure"`
-
- // Specifies whether the rule is enabled.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ReplicationRuleStatus"`
-}
-
-// String returns the string representation
-func (s ReplicationRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplicationRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationRule"}
- if s.Destination == nil {
- invalidParams.Add(request.NewErrParamRequired("Destination"))
- }
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
- if s.Destination != nil {
- if err := s.Destination.Validate(); err != nil {
- invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
- }
- }
- if s.ExistingObjectReplication != nil {
- if err := s.ExistingObjectReplication.Validate(); err != nil {
- invalidParams.AddNested("ExistingObjectReplication", err.(request.ErrInvalidParams))
- }
- }
- if s.Filter != nil {
- if err := s.Filter.Validate(); err != nil {
- invalidParams.AddNested("Filter", err.(request.ErrInvalidParams))
- }
- }
- if s.SourceSelectionCriteria != nil {
- if err := s.SourceSelectionCriteria.Validate(); err != nil {
- invalidParams.AddNested("SourceSelectionCriteria", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDeleteMarkerReplication sets the DeleteMarkerReplication field's value.
-func (s *ReplicationRule) SetDeleteMarkerReplication(v *DeleteMarkerReplication) *ReplicationRule {
- s.DeleteMarkerReplication = v
- return s
-}
-
-// SetDestination sets the Destination field's value.
-func (s *ReplicationRule) SetDestination(v *Destination) *ReplicationRule {
- s.Destination = v
- return s
-}
-
-// SetExistingObjectReplication sets the ExistingObjectReplication field's value.
-func (s *ReplicationRule) SetExistingObjectReplication(v *ExistingObjectReplication) *ReplicationRule {
- s.ExistingObjectReplication = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *ReplicationRule) SetFilter(v *ReplicationRuleFilter) *ReplicationRule {
- s.Filter = v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *ReplicationRule) SetID(v string) *ReplicationRule {
- s.ID = &v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ReplicationRule) SetPrefix(v string) *ReplicationRule {
- s.Prefix = &v
- return s
-}
-
-// SetPriority sets the Priority field's value.
-func (s *ReplicationRule) SetPriority(v int64) *ReplicationRule {
- s.Priority = &v
- return s
-}
-
-// SetSourceSelectionCriteria sets the SourceSelectionCriteria field's value.
-func (s *ReplicationRule) SetSourceSelectionCriteria(v *SourceSelectionCriteria) *ReplicationRule {
- s.SourceSelectionCriteria = v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *ReplicationRule) SetStatus(v string) *ReplicationRule {
- s.Status = &v
- return s
-}
-
-// A container for specifying rule filters. The filters determine the subset
-// of objects to which the rule applies. This element is required only if you
-// specify more than one filter.
-//
-// For example:
-//
-// * If you specify both a Prefix and a Tag filter, wrap these filters in
-// an And tag.
-//
-// * If you specify a filter based on multiple tags, wrap the Tag elements
-// in an And tag.
-type ReplicationRuleAndOperator struct {
- _ struct{} `type:"structure"`
-
- // An object key name prefix that identifies the subset of objects to which
- // the rule applies.
- Prefix *string `type:"string"`
-
- // An array of tags containing key and value pairs.
- Tags []*Tag `locationName:"Tag" locationNameList:"Tag" type:"list" flattened:"true"`
-}
-
-// String returns the string representation
-func (s ReplicationRuleAndOperator) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplicationRuleAndOperator) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationRuleAndOperator) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleAndOperator"}
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ReplicationRuleAndOperator) SetPrefix(v string) *ReplicationRuleAndOperator {
- s.Prefix = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *ReplicationRuleAndOperator) SetTags(v []*Tag) *ReplicationRuleAndOperator {
- s.Tags = v
- return s
-}
-
-// A filter that identifies the subset of objects to which the replication rule
-// applies. A Filter must specify exactly one Prefix, Tag, or an And child element.
-type ReplicationRuleFilter struct {
- _ struct{} `type:"structure"`
-
- // A container for specifying rule filters. The filters determine the subset
- // of objects to which the rule applies. This element is required only if you
- // specify more than one filter. For example:
- //
- // * If you specify both a Prefix and a Tag filter, wrap these filters in
- // an And tag.
- //
- // * If you specify a filter based on multiple tags, wrap the Tag elements
- // in an And tag.
- And *ReplicationRuleAndOperator `type:"structure"`
-
- // An object key name prefix that identifies the subset of objects to which
- // the rule applies.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- Prefix *string `type:"string"`
-
- // A container for specifying a tag key and value.
- //
- // The rule applies only to objects that have the tag in their tag set.
- Tag *Tag `type:"structure"`
-}
-
-// String returns the string representation
-func (s ReplicationRuleFilter) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplicationRuleFilter) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationRuleFilter) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationRuleFilter"}
- if s.And != nil {
- if err := s.And.Validate(); err != nil {
- invalidParams.AddNested("And", err.(request.ErrInvalidParams))
- }
- }
- if s.Tag != nil {
- if err := s.Tag.Validate(); err != nil {
- invalidParams.AddNested("Tag", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAnd sets the And field's value.
-func (s *ReplicationRuleFilter) SetAnd(v *ReplicationRuleAndOperator) *ReplicationRuleFilter {
- s.And = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
- s.Prefix = &v
- return s
-}
-
-// SetTag sets the Tag field's value.
-func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
- s.Tag = v
- return s
-}
-
-// A container specifying S3 Replication Time Control (S3 RTC) related information,
-// including whether S3 RTC is enabled and the time when all objects and operations
-// on objects must be replicated. Must be specified together with a Metrics
-// block.
-type ReplicationTime struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether the replication time is enabled.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ReplicationTimeStatus"`
-
- // A container specifying the time by which replication should be complete for
- // all objects and operations on objects.
- //
- // Time is a required field
- Time *ReplicationTimeValue `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s ReplicationTime) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplicationTime) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicationTime) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicationTime"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
- if s.Time == nil {
- invalidParams.Add(request.NewErrParamRequired("Time"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStatus sets the Status field's value.
-func (s *ReplicationTime) SetStatus(v string) *ReplicationTime {
- s.Status = &v
- return s
-}
-
-// SetTime sets the Time field's value.
-func (s *ReplicationTime) SetTime(v *ReplicationTimeValue) *ReplicationTime {
- s.Time = v
- return s
-}
-
-// A container specifying the time value for S3 Replication Time Control (S3
-// RTC) and replication metrics EventThreshold.
-type ReplicationTimeValue struct {
- _ struct{} `type:"structure"`
-
- // Contains an integer specifying time in minutes.
- //
- // Valid values: 15 minutes.
- Minutes *int64 `type:"integer"`
-}
-
-// String returns the string representation
-func (s ReplicationTimeValue) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ReplicationTimeValue) GoString() string {
- return s.String()
-}
-
-// SetMinutes sets the Minutes field's value.
-func (s *ReplicationTimeValue) SetMinutes(v int64) *ReplicationTimeValue {
- s.Minutes = &v
- return s
-}
-
-// Container for Payer.
-type RequestPaymentConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies who pays for the download and request fees.
- //
- // Payer is a required field
- Payer *string `type:"string" required:"true" enum:"Payer"`
-}
-
-// String returns the string representation
-func (s RequestPaymentConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RequestPaymentConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RequestPaymentConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RequestPaymentConfiguration"}
- if s.Payer == nil {
- invalidParams.Add(request.NewErrParamRequired("Payer"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetPayer sets the Payer field's value.
-func (s *RequestPaymentConfiguration) SetPayer(v string) *RequestPaymentConfiguration {
- s.Payer = &v
- return s
-}
-
-// Container for specifying if periodic QueryProgress messages should be sent.
-type RequestProgress struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether periodic QueryProgress frames should be sent. Valid values:
- // TRUE, FALSE. Default value: FALSE.
- Enabled *bool `type:"boolean"`
-}
-
-// String returns the string representation
-func (s RequestProgress) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RequestProgress) GoString() string {
- return s.String()
-}
-
-// SetEnabled sets the Enabled field's value.
-func (s *RequestProgress) SetEnabled(v bool) *RequestProgress {
- s.Enabled = &v
- return s
-}
-
-type RestoreObjectInput struct {
- _ struct{} `locationName:"RestoreObjectRequest" type:"structure" payload:"RestoreRequest"`
-
- // The bucket name containing the object to restore.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Object key for which the action was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Container for restore job parameters.
- RestoreRequest *RestoreRequest `locationName:"RestoreRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // VersionId used to reference a specific version of the object.
- VersionId *string `location:"querystring" locationName:"versionId" type:"string"`
-}
-
-// String returns the string representation
-func (s RestoreObjectInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RestoreObjectInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RestoreObjectInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RestoreObjectInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.RestoreRequest != nil {
- if err := s.RestoreRequest.Validate(); err != nil {
- invalidParams.AddNested("RestoreRequest", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *RestoreObjectInput) SetBucket(v string) *RestoreObjectInput {
- s.Bucket = &v
- return s
-}
-
-func (s *RestoreObjectInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *RestoreObjectInput) SetExpectedBucketOwner(v string) *RestoreObjectInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *RestoreObjectInput) SetKey(v string) *RestoreObjectInput {
- s.Key = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *RestoreObjectInput) SetRequestPayer(v string) *RestoreObjectInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetRestoreRequest sets the RestoreRequest field's value.
-func (s *RestoreObjectInput) SetRestoreRequest(v *RestoreRequest) *RestoreObjectInput {
- s.RestoreRequest = v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *RestoreObjectInput) SetVersionId(v string) *RestoreObjectInput {
- s.VersionId = &v
- return s
-}
-
-func (s *RestoreObjectInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *RestoreObjectInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s RestoreObjectInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type RestoreObjectOutput struct {
- _ struct{} `type:"structure"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // Indicates the path in the provided S3 output location where Select results
- // will be restored to.
- RestoreOutputPath *string `location:"header" locationName:"x-amz-restore-output-path" type:"string"`
-}
-
-// String returns the string representation
-func (s RestoreObjectOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RestoreObjectOutput) GoString() string {
- return s.String()
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *RestoreObjectOutput) SetRequestCharged(v string) *RestoreObjectOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetRestoreOutputPath sets the RestoreOutputPath field's value.
-func (s *RestoreObjectOutput) SetRestoreOutputPath(v string) *RestoreObjectOutput {
- s.RestoreOutputPath = &v
- return s
-}
-
-// Container for restore job parameters.
-type RestoreRequest struct {
- _ struct{} `type:"structure"`
-
- // Lifetime of the active copy in days. Do not use with restores that specify
- // OutputLocation.
- //
- // The Days element is required for regular restores, and must not be provided
- // for select requests.
- Days *int64 `type:"integer"`
-
- // The optional description for the job.
- Description *string `type:"string"`
-
- // S3 Glacier related parameters pertaining to this job. Do not use with restores
- // that specify OutputLocation.
- GlacierJobParameters *GlacierJobParameters `type:"structure"`
-
- // Describes the location where the restore job's output is stored.
- OutputLocation *OutputLocation `type:"structure"`
-
- // Describes the parameters for Select job types.
- SelectParameters *SelectParameters `type:"structure"`
-
- // Retrieval tier at which the restore will be processed.
- Tier *string `type:"string" enum:"Tier"`
-
- // Type of restore request.
- Type *string `type:"string" enum:"RestoreRequestType"`
-}
-
-// String returns the string representation
-func (s RestoreRequest) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RestoreRequest) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RestoreRequest) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RestoreRequest"}
- if s.GlacierJobParameters != nil {
- if err := s.GlacierJobParameters.Validate(); err != nil {
- invalidParams.AddNested("GlacierJobParameters", err.(request.ErrInvalidParams))
- }
- }
- if s.OutputLocation != nil {
- if err := s.OutputLocation.Validate(); err != nil {
- invalidParams.AddNested("OutputLocation", err.(request.ErrInvalidParams))
- }
- }
- if s.SelectParameters != nil {
- if err := s.SelectParameters.Validate(); err != nil {
- invalidParams.AddNested("SelectParameters", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDays sets the Days field's value.
-func (s *RestoreRequest) SetDays(v int64) *RestoreRequest {
- s.Days = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *RestoreRequest) SetDescription(v string) *RestoreRequest {
- s.Description = &v
- return s
-}
-
-// SetGlacierJobParameters sets the GlacierJobParameters field's value.
-func (s *RestoreRequest) SetGlacierJobParameters(v *GlacierJobParameters) *RestoreRequest {
- s.GlacierJobParameters = v
- return s
-}
-
-// SetOutputLocation sets the OutputLocation field's value.
-func (s *RestoreRequest) SetOutputLocation(v *OutputLocation) *RestoreRequest {
- s.OutputLocation = v
- return s
-}
-
-// SetSelectParameters sets the SelectParameters field's value.
-func (s *RestoreRequest) SetSelectParameters(v *SelectParameters) *RestoreRequest {
- s.SelectParameters = v
- return s
-}
-
-// SetTier sets the Tier field's value.
-func (s *RestoreRequest) SetTier(v string) *RestoreRequest {
- s.Tier = &v
- return s
-}
-
-// SetType sets the Type field's value.
-func (s *RestoreRequest) SetType(v string) *RestoreRequest {
- s.Type = &v
- return s
-}
-
-// Specifies the redirect behavior and when a redirect is applied. For more
-// information about routing rules, see Configuring advanced conditional redirects
-// (https://docs.aws.amazon.com/AmazonS3/latest/dev/how-to-page-redirect.html#advanced-conditional-redirects)
-// in the Amazon S3 User Guide.
-type RoutingRule struct {
- _ struct{} `type:"structure"`
-
- // A container for describing a condition that must be met for the specified
- // redirect to apply. For example, 1. If request is for pages in the /docs folder,
- // redirect to the /documents folder. 2. If request results in HTTP error 4xx,
- // redirect request to another host where you might process the error.
- Condition *Condition `type:"structure"`
-
- // Container for redirect information. You can redirect requests to another
- // host, to another page, or with another protocol. In the event of an error,
- // you can specify a different error code to return.
- //
- // Redirect is a required field
- Redirect *Redirect `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s RoutingRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s RoutingRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RoutingRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RoutingRule"}
- if s.Redirect == nil {
- invalidParams.Add(request.NewErrParamRequired("Redirect"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCondition sets the Condition field's value.
-func (s *RoutingRule) SetCondition(v *Condition) *RoutingRule {
- s.Condition = v
- return s
-}
-
-// SetRedirect sets the Redirect field's value.
-func (s *RoutingRule) SetRedirect(v *Redirect) *RoutingRule {
- s.Redirect = v
- return s
-}
-
-// Specifies lifecycle rules for an Amazon S3 bucket. For more information,
-// see Put Bucket Lifecycle Configuration (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html)
-// in the Amazon S3 API Reference. For examples, see Put Bucket Lifecycle Configuration
-// Examples (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html#API_PutBucketLifecycleConfiguration_Examples).
-type Rule struct {
- _ struct{} `type:"structure"`
-
- // Specifies the days since the initiation of an incomplete multipart upload
- // that Amazon S3 will wait before permanently removing all parts of the upload.
- // For more information, see Aborting Incomplete Multipart Uploads Using a Bucket
- // Lifecycle Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuoverview.html#mpu-abort-incomplete-mpu-lifecycle-config)
- // in the Amazon S3 User Guide.
- AbortIncompleteMultipartUpload *AbortIncompleteMultipartUpload `type:"structure"`
-
- // Specifies the expiration for the lifecycle of the object.
- Expiration *LifecycleExpiration `type:"structure"`
-
- // Unique identifier for the rule. The value can't be longer than 255 characters.
- ID *string `type:"string"`
-
- // Specifies when noncurrent object versions expire. Upon expiration, Amazon
- // S3 permanently deletes the noncurrent object versions. You set this lifecycle
- // configuration action on a bucket that has versioning enabled (or suspended)
- // to request that Amazon S3 delete noncurrent object versions at a specific
- // period in the object's lifetime.
- NoncurrentVersionExpiration *NoncurrentVersionExpiration `type:"structure"`
-
- // Container for the transition rule that describes when noncurrent objects
- // transition to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER,
- // or DEEP_ARCHIVE storage class. If your bucket is versioning-enabled (or versioning
- // is suspended), you can set this action to request that Amazon S3 transition
- // noncurrent object versions to the STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING,
- // GLACIER, or DEEP_ARCHIVE storage class at a specific period in the object's
- // lifetime.
- NoncurrentVersionTransition *NoncurrentVersionTransition `type:"structure"`
-
- // Object key prefix that identifies one or more objects to which this rule
- // applies.
- //
- // Replacement must be made for object keys containing special characters (such
- // as carriage returns) when using XML requests. For more information, see XML
- // related object key constraints (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
- //
- // Prefix is a required field
- Prefix *string `type:"string" required:"true"`
-
- // If Enabled, the rule is currently being applied. If Disabled, the rule is
- // not currently being applied.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"ExpirationStatus"`
-
- // Specifies when an object transitions to a specified storage class. For more
- // information about Amazon S3 lifecycle configuration rules, see Transitioning
- // Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html)
- // in the Amazon S3 User Guide.
- Transition *Transition `type:"structure"`
-}
-
-// String returns the string representation
-func (s Rule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Rule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Rule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Rule"}
- if s.Prefix == nil {
- invalidParams.Add(request.NewErrParamRequired("Prefix"))
- }
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAbortIncompleteMultipartUpload sets the AbortIncompleteMultipartUpload field's value.
-func (s *Rule) SetAbortIncompleteMultipartUpload(v *AbortIncompleteMultipartUpload) *Rule {
- s.AbortIncompleteMultipartUpload = v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *Rule) SetExpiration(v *LifecycleExpiration) *Rule {
- s.Expiration = v
- return s
-}
-
-// SetID sets the ID field's value.
-func (s *Rule) SetID(v string) *Rule {
- s.ID = &v
- return s
-}
-
-// SetNoncurrentVersionExpiration sets the NoncurrentVersionExpiration field's value.
-func (s *Rule) SetNoncurrentVersionExpiration(v *NoncurrentVersionExpiration) *Rule {
- s.NoncurrentVersionExpiration = v
- return s
-}
-
-// SetNoncurrentVersionTransition sets the NoncurrentVersionTransition field's value.
-func (s *Rule) SetNoncurrentVersionTransition(v *NoncurrentVersionTransition) *Rule {
- s.NoncurrentVersionTransition = v
- return s
-}
-
-// SetPrefix sets the Prefix field's value.
-func (s *Rule) SetPrefix(v string) *Rule {
- s.Prefix = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *Rule) SetStatus(v string) *Rule {
- s.Status = &v
- return s
-}
-
-// SetTransition sets the Transition field's value.
-func (s *Rule) SetTransition(v *Transition) *Rule {
- s.Transition = v
- return s
-}
-
-// Specifies the use of SSE-KMS to encrypt delivered inventory reports.
-type SSEKMS struct {
- _ struct{} `locationName:"SSE-KMS" type:"structure"`
-
- // Specifies the ID of the AWS Key Management Service (AWS KMS) symmetric customer
- // managed customer master key (CMK) to use for encrypting inventory reports.
- //
- // KeyId is a required field
- KeyId *string `type:"string" required:"true" sensitive:"true"`
-}
-
-// String returns the string representation
-func (s SSEKMS) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SSEKMS) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SSEKMS) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SSEKMS"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *SSEKMS) SetKeyId(v string) *SSEKMS {
- s.KeyId = &v
- return s
-}
-
-// Specifies the use of SSE-S3 to encrypt delivered inventory reports.
-type SSES3 struct {
- _ struct{} `locationName:"SSE-S3" type:"structure"`
-}
-
-// String returns the string representation
-func (s SSES3) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SSES3) GoString() string {
- return s.String()
-}
-
-// Specifies the byte range of the object to get the records from. A record
-// is processed when its first byte is contained by the range. This parameter
-// is optional, but when specified, it must not be empty. See RFC 2616, Section
-// 14.35.1 about how to specify the start and end of the range.
-type ScanRange struct {
- _ struct{} `type:"structure"`
-
- // Specifies the end of the byte range. This parameter is optional. Valid values:
- // non-negative integers. The default value is one less than the size of the
- // object being queried. If only the End parameter is supplied, it is interpreted
- // to mean scan the last N bytes of the file. For example, 50
- // means scan the last 50 bytes.
- End *int64 `type:"long"`
-
- // Specifies the start of the byte range. This parameter is optional. Valid
- // values: non-negative integers. The default value is 0. If only start is supplied,
- // it means scan from that point to the end of the file.For example; 50
- // means scan from byte 50 until the end of the file.
- Start *int64 `type:"long"`
-}
-
-// String returns the string representation
-func (s ScanRange) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ScanRange) GoString() string {
- return s.String()
-}
-
-// SetEnd sets the End field's value.
-func (s *ScanRange) SetEnd(v int64) *ScanRange {
- s.End = &v
- return s
-}
-
-// SetStart sets the Start field's value.
-func (s *ScanRange) SetStart(v int64) *ScanRange {
- s.Start = &v
- return s
-}
-
-// SelectObjectContentEventStreamEvent groups together all EventStream
-// events writes for SelectObjectContentEventStream.
-//
-// These events are:
-//
-// * ContinuationEvent
-// * EndEvent
-// * ProgressEvent
-// * RecordsEvent
-// * StatsEvent
-type SelectObjectContentEventStreamEvent interface {
- eventSelectObjectContentEventStream()
- eventstreamapi.Marshaler
- eventstreamapi.Unmarshaler
-}
-
-// SelectObjectContentEventStreamReader provides the interface for reading to the stream. The
-// default implementation for this interface will be SelectObjectContentEventStreamData.
-//
-// The reader's Close method must allow multiple concurrent calls.
-//
-// These events are:
-//
-// * ContinuationEvent
-// * EndEvent
-// * ProgressEvent
-// * RecordsEvent
-// * StatsEvent
-// * SelectObjectContentEventStreamUnknownEvent
-type SelectObjectContentEventStreamReader interface {
- // Returns a channel of events as they are read from the event stream.
- Events() <-chan SelectObjectContentEventStreamEvent
-
- // Close will stop the reader reading events from the stream.
- Close() error
-
- // Returns any error that has occurred while reading from the event stream.
- Err() error
-}
-
-type readSelectObjectContentEventStream struct {
- eventReader *eventstreamapi.EventReader
- stream chan SelectObjectContentEventStreamEvent
- err *eventstreamapi.OnceError
-
- done chan struct{}
- closeOnce sync.Once
-}
-
-func newReadSelectObjectContentEventStream(eventReader *eventstreamapi.EventReader) *readSelectObjectContentEventStream {
- r := &readSelectObjectContentEventStream{
- eventReader: eventReader,
- stream: make(chan SelectObjectContentEventStreamEvent),
- done: make(chan struct{}),
- err: eventstreamapi.NewOnceError(),
- }
- go r.readEventStream()
-
- return r
-}
-
-// Close will close the underlying event stream reader.
-func (r *readSelectObjectContentEventStream) Close() error {
- r.closeOnce.Do(r.safeClose)
- return r.Err()
-}
-
-func (r *readSelectObjectContentEventStream) ErrorSet() <-chan struct{} {
- return r.err.ErrorSet()
-}
-
-func (r *readSelectObjectContentEventStream) Closed() <-chan struct{} {
- return r.done
-}
-
-func (r *readSelectObjectContentEventStream) safeClose() {
- close(r.done)
-}
-
-func (r *readSelectObjectContentEventStream) Err() error {
- return r.err.Err()
-}
-
-func (r *readSelectObjectContentEventStream) Events() <-chan SelectObjectContentEventStreamEvent {
- return r.stream
-}
-
-func (r *readSelectObjectContentEventStream) readEventStream() {
- defer r.Close()
- defer close(r.stream)
-
- for {
- event, err := r.eventReader.ReadEvent()
- if err != nil {
- if err == io.EOF {
- return
- }
- select {
- case <-r.done:
- // If closed already ignore the error
- return
- default:
- }
- if _, ok := err.(*eventstreamapi.UnknownMessageTypeError); ok {
- continue
- }
- r.err.SetError(err)
- return
- }
-
- select {
- case r.stream <- event.(SelectObjectContentEventStreamEvent):
- case <-r.done:
- return
- }
- }
-}
-
-type unmarshalerForSelectObjectContentEventStreamEvent struct {
- metadata protocol.ResponseMetadata
-}
-
-func (u unmarshalerForSelectObjectContentEventStreamEvent) UnmarshalerForEventName(eventType string) (eventstreamapi.Unmarshaler, error) {
- switch eventType {
- case "Cont":
- return &ContinuationEvent{}, nil
- case "End":
- return &EndEvent{}, nil
- case "Progress":
- return &ProgressEvent{}, nil
- case "Records":
- return &RecordsEvent{}, nil
- case "Stats":
- return &StatsEvent{}, nil
- default:
- return &SelectObjectContentEventStreamUnknownEvent{Type: eventType}, nil
- }
-}
-
-// SelectObjectContentEventStreamUnknownEvent provides a failsafe event for the
-// SelectObjectContentEventStream group of events when an unknown event is received.
-type SelectObjectContentEventStreamUnknownEvent struct {
- Type string
- Message eventstream.Message
-}
-
-// The SelectObjectContentEventStreamUnknownEvent is and event in the SelectObjectContentEventStream
-// group of events.
-func (s *SelectObjectContentEventStreamUnknownEvent) eventSelectObjectContentEventStream() {}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-func (e *SelectObjectContentEventStreamUnknownEvent) MarshalEvent(pm protocol.PayloadMarshaler) (
- msg eventstream.Message, err error,
-) {
- return e.Message.Clone(), nil
-}
-
-// UnmarshalEvent unmarshals the EventStream Message into the SelectObjectContentEventStreamData value.
-// This method is only used internally within the SDK's EventStream handling.
-func (e *SelectObjectContentEventStreamUnknownEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- e.Message = msg.Clone()
- return nil
-}
-
-// Request to filter the contents of an Amazon S3 object based on a simple Structured
-// Query Language (SQL) statement. In the request, along with the SQL expression,
-// you must specify a data serialization format (JSON or CSV) of the object.
-// Amazon S3 uses this to parse object data into records. It returns only records
-// that match the specified SQL expression. You must also specify the data serialization
-// format for the response. For more information, see S3Select API Documentation
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectSELECTContent.html).
-type SelectObjectContentInput struct {
- _ struct{} `locationName:"SelectObjectContentRequest" type:"structure" xmlURI:"http://s3.amazonaws.com/doc/2006-03-01/"`
-
- // The S3 bucket.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The expression that is used to query the object.
- //
- // Expression is a required field
- Expression *string `type:"string" required:"true"`
-
- // The type of the provided expression (for example, SQL).
- //
- // ExpressionType is a required field
- ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
-
- // Describes the format of the data in the object that is being queried.
- //
- // InputSerialization is a required field
- InputSerialization *InputSerialization `type:"structure" required:"true"`
-
- // The object key.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Describes the format of the data that you want Amazon S3 to return in response.
- //
- // OutputSerialization is a required field
- OutputSerialization *OutputSerialization `type:"structure" required:"true"`
-
- // Specifies if periodic request progress information should be enabled.
- RequestProgress *RequestProgress `type:"structure"`
-
- // The SSE Algorithm used to encrypt the object. For more information, see Server-Side
- // Encryption (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // The SSE Customer Key. For more information, see Server-Side Encryption (Using
- // Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // The SSE Customer Key MD5. For more information, see Server-Side Encryption
- // (Using Customer-Provided Encryption Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html).
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // Specifies the byte range of the object to get the records from. A record
- // is processed when its first byte is contained by the range. This parameter
- // is optional, but when specified, it must not be empty. See RFC 2616, Section
- // 14.35.1 about how to specify the start and end of the range.
- //
- // ScanRangemay be used in the following ways:
- //
- // * 50100 - process only
- // the records starting between the bytes 50 and 100 (inclusive, counting
- // from zero)
- //
- // * 50 - process only the records
- // starting after the byte 50
- //
- // * 50 - process only the records within
- // the last 50 bytes of the file.
- ScanRange *ScanRange `type:"structure"`
-}
-
-// String returns the string representation
-func (s SelectObjectContentInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SelectObjectContentInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SelectObjectContentInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SelectObjectContentInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Expression == nil {
- invalidParams.Add(request.NewErrParamRequired("Expression"))
- }
- if s.ExpressionType == nil {
- invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
- }
- if s.InputSerialization == nil {
- invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.OutputSerialization == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *SelectObjectContentInput) SetBucket(v string) *SelectObjectContentInput {
- s.Bucket = &v
- return s
-}
-
-func (s *SelectObjectContentInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *SelectObjectContentInput) SetExpectedBucketOwner(v string) *SelectObjectContentInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpression sets the Expression field's value.
-func (s *SelectObjectContentInput) SetExpression(v string) *SelectObjectContentInput {
- s.Expression = &v
- return s
-}
-
-// SetExpressionType sets the ExpressionType field's value.
-func (s *SelectObjectContentInput) SetExpressionType(v string) *SelectObjectContentInput {
- s.ExpressionType = &v
- return s
-}
-
-// SetInputSerialization sets the InputSerialization field's value.
-func (s *SelectObjectContentInput) SetInputSerialization(v *InputSerialization) *SelectObjectContentInput {
- s.InputSerialization = v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *SelectObjectContentInput) SetKey(v string) *SelectObjectContentInput {
- s.Key = &v
- return s
-}
-
-// SetOutputSerialization sets the OutputSerialization field's value.
-func (s *SelectObjectContentInput) SetOutputSerialization(v *OutputSerialization) *SelectObjectContentInput {
- s.OutputSerialization = v
- return s
-}
-
-// SetRequestProgress sets the RequestProgress field's value.
-func (s *SelectObjectContentInput) SetRequestProgress(v *RequestProgress) *SelectObjectContentInput {
- s.RequestProgress = v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *SelectObjectContentInput) SetSSECustomerAlgorithm(v string) *SelectObjectContentInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *SelectObjectContentInput) SetSSECustomerKey(v string) *SelectObjectContentInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *SelectObjectContentInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *SelectObjectContentInput) SetSSECustomerKeyMD5(v string) *SelectObjectContentInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetScanRange sets the ScanRange field's value.
-func (s *SelectObjectContentInput) SetScanRange(v *ScanRange) *SelectObjectContentInput {
- s.ScanRange = v
- return s
-}
-
-func (s *SelectObjectContentInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *SelectObjectContentInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s SelectObjectContentInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type SelectObjectContentOutput struct {
- _ struct{} `type:"structure" payload:"Payload"`
-
- EventStream *SelectObjectContentEventStream
-}
-
-// String returns the string representation
-func (s SelectObjectContentOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SelectObjectContentOutput) GoString() string {
- return s.String()
-}
-
-func (s *SelectObjectContentOutput) SetEventStream(v *SelectObjectContentEventStream) *SelectObjectContentOutput {
- s.EventStream = v
- return s
-}
-func (s *SelectObjectContentOutput) GetEventStream() *SelectObjectContentEventStream {
- return s.EventStream
-}
-
-// GetStream returns the type to interact with the event stream.
-func (s *SelectObjectContentOutput) GetStream() *SelectObjectContentEventStream {
- return s.EventStream
-}
-
-// Describes the parameters for Select job types.
-type SelectParameters struct {
- _ struct{} `type:"structure"`
-
- // The expression that is used to query the object.
- //
- // Expression is a required field
- Expression *string `type:"string" required:"true"`
-
- // The type of the provided expression (for example, SQL).
- //
- // ExpressionType is a required field
- ExpressionType *string `type:"string" required:"true" enum:"ExpressionType"`
-
- // Describes the serialization format of the object.
- //
- // InputSerialization is a required field
- InputSerialization *InputSerialization `type:"structure" required:"true"`
-
- // Describes how the results of the Select job are serialized.
- //
- // OutputSerialization is a required field
- OutputSerialization *OutputSerialization `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s SelectParameters) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SelectParameters) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SelectParameters) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SelectParameters"}
- if s.Expression == nil {
- invalidParams.Add(request.NewErrParamRequired("Expression"))
- }
- if s.ExpressionType == nil {
- invalidParams.Add(request.NewErrParamRequired("ExpressionType"))
- }
- if s.InputSerialization == nil {
- invalidParams.Add(request.NewErrParamRequired("InputSerialization"))
- }
- if s.OutputSerialization == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputSerialization"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetExpression sets the Expression field's value.
-func (s *SelectParameters) SetExpression(v string) *SelectParameters {
- s.Expression = &v
- return s
-}
-
-// SetExpressionType sets the ExpressionType field's value.
-func (s *SelectParameters) SetExpressionType(v string) *SelectParameters {
- s.ExpressionType = &v
- return s
-}
-
-// SetInputSerialization sets the InputSerialization field's value.
-func (s *SelectParameters) SetInputSerialization(v *InputSerialization) *SelectParameters {
- s.InputSerialization = v
- return s
-}
-
-// SetOutputSerialization sets the OutputSerialization field's value.
-func (s *SelectParameters) SetOutputSerialization(v *OutputSerialization) *SelectParameters {
- s.OutputSerialization = v
- return s
-}
-
-// Describes the default server-side encryption to apply to new objects in the
-// bucket. If a PUT Object request doesn't specify any server-side encryption,
-// this default encryption will be applied. For more information, see PUT Bucket
-// encryption (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html)
-// in the Amazon S3 API Reference.
-type ServerSideEncryptionByDefault struct {
- _ struct{} `type:"structure"`
-
- // AWS Key Management Service (KMS) customer AWS KMS key ID to use for the default
- // encryption. This parameter is allowed if and only if SSEAlgorithm is set
- // to aws:kms.
- //
- // You can specify the key ID or the Amazon Resource Name (ARN) of the KMS key.
- // However, if you are using encryption with cross-account operations, you must
- // use a fully qualified KMS key ARN. For more information, see Using encryption
- // for cross-account operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-encryption.html#bucket-encryption-update-bucket-policy).
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // Amazon S3 only supports symmetric KMS keys and not asymmetric KMS keys. For
- // more information, see Using symmetric and asymmetric keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
- // in the AWS Key Management Service Developer Guide.
- KMSMasterKeyID *string `type:"string" sensitive:"true"`
-
- // Server-side encryption algorithm to use for the default encryption.
- //
- // SSEAlgorithm is a required field
- SSEAlgorithm *string `type:"string" required:"true" enum:"ServerSideEncryption"`
-}
-
-// String returns the string representation
-func (s ServerSideEncryptionByDefault) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ServerSideEncryptionByDefault) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ServerSideEncryptionByDefault) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionByDefault"}
- if s.SSEAlgorithm == nil {
- invalidParams.Add(request.NewErrParamRequired("SSEAlgorithm"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKMSMasterKeyID sets the KMSMasterKeyID field's value.
-func (s *ServerSideEncryptionByDefault) SetKMSMasterKeyID(v string) *ServerSideEncryptionByDefault {
- s.KMSMasterKeyID = &v
- return s
-}
-
-// SetSSEAlgorithm sets the SSEAlgorithm field's value.
-func (s *ServerSideEncryptionByDefault) SetSSEAlgorithm(v string) *ServerSideEncryptionByDefault {
- s.SSEAlgorithm = &v
- return s
-}
-
-// Specifies the default server-side-encryption configuration.
-type ServerSideEncryptionConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Container for information about a particular server-side encryption configuration
- // rule.
- //
- // Rules is a required field
- Rules []*ServerSideEncryptionRule `locationName:"Rule" type:"list" flattened:"true" required:"true"`
-}
-
-// String returns the string representation
-func (s ServerSideEncryptionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ServerSideEncryptionConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ServerSideEncryptionConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionConfiguration"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
- s.Rules = v
- return s
-}
-
-// Specifies the default server-side encryption configuration.
-type ServerSideEncryptionRule struct {
- _ struct{} `type:"structure"`
-
- // Specifies the default server-side encryption to apply to new objects in the
- // bucket. If a PUT Object request doesn't specify any server-side encryption,
- // this default encryption will be applied.
- ApplyServerSideEncryptionByDefault *ServerSideEncryptionByDefault `type:"structure"`
-
- // Specifies whether Amazon S3 should use an S3 Bucket Key with server-side
- // encryption using KMS (SSE-KMS) for new objects in the bucket. Existing objects
- // are not affected. Setting the BucketKeyEnabled element to true causes Amazon
- // S3 to use an S3 Bucket Key. By default, S3 Bucket Key is not enabled.
- //
- // For more information, see Amazon S3 Bucket Keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/bucket-key.html)
- // in the Amazon S3 User Guide.
- BucketKeyEnabled *bool `type:"boolean"`
-}
-
-// String returns the string representation
-func (s ServerSideEncryptionRule) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ServerSideEncryptionRule) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ServerSideEncryptionRule) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ServerSideEncryptionRule"}
- if s.ApplyServerSideEncryptionByDefault != nil {
- if err := s.ApplyServerSideEncryptionByDefault.Validate(); err != nil {
- invalidParams.AddNested("ApplyServerSideEncryptionByDefault", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetApplyServerSideEncryptionByDefault sets the ApplyServerSideEncryptionByDefault field's value.
-func (s *ServerSideEncryptionRule) SetApplyServerSideEncryptionByDefault(v *ServerSideEncryptionByDefault) *ServerSideEncryptionRule {
- s.ApplyServerSideEncryptionByDefault = v
- return s
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *ServerSideEncryptionRule) SetBucketKeyEnabled(v bool) *ServerSideEncryptionRule {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// A container that describes additional filters for identifying the source
-// objects that you want to replicate. You can choose to enable or disable the
-// replication of these objects. Currently, Amazon S3 supports only the filter
-// that you can specify for objects created with server-side encryption using
-// a customer master key (CMK) stored in AWS Key Management Service (SSE-KMS).
-type SourceSelectionCriteria struct {
- _ struct{} `type:"structure"`
-
- // A filter that you can specify for selections for modifications on replicas.
- // Amazon S3 doesn't replicate replica modifications by default. In the latest
- // version of replication configuration (when Filter is specified), you can
- // specify this element and set the status to Enabled to replicate modifications
- // on replicas.
- //
- // If you don't specify the Filter element, Amazon S3 assumes that the replication
- // configuration is the earlier version, V1. In the earlier version, this element
- // is not allowed
- ReplicaModifications *ReplicaModifications `type:"structure"`
-
- // A container for filter information for the selection of Amazon S3 objects
- // encrypted with AWS KMS. If you include SourceSelectionCriteria in the replication
- // configuration, this element is required.
- SseKmsEncryptedObjects *SseKmsEncryptedObjects `type:"structure"`
-}
-
-// String returns the string representation
-func (s SourceSelectionCriteria) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SourceSelectionCriteria) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SourceSelectionCriteria) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SourceSelectionCriteria"}
- if s.ReplicaModifications != nil {
- if err := s.ReplicaModifications.Validate(); err != nil {
- invalidParams.AddNested("ReplicaModifications", err.(request.ErrInvalidParams))
- }
- }
- if s.SseKmsEncryptedObjects != nil {
- if err := s.SseKmsEncryptedObjects.Validate(); err != nil {
- invalidParams.AddNested("SseKmsEncryptedObjects", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetReplicaModifications sets the ReplicaModifications field's value.
-func (s *SourceSelectionCriteria) SetReplicaModifications(v *ReplicaModifications) *SourceSelectionCriteria {
- s.ReplicaModifications = v
- return s
-}
-
-// SetSseKmsEncryptedObjects sets the SseKmsEncryptedObjects field's value.
-func (s *SourceSelectionCriteria) SetSseKmsEncryptedObjects(v *SseKmsEncryptedObjects) *SourceSelectionCriteria {
- s.SseKmsEncryptedObjects = v
- return s
-}
-
-// A container for filter information for the selection of S3 objects encrypted
-// with AWS KMS.
-type SseKmsEncryptedObjects struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether Amazon S3 replicates objects created with server-side encryption
- // using an AWS KMS key stored in AWS Key Management Service.
- //
- // Status is a required field
- Status *string `type:"string" required:"true" enum:"SseKmsEncryptedObjectsStatus"`
-}
-
-// String returns the string representation
-func (s SseKmsEncryptedObjects) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s SseKmsEncryptedObjects) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SseKmsEncryptedObjects) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SseKmsEncryptedObjects"}
- if s.Status == nil {
- invalidParams.Add(request.NewErrParamRequired("Status"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStatus sets the Status field's value.
-func (s *SseKmsEncryptedObjects) SetStatus(v string) *SseKmsEncryptedObjects {
- s.Status = &v
- return s
-}
-
-// Container for the stats details.
-type Stats struct {
- _ struct{} `type:"structure"`
-
- // The total number of uncompressed object bytes processed.
- BytesProcessed *int64 `type:"long"`
-
- // The total number of bytes of records payload data returned.
- BytesReturned *int64 `type:"long"`
-
- // The total number of object bytes scanned.
- BytesScanned *int64 `type:"long"`
-}
-
-// String returns the string representation
-func (s Stats) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Stats) GoString() string {
- return s.String()
-}
-
-// SetBytesProcessed sets the BytesProcessed field's value.
-func (s *Stats) SetBytesProcessed(v int64) *Stats {
- s.BytesProcessed = &v
- return s
-}
-
-// SetBytesReturned sets the BytesReturned field's value.
-func (s *Stats) SetBytesReturned(v int64) *Stats {
- s.BytesReturned = &v
- return s
-}
-
-// SetBytesScanned sets the BytesScanned field's value.
-func (s *Stats) SetBytesScanned(v int64) *Stats {
- s.BytesScanned = &v
- return s
-}
-
-// Container for the Stats Event.
-type StatsEvent struct {
- _ struct{} `locationName:"StatsEvent" type:"structure" payload:"Details"`
-
- // The Stats event details.
- Details *Stats `locationName:"Details" type:"structure"`
-}
-
-// String returns the string representation
-func (s StatsEvent) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StatsEvent) GoString() string {
- return s.String()
-}
-
-// SetDetails sets the Details field's value.
-func (s *StatsEvent) SetDetails(v *Stats) *StatsEvent {
- s.Details = v
- return s
-}
-
-// The StatsEvent is and event in the SelectObjectContentEventStream group of events.
-func (s *StatsEvent) eventSelectObjectContentEventStream() {}
-
-// UnmarshalEvent unmarshals the EventStream Message into the StatsEvent value.
-// This method is only used internally within the SDK's EventStream handling.
-func (s *StatsEvent) UnmarshalEvent(
- payloadUnmarshaler protocol.PayloadUnmarshaler,
- msg eventstream.Message,
-) error {
- if err := payloadUnmarshaler.UnmarshalPayload(
- bytes.NewReader(msg.Payload), s,
- ); err != nil {
- return err
- }
- return nil
-}
-
-// MarshalEvent marshals the type into an stream event value. This method
-// should only used internally within the SDK's EventStream handling.
-func (s *StatsEvent) MarshalEvent(pm protocol.PayloadMarshaler) (msg eventstream.Message, err error) {
- msg.Headers.Set(eventstreamapi.MessageTypeHeader, eventstream.StringValue(eventstreamapi.EventMessageType))
- var buf bytes.Buffer
- if err = pm.MarshalPayload(&buf, s); err != nil {
- return eventstream.Message{}, err
- }
- msg.Payload = buf.Bytes()
- return msg, err
-}
-
-// Specifies data related to access patterns to be collected and made available
-// to analyze the tradeoffs between different storage classes for an Amazon
-// S3 bucket.
-type StorageClassAnalysis struct {
- _ struct{} `type:"structure"`
-
- // Specifies how data related to the storage class analysis for an Amazon S3
- // bucket should be exported.
- DataExport *StorageClassAnalysisDataExport `type:"structure"`
-}
-
-// String returns the string representation
-func (s StorageClassAnalysis) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StorageClassAnalysis) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *StorageClassAnalysis) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysis"}
- if s.DataExport != nil {
- if err := s.DataExport.Validate(); err != nil {
- invalidParams.AddNested("DataExport", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDataExport sets the DataExport field's value.
-func (s *StorageClassAnalysis) SetDataExport(v *StorageClassAnalysisDataExport) *StorageClassAnalysis {
- s.DataExport = v
- return s
-}
-
-// Container for data related to the storage class analysis for an Amazon S3
-// bucket for export.
-type StorageClassAnalysisDataExport struct {
- _ struct{} `type:"structure"`
-
- // The place to store the data for an analysis.
- //
- // Destination is a required field
- Destination *AnalyticsExportDestination `type:"structure" required:"true"`
-
- // The version of the output schema to use when exporting data. Must be V_1.
- //
- // OutputSchemaVersion is a required field
- OutputSchemaVersion *string `type:"string" required:"true" enum:"StorageClassAnalysisSchemaVersion"`
-}
-
-// String returns the string representation
-func (s StorageClassAnalysisDataExport) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s StorageClassAnalysisDataExport) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *StorageClassAnalysisDataExport) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "StorageClassAnalysisDataExport"}
- if s.Destination == nil {
- invalidParams.Add(request.NewErrParamRequired("Destination"))
- }
- if s.OutputSchemaVersion == nil {
- invalidParams.Add(request.NewErrParamRequired("OutputSchemaVersion"))
- }
- if s.Destination != nil {
- if err := s.Destination.Validate(); err != nil {
- invalidParams.AddNested("Destination", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDestination sets the Destination field's value.
-func (s *StorageClassAnalysisDataExport) SetDestination(v *AnalyticsExportDestination) *StorageClassAnalysisDataExport {
- s.Destination = v
- return s
-}
-
-// SetOutputSchemaVersion sets the OutputSchemaVersion field's value.
-func (s *StorageClassAnalysisDataExport) SetOutputSchemaVersion(v string) *StorageClassAnalysisDataExport {
- s.OutputSchemaVersion = &v
- return s
-}
-
-// A container of a key value name pair.
-type Tag struct {
- _ struct{} `type:"structure"`
-
- // Name of the object key.
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-
- // Value of the tag.
- //
- // Value is a required field
- Value *string `type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Tag) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tag) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tag"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.Value == nil {
- invalidParams.Add(request.NewErrParamRequired("Value"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKey sets the Key field's value.
-func (s *Tag) SetKey(v string) *Tag {
- s.Key = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *Tag) SetValue(v string) *Tag {
- s.Value = &v
- return s
-}
-
-// Container for TagSet elements.
-type Tagging struct {
- _ struct{} `type:"structure"`
-
- // A collection for a set of tags
- //
- // TagSet is a required field
- TagSet []*Tag `locationNameList:"Tag" type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s Tagging) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Tagging) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tagging) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tagging"}
- if s.TagSet == nil {
- invalidParams.Add(request.NewErrParamRequired("TagSet"))
- }
- if s.TagSet != nil {
- for i, v := range s.TagSet {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagSet", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTagSet sets the TagSet field's value.
-func (s *Tagging) SetTagSet(v []*Tag) *Tagging {
- s.TagSet = v
- return s
-}
-
-// Container for granting information.
-type TargetGrant struct {
- _ struct{} `type:"structure"`
-
- // Container for the person being granted permissions.
- Grantee *Grantee `type:"structure" xmlPrefix:"xsi" xmlURI:"http://www.w3.org/2001/XMLSchema-instance"`
-
- // Logging permissions assigned to the grantee for the bucket.
- Permission *string `type:"string" enum:"BucketLogsPermission"`
-}
-
-// String returns the string representation
-func (s TargetGrant) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TargetGrant) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *TargetGrant) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TargetGrant"}
- if s.Grantee != nil {
- if err := s.Grantee.Validate(); err != nil {
- invalidParams.AddNested("Grantee", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantee sets the Grantee field's value.
-func (s *TargetGrant) SetGrantee(v *Grantee) *TargetGrant {
- s.Grantee = v
- return s
-}
-
-// SetPermission sets the Permission field's value.
-func (s *TargetGrant) SetPermission(v string) *TargetGrant {
- s.Permission = &v
- return s
-}
-
-// The S3 Intelligent-Tiering storage class is designed to optimize storage
-// costs by automatically moving data to the most cost-effective storage access
-// tier, without additional operational overhead.
-type Tiering struct {
- _ struct{} `type:"structure"`
-
- // S3 Intelligent-Tiering access tier. See Storage class for automatically optimizing
- // frequently and infrequently accessed objects (https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html#sc-dynamic-data-access)
- // for a list of access tiers in the S3 Intelligent-Tiering storage class.
- //
- // AccessTier is a required field
- AccessTier *string `type:"string" required:"true" enum:"IntelligentTieringAccessTier"`
-
- // The number of consecutive days of no access after which an object will be
- // eligible to be transitioned to the corresponding tier. The minimum number
- // of days specified for Archive Access tier must be at least 90 days and Deep
- // Archive Access tier must be at least 180 days. The maximum can be up to 2
- // years (730 days).
- //
- // Days is a required field
- Days *int64 `type:"integer" required:"true"`
-}
-
-// String returns the string representation
-func (s Tiering) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Tiering) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tiering) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tiering"}
- if s.AccessTier == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessTier"))
- }
- if s.Days == nil {
- invalidParams.Add(request.NewErrParamRequired("Days"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessTier sets the AccessTier field's value.
-func (s *Tiering) SetAccessTier(v string) *Tiering {
- s.AccessTier = &v
- return s
-}
-
-// SetDays sets the Days field's value.
-func (s *Tiering) SetDays(v int64) *Tiering {
- s.Days = &v
- return s
-}
-
-// A container for specifying the configuration for publication of messages
-// to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3
-// detects specified events.
-type TopicConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The Amazon S3 bucket event about which to send notifications. For more information,
- // see Supported Event Types (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- //
- // Events is a required field
- Events []*string `locationName:"Event" type:"list" flattened:"true" required:"true"`
-
- // Specifies object key name filtering rules. For information about key name
- // filtering, see Configuring Event Notifications (https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html)
- // in the Amazon S3 User Guide.
- Filter *NotificationConfigurationFilter `type:"structure"`
-
- // An optional unique identifier for configurations in a notification configuration.
- // If you don't provide one, Amazon S3 will assign an ID.
- Id *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3
- // publishes a message when it detects events of the specified type.
- //
- // TopicArn is a required field
- TopicArn *string `locationName:"Topic" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s TopicConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TopicConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *TopicConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TopicConfiguration"}
- if s.Events == nil {
- invalidParams.Add(request.NewErrParamRequired("Events"))
- }
- if s.TopicArn == nil {
- invalidParams.Add(request.NewErrParamRequired("TopicArn"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEvents sets the Events field's value.
-func (s *TopicConfiguration) SetEvents(v []*string) *TopicConfiguration {
- s.Events = v
- return s
-}
-
-// SetFilter sets the Filter field's value.
-func (s *TopicConfiguration) SetFilter(v *NotificationConfigurationFilter) *TopicConfiguration {
- s.Filter = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *TopicConfiguration) SetId(v string) *TopicConfiguration {
- s.Id = &v
- return s
-}
-
-// SetTopicArn sets the TopicArn field's value.
-func (s *TopicConfiguration) SetTopicArn(v string) *TopicConfiguration {
- s.TopicArn = &v
- return s
-}
-
-// A container for specifying the configuration for publication of messages
-// to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3
-// detects specified events. This data type is deprecated. Use TopicConfiguration
-// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_TopicConfiguration.html)
-// instead.
-type TopicConfigurationDeprecated struct {
- _ struct{} `type:"structure"`
-
- // Bucket event for which to send notifications.
- //
- // Deprecated: Event has been deprecated
- Event *string `deprecated:"true" type:"string" enum:"Event"`
-
- // A collection of events related to objects
- Events []*string `locationName:"Event" type:"list" flattened:"true"`
-
- // An optional unique identifier for configurations in a notification configuration.
- // If you don't provide one, Amazon S3 will assign an ID.
- Id *string `type:"string"`
-
- // Amazon SNS topic to which Amazon S3 will publish a message to report the
- // specified events for the bucket.
- Topic *string `type:"string"`
-}
-
-// String returns the string representation
-func (s TopicConfigurationDeprecated) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s TopicConfigurationDeprecated) GoString() string {
- return s.String()
-}
-
-// SetEvent sets the Event field's value.
-func (s *TopicConfigurationDeprecated) SetEvent(v string) *TopicConfigurationDeprecated {
- s.Event = &v
- return s
-}
-
-// SetEvents sets the Events field's value.
-func (s *TopicConfigurationDeprecated) SetEvents(v []*string) *TopicConfigurationDeprecated {
- s.Events = v
- return s
-}
-
-// SetId sets the Id field's value.
-func (s *TopicConfigurationDeprecated) SetId(v string) *TopicConfigurationDeprecated {
- s.Id = &v
- return s
-}
-
-// SetTopic sets the Topic field's value.
-func (s *TopicConfigurationDeprecated) SetTopic(v string) *TopicConfigurationDeprecated {
- s.Topic = &v
- return s
-}
-
-// Specifies when an object transitions to a specified storage class. For more
-// information about Amazon S3 lifecycle configuration rules, see Transitioning
-// Objects Using Amazon S3 Lifecycle (https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html)
-// in the Amazon S3 User Guide.
-type Transition struct {
- _ struct{} `type:"structure"`
-
- // Indicates when objects are transitioned to the specified storage class. The
- // date value must be in ISO 8601 format. The time is always midnight UTC.
- Date *time.Time `type:"timestamp" timestampFormat:"iso8601"`
-
- // Indicates the number of days after creation when objects are transitioned
- // to the specified storage class. The value must be a positive integer.
- Days *int64 `type:"integer"`
-
- // The storage class to which you want the object to transition.
- StorageClass *string `type:"string" enum:"TransitionStorageClass"`
-}
-
-// String returns the string representation
-func (s Transition) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Transition) GoString() string {
- return s.String()
-}
-
-// SetDate sets the Date field's value.
-func (s *Transition) SetDate(v time.Time) *Transition {
- s.Date = &v
- return s
-}
-
-// SetDays sets the Days field's value.
-func (s *Transition) SetDays(v int64) *Transition {
- s.Days = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *Transition) SetStorageClass(v string) *Transition {
- s.StorageClass = &v
- return s
-}
-
-type UploadPartCopyInput struct {
- _ struct{} `locationName:"UploadPartCopyRequest" type:"structure"`
-
- // The bucket name.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Specifies the source object for the copy operation. You specify the value
- // in one of two formats, depending on whether you want to access the source
- // object through an access point (https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-points.html):
- //
- // * For objects not accessed through an access point, specify the name of
- // the source bucket and key of the source object, separated by a slash (/).
- // For example, to copy the object reports/january.pdf from the bucket awsexamplebucket,
- // use awsexamplebucket/reports/january.pdf. The value must be URL encoded.
- //
- // * For objects accessed through access points, specify the Amazon Resource
- // Name (ARN) of the object as accessed through the access point, in the
- // format arn:aws:s3:::accesspoint//object/.
- // For example, to copy the object reports/january.pdf through access point
- // my-access-point owned by account 123456789012 in Region us-west-2, use
- // the URL encoding of arn:aws:s3:us-west-2:123456789012:accesspoint/my-access-point/object/reports/january.pdf.
- // The value must be URL encoded. Amazon S3 supports copy operations using
- // access points only when the source and destination buckets are in the
- // same AWS Region. Alternatively, for objects accessed through Amazon S3
- // on Outposts, specify the ARN of the object as accessed in the format arn:aws:s3-outposts:::outpost//object/.
- // For example, to copy the object reports/january.pdf through outpost my-outpost
- // owned by account 123456789012 in Region us-west-2, use the URL encoding
- // of arn:aws:s3-outposts:us-west-2:123456789012:outpost/my-outpost/object/reports/january.pdf.
- // The value must be URL encoded.
- //
- // To copy a specific version of an object, append ?versionId= to
- // the value (for example, awsexamplebucket/reports/january.pdf?versionId=QUpfdndhfd8438MNFDN93jdnJFkdmqnh893).
- // If you don't specify a version ID, Amazon S3 copies the latest version of
- // the source object.
- //
- // CopySource is a required field
- CopySource *string `location:"header" locationName:"x-amz-copy-source" type:"string" required:"true"`
-
- // Copies the object if its entity tag (ETag) matches the specified tag.
- CopySourceIfMatch *string `location:"header" locationName:"x-amz-copy-source-if-match" type:"string"`
-
- // Copies the object if it has been modified since the specified time.
- CopySourceIfModifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-modified-since" type:"timestamp"`
-
- // Copies the object if its entity tag (ETag) is different than the specified
- // ETag.
- CopySourceIfNoneMatch *string `location:"header" locationName:"x-amz-copy-source-if-none-match" type:"string"`
-
- // Copies the object if it hasn't been modified since the specified time.
- CopySourceIfUnmodifiedSince *time.Time `location:"header" locationName:"x-amz-copy-source-if-unmodified-since" type:"timestamp"`
-
- // The range of bytes to copy from the source object. The range value must use
- // the form bytes=first-last, where the first and last are the zero-based byte
- // offsets to copy. For example, bytes=0-9 indicates that you want to copy the
- // first 10 bytes of the source. You can copy a range only if the source object
- // is greater than 5 MB.
- CopySourceRange *string `location:"header" locationName:"x-amz-copy-source-range" type:"string"`
-
- // Specifies the algorithm to use when decrypting the source object (for example,
- // AES256).
- CopySourceSSECustomerAlgorithm *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 to use to decrypt
- // the source object. The encryption key provided in this header must be one
- // that was used when the source object was created.
- CopySourceSSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- CopySourceSSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5" type:"string"`
-
- // The account ID of the expected destination bucket owner. If the destination
- // bucket is owned by a different account, the request will fail with an HTTP
- // 403 (Access Denied) error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // The account ID of the expected source bucket owner. If the source bucket
- // is owned by a different account, the request will fail with an HTTP 403 (Access
- // Denied) error.
- ExpectedSourceBucketOwner *string `location:"header" locationName:"x-amz-source-expected-bucket-owner" type:"string"`
-
- // Object key for which the multipart upload was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Part number of part being copied. This is a positive integer between 1 and
- // 10,000.
- //
- // PartNumber is a required field
- PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
- // data. This value is used to store the object and then it is discarded; Amazon
- // S3 does not store the encryption key. The key must be appropriate for use
- // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header. This must be the same encryption key specified in the initiate multipart
- // upload request.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // Upload ID identifying the multipart upload whose part is being copied.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s UploadPartCopyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UploadPartCopyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UploadPartCopyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UploadPartCopyInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.CopySource == nil {
- invalidParams.Add(request.NewErrParamRequired("CopySource"))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.PartNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("PartNumber"))
- }
- if s.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *UploadPartCopyInput) SetBucket(v string) *UploadPartCopyInput {
- s.Bucket = &v
- return s
-}
-
-func (s *UploadPartCopyInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetCopySource sets the CopySource field's value.
-func (s *UploadPartCopyInput) SetCopySource(v string) *UploadPartCopyInput {
- s.CopySource = &v
- return s
-}
-
-// SetCopySourceIfMatch sets the CopySourceIfMatch field's value.
-func (s *UploadPartCopyInput) SetCopySourceIfMatch(v string) *UploadPartCopyInput {
- s.CopySourceIfMatch = &v
- return s
-}
-
-// SetCopySourceIfModifiedSince sets the CopySourceIfModifiedSince field's value.
-func (s *UploadPartCopyInput) SetCopySourceIfModifiedSince(v time.Time) *UploadPartCopyInput {
- s.CopySourceIfModifiedSince = &v
- return s
-}
-
-// SetCopySourceIfNoneMatch sets the CopySourceIfNoneMatch field's value.
-func (s *UploadPartCopyInput) SetCopySourceIfNoneMatch(v string) *UploadPartCopyInput {
- s.CopySourceIfNoneMatch = &v
- return s
-}
-
-// SetCopySourceIfUnmodifiedSince sets the CopySourceIfUnmodifiedSince field's value.
-func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
- s.CopySourceIfUnmodifiedSince = &v
- return s
-}
-
-// SetCopySourceRange sets the CopySourceRange field's value.
-func (s *UploadPartCopyInput) SetCopySourceRange(v string) *UploadPartCopyInput {
- s.CopySourceRange = &v
- return s
-}
-
-// SetCopySourceSSECustomerAlgorithm sets the CopySourceSSECustomerAlgorithm field's value.
-func (s *UploadPartCopyInput) SetCopySourceSSECustomerAlgorithm(v string) *UploadPartCopyInput {
- s.CopySourceSSECustomerAlgorithm = &v
- return s
-}
-
-// SetCopySourceSSECustomerKey sets the CopySourceSSECustomerKey field's value.
-func (s *UploadPartCopyInput) SetCopySourceSSECustomerKey(v string) *UploadPartCopyInput {
- s.CopySourceSSECustomerKey = &v
- return s
-}
-
-func (s *UploadPartCopyInput) getCopySourceSSECustomerKey() (v string) {
- if s.CopySourceSSECustomerKey == nil {
- return v
- }
- return *s.CopySourceSSECustomerKey
-}
-
-// SetCopySourceSSECustomerKeyMD5 sets the CopySourceSSECustomerKeyMD5 field's value.
-func (s *UploadPartCopyInput) SetCopySourceSSECustomerKeyMD5(v string) *UploadPartCopyInput {
- s.CopySourceSSECustomerKeyMD5 = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *UploadPartCopyInput) SetExpectedBucketOwner(v string) *UploadPartCopyInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetExpectedSourceBucketOwner sets the ExpectedSourceBucketOwner field's value.
-func (s *UploadPartCopyInput) SetExpectedSourceBucketOwner(v string) *UploadPartCopyInput {
- s.ExpectedSourceBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *UploadPartCopyInput) SetKey(v string) *UploadPartCopyInput {
- s.Key = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *UploadPartCopyInput) SetPartNumber(v int64) *UploadPartCopyInput {
- s.PartNumber = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *UploadPartCopyInput) SetRequestPayer(v string) *UploadPartCopyInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *UploadPartCopyInput) SetSSECustomerAlgorithm(v string) *UploadPartCopyInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *UploadPartCopyInput) SetSSECustomerKey(v string) *UploadPartCopyInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *UploadPartCopyInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *UploadPartCopyInput) SetSSECustomerKeyMD5(v string) *UploadPartCopyInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *UploadPartCopyInput) SetUploadId(v string) *UploadPartCopyInput {
- s.UploadId = &v
- return s
-}
-
-func (s *UploadPartCopyInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *UploadPartCopyInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s UploadPartCopyInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type UploadPartCopyOutput struct {
- _ struct{} `type:"structure" payload:"CopyPartResult"`
-
- // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Container for all response elements.
- CopyPartResult *CopyPartResult `type:"structure"`
-
- // The version of the source object that was copied, if you have enabled versioning
- // on the source bucket.
- CopySourceVersionId *string `location:"header" locationName:"x-amz-copy-source-version-id" type:"string"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) that was used for the
- // object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing this object in Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-}
-
-// String returns the string representation
-func (s UploadPartCopyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UploadPartCopyOutput) GoString() string {
- return s.String()
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *UploadPartCopyOutput) SetBucketKeyEnabled(v bool) *UploadPartCopyOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCopyPartResult sets the CopyPartResult field's value.
-func (s *UploadPartCopyOutput) SetCopyPartResult(v *CopyPartResult) *UploadPartCopyOutput {
- s.CopyPartResult = v
- return s
-}
-
-// SetCopySourceVersionId sets the CopySourceVersionId field's value.
-func (s *UploadPartCopyOutput) SetCopySourceVersionId(v string) *UploadPartCopyOutput {
- s.CopySourceVersionId = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *UploadPartCopyOutput) SetRequestCharged(v string) *UploadPartCopyOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *UploadPartCopyOutput) SetSSECustomerAlgorithm(v string) *UploadPartCopyOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *UploadPartCopyOutput) SetSSECustomerKeyMD5(v string) *UploadPartCopyOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *UploadPartCopyOutput) SetSSEKMSKeyId(v string) *UploadPartCopyOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *UploadPartCopyOutput) SetServerSideEncryption(v string) *UploadPartCopyOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-type UploadPartInput struct {
- _ struct{} `locationName:"UploadPartRequest" type:"structure" payload:"Body"`
-
- // Object data.
- Body io.ReadSeeker `type:"blob"`
-
- // The name of the bucket to which the multipart upload was initiated.
- //
- // When using this action with an access point, you must direct requests to
- // the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com.
- // When using this action with an access point through the AWS SDKs, you provide
- // the access point ARN in place of the bucket name. For more information about
- // access point ARNs, see Using access points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-access-points.html)
- // in the Amazon S3 User Guide.
- //
- // When using this action with Amazon S3 on Outposts, you must direct requests
- // to the S3 on Outposts hostname. The S3 on Outposts hostname takes the form
- // AccessPointName-AccountId.outpostID.s3-outposts.Region.amazonaws.com. When
- // using this action using S3 on Outposts through the AWS SDKs, you provide
- // the Outposts bucket ARN in place of the bucket name. For more information
- // about S3 on Outposts ARNs, see Using S3 on Outposts (https://docs.aws.amazon.com/AmazonS3/latest/userguide/S3onOutposts.html)
- // in the Amazon S3 User Guide.
- //
- // Bucket is a required field
- Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"`
-
- // Size of the body in bytes. This parameter is useful when the size of the
- // body cannot be determined automatically.
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // The base64-encoded 128-bit MD5 digest of the part data. This parameter is
- // auto-populated when using the command from the CLI. This parameter is required
- // if object lock parameters are specified.
- ContentMD5 *string `location:"header" locationName:"Content-MD5" type:"string"`
-
- // The account ID of the expected bucket owner. If the bucket is owned by a
- // different account, the request will fail with an HTTP 403 (Access Denied)
- // error.
- ExpectedBucketOwner *string `location:"header" locationName:"x-amz-expected-bucket-owner" type:"string"`
-
- // Object key for which the multipart upload was initiated.
- //
- // Key is a required field
- Key *string `location:"uri" locationName:"Key" min:"1" type:"string" required:"true"`
-
- // Part number of part being uploaded. This is a positive integer between 1
- // and 10,000.
- //
- // PartNumber is a required field
- PartNumber *int64 `location:"querystring" locationName:"partNumber" type:"integer" required:"true"`
-
- // Confirms that the requester knows that they will be charged for the request.
- // Bucket owners need not specify this parameter in their requests. For information
- // about downloading objects from requester pays buckets, see Downloading Objects
- // in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
- // in the Amazon S3 User Guide.
- RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"`
-
- // Specifies the algorithm to use to when encrypting the object (for example,
- // AES256).
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // Specifies the customer-provided encryption key for Amazon S3 to use in encrypting
- // data. This value is used to store the object and then it is discarded; Amazon
- // S3 does not store the encryption key. The key must be appropriate for use
- // with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm
- // header. This must be the same encryption key specified in the initiate multipart
- // upload request.
- SSECustomerKey *string `marshal-as:"blob" location:"header" locationName:"x-amz-server-side-encryption-customer-key" type:"string" sensitive:"true"`
-
- // Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.
- // Amazon S3 uses this header for a message integrity check to ensure that the
- // encryption key was transmitted without error.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // Upload ID identifying the multipart upload whose part is being uploaded.
- //
- // UploadId is a required field
- UploadId *string `location:"querystring" locationName:"uploadId" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s UploadPartInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UploadPartInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UploadPartInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UploadPartInput"}
- if s.Bucket == nil {
- invalidParams.Add(request.NewErrParamRequired("Bucket"))
- }
- if s.Bucket != nil && len(*s.Bucket) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Bucket", 1))
- }
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.PartNumber == nil {
- invalidParams.Add(request.NewErrParamRequired("PartNumber"))
- }
- if s.UploadId == nil {
- invalidParams.Add(request.NewErrParamRequired("UploadId"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBody sets the Body field's value.
-func (s *UploadPartInput) SetBody(v io.ReadSeeker) *UploadPartInput {
- s.Body = v
- return s
-}
-
-// SetBucket sets the Bucket field's value.
-func (s *UploadPartInput) SetBucket(v string) *UploadPartInput {
- s.Bucket = &v
- return s
-}
-
-func (s *UploadPartInput) getBucket() (v string) {
- if s.Bucket == nil {
- return v
- }
- return *s.Bucket
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *UploadPartInput) SetContentLength(v int64) *UploadPartInput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentMD5 sets the ContentMD5 field's value.
-func (s *UploadPartInput) SetContentMD5(v string) *UploadPartInput {
- s.ContentMD5 = &v
- return s
-}
-
-// SetExpectedBucketOwner sets the ExpectedBucketOwner field's value.
-func (s *UploadPartInput) SetExpectedBucketOwner(v string) *UploadPartInput {
- s.ExpectedBucketOwner = &v
- return s
-}
-
-// SetKey sets the Key field's value.
-func (s *UploadPartInput) SetKey(v string) *UploadPartInput {
- s.Key = &v
- return s
-}
-
-// SetPartNumber sets the PartNumber field's value.
-func (s *UploadPartInput) SetPartNumber(v int64) *UploadPartInput {
- s.PartNumber = &v
- return s
-}
-
-// SetRequestPayer sets the RequestPayer field's value.
-func (s *UploadPartInput) SetRequestPayer(v string) *UploadPartInput {
- s.RequestPayer = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *UploadPartInput) SetSSECustomerAlgorithm(v string) *UploadPartInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKey sets the SSECustomerKey field's value.
-func (s *UploadPartInput) SetSSECustomerKey(v string) *UploadPartInput {
- s.SSECustomerKey = &v
- return s
-}
-
-func (s *UploadPartInput) getSSECustomerKey() (v string) {
- if s.SSECustomerKey == nil {
- return v
- }
- return *s.SSECustomerKey
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *UploadPartInput) SetSSECustomerKeyMD5(v string) *UploadPartInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetUploadId sets the UploadId field's value.
-func (s *UploadPartInput) SetUploadId(v string) *UploadPartInput {
- s.UploadId = &v
- return s
-}
-
-func (s *UploadPartInput) getEndpointARN() (arn.Resource, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- return parseEndpointARN(*s.Bucket)
-}
-
-func (s *UploadPartInput) hasEndpointARN() bool {
- if s.Bucket == nil {
- return false
- }
- return arn.IsARN(*s.Bucket)
-}
-
-// updateArnableField updates the value of the input field that
-// takes an ARN as an input. This method is useful to backfill
-// the parsed resource name from ARN into the input member.
-// It returns a pointer to a modified copy of input and an error.
-// Note that original input is not modified.
-func (s UploadPartInput) updateArnableField(v string) (interface{}, error) {
- if s.Bucket == nil {
- return nil, fmt.Errorf("member Bucket is nil")
- }
- s.Bucket = aws.String(v)
- return &s, nil
-}
-
-type UploadPartOutput struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether the multipart upload uses an S3 Bucket Key for server-side
- // encryption with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Entity tag for the uploaded object.
- ETag *string `location:"header" locationName:"ETag" type:"string"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header confirming the encryption algorithm
- // used.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // If server-side encryption with a customer-provided encryption key was requested,
- // the response will include this header to provide round-trip message integrity
- // verification of the customer-provided encryption key.
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) was used for the object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing this object in Amazon
- // S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-}
-
-// String returns the string representation
-func (s UploadPartOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s UploadPartOutput) GoString() string {
- return s.String()
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *UploadPartOutput) SetBucketKeyEnabled(v bool) *UploadPartOutput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *UploadPartOutput) SetETag(v string) *UploadPartOutput {
- s.ETag = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *UploadPartOutput) SetRequestCharged(v string) *UploadPartOutput {
- s.RequestCharged = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *UploadPartOutput) SetSSECustomerAlgorithm(v string) *UploadPartOutput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *UploadPartOutput) SetSSECustomerKeyMD5(v string) *UploadPartOutput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *UploadPartOutput) SetSSEKMSKeyId(v string) *UploadPartOutput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *UploadPartOutput) SetServerSideEncryption(v string) *UploadPartOutput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// Describes the versioning state of an Amazon S3 bucket. For more information,
-// see PUT Bucket versioning (https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTVersioningStatus.html)
-// in the Amazon S3 API Reference.
-type VersioningConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Specifies whether MFA delete is enabled in the bucket versioning configuration.
- // This element is only returned if the bucket has been configured with MFA
- // delete. If the bucket has never been so configured, this element is not returned.
- MFADelete *string `locationName:"MfaDelete" type:"string" enum:"MFADelete"`
-
- // The versioning state of the bucket.
- Status *string `type:"string" enum:"BucketVersioningStatus"`
-}
-
-// String returns the string representation
-func (s VersioningConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s VersioningConfiguration) GoString() string {
- return s.String()
-}
-
-// SetMFADelete sets the MFADelete field's value.
-func (s *VersioningConfiguration) SetMFADelete(v string) *VersioningConfiguration {
- s.MFADelete = &v
- return s
-}
-
-// SetStatus sets the Status field's value.
-func (s *VersioningConfiguration) SetStatus(v string) *VersioningConfiguration {
- s.Status = &v
- return s
-}
-
-// Specifies website configuration parameters for an Amazon S3 bucket.
-type WebsiteConfiguration struct {
- _ struct{} `type:"structure"`
-
- // The name of the error document for the website.
- ErrorDocument *ErrorDocument `type:"structure"`
-
- // The name of the index document for the website.
- IndexDocument *IndexDocument `type:"structure"`
-
- // The redirect behavior for every request to this bucket's website endpoint.
- //
- // If you specify this property, you can't specify any other property.
- RedirectAllRequestsTo *RedirectAllRequestsTo `type:"structure"`
-
- // Rules that define when a redirect is applied and the redirect behavior.
- RoutingRules []*RoutingRule `locationNameList:"RoutingRule" type:"list"`
-}
-
-// String returns the string representation
-func (s WebsiteConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s WebsiteConfiguration) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *WebsiteConfiguration) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "WebsiteConfiguration"}
- if s.ErrorDocument != nil {
- if err := s.ErrorDocument.Validate(); err != nil {
- invalidParams.AddNested("ErrorDocument", err.(request.ErrInvalidParams))
- }
- }
- if s.IndexDocument != nil {
- if err := s.IndexDocument.Validate(); err != nil {
- invalidParams.AddNested("IndexDocument", err.(request.ErrInvalidParams))
- }
- }
- if s.RedirectAllRequestsTo != nil {
- if err := s.RedirectAllRequestsTo.Validate(); err != nil {
- invalidParams.AddNested("RedirectAllRequestsTo", err.(request.ErrInvalidParams))
- }
- }
- if s.RoutingRules != nil {
- for i, v := range s.RoutingRules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RoutingRules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetErrorDocument sets the ErrorDocument field's value.
-func (s *WebsiteConfiguration) SetErrorDocument(v *ErrorDocument) *WebsiteConfiguration {
- s.ErrorDocument = v
- return s
-}
-
-// SetIndexDocument sets the IndexDocument field's value.
-func (s *WebsiteConfiguration) SetIndexDocument(v *IndexDocument) *WebsiteConfiguration {
- s.IndexDocument = v
- return s
-}
-
-// SetRedirectAllRequestsTo sets the RedirectAllRequestsTo field's value.
-func (s *WebsiteConfiguration) SetRedirectAllRequestsTo(v *RedirectAllRequestsTo) *WebsiteConfiguration {
- s.RedirectAllRequestsTo = v
- return s
-}
-
-// SetRoutingRules sets the RoutingRules field's value.
-func (s *WebsiteConfiguration) SetRoutingRules(v []*RoutingRule) *WebsiteConfiguration {
- s.RoutingRules = v
- return s
-}
-
-type WriteGetObjectResponseInput struct {
- _ struct{} `locationName:"WriteGetObjectResponseRequest" type:"structure" payload:"Body"`
-
- // Indicates that a range of bytes was specified.
- AcceptRanges *string `location:"header" locationName:"x-amz-fwd-header-accept-ranges" type:"string"`
-
- // The object data.
- //
- // To use an non-seekable io.Reader for this request wrap the io.Reader with
- // "aws.ReadSeekCloser". The SDK will not retry request errors for non-seekable
- // readers. This will allow the SDK to send the reader's payload as chunked
- // transfer encoding.
- Body io.ReadSeeker `type:"blob"`
-
- // Indicates whether the object stored in Amazon S3 uses an S3 bucket key for
- // server-side encryption with AWS KMS (SSE-KMS).
- BucketKeyEnabled *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled" type:"boolean"`
-
- // Specifies caching behavior along the request/reply chain.
- CacheControl *string `location:"header" locationName:"x-amz-fwd-header-Cache-Control" type:"string"`
-
- // Specifies presentational information for the object.
- ContentDisposition *string `location:"header" locationName:"x-amz-fwd-header-Content-Disposition" type:"string"`
-
- // Specifies what content encodings have been applied to the object and thus
- // what decoding mechanisms must be applied to obtain the media-type referenced
- // by the Content-Type header field.
- ContentEncoding *string `location:"header" locationName:"x-amz-fwd-header-Content-Encoding" type:"string"`
-
- // The language the content is in.
- ContentLanguage *string `location:"header" locationName:"x-amz-fwd-header-Content-Language" type:"string"`
-
- // The size of the content body in bytes.
- ContentLength *int64 `location:"header" locationName:"Content-Length" type:"long"`
-
- // The portion of the object returned in the response.
- ContentRange *string `location:"header" locationName:"x-amz-fwd-header-Content-Range" type:"string"`
-
- // A standard MIME type describing the format of the object data.
- ContentType *string `location:"header" locationName:"x-amz-fwd-header-Content-Type" type:"string"`
-
- // Specifies whether an object stored in Amazon S3 is (true) or is not (false)
- // a delete marker.
- DeleteMarker *bool `location:"header" locationName:"x-amz-fwd-header-x-amz-delete-marker" type:"boolean"`
-
- // An opaque identifier assigned by a web server to a specific version of a
- // resource found at a URL.
- ETag *string `location:"header" locationName:"x-amz-fwd-header-ETag" type:"string"`
-
- // A string that uniquely identifies an error condition. Returned in the
- // tag of the error XML response for a corresponding GetObject call. Cannot
- // be used with a successful StatusCode header or when the transformed object
- // is provided in the body. All error codes from S3 are sentence-cased. Regex
- // value is "^[A-Z][a-zA-Z]+$".
- ErrorCode *string `location:"header" locationName:"x-amz-fwd-error-code" type:"string"`
-
- // Contains a generic description of the error condition. Returned in the
- // tag of the error XML response for a corresponding GetObject call. Cannot
- // be used with a successful StatusCode header or when the transformed object
- // is provided in body.
- ErrorMessage *string `location:"header" locationName:"x-amz-fwd-error-message" type:"string"`
-
- // If object stored in Amazon S3 expiration is configured (see PUT Bucket lifecycle)
- // it includes expiry-date and rule-id key-value pairs providing object expiration
- // information. The value of the rule-id is URL encoded.
- Expiration *string `location:"header" locationName:"x-amz-fwd-header-x-amz-expiration" type:"string"`
-
- // The date and time at which the object is no longer cacheable.
- Expires *time.Time `location:"header" locationName:"x-amz-fwd-header-Expires" type:"timestamp"`
-
- // The date and time that the object was last modified.
- LastModified *time.Time `location:"header" locationName:"x-amz-fwd-header-Last-Modified" type:"timestamp"`
-
- // A map of metadata to store with the object in S3.
- Metadata map[string]*string `location:"headers" locationName:"x-amz-meta-" type:"map"`
-
- // Set to the number of metadata entries not returned in x-amz-meta headers.
- // This can happen if you create metadata using an API like SOAP that supports
- // more flexible metadata than the REST API. For example, using SOAP, you can
- // create metadata whose values are not legal HTTP headers.
- MissingMeta *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-missing-meta" type:"integer"`
-
- // Indicates whether an object stored in Amazon S3 has an active legal hold.
- ObjectLockLegalHoldStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-legal-hold" type:"string" enum:"ObjectLockLegalHoldStatus"`
-
- // Indicates whether an object stored in Amazon S3 has Object Lock enabled.
- // For more information about S3 Object Lock, see Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html).
- ObjectLockMode *string `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-mode" type:"string" enum:"ObjectLockMode"`
-
- // The date and time when Object Lock is configured to expire.
- ObjectLockRetainUntilDate *time.Time `location:"header" locationName:"x-amz-fwd-header-x-amz-object-lock-retain-until-date" type:"timestamp" timestampFormat:"iso8601"`
-
- // The count of parts this object has.
- PartsCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-mp-parts-count" type:"integer"`
-
- // Indicates if request involves bucket that is either a source or destination
- // in a Replication rule. For more information about S3 Replication, see Replication
- // (https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html).
- ReplicationStatus *string `location:"header" locationName:"x-amz-fwd-header-x-amz-replication-status" type:"string" enum:"ReplicationStatus"`
-
- // If present, indicates that the requester was successfully charged for the
- // request.
- RequestCharged *string `location:"header" locationName:"x-amz-fwd-header-x-amz-request-charged" type:"string" enum:"RequestCharged"`
-
- // Route prefix to the HTTP URL generated.
- //
- // RequestRoute is a required field
- RequestRoute *string `location:"header" locationName:"x-amz-request-route" type:"string" required:"true"`
-
- // A single use encrypted token that maps WriteGetObjectResponse to the end
- // user GetObject request.
- //
- // RequestToken is a required field
- RequestToken *string `location:"header" locationName:"x-amz-request-token" type:"string" required:"true"`
-
- // Provides information about object restoration operation and expiration time
- // of the restored object copy.
- Restore *string `location:"header" locationName:"x-amz-fwd-header-x-amz-restore" type:"string"`
-
- // Encryption algorithm used if server-side encryption with a customer-provided
- // encryption key was specified for object stored in Amazon S3.
- SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm" type:"string"`
-
- // 128-bit MD5 digest of customer-provided encryption key used in Amazon S3
- // to encrypt data stored in S3. For more information, see Protecting data using
- // server-side encryption with customer-provided encryption keys (SSE-C) (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html).
- SSECustomerKeyMD5 *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5" type:"string"`
-
- // If present, specifies the ID of the AWS Key Management Service (AWS KMS)
- // symmetric customer managed customer master key (CMK) that was used for stored
- // in Amazon S3 object.
- SSEKMSKeyId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id" type:"string" sensitive:"true"`
-
- // The server-side encryption algorithm used when storing requested object in
- // Amazon S3 (for example, AES256, aws:kms).
- ServerSideEncryption *string `location:"header" locationName:"x-amz-fwd-header-x-amz-server-side-encryption" type:"string" enum:"ServerSideEncryption"`
-
- // The integer status code for an HTTP response of a corresponding GetObject
- // request.
- //
- // Status Codes
- //
- // * 200 - OK
- //
- // * 206 - Partial Content
- //
- // * 304 - Not Modified
- //
- // * 400 - Bad Request
- //
- // * 401 - Unauthorized
- //
- // * 403 - Forbidden
- //
- // * 404 - Not Found
- //
- // * 405 - Method Not Allowed
- //
- // * 409 - Conflict
- //
- // * 411 - Length Required
- //
- // * 412 - Precondition Failed
- //
- // * 416 - Range Not Satisfiable
- //
- // * 500 - Internal Server Error
- //
- // * 503 - Service Unavailable
- StatusCode *int64 `location:"header" locationName:"x-amz-fwd-status" type:"integer"`
-
- // The class of storage used to store object in Amazon S3.
- StorageClass *string `location:"header" locationName:"x-amz-fwd-header-x-amz-storage-class" type:"string" enum:"StorageClass"`
-
- // The number of tags, if any, on the object.
- TagCount *int64 `location:"header" locationName:"x-amz-fwd-header-x-amz-tagging-count" type:"integer"`
-
- // An ID used to reference a specific version of the object.
- VersionId *string `location:"header" locationName:"x-amz-fwd-header-x-amz-version-id" type:"string"`
-}
-
-// String returns the string representation
-func (s WriteGetObjectResponseInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s WriteGetObjectResponseInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *WriteGetObjectResponseInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "WriteGetObjectResponseInput"}
- if s.RequestRoute == nil {
- invalidParams.Add(request.NewErrParamRequired("RequestRoute"))
- }
- if s.RequestRoute != nil && len(*s.RequestRoute) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RequestRoute", 1))
- }
- if s.RequestToken == nil {
- invalidParams.Add(request.NewErrParamRequired("RequestToken"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAcceptRanges sets the AcceptRanges field's value.
-func (s *WriteGetObjectResponseInput) SetAcceptRanges(v string) *WriteGetObjectResponseInput {
- s.AcceptRanges = &v
- return s
-}
-
-// SetBody sets the Body field's value.
-func (s *WriteGetObjectResponseInput) SetBody(v io.ReadSeeker) *WriteGetObjectResponseInput {
- s.Body = v
- return s
-}
-
-// SetBucketKeyEnabled sets the BucketKeyEnabled field's value.
-func (s *WriteGetObjectResponseInput) SetBucketKeyEnabled(v bool) *WriteGetObjectResponseInput {
- s.BucketKeyEnabled = &v
- return s
-}
-
-// SetCacheControl sets the CacheControl field's value.
-func (s *WriteGetObjectResponseInput) SetCacheControl(v string) *WriteGetObjectResponseInput {
- s.CacheControl = &v
- return s
-}
-
-// SetContentDisposition sets the ContentDisposition field's value.
-func (s *WriteGetObjectResponseInput) SetContentDisposition(v string) *WriteGetObjectResponseInput {
- s.ContentDisposition = &v
- return s
-}
-
-// SetContentEncoding sets the ContentEncoding field's value.
-func (s *WriteGetObjectResponseInput) SetContentEncoding(v string) *WriteGetObjectResponseInput {
- s.ContentEncoding = &v
- return s
-}
-
-// SetContentLanguage sets the ContentLanguage field's value.
-func (s *WriteGetObjectResponseInput) SetContentLanguage(v string) *WriteGetObjectResponseInput {
- s.ContentLanguage = &v
- return s
-}
-
-// SetContentLength sets the ContentLength field's value.
-func (s *WriteGetObjectResponseInput) SetContentLength(v int64) *WriteGetObjectResponseInput {
- s.ContentLength = &v
- return s
-}
-
-// SetContentRange sets the ContentRange field's value.
-func (s *WriteGetObjectResponseInput) SetContentRange(v string) *WriteGetObjectResponseInput {
- s.ContentRange = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *WriteGetObjectResponseInput) SetContentType(v string) *WriteGetObjectResponseInput {
- s.ContentType = &v
- return s
-}
-
-// SetDeleteMarker sets the DeleteMarker field's value.
-func (s *WriteGetObjectResponseInput) SetDeleteMarker(v bool) *WriteGetObjectResponseInput {
- s.DeleteMarker = &v
- return s
-}
-
-// SetETag sets the ETag field's value.
-func (s *WriteGetObjectResponseInput) SetETag(v string) *WriteGetObjectResponseInput {
- s.ETag = &v
- return s
-}
-
-// SetErrorCode sets the ErrorCode field's value.
-func (s *WriteGetObjectResponseInput) SetErrorCode(v string) *WriteGetObjectResponseInput {
- s.ErrorCode = &v
- return s
-}
-
-// SetErrorMessage sets the ErrorMessage field's value.
-func (s *WriteGetObjectResponseInput) SetErrorMessage(v string) *WriteGetObjectResponseInput {
- s.ErrorMessage = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *WriteGetObjectResponseInput) SetExpiration(v string) *WriteGetObjectResponseInput {
- s.Expiration = &v
- return s
-}
-
-// SetExpires sets the Expires field's value.
-func (s *WriteGetObjectResponseInput) SetExpires(v time.Time) *WriteGetObjectResponseInput {
- s.Expires = &v
- return s
-}
-
-// SetLastModified sets the LastModified field's value.
-func (s *WriteGetObjectResponseInput) SetLastModified(v time.Time) *WriteGetObjectResponseInput {
- s.LastModified = &v
- return s
-}
-
-// SetMetadata sets the Metadata field's value.
-func (s *WriteGetObjectResponseInput) SetMetadata(v map[string]*string) *WriteGetObjectResponseInput {
- s.Metadata = v
- return s
-}
-
-// SetMissingMeta sets the MissingMeta field's value.
-func (s *WriteGetObjectResponseInput) SetMissingMeta(v int64) *WriteGetObjectResponseInput {
- s.MissingMeta = &v
- return s
-}
-
-// SetObjectLockLegalHoldStatus sets the ObjectLockLegalHoldStatus field's value.
-func (s *WriteGetObjectResponseInput) SetObjectLockLegalHoldStatus(v string) *WriteGetObjectResponseInput {
- s.ObjectLockLegalHoldStatus = &v
- return s
-}
-
-// SetObjectLockMode sets the ObjectLockMode field's value.
-func (s *WriteGetObjectResponseInput) SetObjectLockMode(v string) *WriteGetObjectResponseInput {
- s.ObjectLockMode = &v
- return s
-}
-
-// SetObjectLockRetainUntilDate sets the ObjectLockRetainUntilDate field's value.
-func (s *WriteGetObjectResponseInput) SetObjectLockRetainUntilDate(v time.Time) *WriteGetObjectResponseInput {
- s.ObjectLockRetainUntilDate = &v
- return s
-}
-
-// SetPartsCount sets the PartsCount field's value.
-func (s *WriteGetObjectResponseInput) SetPartsCount(v int64) *WriteGetObjectResponseInput {
- s.PartsCount = &v
- return s
-}
-
-// SetReplicationStatus sets the ReplicationStatus field's value.
-func (s *WriteGetObjectResponseInput) SetReplicationStatus(v string) *WriteGetObjectResponseInput {
- s.ReplicationStatus = &v
- return s
-}
-
-// SetRequestCharged sets the RequestCharged field's value.
-func (s *WriteGetObjectResponseInput) SetRequestCharged(v string) *WriteGetObjectResponseInput {
- s.RequestCharged = &v
- return s
-}
-
-// SetRequestRoute sets the RequestRoute field's value.
-func (s *WriteGetObjectResponseInput) SetRequestRoute(v string) *WriteGetObjectResponseInput {
- s.RequestRoute = &v
- return s
-}
-
-// SetRequestToken sets the RequestToken field's value.
-func (s *WriteGetObjectResponseInput) SetRequestToken(v string) *WriteGetObjectResponseInput {
- s.RequestToken = &v
- return s
-}
-
-// SetRestore sets the Restore field's value.
-func (s *WriteGetObjectResponseInput) SetRestore(v string) *WriteGetObjectResponseInput {
- s.Restore = &v
- return s
-}
-
-// SetSSECustomerAlgorithm sets the SSECustomerAlgorithm field's value.
-func (s *WriteGetObjectResponseInput) SetSSECustomerAlgorithm(v string) *WriteGetObjectResponseInput {
- s.SSECustomerAlgorithm = &v
- return s
-}
-
-// SetSSECustomerKeyMD5 sets the SSECustomerKeyMD5 field's value.
-func (s *WriteGetObjectResponseInput) SetSSECustomerKeyMD5(v string) *WriteGetObjectResponseInput {
- s.SSECustomerKeyMD5 = &v
- return s
-}
-
-// SetSSEKMSKeyId sets the SSEKMSKeyId field's value.
-func (s *WriteGetObjectResponseInput) SetSSEKMSKeyId(v string) *WriteGetObjectResponseInput {
- s.SSEKMSKeyId = &v
- return s
-}
-
-// SetServerSideEncryption sets the ServerSideEncryption field's value.
-func (s *WriteGetObjectResponseInput) SetServerSideEncryption(v string) *WriteGetObjectResponseInput {
- s.ServerSideEncryption = &v
- return s
-}
-
-// SetStatusCode sets the StatusCode field's value.
-func (s *WriteGetObjectResponseInput) SetStatusCode(v int64) *WriteGetObjectResponseInput {
- s.StatusCode = &v
- return s
-}
-
-// SetStorageClass sets the StorageClass field's value.
-func (s *WriteGetObjectResponseInput) SetStorageClass(v string) *WriteGetObjectResponseInput {
- s.StorageClass = &v
- return s
-}
-
-// SetTagCount sets the TagCount field's value.
-func (s *WriteGetObjectResponseInput) SetTagCount(v int64) *WriteGetObjectResponseInput {
- s.TagCount = &v
- return s
-}
-
-// SetVersionId sets the VersionId field's value.
-func (s *WriteGetObjectResponseInput) SetVersionId(v string) *WriteGetObjectResponseInput {
- s.VersionId = &v
- return s
-}
-
-func (s *WriteGetObjectResponseInput) hostLabels() map[string]string {
- return map[string]string{
- "RequestRoute": aws.StringValue(s.RequestRoute),
- }
-}
-
-type WriteGetObjectResponseOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s WriteGetObjectResponseOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s WriteGetObjectResponseOutput) GoString() string {
- return s.String()
-}
-
-const (
- // AnalyticsS3ExportFileFormatCsv is a AnalyticsS3ExportFileFormat enum value
- AnalyticsS3ExportFileFormatCsv = "CSV"
-)
-
-// AnalyticsS3ExportFileFormat_Values returns all elements of the AnalyticsS3ExportFileFormat enum
-func AnalyticsS3ExportFileFormat_Values() []string {
- return []string{
- AnalyticsS3ExportFileFormatCsv,
- }
-}
-
-const (
- // ArchiveStatusArchiveAccess is a ArchiveStatus enum value
- ArchiveStatusArchiveAccess = "ARCHIVE_ACCESS"
-
- // ArchiveStatusDeepArchiveAccess is a ArchiveStatus enum value
- ArchiveStatusDeepArchiveAccess = "DEEP_ARCHIVE_ACCESS"
-)
-
-// ArchiveStatus_Values returns all elements of the ArchiveStatus enum
-func ArchiveStatus_Values() []string {
- return []string{
- ArchiveStatusArchiveAccess,
- ArchiveStatusDeepArchiveAccess,
- }
-}
-
-const (
- // BucketAccelerateStatusEnabled is a BucketAccelerateStatus enum value
- BucketAccelerateStatusEnabled = "Enabled"
-
- // BucketAccelerateStatusSuspended is a BucketAccelerateStatus enum value
- BucketAccelerateStatusSuspended = "Suspended"
-)
-
-// BucketAccelerateStatus_Values returns all elements of the BucketAccelerateStatus enum
-func BucketAccelerateStatus_Values() []string {
- return []string{
- BucketAccelerateStatusEnabled,
- BucketAccelerateStatusSuspended,
- }
-}
-
-const (
- // BucketCannedACLPrivate is a BucketCannedACL enum value
- BucketCannedACLPrivate = "private"
-
- // BucketCannedACLPublicRead is a BucketCannedACL enum value
- BucketCannedACLPublicRead = "public-read"
-
- // BucketCannedACLPublicReadWrite is a BucketCannedACL enum value
- BucketCannedACLPublicReadWrite = "public-read-write"
-
- // BucketCannedACLAuthenticatedRead is a BucketCannedACL enum value
- BucketCannedACLAuthenticatedRead = "authenticated-read"
-)
-
-// BucketCannedACL_Values returns all elements of the BucketCannedACL enum
-func BucketCannedACL_Values() []string {
- return []string{
- BucketCannedACLPrivate,
- BucketCannedACLPublicRead,
- BucketCannedACLPublicReadWrite,
- BucketCannedACLAuthenticatedRead,
- }
-}
-
-const (
- // BucketLocationConstraintAfSouth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintAfSouth1 = "af-south-1"
-
- // BucketLocationConstraintApEast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintApEast1 = "ap-east-1"
-
- // BucketLocationConstraintApNortheast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintApNortheast1 = "ap-northeast-1"
-
- // BucketLocationConstraintApNortheast2 is a BucketLocationConstraint enum value
- BucketLocationConstraintApNortheast2 = "ap-northeast-2"
-
- // BucketLocationConstraintApNortheast3 is a BucketLocationConstraint enum value
- BucketLocationConstraintApNortheast3 = "ap-northeast-3"
-
- // BucketLocationConstraintApSouth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintApSouth1 = "ap-south-1"
-
- // BucketLocationConstraintApSoutheast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintApSoutheast1 = "ap-southeast-1"
-
- // BucketLocationConstraintApSoutheast2 is a BucketLocationConstraint enum value
- BucketLocationConstraintApSoutheast2 = "ap-southeast-2"
-
- // BucketLocationConstraintCaCentral1 is a BucketLocationConstraint enum value
- BucketLocationConstraintCaCentral1 = "ca-central-1"
-
- // BucketLocationConstraintCnNorth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintCnNorth1 = "cn-north-1"
-
- // BucketLocationConstraintCnNorthwest1 is a BucketLocationConstraint enum value
- BucketLocationConstraintCnNorthwest1 = "cn-northwest-1"
-
- // BucketLocationConstraintEu is a BucketLocationConstraint enum value
- BucketLocationConstraintEu = "EU"
-
- // BucketLocationConstraintEuCentral1 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuCentral1 = "eu-central-1"
-
- // BucketLocationConstraintEuNorth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuNorth1 = "eu-north-1"
-
- // BucketLocationConstraintEuSouth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuSouth1 = "eu-south-1"
-
- // BucketLocationConstraintEuWest1 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuWest1 = "eu-west-1"
-
- // BucketLocationConstraintEuWest2 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuWest2 = "eu-west-2"
-
- // BucketLocationConstraintEuWest3 is a BucketLocationConstraint enum value
- BucketLocationConstraintEuWest3 = "eu-west-3"
-
- // BucketLocationConstraintMeSouth1 is a BucketLocationConstraint enum value
- BucketLocationConstraintMeSouth1 = "me-south-1"
-
- // BucketLocationConstraintSaEast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintSaEast1 = "sa-east-1"
-
- // BucketLocationConstraintUsEast2 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsEast2 = "us-east-2"
-
- // BucketLocationConstraintUsGovEast1 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsGovEast1 = "us-gov-east-1"
-
- // BucketLocationConstraintUsGovWest1 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsGovWest1 = "us-gov-west-1"
-
- // BucketLocationConstraintUsWest1 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsWest1 = "us-west-1"
-
- // BucketLocationConstraintUsWest2 is a BucketLocationConstraint enum value
- BucketLocationConstraintUsWest2 = "us-west-2"
-)
-
-// BucketLocationConstraint_Values returns all elements of the BucketLocationConstraint enum
-func BucketLocationConstraint_Values() []string {
- return []string{
- BucketLocationConstraintAfSouth1,
- BucketLocationConstraintApEast1,
- BucketLocationConstraintApNortheast1,
- BucketLocationConstraintApNortheast2,
- BucketLocationConstraintApNortheast3,
- BucketLocationConstraintApSouth1,
- BucketLocationConstraintApSoutheast1,
- BucketLocationConstraintApSoutheast2,
- BucketLocationConstraintCaCentral1,
- BucketLocationConstraintCnNorth1,
- BucketLocationConstraintCnNorthwest1,
- BucketLocationConstraintEu,
- BucketLocationConstraintEuCentral1,
- BucketLocationConstraintEuNorth1,
- BucketLocationConstraintEuSouth1,
- BucketLocationConstraintEuWest1,
- BucketLocationConstraintEuWest2,
- BucketLocationConstraintEuWest3,
- BucketLocationConstraintMeSouth1,
- BucketLocationConstraintSaEast1,
- BucketLocationConstraintUsEast2,
- BucketLocationConstraintUsGovEast1,
- BucketLocationConstraintUsGovWest1,
- BucketLocationConstraintUsWest1,
- BucketLocationConstraintUsWest2,
- }
-}
-
-const (
- // BucketLogsPermissionFullControl is a BucketLogsPermission enum value
- BucketLogsPermissionFullControl = "FULL_CONTROL"
-
- // BucketLogsPermissionRead is a BucketLogsPermission enum value
- BucketLogsPermissionRead = "READ"
-
- // BucketLogsPermissionWrite is a BucketLogsPermission enum value
- BucketLogsPermissionWrite = "WRITE"
-)
-
-// BucketLogsPermission_Values returns all elements of the BucketLogsPermission enum
-func BucketLogsPermission_Values() []string {
- return []string{
- BucketLogsPermissionFullControl,
- BucketLogsPermissionRead,
- BucketLogsPermissionWrite,
- }
-}
-
-const (
- // BucketVersioningStatusEnabled is a BucketVersioningStatus enum value
- BucketVersioningStatusEnabled = "Enabled"
-
- // BucketVersioningStatusSuspended is a BucketVersioningStatus enum value
- BucketVersioningStatusSuspended = "Suspended"
-)
-
-// BucketVersioningStatus_Values returns all elements of the BucketVersioningStatus enum
-func BucketVersioningStatus_Values() []string {
- return []string{
- BucketVersioningStatusEnabled,
- BucketVersioningStatusSuspended,
- }
-}
-
-const (
- // CompressionTypeNone is a CompressionType enum value
- CompressionTypeNone = "NONE"
-
- // CompressionTypeGzip is a CompressionType enum value
- CompressionTypeGzip = "GZIP"
-
- // CompressionTypeBzip2 is a CompressionType enum value
- CompressionTypeBzip2 = "BZIP2"
-)
-
-// CompressionType_Values returns all elements of the CompressionType enum
-func CompressionType_Values() []string {
- return []string{
- CompressionTypeNone,
- CompressionTypeGzip,
- CompressionTypeBzip2,
- }
-}
-
-const (
- // DeleteMarkerReplicationStatusEnabled is a DeleteMarkerReplicationStatus enum value
- DeleteMarkerReplicationStatusEnabled = "Enabled"
-
- // DeleteMarkerReplicationStatusDisabled is a DeleteMarkerReplicationStatus enum value
- DeleteMarkerReplicationStatusDisabled = "Disabled"
-)
-
-// DeleteMarkerReplicationStatus_Values returns all elements of the DeleteMarkerReplicationStatus enum
-func DeleteMarkerReplicationStatus_Values() []string {
- return []string{
- DeleteMarkerReplicationStatusEnabled,
- DeleteMarkerReplicationStatusDisabled,
- }
-}
-
-// Requests Amazon S3 to encode the object keys in the response and specifies
-// the encoding method to use. An object key may contain any Unicode character;
-// however, XML 1.0 parser cannot parse some characters, such as characters
-// with an ASCII value from 0 to 10. For characters that are not supported in
-// XML 1.0, you can add this parameter to request that Amazon S3 encode the
-// keys in the response.
-const (
- // EncodingTypeUrl is a EncodingType enum value
- EncodingTypeUrl = "url"
-)
-
-// EncodingType_Values returns all elements of the EncodingType enum
-func EncodingType_Values() []string {
- return []string{
- EncodingTypeUrl,
- }
-}
-
-// The bucket event for which to send notifications.
-const (
- // EventS3ReducedRedundancyLostObject is a Event enum value
- EventS3ReducedRedundancyLostObject = "s3:ReducedRedundancyLostObject"
-
- // EventS3ObjectCreated is a Event enum value
- EventS3ObjectCreated = "s3:ObjectCreated:*"
-
- // EventS3ObjectCreatedPut is a Event enum value
- EventS3ObjectCreatedPut = "s3:ObjectCreated:Put"
-
- // EventS3ObjectCreatedPost is a Event enum value
- EventS3ObjectCreatedPost = "s3:ObjectCreated:Post"
-
- // EventS3ObjectCreatedCopy is a Event enum value
- EventS3ObjectCreatedCopy = "s3:ObjectCreated:Copy"
-
- // EventS3ObjectCreatedCompleteMultipartUpload is a Event enum value
- EventS3ObjectCreatedCompleteMultipartUpload = "s3:ObjectCreated:CompleteMultipartUpload"
-
- // EventS3ObjectRemoved is a Event enum value
- EventS3ObjectRemoved = "s3:ObjectRemoved:*"
-
- // EventS3ObjectRemovedDelete is a Event enum value
- EventS3ObjectRemovedDelete = "s3:ObjectRemoved:Delete"
-
- // EventS3ObjectRemovedDeleteMarkerCreated is a Event enum value
- EventS3ObjectRemovedDeleteMarkerCreated = "s3:ObjectRemoved:DeleteMarkerCreated"
-
- // EventS3ObjectRestore is a Event enum value
- EventS3ObjectRestore = "s3:ObjectRestore:*"
-
- // EventS3ObjectRestorePost is a Event enum value
- EventS3ObjectRestorePost = "s3:ObjectRestore:Post"
-
- // EventS3ObjectRestoreCompleted is a Event enum value
- EventS3ObjectRestoreCompleted = "s3:ObjectRestore:Completed"
-
- // EventS3Replication is a Event enum value
- EventS3Replication = "s3:Replication:*"
-
- // EventS3ReplicationOperationFailedReplication is a Event enum value
- EventS3ReplicationOperationFailedReplication = "s3:Replication:OperationFailedReplication"
-
- // EventS3ReplicationOperationNotTracked is a Event enum value
- EventS3ReplicationOperationNotTracked = "s3:Replication:OperationNotTracked"
-
- // EventS3ReplicationOperationMissedThreshold is a Event enum value
- EventS3ReplicationOperationMissedThreshold = "s3:Replication:OperationMissedThreshold"
-
- // EventS3ReplicationOperationReplicatedAfterThreshold is a Event enum value
- EventS3ReplicationOperationReplicatedAfterThreshold = "s3:Replication:OperationReplicatedAfterThreshold"
-)
-
-// Event_Values returns all elements of the Event enum
-func Event_Values() []string {
- return []string{
- EventS3ReducedRedundancyLostObject,
- EventS3ObjectCreated,
- EventS3ObjectCreatedPut,
- EventS3ObjectCreatedPost,
- EventS3ObjectCreatedCopy,
- EventS3ObjectCreatedCompleteMultipartUpload,
- EventS3ObjectRemoved,
- EventS3ObjectRemovedDelete,
- EventS3ObjectRemovedDeleteMarkerCreated,
- EventS3ObjectRestore,
- EventS3ObjectRestorePost,
- EventS3ObjectRestoreCompleted,
- EventS3Replication,
- EventS3ReplicationOperationFailedReplication,
- EventS3ReplicationOperationNotTracked,
- EventS3ReplicationOperationMissedThreshold,
- EventS3ReplicationOperationReplicatedAfterThreshold,
- }
-}
-
-const (
- // ExistingObjectReplicationStatusEnabled is a ExistingObjectReplicationStatus enum value
- ExistingObjectReplicationStatusEnabled = "Enabled"
-
- // ExistingObjectReplicationStatusDisabled is a ExistingObjectReplicationStatus enum value
- ExistingObjectReplicationStatusDisabled = "Disabled"
-)
-
-// ExistingObjectReplicationStatus_Values returns all elements of the ExistingObjectReplicationStatus enum
-func ExistingObjectReplicationStatus_Values() []string {
- return []string{
- ExistingObjectReplicationStatusEnabled,
- ExistingObjectReplicationStatusDisabled,
- }
-}
-
-const (
- // ExpirationStatusEnabled is a ExpirationStatus enum value
- ExpirationStatusEnabled = "Enabled"
-
- // ExpirationStatusDisabled is a ExpirationStatus enum value
- ExpirationStatusDisabled = "Disabled"
-)
-
-// ExpirationStatus_Values returns all elements of the ExpirationStatus enum
-func ExpirationStatus_Values() []string {
- return []string{
- ExpirationStatusEnabled,
- ExpirationStatusDisabled,
- }
-}
-
-const (
- // ExpressionTypeSql is a ExpressionType enum value
- ExpressionTypeSql = "SQL"
-)
-
-// ExpressionType_Values returns all elements of the ExpressionType enum
-func ExpressionType_Values() []string {
- return []string{
- ExpressionTypeSql,
- }
-}
-
-const (
- // FileHeaderInfoUse is a FileHeaderInfo enum value
- FileHeaderInfoUse = "USE"
-
- // FileHeaderInfoIgnore is a FileHeaderInfo enum value
- FileHeaderInfoIgnore = "IGNORE"
-
- // FileHeaderInfoNone is a FileHeaderInfo enum value
- FileHeaderInfoNone = "NONE"
-)
-
-// FileHeaderInfo_Values returns all elements of the FileHeaderInfo enum
-func FileHeaderInfo_Values() []string {
- return []string{
- FileHeaderInfoUse,
- FileHeaderInfoIgnore,
- FileHeaderInfoNone,
- }
-}
-
-const (
- // FilterRuleNamePrefix is a FilterRuleName enum value
- FilterRuleNamePrefix = "prefix"
-
- // FilterRuleNameSuffix is a FilterRuleName enum value
- FilterRuleNameSuffix = "suffix"
-)
-
-// FilterRuleName_Values returns all elements of the FilterRuleName enum
-func FilterRuleName_Values() []string {
- return []string{
- FilterRuleNamePrefix,
- FilterRuleNameSuffix,
- }
-}
-
-const (
- // IntelligentTieringAccessTierArchiveAccess is a IntelligentTieringAccessTier enum value
- IntelligentTieringAccessTierArchiveAccess = "ARCHIVE_ACCESS"
-
- // IntelligentTieringAccessTierDeepArchiveAccess is a IntelligentTieringAccessTier enum value
- IntelligentTieringAccessTierDeepArchiveAccess = "DEEP_ARCHIVE_ACCESS"
-)
-
-// IntelligentTieringAccessTier_Values returns all elements of the IntelligentTieringAccessTier enum
-func IntelligentTieringAccessTier_Values() []string {
- return []string{
- IntelligentTieringAccessTierArchiveAccess,
- IntelligentTieringAccessTierDeepArchiveAccess,
- }
-}
-
-const (
- // IntelligentTieringStatusEnabled is a IntelligentTieringStatus enum value
- IntelligentTieringStatusEnabled = "Enabled"
-
- // IntelligentTieringStatusDisabled is a IntelligentTieringStatus enum value
- IntelligentTieringStatusDisabled = "Disabled"
-)
-
-// IntelligentTieringStatus_Values returns all elements of the IntelligentTieringStatus enum
-func IntelligentTieringStatus_Values() []string {
- return []string{
- IntelligentTieringStatusEnabled,
- IntelligentTieringStatusDisabled,
- }
-}
-
-const (
- // InventoryFormatCsv is a InventoryFormat enum value
- InventoryFormatCsv = "CSV"
-
- // InventoryFormatOrc is a InventoryFormat enum value
- InventoryFormatOrc = "ORC"
-
- // InventoryFormatParquet is a InventoryFormat enum value
- InventoryFormatParquet = "Parquet"
-)
-
-// InventoryFormat_Values returns all elements of the InventoryFormat enum
-func InventoryFormat_Values() []string {
- return []string{
- InventoryFormatCsv,
- InventoryFormatOrc,
- InventoryFormatParquet,
- }
-}
-
-const (
- // InventoryFrequencyDaily is a InventoryFrequency enum value
- InventoryFrequencyDaily = "Daily"
-
- // InventoryFrequencyWeekly is a InventoryFrequency enum value
- InventoryFrequencyWeekly = "Weekly"
-)
-
-// InventoryFrequency_Values returns all elements of the InventoryFrequency enum
-func InventoryFrequency_Values() []string {
- return []string{
- InventoryFrequencyDaily,
- InventoryFrequencyWeekly,
- }
-}
-
-const (
- // InventoryIncludedObjectVersionsAll is a InventoryIncludedObjectVersions enum value
- InventoryIncludedObjectVersionsAll = "All"
-
- // InventoryIncludedObjectVersionsCurrent is a InventoryIncludedObjectVersions enum value
- InventoryIncludedObjectVersionsCurrent = "Current"
-)
-
-// InventoryIncludedObjectVersions_Values returns all elements of the InventoryIncludedObjectVersions enum
-func InventoryIncludedObjectVersions_Values() []string {
- return []string{
- InventoryIncludedObjectVersionsAll,
- InventoryIncludedObjectVersionsCurrent,
- }
-}
-
-const (
- // InventoryOptionalFieldSize is a InventoryOptionalField enum value
- InventoryOptionalFieldSize = "Size"
-
- // InventoryOptionalFieldLastModifiedDate is a InventoryOptionalField enum value
- InventoryOptionalFieldLastModifiedDate = "LastModifiedDate"
-
- // InventoryOptionalFieldStorageClass is a InventoryOptionalField enum value
- InventoryOptionalFieldStorageClass = "StorageClass"
-
- // InventoryOptionalFieldEtag is a InventoryOptionalField enum value
- InventoryOptionalFieldEtag = "ETag"
-
- // InventoryOptionalFieldIsMultipartUploaded is a InventoryOptionalField enum value
- InventoryOptionalFieldIsMultipartUploaded = "IsMultipartUploaded"
-
- // InventoryOptionalFieldReplicationStatus is a InventoryOptionalField enum value
- InventoryOptionalFieldReplicationStatus = "ReplicationStatus"
-
- // InventoryOptionalFieldEncryptionStatus is a InventoryOptionalField enum value
- InventoryOptionalFieldEncryptionStatus = "EncryptionStatus"
-
- // InventoryOptionalFieldObjectLockRetainUntilDate is a InventoryOptionalField enum value
- InventoryOptionalFieldObjectLockRetainUntilDate = "ObjectLockRetainUntilDate"
-
- // InventoryOptionalFieldObjectLockMode is a InventoryOptionalField enum value
- InventoryOptionalFieldObjectLockMode = "ObjectLockMode"
-
- // InventoryOptionalFieldObjectLockLegalHoldStatus is a InventoryOptionalField enum value
- InventoryOptionalFieldObjectLockLegalHoldStatus = "ObjectLockLegalHoldStatus"
-
- // InventoryOptionalFieldIntelligentTieringAccessTier is a InventoryOptionalField enum value
- InventoryOptionalFieldIntelligentTieringAccessTier = "IntelligentTieringAccessTier"
-
- // InventoryOptionalFieldBucketKeyStatus is a InventoryOptionalField enum value
- InventoryOptionalFieldBucketKeyStatus = "BucketKeyStatus"
-)
-
-// InventoryOptionalField_Values returns all elements of the InventoryOptionalField enum
-func InventoryOptionalField_Values() []string {
- return []string{
- InventoryOptionalFieldSize,
- InventoryOptionalFieldLastModifiedDate,
- InventoryOptionalFieldStorageClass,
- InventoryOptionalFieldEtag,
- InventoryOptionalFieldIsMultipartUploaded,
- InventoryOptionalFieldReplicationStatus,
- InventoryOptionalFieldEncryptionStatus,
- InventoryOptionalFieldObjectLockRetainUntilDate,
- InventoryOptionalFieldObjectLockMode,
- InventoryOptionalFieldObjectLockLegalHoldStatus,
- InventoryOptionalFieldIntelligentTieringAccessTier,
- InventoryOptionalFieldBucketKeyStatus,
- }
-}
-
-const (
- // JSONTypeDocument is a JSONType enum value
- JSONTypeDocument = "DOCUMENT"
-
- // JSONTypeLines is a JSONType enum value
- JSONTypeLines = "LINES"
-)
-
-// JSONType_Values returns all elements of the JSONType enum
-func JSONType_Values() []string {
- return []string{
- JSONTypeDocument,
- JSONTypeLines,
- }
-}
-
-const (
- // MFADeleteEnabled is a MFADelete enum value
- MFADeleteEnabled = "Enabled"
-
- // MFADeleteDisabled is a MFADelete enum value
- MFADeleteDisabled = "Disabled"
-)
-
-// MFADelete_Values returns all elements of the MFADelete enum
-func MFADelete_Values() []string {
- return []string{
- MFADeleteEnabled,
- MFADeleteDisabled,
- }
-}
-
-const (
- // MFADeleteStatusEnabled is a MFADeleteStatus enum value
- MFADeleteStatusEnabled = "Enabled"
-
- // MFADeleteStatusDisabled is a MFADeleteStatus enum value
- MFADeleteStatusDisabled = "Disabled"
-)
-
-// MFADeleteStatus_Values returns all elements of the MFADeleteStatus enum
-func MFADeleteStatus_Values() []string {
- return []string{
- MFADeleteStatusEnabled,
- MFADeleteStatusDisabled,
- }
-}
-
-const (
- // MetadataDirectiveCopy is a MetadataDirective enum value
- MetadataDirectiveCopy = "COPY"
-
- // MetadataDirectiveReplace is a MetadataDirective enum value
- MetadataDirectiveReplace = "REPLACE"
-)
-
-// MetadataDirective_Values returns all elements of the MetadataDirective enum
-func MetadataDirective_Values() []string {
- return []string{
- MetadataDirectiveCopy,
- MetadataDirectiveReplace,
- }
-}
-
-const (
- // MetricsStatusEnabled is a MetricsStatus enum value
- MetricsStatusEnabled = "Enabled"
-
- // MetricsStatusDisabled is a MetricsStatus enum value
- MetricsStatusDisabled = "Disabled"
-)
-
-// MetricsStatus_Values returns all elements of the MetricsStatus enum
-func MetricsStatus_Values() []string {
- return []string{
- MetricsStatusEnabled,
- MetricsStatusDisabled,
- }
-}
-
-const (
- // ObjectCannedACLPrivate is a ObjectCannedACL enum value
- ObjectCannedACLPrivate = "private"
-
- // ObjectCannedACLPublicRead is a ObjectCannedACL enum value
- ObjectCannedACLPublicRead = "public-read"
-
- // ObjectCannedACLPublicReadWrite is a ObjectCannedACL enum value
- ObjectCannedACLPublicReadWrite = "public-read-write"
-
- // ObjectCannedACLAuthenticatedRead is a ObjectCannedACL enum value
- ObjectCannedACLAuthenticatedRead = "authenticated-read"
-
- // ObjectCannedACLAwsExecRead is a ObjectCannedACL enum value
- ObjectCannedACLAwsExecRead = "aws-exec-read"
-
- // ObjectCannedACLBucketOwnerRead is a ObjectCannedACL enum value
- ObjectCannedACLBucketOwnerRead = "bucket-owner-read"
-
- // ObjectCannedACLBucketOwnerFullControl is a ObjectCannedACL enum value
- ObjectCannedACLBucketOwnerFullControl = "bucket-owner-full-control"
-)
-
-// ObjectCannedACL_Values returns all elements of the ObjectCannedACL enum
-func ObjectCannedACL_Values() []string {
- return []string{
- ObjectCannedACLPrivate,
- ObjectCannedACLPublicRead,
- ObjectCannedACLPublicReadWrite,
- ObjectCannedACLAuthenticatedRead,
- ObjectCannedACLAwsExecRead,
- ObjectCannedACLBucketOwnerRead,
- ObjectCannedACLBucketOwnerFullControl,
- }
-}
-
-const (
- // ObjectLockEnabledEnabled is a ObjectLockEnabled enum value
- ObjectLockEnabledEnabled = "Enabled"
-)
-
-// ObjectLockEnabled_Values returns all elements of the ObjectLockEnabled enum
-func ObjectLockEnabled_Values() []string {
- return []string{
- ObjectLockEnabledEnabled,
- }
-}
-
-const (
- // ObjectLockLegalHoldStatusOn is a ObjectLockLegalHoldStatus enum value
- ObjectLockLegalHoldStatusOn = "ON"
-
- // ObjectLockLegalHoldStatusOff is a ObjectLockLegalHoldStatus enum value
- ObjectLockLegalHoldStatusOff = "OFF"
-)
-
-// ObjectLockLegalHoldStatus_Values returns all elements of the ObjectLockLegalHoldStatus enum
-func ObjectLockLegalHoldStatus_Values() []string {
- return []string{
- ObjectLockLegalHoldStatusOn,
- ObjectLockLegalHoldStatusOff,
- }
-}
-
-const (
- // ObjectLockModeGovernance is a ObjectLockMode enum value
- ObjectLockModeGovernance = "GOVERNANCE"
-
- // ObjectLockModeCompliance is a ObjectLockMode enum value
- ObjectLockModeCompliance = "COMPLIANCE"
-)
-
-// ObjectLockMode_Values returns all elements of the ObjectLockMode enum
-func ObjectLockMode_Values() []string {
- return []string{
- ObjectLockModeGovernance,
- ObjectLockModeCompliance,
- }
-}
-
-const (
- // ObjectLockRetentionModeGovernance is a ObjectLockRetentionMode enum value
- ObjectLockRetentionModeGovernance = "GOVERNANCE"
-
- // ObjectLockRetentionModeCompliance is a ObjectLockRetentionMode enum value
- ObjectLockRetentionModeCompliance = "COMPLIANCE"
-)
-
-// ObjectLockRetentionMode_Values returns all elements of the ObjectLockRetentionMode enum
-func ObjectLockRetentionMode_Values() []string {
- return []string{
- ObjectLockRetentionModeGovernance,
- ObjectLockRetentionModeCompliance,
- }
-}
-
-// The container element for object ownership for a bucket's ownership controls.
-//
-// BucketOwnerPreferred - Objects uploaded to the bucket change ownership to
-// the bucket owner if the objects are uploaded with the bucket-owner-full-control
-// canned ACL.
-//
-// ObjectWriter - The uploading account will own the object if the object is
-// uploaded with the bucket-owner-full-control canned ACL.
-const (
- // ObjectOwnershipBucketOwnerPreferred is a ObjectOwnership enum value
- ObjectOwnershipBucketOwnerPreferred = "BucketOwnerPreferred"
-
- // ObjectOwnershipObjectWriter is a ObjectOwnership enum value
- ObjectOwnershipObjectWriter = "ObjectWriter"
-)
-
-// ObjectOwnership_Values returns all elements of the ObjectOwnership enum
-func ObjectOwnership_Values() []string {
- return []string{
- ObjectOwnershipBucketOwnerPreferred,
- ObjectOwnershipObjectWriter,
- }
-}
-
-const (
- // ObjectStorageClassStandard is a ObjectStorageClass enum value
- ObjectStorageClassStandard = "STANDARD"
-
- // ObjectStorageClassReducedRedundancy is a ObjectStorageClass enum value
- ObjectStorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
-
- // ObjectStorageClassGlacier is a ObjectStorageClass enum value
- ObjectStorageClassGlacier = "GLACIER"
-
- // ObjectStorageClassStandardIa is a ObjectStorageClass enum value
- ObjectStorageClassStandardIa = "STANDARD_IA"
-
- // ObjectStorageClassOnezoneIa is a ObjectStorageClass enum value
- ObjectStorageClassOnezoneIa = "ONEZONE_IA"
-
- // ObjectStorageClassIntelligentTiering is a ObjectStorageClass enum value
- ObjectStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
-
- // ObjectStorageClassDeepArchive is a ObjectStorageClass enum value
- ObjectStorageClassDeepArchive = "DEEP_ARCHIVE"
-
- // ObjectStorageClassOutposts is a ObjectStorageClass enum value
- ObjectStorageClassOutposts = "OUTPOSTS"
-)
-
-// ObjectStorageClass_Values returns all elements of the ObjectStorageClass enum
-func ObjectStorageClass_Values() []string {
- return []string{
- ObjectStorageClassStandard,
- ObjectStorageClassReducedRedundancy,
- ObjectStorageClassGlacier,
- ObjectStorageClassStandardIa,
- ObjectStorageClassOnezoneIa,
- ObjectStorageClassIntelligentTiering,
- ObjectStorageClassDeepArchive,
- ObjectStorageClassOutposts,
- }
-}
-
-const (
- // ObjectVersionStorageClassStandard is a ObjectVersionStorageClass enum value
- ObjectVersionStorageClassStandard = "STANDARD"
-)
-
-// ObjectVersionStorageClass_Values returns all elements of the ObjectVersionStorageClass enum
-func ObjectVersionStorageClass_Values() []string {
- return []string{
- ObjectVersionStorageClassStandard,
- }
-}
-
-const (
- // OwnerOverrideDestination is a OwnerOverride enum value
- OwnerOverrideDestination = "Destination"
-)
-
-// OwnerOverride_Values returns all elements of the OwnerOverride enum
-func OwnerOverride_Values() []string {
- return []string{
- OwnerOverrideDestination,
- }
-}
-
-const (
- // PayerRequester is a Payer enum value
- PayerRequester = "Requester"
-
- // PayerBucketOwner is a Payer enum value
- PayerBucketOwner = "BucketOwner"
-)
-
-// Payer_Values returns all elements of the Payer enum
-func Payer_Values() []string {
- return []string{
- PayerRequester,
- PayerBucketOwner,
- }
-}
-
-const (
- // PermissionFullControl is a Permission enum value
- PermissionFullControl = "FULL_CONTROL"
-
- // PermissionWrite is a Permission enum value
- PermissionWrite = "WRITE"
-
- // PermissionWriteAcp is a Permission enum value
- PermissionWriteAcp = "WRITE_ACP"
-
- // PermissionRead is a Permission enum value
- PermissionRead = "READ"
-
- // PermissionReadAcp is a Permission enum value
- PermissionReadAcp = "READ_ACP"
-)
-
-// Permission_Values returns all elements of the Permission enum
-func Permission_Values() []string {
- return []string{
- PermissionFullControl,
- PermissionWrite,
- PermissionWriteAcp,
- PermissionRead,
- PermissionReadAcp,
- }
-}
-
-const (
- // ProtocolHttp is a Protocol enum value
- ProtocolHttp = "http"
-
- // ProtocolHttps is a Protocol enum value
- ProtocolHttps = "https"
-)
-
-// Protocol_Values returns all elements of the Protocol enum
-func Protocol_Values() []string {
- return []string{
- ProtocolHttp,
- ProtocolHttps,
- }
-}
-
-const (
- // QuoteFieldsAlways is a QuoteFields enum value
- QuoteFieldsAlways = "ALWAYS"
-
- // QuoteFieldsAsneeded is a QuoteFields enum value
- QuoteFieldsAsneeded = "ASNEEDED"
-)
-
-// QuoteFields_Values returns all elements of the QuoteFields enum
-func QuoteFields_Values() []string {
- return []string{
- QuoteFieldsAlways,
- QuoteFieldsAsneeded,
- }
-}
-
-const (
- // ReplicaModificationsStatusEnabled is a ReplicaModificationsStatus enum value
- ReplicaModificationsStatusEnabled = "Enabled"
-
- // ReplicaModificationsStatusDisabled is a ReplicaModificationsStatus enum value
- ReplicaModificationsStatusDisabled = "Disabled"
-)
-
-// ReplicaModificationsStatus_Values returns all elements of the ReplicaModificationsStatus enum
-func ReplicaModificationsStatus_Values() []string {
- return []string{
- ReplicaModificationsStatusEnabled,
- ReplicaModificationsStatusDisabled,
- }
-}
-
-const (
- // ReplicationRuleStatusEnabled is a ReplicationRuleStatus enum value
- ReplicationRuleStatusEnabled = "Enabled"
-
- // ReplicationRuleStatusDisabled is a ReplicationRuleStatus enum value
- ReplicationRuleStatusDisabled = "Disabled"
-)
-
-// ReplicationRuleStatus_Values returns all elements of the ReplicationRuleStatus enum
-func ReplicationRuleStatus_Values() []string {
- return []string{
- ReplicationRuleStatusEnabled,
- ReplicationRuleStatusDisabled,
- }
-}
-
-const (
- // ReplicationStatusComplete is a ReplicationStatus enum value
- ReplicationStatusComplete = "COMPLETE"
-
- // ReplicationStatusPending is a ReplicationStatus enum value
- ReplicationStatusPending = "PENDING"
-
- // ReplicationStatusFailed is a ReplicationStatus enum value
- ReplicationStatusFailed = "FAILED"
-
- // ReplicationStatusReplica is a ReplicationStatus enum value
- ReplicationStatusReplica = "REPLICA"
-)
-
-// ReplicationStatus_Values returns all elements of the ReplicationStatus enum
-func ReplicationStatus_Values() []string {
- return []string{
- ReplicationStatusComplete,
- ReplicationStatusPending,
- ReplicationStatusFailed,
- ReplicationStatusReplica,
- }
-}
-
-const (
- // ReplicationTimeStatusEnabled is a ReplicationTimeStatus enum value
- ReplicationTimeStatusEnabled = "Enabled"
-
- // ReplicationTimeStatusDisabled is a ReplicationTimeStatus enum value
- ReplicationTimeStatusDisabled = "Disabled"
-)
-
-// ReplicationTimeStatus_Values returns all elements of the ReplicationTimeStatus enum
-func ReplicationTimeStatus_Values() []string {
- return []string{
- ReplicationTimeStatusEnabled,
- ReplicationTimeStatusDisabled,
- }
-}
-
-// If present, indicates that the requester was successfully charged for the
-// request.
-const (
- // RequestChargedRequester is a RequestCharged enum value
- RequestChargedRequester = "requester"
-)
-
-// RequestCharged_Values returns all elements of the RequestCharged enum
-func RequestCharged_Values() []string {
- return []string{
- RequestChargedRequester,
- }
-}
-
-// Confirms that the requester knows that they will be charged for the request.
-// Bucket owners need not specify this parameter in their requests. For information
-// about downloading objects from requester pays buckets, see Downloading Objects
-// in Requestor Pays Buckets (https://docs.aws.amazon.com/AmazonS3/latest/dev/ObjectsinRequesterPaysBuckets.html)
-// in the Amazon S3 User Guide.
-const (
- // RequestPayerRequester is a RequestPayer enum value
- RequestPayerRequester = "requester"
-)
-
-// RequestPayer_Values returns all elements of the RequestPayer enum
-func RequestPayer_Values() []string {
- return []string{
- RequestPayerRequester,
- }
-}
-
-const (
- // RestoreRequestTypeSelect is a RestoreRequestType enum value
- RestoreRequestTypeSelect = "SELECT"
-)
-
-// RestoreRequestType_Values returns all elements of the RestoreRequestType enum
-func RestoreRequestType_Values() []string {
- return []string{
- RestoreRequestTypeSelect,
- }
-}
-
-const (
- // ServerSideEncryptionAes256 is a ServerSideEncryption enum value
- ServerSideEncryptionAes256 = "AES256"
-
- // ServerSideEncryptionAwsKms is a ServerSideEncryption enum value
- ServerSideEncryptionAwsKms = "aws:kms"
-)
-
-// ServerSideEncryption_Values returns all elements of the ServerSideEncryption enum
-func ServerSideEncryption_Values() []string {
- return []string{
- ServerSideEncryptionAes256,
- ServerSideEncryptionAwsKms,
- }
-}
-
-const (
- // SseKmsEncryptedObjectsStatusEnabled is a SseKmsEncryptedObjectsStatus enum value
- SseKmsEncryptedObjectsStatusEnabled = "Enabled"
-
- // SseKmsEncryptedObjectsStatusDisabled is a SseKmsEncryptedObjectsStatus enum value
- SseKmsEncryptedObjectsStatusDisabled = "Disabled"
-)
-
-// SseKmsEncryptedObjectsStatus_Values returns all elements of the SseKmsEncryptedObjectsStatus enum
-func SseKmsEncryptedObjectsStatus_Values() []string {
- return []string{
- SseKmsEncryptedObjectsStatusEnabled,
- SseKmsEncryptedObjectsStatusDisabled,
- }
-}
-
-const (
- // StorageClassStandard is a StorageClass enum value
- StorageClassStandard = "STANDARD"
-
- // StorageClassReducedRedundancy is a StorageClass enum value
- StorageClassReducedRedundancy = "REDUCED_REDUNDANCY"
-
- // StorageClassStandardIa is a StorageClass enum value
- StorageClassStandardIa = "STANDARD_IA"
-
- // StorageClassOnezoneIa is a StorageClass enum value
- StorageClassOnezoneIa = "ONEZONE_IA"
-
- // StorageClassIntelligentTiering is a StorageClass enum value
- StorageClassIntelligentTiering = "INTELLIGENT_TIERING"
-
- // StorageClassGlacier is a StorageClass enum value
- StorageClassGlacier = "GLACIER"
-
- // StorageClassDeepArchive is a StorageClass enum value
- StorageClassDeepArchive = "DEEP_ARCHIVE"
-
- // StorageClassOutposts is a StorageClass enum value
- StorageClassOutposts = "OUTPOSTS"
-)
-
-// StorageClass_Values returns all elements of the StorageClass enum
-func StorageClass_Values() []string {
- return []string{
- StorageClassStandard,
- StorageClassReducedRedundancy,
- StorageClassStandardIa,
- StorageClassOnezoneIa,
- StorageClassIntelligentTiering,
- StorageClassGlacier,
- StorageClassDeepArchive,
- StorageClassOutposts,
- }
-}
-
-const (
- // StorageClassAnalysisSchemaVersionV1 is a StorageClassAnalysisSchemaVersion enum value
- StorageClassAnalysisSchemaVersionV1 = "V_1"
-)
-
-// StorageClassAnalysisSchemaVersion_Values returns all elements of the StorageClassAnalysisSchemaVersion enum
-func StorageClassAnalysisSchemaVersion_Values() []string {
- return []string{
- StorageClassAnalysisSchemaVersionV1,
- }
-}
-
-const (
- // TaggingDirectiveCopy is a TaggingDirective enum value
- TaggingDirectiveCopy = "COPY"
-
- // TaggingDirectiveReplace is a TaggingDirective enum value
- TaggingDirectiveReplace = "REPLACE"
-)
-
-// TaggingDirective_Values returns all elements of the TaggingDirective enum
-func TaggingDirective_Values() []string {
- return []string{
- TaggingDirectiveCopy,
- TaggingDirectiveReplace,
- }
-}
-
-const (
- // TierStandard is a Tier enum value
- TierStandard = "Standard"
-
- // TierBulk is a Tier enum value
- TierBulk = "Bulk"
-
- // TierExpedited is a Tier enum value
- TierExpedited = "Expedited"
-)
-
-// Tier_Values returns all elements of the Tier enum
-func Tier_Values() []string {
- return []string{
- TierStandard,
- TierBulk,
- TierExpedited,
- }
-}
-
-const (
- // TransitionStorageClassGlacier is a TransitionStorageClass enum value
- TransitionStorageClassGlacier = "GLACIER"
-
- // TransitionStorageClassStandardIa is a TransitionStorageClass enum value
- TransitionStorageClassStandardIa = "STANDARD_IA"
-
- // TransitionStorageClassOnezoneIa is a TransitionStorageClass enum value
- TransitionStorageClassOnezoneIa = "ONEZONE_IA"
-
- // TransitionStorageClassIntelligentTiering is a TransitionStorageClass enum value
- TransitionStorageClassIntelligentTiering = "INTELLIGENT_TIERING"
-
- // TransitionStorageClassDeepArchive is a TransitionStorageClass enum value
- TransitionStorageClassDeepArchive = "DEEP_ARCHIVE"
-)
-
-// TransitionStorageClass_Values returns all elements of the TransitionStorageClass enum
-func TransitionStorageClass_Values() []string {
- return []string{
- TransitionStorageClassGlacier,
- TransitionStorageClassStandardIa,
- TransitionStorageClassOnezoneIa,
- TransitionStorageClassIntelligentTiering,
- TransitionStorageClassDeepArchive,
- }
-}
-
-const (
- // TypeCanonicalUser is a Type enum value
- TypeCanonicalUser = "CanonicalUser"
-
- // TypeAmazonCustomerByEmail is a Type enum value
- TypeAmazonCustomerByEmail = "AmazonCustomerByEmail"
-
- // TypeGroup is a Type enum value
- TypeGroup = "Group"
-)
-
-// Type_Values returns all elements of the Type enum
-func Type_Values() []string {
- return []string{
- TypeCanonicalUser,
- TypeAmazonCustomerByEmail,
- TypeGroup,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go b/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go
deleted file mode 100644
index 407f06b6e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/body_hash.go
+++ /dev/null
@@ -1,202 +0,0 @@
-package s3
-
-import (
- "bytes"
- "crypto/md5"
- "crypto/sha256"
- "encoding/base64"
- "encoding/hex"
- "fmt"
- "hash"
- "io"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const (
- contentMD5Header = "Content-Md5"
- contentSha256Header = "X-Amz-Content-Sha256"
- amzTeHeader = "X-Amz-Te"
- amzTxEncodingHeader = "X-Amz-Transfer-Encoding"
-
- appendMD5TxEncoding = "append-md5"
-)
-
-// computeBodyHashes will add Content MD5 and Content Sha256 hashes to the
-// request. If the body is not seekable or S3DisableContentMD5Validation set
-// this handler will be ignored.
-func computeBodyHashes(r *request.Request) {
- if aws.BoolValue(r.Config.S3DisableContentMD5Validation) {
- return
- }
- if r.IsPresigned() {
- return
- }
- if r.Error != nil || !aws.IsReaderSeekable(r.Body) {
- return
- }
-
- var md5Hash, sha256Hash hash.Hash
- hashers := make([]io.Writer, 0, 2)
-
- // Determine upfront which hashes can be set without overriding user
- // provide header data.
- if v := r.HTTPRequest.Header.Get(contentMD5Header); len(v) == 0 {
- md5Hash = md5.New()
- hashers = append(hashers, md5Hash)
- }
-
- if v := r.HTTPRequest.Header.Get(contentSha256Header); len(v) == 0 {
- sha256Hash = sha256.New()
- hashers = append(hashers, sha256Hash)
- }
-
- // Create the destination writer based on the hashes that are not already
- // provided by the user.
- var dst io.Writer
- switch len(hashers) {
- case 0:
- return
- case 1:
- dst = hashers[0]
- default:
- dst = io.MultiWriter(hashers...)
- }
-
- if _, err := aws.CopySeekableBody(dst, r.Body); err != nil {
- r.Error = awserr.New("BodyHashError", "failed to compute body hashes", err)
- return
- }
-
- // For the hashes created, set the associated headers that the user did not
- // already provide.
- if md5Hash != nil {
- sum := make([]byte, md5.Size)
- encoded := make([]byte, md5Base64EncLen)
-
- base64.StdEncoding.Encode(encoded, md5Hash.Sum(sum[0:0]))
- r.HTTPRequest.Header[contentMD5Header] = []string{string(encoded)}
- }
-
- if sha256Hash != nil {
- encoded := make([]byte, sha256HexEncLen)
- sum := make([]byte, sha256.Size)
-
- hex.Encode(encoded, sha256Hash.Sum(sum[0:0]))
- r.HTTPRequest.Header[contentSha256Header] = []string{string(encoded)}
- }
-}
-
-const (
- md5Base64EncLen = (md5.Size + 2) / 3 * 4 // base64.StdEncoding.EncodedLen
- sha256HexEncLen = sha256.Size * 2 // hex.EncodedLen
-)
-
-// Adds the x-amz-te: append_md5 header to the request. This requests the service
-// responds with a trailing MD5 checksum.
-//
-// Will not ask for append MD5 if disabled, the request is presigned or,
-// or the API operation does not support content MD5 validation.
-func askForTxEncodingAppendMD5(r *request.Request) {
- if aws.BoolValue(r.Config.S3DisableContentMD5Validation) {
- return
- }
- if r.IsPresigned() {
- return
- }
- r.HTTPRequest.Header.Set(amzTeHeader, appendMD5TxEncoding)
-}
-
-func useMD5ValidationReader(r *request.Request) {
- if r.Error != nil {
- return
- }
-
- if v := r.HTTPResponse.Header.Get(amzTxEncodingHeader); v != appendMD5TxEncoding {
- return
- }
-
- var bodyReader *io.ReadCloser
- var contentLen int64
- switch tv := r.Data.(type) {
- case *GetObjectOutput:
- bodyReader = &tv.Body
- contentLen = aws.Int64Value(tv.ContentLength)
- // Update ContentLength hiden the trailing MD5 checksum.
- tv.ContentLength = aws.Int64(contentLen - md5.Size)
- tv.ContentRange = aws.String(r.HTTPResponse.Header.Get("X-Amz-Content-Range"))
- default:
- r.Error = awserr.New("ChecksumValidationError",
- fmt.Sprintf("%s: %s header received on unsupported API, %s",
- amzTxEncodingHeader, appendMD5TxEncoding, r.Operation.Name,
- ), nil)
- return
- }
-
- if contentLen < md5.Size {
- r.Error = awserr.New("ChecksumValidationError",
- fmt.Sprintf("invalid Content-Length %d for %s %s",
- contentLen, appendMD5TxEncoding, amzTxEncodingHeader,
- ), nil)
- return
- }
-
- // Wrap and swap the response body reader with the validation reader.
- *bodyReader = newMD5ValidationReader(*bodyReader, contentLen-md5.Size)
-}
-
-type md5ValidationReader struct {
- rawReader io.ReadCloser
- payload io.Reader
- hash hash.Hash
-
- payloadLen int64
- read int64
-}
-
-func newMD5ValidationReader(reader io.ReadCloser, payloadLen int64) *md5ValidationReader {
- h := md5.New()
- return &md5ValidationReader{
- rawReader: reader,
- payload: io.TeeReader(&io.LimitedReader{R: reader, N: payloadLen}, h),
- hash: h,
- payloadLen: payloadLen,
- }
-}
-
-func (v *md5ValidationReader) Read(p []byte) (n int, err error) {
- n, err = v.payload.Read(p)
- if err != nil && err != io.EOF {
- return n, err
- }
-
- v.read += int64(n)
-
- if err == io.EOF {
- if v.read != v.payloadLen {
- return n, io.ErrUnexpectedEOF
- }
- expectSum := make([]byte, md5.Size)
- actualSum := make([]byte, md5.Size)
- if _, sumReadErr := io.ReadFull(v.rawReader, expectSum); sumReadErr != nil {
- return n, sumReadErr
- }
- actualSum = v.hash.Sum(actualSum[0:0])
- if !bytes.Equal(expectSum, actualSum) {
- return n, awserr.New("InvalidChecksum",
- fmt.Sprintf("expected MD5 checksum %s, got %s",
- hex.EncodeToString(expectSum),
- hex.EncodeToString(actualSum),
- ),
- nil)
- }
- }
-
- return n, err
-}
-
-func (v *md5ValidationReader) Close() error {
- return v.rawReader.Close()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go b/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
deleted file mode 100644
index 9ba8a7887..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/bucket_location.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package s3
-
-import (
- "io/ioutil"
- "regexp"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-var reBucketLocation = regexp.MustCompile(`>([^<>]+)<\/Location`)
-
-// NormalizeBucketLocation is a utility function which will update the
-// passed in value to always be a region ID. Generally this would be used
-// with GetBucketLocation API operation.
-//
-// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
-// for more information on the values that can be returned.
-func NormalizeBucketLocation(loc string) string {
- switch loc {
- case "":
- loc = "us-east-1"
- case "EU":
- loc = "eu-west-1"
- }
-
- return loc
-}
-
-// NormalizeBucketLocationHandler is a request handler which will update the
-// GetBucketLocation's result LocationConstraint value to always be a region ID.
-//
-// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
-// for more information on the values that can be returned.
-//
-// req, result := svc.GetBucketLocationRequest(&s3.GetBucketLocationInput{
-// Bucket: aws.String(bucket),
-// })
-// req.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
-// err := req.Send()
-var NormalizeBucketLocationHandler = request.NamedHandler{
- Name: "awssdk.s3.NormalizeBucketLocation",
- Fn: func(req *request.Request) {
- if req.Error != nil {
- return
- }
-
- out := req.Data.(*GetBucketLocationOutput)
- loc := NormalizeBucketLocation(aws.StringValue(out.LocationConstraint))
- out.LocationConstraint = aws.String(loc)
- },
-}
-
-// WithNormalizeBucketLocation is a request option which will update the
-// GetBucketLocation's result LocationConstraint value to always be a region ID.
-//
-// Replaces empty string with "us-east-1", and "EU" with "eu-west-1".
-//
-// See http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html
-// for more information on the values that can be returned.
-//
-// result, err := svc.GetBucketLocationWithContext(ctx,
-// &s3.GetBucketLocationInput{
-// Bucket: aws.String(bucket),
-// },
-// s3.WithNormalizeBucketLocation,
-// )
-func WithNormalizeBucketLocation(r *request.Request) {
- r.Handlers.Unmarshal.PushBackNamed(NormalizeBucketLocationHandler)
-}
-
-func buildGetBucketLocation(r *request.Request) {
- if r.DataFilled() {
- out := r.Data.(*GetBucketLocationOutput)
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization,
- "failed reading response body", err)
- return
- }
-
- match := reBucketLocation.FindSubmatch(b)
- if len(match) > 1 {
- loc := string(match[1])
- out.LocationConstraint = aws.String(loc)
- }
- }
-}
-
-func populateLocationConstraint(r *request.Request) {
- if r.ParamsFilled() && aws.StringValue(r.Config.Region) != "us-east-1" {
- in := r.Params.(*CreateBucketInput)
- if in.CreateBucketConfiguration == nil {
- r.Params = awsutil.CopyOf(r.Params)
- in = r.Params.(*CreateBucketInput)
- in.CreateBucketConfiguration = &CreateBucketConfiguration{
- LocationConstraint: r.Config.Region,
- }
- }
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
deleted file mode 100644
index ce87ab320..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/customizations.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package s3
-
-import (
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
- "github.com/aws/aws-sdk-go/internal/s3shared/s3err"
-)
-
-func init() {
- initClient = defaultInitClientFn
- initRequest = defaultInitRequestFn
-}
-
-func defaultInitClientFn(c *client.Client) {
- // Support building custom endpoints based on config
- c.Handlers.Build.PushFront(endpointHandler)
-
- // Require SSL when using SSE keys
- c.Handlers.Validate.PushBack(validateSSERequiresSSL)
- c.Handlers.Build.PushBack(computeSSEKeyMD5)
- c.Handlers.Build.PushBack(computeCopySourceSSEKeyMD5)
-
- // S3 uses custom error unmarshaling logic
- c.Handlers.UnmarshalError.Clear()
- c.Handlers.UnmarshalError.PushBack(unmarshalError)
- c.Handlers.UnmarshalError.PushBackNamed(s3err.RequestFailureWrapperHandler())
-}
-
-func defaultInitRequestFn(r *request.Request) {
- // Add request handlers for specific platforms.
- // e.g. 100-continue support for PUT requests using Go 1.6
- platformRequestHandlers(r)
-
- switch r.Operation.Name {
- case opGetBucketLocation:
- // GetBucketLocation has custom parsing logic
- r.Handlers.Unmarshal.PushFront(buildGetBucketLocation)
- case opCreateBucket:
- // Auto-populate LocationConstraint with current region
- r.Handlers.Validate.PushFront(populateLocationConstraint)
- case opCopyObject, opUploadPartCopy, opCompleteMultipartUpload:
- r.Handlers.Unmarshal.PushFront(copyMultipartStatusOKUnmarhsalError)
- r.Handlers.Unmarshal.PushBackNamed(s3err.RequestFailureWrapperHandler())
- case opPutObject, opUploadPart:
- r.Handlers.Build.PushBack(computeBodyHashes)
- // Disabled until #1837 root issue is resolved.
- // case opGetObject:
- // r.Handlers.Build.PushBack(askForTxEncodingAppendMD5)
- // r.Handlers.Unmarshal.PushBack(useMD5ValidationReader)
- case opWriteGetObjectResponse:
- r.Handlers.Build.PushFront(buildWriteGetObjectResponseEndpoint)
- }
-}
-
-// bucketGetter is an accessor interface to grab the "Bucket" field from
-// an S3 type.
-type bucketGetter interface {
- getBucket() string
-}
-
-// sseCustomerKeyGetter is an accessor interface to grab the "SSECustomerKey"
-// field from an S3 type.
-type sseCustomerKeyGetter interface {
- getSSECustomerKey() string
-}
-
-// copySourceSSECustomerKeyGetter is an accessor interface to grab the
-// "CopySourceSSECustomerKey" field from an S3 type.
-type copySourceSSECustomerKeyGetter interface {
- getCopySourceSSECustomerKey() string
-}
-
-// endpointARNGetter is an accessor interface to grab the
-// the field corresponding to an endpoint ARN input.
-type endpointARNGetter interface {
- getEndpointARN() (arn.Resource, error)
- hasEndpointARN() bool
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
deleted file mode 100644
index 0def02255..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package s3 provides the client and types for making API
-// requests to Amazon Simple Storage Service.
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01 for more information on this service.
-//
-// See s3 package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/
-//
-// Using the Client
-//
-// To contact Amazon Simple Storage Service with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the Amazon Simple Storage Service client S3 for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/#New
-package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go b/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
deleted file mode 100644
index 7f7aca208..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/doc_custom.go
+++ /dev/null
@@ -1,110 +0,0 @@
-// Upload Managers
-//
-// The s3manager package's Uploader provides concurrent upload of content to S3
-// by taking advantage of S3's Multipart APIs. The Uploader also supports both
-// io.Reader for streaming uploads, and will also take advantage of io.ReadSeeker
-// for optimizations if the Body satisfies that type. Once the Uploader instance
-// is created you can call Upload concurrently from multiple goroutines safely.
-//
-// // The session the S3 Uploader will use
-// sess := session.Must(session.NewSession())
-//
-// // Create an uploader with the session and default options
-// uploader := s3manager.NewUploader(sess)
-//
-// f, err := os.Open(filename)
-// if err != nil {
-// return fmt.Errorf("failed to open file %q, %v", filename, err)
-// }
-//
-// // Upload the file to S3.
-// result, err := uploader.Upload(&s3manager.UploadInput{
-// Bucket: aws.String(myBucket),
-// Key: aws.String(myString),
-// Body: f,
-// })
-// if err != nil {
-// return fmt.Errorf("failed to upload file, %v", err)
-// }
-// fmt.Printf("file uploaded to, %s\n", aws.StringValue(result.Location))
-//
-// See the s3manager package's Uploader type documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Uploader
-//
-// Download Manager
-//
-// The s3manager package's Downloader provides concurrently downloading of Objects
-// from S3. The Downloader will write S3 Object content with an io.WriterAt.
-// Once the Downloader instance is created you can call Download concurrently from
-// multiple goroutines safely.
-//
-// // The session the S3 Downloader will use
-// sess := session.Must(session.NewSession())
-//
-// // Create a downloader with the session and default options
-// downloader := s3manager.NewDownloader(sess)
-//
-// // Create a file to write the S3 Object contents to.
-// f, err := os.Create(filename)
-// if err != nil {
-// return fmt.Errorf("failed to create file %q, %v", filename, err)
-// }
-//
-// // Write the contents of S3 Object to the file
-// n, err := downloader.Download(f, &s3.GetObjectInput{
-// Bucket: aws.String(myBucket),
-// Key: aws.String(myString),
-// })
-// if err != nil {
-// return fmt.Errorf("failed to download file, %v", err)
-// }
-// fmt.Printf("file downloaded, %d bytes\n", n)
-//
-// See the s3manager package's Downloader type documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#Downloader
-//
-// Automatic URI cleaning
-//
-// Interacting with objects whose keys contain adjacent slashes (e.g. bucketname/foo//bar/objectname)
-// requires setting DisableRestProtocolURICleaning to true in the aws.Config struct
-// used by the service client.
-//
-// svc := s3.New(sess, &aws.Config{
-// DisableRestProtocolURICleaning: aws.Bool(true),
-// })
-// out, err := svc.GetObject(&s3.GetObjectInput {
-// Bucket: aws.String("bucketname"),
-// Key: aws.String("//foo//bar//moo"),
-// })
-//
-// Get Bucket Region
-//
-// GetBucketRegion will attempt to get the region for a bucket using a region
-// hint to determine which AWS partition to perform the query on. Use this utility
-// to determine the region a bucket is in.
-//
-// sess := session.Must(session.NewSession())
-//
-// bucket := "my-bucket"
-// region, err := s3manager.GetBucketRegion(ctx, sess, bucket, "us-west-2")
-// if err != nil {
-// if aerr, ok := err.(awserr.Error); ok && aerr.Code() == "NotFound" {
-// fmt.Fprintf(os.Stderr, "unable to find bucket %s's region not found\n", bucket)
-// }
-// return err
-// }
-// fmt.Printf("Bucket %s is in %s region\n", bucket, region)
-//
-// See the s3manager package's GetBucketRegion function documentation for more information
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3manager/#GetBucketRegion
-//
-// S3 Crypto Client
-//
-// The s3crypto package provides the tools to upload and download encrypted
-// content from S3. The Encryption and Decryption clients can be used concurrently
-// once the client is created.
-//
-// See the s3crypto package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/s3/s3crypto/
-//
-package s3
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go
deleted file mode 100644
index ba1a84d09..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint.go
+++ /dev/null
@@ -1,291 +0,0 @@
-package s3
-
-import (
- "fmt"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "net/url"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- awsarn "github.com/aws/aws-sdk-go/aws/arn"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/s3shared"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
-)
-
-const (
- s3Namespace = "s3"
- s3AccessPointNamespace = "s3-accesspoint"
- s3ObjectsLambdaNamespace = "s3-object-lambda"
- s3OutpostsNamespace = "s3-outposts"
-)
-
-// Used by shapes with members decorated as endpoint ARN.
-func parseEndpointARN(v string) (arn.Resource, error) {
- return arn.ParseResource(v, accessPointResourceParser)
-}
-
-func accessPointResourceParser(a awsarn.ARN) (arn.Resource, error) {
- resParts := arn.SplitResource(a.Resource)
- switch resParts[0] {
- case "accesspoint":
- switch a.Service {
- case s3Namespace:
- return arn.ParseAccessPointResource(a, resParts[1:])
- case s3ObjectsLambdaNamespace:
- return parseS3ObjectLambdaAccessPointResource(a, resParts)
- default:
- return arn.AccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s or %s", s3Namespace, s3ObjectsLambdaNamespace)}
- }
- case "outpost":
- if a.Service != "s3-outposts" {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3-outposts"}
- }
- return parseOutpostAccessPointResource(a, resParts[1:])
- default:
- return nil, arn.InvalidARNError{ARN: a, Reason: "unknown resource type"}
- }
-}
-
-// parseOutpostAccessPointResource attempts to parse the ARNs resource as an
-// outpost access-point resource.
-//
-// Supported Outpost AccessPoint ARN format:
-// - ARN format: arn:{partition}:s3-outposts:{region}:{accountId}:outpost/{outpostId}/accesspoint/{accesspointName}
-// - example: arn:aws:s3-outposts:us-west-2:012345678901:outpost/op-1234567890123456/accesspoint/myaccesspoint
-//
-func parseOutpostAccessPointResource(a awsarn.ARN, resParts []string) (arn.OutpostAccessPointARN, error) {
- // outpost accesspoint arn is only valid if service is s3-outposts
- if a.Service != "s3-outposts" {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "service is not s3-outposts"}
- }
-
- if len(resParts) == 0 {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "outpost resource-id not set"}
- }
-
- if len(resParts) < 3 {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{
- ARN: a, Reason: "access-point resource not set in Outpost ARN",
- }
- }
-
- resID := strings.TrimSpace(resParts[0])
- if len(resID) == 0 {
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "outpost resource-id not set"}
- }
-
- var outpostAccessPointARN = arn.OutpostAccessPointARN{}
- switch resParts[1] {
- case "accesspoint":
- accessPointARN, err := arn.ParseAccessPointResource(a, resParts[2:])
- if err != nil {
- return arn.OutpostAccessPointARN{}, err
- }
- // set access-point arn
- outpostAccessPointARN.AccessPointARN = accessPointARN
- default:
- return arn.OutpostAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: "access-point resource not set in Outpost ARN"}
- }
-
- // set outpost id
- outpostAccessPointARN.OutpostID = resID
- return outpostAccessPointARN, nil
-}
-
-func parseS3ObjectLambdaAccessPointResource(a awsarn.ARN, resParts []string) (arn.S3ObjectLambdaAccessPointARN, error) {
- if a.Service != s3ObjectsLambdaNamespace {
- return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("service is not %s", s3ObjectsLambdaNamespace)}
- }
-
- accessPointARN, err := arn.ParseAccessPointResource(a, resParts[1:])
- if err != nil {
- return arn.S3ObjectLambdaAccessPointARN{}, err
- }
-
- if len(accessPointARN.Region) == 0 {
- return arn.S3ObjectLambdaAccessPointARN{}, arn.InvalidARNError{ARN: a, Reason: fmt.Sprintf("%s region not set", s3ObjectsLambdaNamespace)}
- }
-
- return arn.S3ObjectLambdaAccessPointARN{
- AccessPointARN: accessPointARN,
- }, nil
-}
-
-func endpointHandler(req *request.Request) {
- endpoint, ok := req.Params.(endpointARNGetter)
- if !ok || !endpoint.hasEndpointARN() {
- updateBucketEndpointFromParams(req)
- return
- }
-
- resource, err := endpoint.getEndpointARN()
- if err != nil {
- req.Error = s3shared.NewInvalidARNError(nil, err)
- return
- }
-
- resReq := s3shared.ResourceRequest{
- Resource: resource,
- Request: req,
- }
-
- if len(resReq.Request.ClientInfo.PartitionID) != 0 && resReq.IsCrossPartition() {
- req.Error = s3shared.NewClientPartitionMismatchError(resource,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- return
- }
-
- if !resReq.AllowCrossRegion() && resReq.IsCrossRegion() {
- req.Error = s3shared.NewClientRegionMismatchError(resource,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- return
- }
-
- switch tv := resource.(type) {
- case arn.AccessPointARN:
- err = updateRequestAccessPointEndpoint(req, tv)
- if err != nil {
- req.Error = err
- }
- case arn.S3ObjectLambdaAccessPointARN:
- err = updateRequestS3ObjectLambdaAccessPointEndpoint(req, tv)
- if err != nil {
- req.Error = err
- }
- case arn.OutpostAccessPointARN:
- // outposts does not support FIPS regions
- if resReq.UseFIPS() {
- req.Error = s3shared.NewFIPSConfigurationError(resource, req.ClientInfo.PartitionID,
- aws.StringValue(req.Config.Region), nil)
- return
- }
-
- err = updateRequestOutpostAccessPointEndpoint(req, tv)
- if err != nil {
- req.Error = err
- }
- default:
- req.Error = s3shared.NewInvalidARNError(resource, nil)
- }
-}
-
-func updateBucketEndpointFromParams(r *request.Request) {
- bucket, ok := bucketNameFromReqParams(r.Params)
- if !ok {
- // Ignore operation requests if the bucket name was not provided
- // if this is an input validation error the validation handler
- // will report it.
- return
- }
- updateEndpointForS3Config(r, bucket)
-}
-
-func updateRequestAccessPointEndpoint(req *request.Request, accessPoint arn.AccessPointARN) error {
- // Accelerate not supported
- if aws.BoolValue(req.Config.S3UseAccelerate) {
- return s3shared.NewClientConfiguredForAccelerateError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Ignore the disable host prefix for access points
- req.Config.DisableEndpointHostPrefix = aws.Bool(false)
-
- if err := accessPointEndpointBuilder(accessPoint).build(req); err != nil {
- return err
- }
-
- removeBucketFromPath(req.HTTPRequest.URL)
-
- return nil
-}
-
-func updateRequestS3ObjectLambdaAccessPointEndpoint(req *request.Request, accessPoint arn.S3ObjectLambdaAccessPointARN) error {
- // DualStack not supported
- if aws.BoolValue(req.Config.UseDualStack) {
- return s3shared.NewClientConfiguredForDualStackError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Accelerate not supported
- if aws.BoolValue(req.Config.S3UseAccelerate) {
- return s3shared.NewClientConfiguredForAccelerateError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Ignore the disable host prefix for access points
- req.Config.DisableEndpointHostPrefix = aws.Bool(false)
-
- if err := s3ObjectLambdaAccessPointEndpointBuilder(accessPoint).build(req); err != nil {
- return err
- }
-
- removeBucketFromPath(req.HTTPRequest.URL)
-
- return nil
-}
-
-func updateRequestOutpostAccessPointEndpoint(req *request.Request, accessPoint arn.OutpostAccessPointARN) error {
- // Accelerate not supported
- if aws.BoolValue(req.Config.S3UseAccelerate) {
- return s3shared.NewClientConfiguredForAccelerateError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Dualstack not supported
- if aws.BoolValue(req.Config.UseDualStack) {
- return s3shared.NewClientConfiguredForDualStackError(accessPoint,
- req.ClientInfo.PartitionID, aws.StringValue(req.Config.Region), nil)
- }
-
- // Ignore the disable host prefix for access points
- req.Config.DisableEndpointHostPrefix = aws.Bool(false)
-
- if err := outpostAccessPointEndpointBuilder(accessPoint).build(req); err != nil {
- return err
- }
-
- removeBucketFromPath(req.HTTPRequest.URL)
- return nil
-}
-
-func removeBucketFromPath(u *url.URL) {
- u.Path = strings.Replace(u.Path, "/{Bucket}", "", -1)
- if u.Path == "" {
- u.Path = "/"
- }
-}
-
-func buildWriteGetObjectResponseEndpoint(req *request.Request) {
- // DualStack not supported
- if aws.BoolValue(req.Config.UseDualStack) {
- req.Error = awserr.New("ConfigurationError", "client configured for dualstack but not supported for operation", nil)
- return
- }
-
- // Accelerate not supported
- if aws.BoolValue(req.Config.S3UseAccelerate) {
- req.Error = awserr.New("ConfigurationError", "client configured for accelerate but not supported for operation", nil)
- return
- }
-
- signingName := s3ObjectsLambdaNamespace
- signingRegion := req.ClientInfo.SigningRegion
-
- if !hasCustomEndpoint(req) {
- endpoint, err := resolveRegionalEndpoint(req, aws.StringValue(req.Config.Region), EndpointsID)
- if err != nil {
- req.Error = awserr.New(request.ErrCodeSerialization, "failed to resolve endpoint", err)
- return
- }
- signingRegion = endpoint.SigningRegion
-
- if err = updateRequestEndpoint(req, endpoint.URL); err != nil {
- req.Error = err
- return
- }
- updateS3HostPrefixForS3ObjectLambda(req)
- }
-
- redirectSigner(req, signingName, signingRegion)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go b/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go
deleted file mode 100644
index 71e9c9eff..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/endpoint_builder.go
+++ /dev/null
@@ -1,261 +0,0 @@
-package s3
-
-import (
- "net/url"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/s3shared"
- "github.com/aws/aws-sdk-go/internal/s3shared/arn"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-const (
- accessPointPrefixLabel = "accesspoint"
- accountIDPrefixLabel = "accountID"
- accessPointPrefixTemplate = "{" + accessPointPrefixLabel + "}-{" + accountIDPrefixLabel + "}."
-
- outpostPrefixLabel = "outpost"
- outpostAccessPointPrefixTemplate = accessPointPrefixTemplate + "{" + outpostPrefixLabel + "}."
-)
-
-// hasCustomEndpoint returns true if endpoint is a custom endpoint
-func hasCustomEndpoint(r *request.Request) bool {
- return len(aws.StringValue(r.Config.Endpoint)) > 0
-}
-
-// accessPointEndpointBuilder represents the endpoint builder for access point arn
-type accessPointEndpointBuilder arn.AccessPointARN
-
-// build builds the endpoint for corresponding access point arn
-//
-// For building an endpoint from access point arn, format used is:
-// - Access point endpoint format : {accesspointName}-{accountId}.s3-accesspoint.{region}.{dnsSuffix}
-// - example : myaccesspoint-012345678901.s3-accesspoint.us-west-2.amazonaws.com
-//
-// Access Point Endpoint requests are signed using "s3" as signing name.
-//
-func (a accessPointEndpointBuilder) build(req *request.Request) error {
- resolveService := arn.AccessPointARN(a).Service
- resolveRegion := arn.AccessPointARN(a).Region
- cfgRegion := aws.StringValue(req.Config.Region)
-
- if s3shared.IsFIPS(cfgRegion) {
- if aws.BoolValue(req.Config.S3UseARNRegion) && s3shared.IsCrossRegion(req, resolveRegion) {
- // FIPS with cross region is not supported, the SDK must fail
- // because there is no well defined method for SDK to construct a
- // correct FIPS endpoint.
- return s3shared.NewClientConfiguredForCrossRegionFIPSError(arn.AccessPointARN(a),
- req.ClientInfo.PartitionID, cfgRegion, nil)
- }
- resolveRegion = cfgRegion
- }
-
- endpoint, err := resolveRegionalEndpoint(req, resolveRegion, resolveService)
- if err != nil {
- return s3shared.NewFailedToResolveEndpointError(arn.AccessPointARN(a),
- req.ClientInfo.PartitionID, cfgRegion, err)
- }
-
- endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL))
-
- if !hasCustomEndpoint(req) {
- if err = updateRequestEndpoint(req, endpoint.URL); err != nil {
- return err
- }
-
- // dual stack provided by endpoint resolver
- updateS3HostForS3AccessPoint(req)
- }
-
- protocol.HostPrefixBuilder{
- Prefix: accessPointPrefixTemplate,
- LabelsFn: a.hostPrefixLabelValues,
- }.Build(req)
-
- // signer redirection
- redirectSigner(req, endpoint.SigningName, endpoint.SigningRegion)
-
- err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host)
- if err != nil {
- return s3shared.NewInvalidARNError(arn.AccessPointARN(a), err)
- }
-
- return nil
-}
-
-func (a accessPointEndpointBuilder) hostPrefixLabelValues() map[string]string {
- return map[string]string{
- accessPointPrefixLabel: arn.AccessPointARN(a).AccessPointName,
- accountIDPrefixLabel: arn.AccessPointARN(a).AccountID,
- }
-}
-
-// s3ObjectLambdaAccessPointEndpointBuilder represents the endpoint builder for an s3 object lambda access point arn
-type s3ObjectLambdaAccessPointEndpointBuilder arn.S3ObjectLambdaAccessPointARN
-
-// build builds the endpoint for corresponding access point arn
-//
-// For building an endpoint from access point arn, format used is:
-// - Access point endpoint format : {accesspointName}-{accountId}.s3-object-lambda.{region}.{dnsSuffix}
-// - example : myaccesspoint-012345678901.s3-object-lambda.us-west-2.amazonaws.com
-//
-// Access Point Endpoint requests are signed using "s3-object-lambda" as signing name.
-//
-func (a s3ObjectLambdaAccessPointEndpointBuilder) build(req *request.Request) error {
- resolveRegion := arn.S3ObjectLambdaAccessPointARN(a).Region
- cfgRegion := aws.StringValue(req.Config.Region)
-
- if s3shared.IsFIPS(cfgRegion) {
- if aws.BoolValue(req.Config.S3UseARNRegion) && s3shared.IsCrossRegion(req, resolveRegion) {
- // FIPS with cross region is not supported, the SDK must fail
- // because there is no well defined method for SDK to construct a
- // correct FIPS endpoint.
- return s3shared.NewClientConfiguredForCrossRegionFIPSError(arn.S3ObjectLambdaAccessPointARN(a),
- req.ClientInfo.PartitionID, cfgRegion, nil)
- }
- resolveRegion = cfgRegion
- }
-
- endpoint, err := resolveRegionalEndpoint(req, resolveRegion, EndpointsID)
- if err != nil {
- return s3shared.NewFailedToResolveEndpointError(arn.S3ObjectLambdaAccessPointARN(a),
- req.ClientInfo.PartitionID, cfgRegion, err)
- }
-
- endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL))
-
- endpoint.SigningName = s3ObjectsLambdaNamespace
-
- if !hasCustomEndpoint(req) {
- if err = updateRequestEndpoint(req, endpoint.URL); err != nil {
- return err
- }
-
- updateS3HostPrefixForS3ObjectLambda(req)
- }
-
- protocol.HostPrefixBuilder{
- Prefix: accessPointPrefixTemplate,
- LabelsFn: a.hostPrefixLabelValues,
- }.Build(req)
-
- // signer redirection
- redirectSigner(req, endpoint.SigningName, endpoint.SigningRegion)
-
- err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host)
- if err != nil {
- return s3shared.NewInvalidARNError(arn.S3ObjectLambdaAccessPointARN(a), err)
- }
-
- return nil
-}
-
-func (a s3ObjectLambdaAccessPointEndpointBuilder) hostPrefixLabelValues() map[string]string {
- return map[string]string{
- accessPointPrefixLabel: arn.S3ObjectLambdaAccessPointARN(a).AccessPointName,
- accountIDPrefixLabel: arn.S3ObjectLambdaAccessPointARN(a).AccountID,
- }
-}
-
-// outpostAccessPointEndpointBuilder represents the Endpoint builder for outpost access point arn.
-type outpostAccessPointEndpointBuilder arn.OutpostAccessPointARN
-
-// build builds an endpoint corresponding to the outpost access point arn.
-//
-// For building an endpoint from outpost access point arn, format used is:
-// - Outpost access point endpoint format : {accesspointName}-{accountId}.{outpostId}.s3-outposts.{region}.{dnsSuffix}
-// - example : myaccesspoint-012345678901.op-01234567890123456.s3-outposts.us-west-2.amazonaws.com
-//
-// Outpost AccessPoint Endpoint request are signed using "s3-outposts" as signing name.
-//
-func (o outpostAccessPointEndpointBuilder) build(req *request.Request) error {
- resolveRegion := o.Region
- resolveService := o.Service
-
- endpointsID := resolveService
- if resolveService == s3OutpostsNamespace {
- endpointsID = "s3"
- }
-
- endpoint, err := resolveRegionalEndpoint(req, resolveRegion, endpointsID)
- if err != nil {
- return s3shared.NewFailedToResolveEndpointError(o,
- req.ClientInfo.PartitionID, resolveRegion, err)
- }
-
- endpoint.URL = endpoints.AddScheme(endpoint.URL, aws.BoolValue(req.Config.DisableSSL))
-
- if !hasCustomEndpoint(req) {
- if err = updateRequestEndpoint(req, endpoint.URL); err != nil {
- return err
- }
- updateHostPrefix(req, endpointsID, resolveService)
- }
-
- protocol.HostPrefixBuilder{
- Prefix: outpostAccessPointPrefixTemplate,
- LabelsFn: o.hostPrefixLabelValues,
- }.Build(req)
-
- // set the signing region, name to resolved names from ARN
- redirectSigner(req, resolveService, resolveRegion)
-
- err = protocol.ValidateEndpointHost(req.Operation.Name, req.HTTPRequest.URL.Host)
- if err != nil {
- return s3shared.NewInvalidARNError(o, err)
- }
-
- return nil
-}
-
-func (o outpostAccessPointEndpointBuilder) hostPrefixLabelValues() map[string]string {
- return map[string]string{
- accessPointPrefixLabel: o.AccessPointName,
- accountIDPrefixLabel: o.AccountID,
- outpostPrefixLabel: o.OutpostID,
- }
-}
-
-func resolveRegionalEndpoint(r *request.Request, region string, endpointsID string) (endpoints.ResolvedEndpoint, error) {
- return r.Config.EndpointResolver.EndpointFor(endpointsID, region, func(opts *endpoints.Options) {
- opts.DisableSSL = aws.BoolValue(r.Config.DisableSSL)
- opts.UseDualStack = aws.BoolValue(r.Config.UseDualStack)
- opts.S3UsEast1RegionalEndpoint = endpoints.RegionalS3UsEast1Endpoint
- })
-}
-
-func updateRequestEndpoint(r *request.Request, endpoint string) (err error) {
- r.HTTPRequest.URL, err = url.Parse(endpoint + r.Operation.HTTPPath)
- if err != nil {
- return awserr.New(request.ErrCodeSerialization,
- "failed to parse endpoint URL", err)
- }
-
- return nil
-}
-
-// redirectSigner sets signing name, signing region for a request
-func redirectSigner(req *request.Request, signingName string, signingRegion string) {
- req.ClientInfo.SigningName = signingName
- req.ClientInfo.SigningRegion = signingRegion
-}
-
-func updateS3HostForS3AccessPoint(req *request.Request) {
- updateHostPrefix(req, "s3", s3AccessPointNamespace)
-}
-
-func updateS3HostPrefixForS3ObjectLambda(req *request.Request) {
- updateHostPrefix(req, "s3", s3ObjectsLambdaNamespace)
-}
-
-func updateHostPrefix(req *request.Request, oldEndpointPrefix, newEndpointPrefix string) {
- host := req.HTTPRequest.URL.Host
- if strings.HasPrefix(host, oldEndpointPrefix) {
- // replace service hostlabel oldEndpointPrefix to newEndpointPrefix
- req.HTTPRequest.URL.Host = newEndpointPrefix + host[len(oldEndpointPrefix):]
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go b/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
deleted file mode 100644
index 6d3e726cf..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/errors.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3
-
-const (
-
- // ErrCodeBucketAlreadyExists for service response error code
- // "BucketAlreadyExists".
- //
- // The requested bucket name is not available. The bucket namespace is shared
- // by all users of the system. Select a different name and try again.
- ErrCodeBucketAlreadyExists = "BucketAlreadyExists"
-
- // ErrCodeBucketAlreadyOwnedByYou for service response error code
- // "BucketAlreadyOwnedByYou".
- //
- // The bucket you tried to create already exists, and you own it. Amazon S3
- // returns this error in all AWS Regions except in the North Virginia Region.
- // For legacy compatibility, if you re-create an existing bucket that you already
- // own in the North Virginia Region, Amazon S3 returns 200 OK and resets the
- // bucket access control lists (ACLs).
- ErrCodeBucketAlreadyOwnedByYou = "BucketAlreadyOwnedByYou"
-
- // ErrCodeInvalidObjectState for service response error code
- // "InvalidObjectState".
- //
- // Object is archived and inaccessible until restored.
- ErrCodeInvalidObjectState = "InvalidObjectState"
-
- // ErrCodeNoSuchBucket for service response error code
- // "NoSuchBucket".
- //
- // The specified bucket does not exist.
- ErrCodeNoSuchBucket = "NoSuchBucket"
-
- // ErrCodeNoSuchKey for service response error code
- // "NoSuchKey".
- //
- // The specified key does not exist.
- ErrCodeNoSuchKey = "NoSuchKey"
-
- // ErrCodeNoSuchUpload for service response error code
- // "NoSuchUpload".
- //
- // The specified multipart upload does not exist.
- ErrCodeNoSuchUpload = "NoSuchUpload"
-
- // ErrCodeObjectAlreadyInActiveTierError for service response error code
- // "ObjectAlreadyInActiveTierError".
- //
- // This action is not allowed against this storage tier.
- ErrCodeObjectAlreadyInActiveTierError = "ObjectAlreadyInActiveTierError"
-
- // ErrCodeObjectNotInActiveTierError for service response error code
- // "ObjectNotInActiveTierError".
- //
- // The source object of the COPY action is not in the active tier and is only
- // stored in Amazon S3 Glacier.
- ErrCodeObjectNotInActiveTierError = "ObjectNotInActiveTierError"
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go b/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
deleted file mode 100644
index 81cdec1ae..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/host_style_bucket.go
+++ /dev/null
@@ -1,136 +0,0 @@
-package s3
-
-import (
- "fmt"
- "net/url"
- "regexp"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// an operationBlacklist is a list of operation names that should a
-// request handler should not be executed with.
-type operationBlacklist []string
-
-// Continue will return true of the Request's operation name is not
-// in the blacklist. False otherwise.
-func (b operationBlacklist) Continue(r *request.Request) bool {
- for i := 0; i < len(b); i++ {
- if b[i] == r.Operation.Name {
- return false
- }
- }
- return true
-}
-
-var accelerateOpBlacklist = operationBlacklist{
- opListBuckets, opCreateBucket, opDeleteBucket,
-}
-
-// Automatically add the bucket name to the endpoint domain
-// if possible. This style of bucket is valid for all bucket names which are
-// DNS compatible and do not contain "."
-func updateEndpointForS3Config(r *request.Request, bucketName string) {
- forceHostStyle := aws.BoolValue(r.Config.S3ForcePathStyle)
- accelerate := aws.BoolValue(r.Config.S3UseAccelerate)
-
- if accelerate && accelerateOpBlacklist.Continue(r) {
- if forceHostStyle {
- if r.Config.Logger != nil {
- r.Config.Logger.Log("ERROR: aws.Config.S3UseAccelerate is not compatible with aws.Config.S3ForcePathStyle, ignoring S3ForcePathStyle.")
- }
- }
- updateEndpointForAccelerate(r, bucketName)
- } else if !forceHostStyle && r.Operation.Name != opGetBucketLocation {
- updateEndpointForHostStyle(r, bucketName)
- }
-}
-
-func updateEndpointForHostStyle(r *request.Request, bucketName string) {
- if !hostCompatibleBucketName(r.HTTPRequest.URL, bucketName) {
- // bucket name must be valid to put into the host
- return
- }
-
- moveBucketToHost(r.HTTPRequest.URL, bucketName)
-}
-
-var (
- accelElem = []byte("s3-accelerate.dualstack.")
-)
-
-func updateEndpointForAccelerate(r *request.Request, bucketName string) {
- if !hostCompatibleBucketName(r.HTTPRequest.URL, bucketName) {
- r.Error = awserr.New("InvalidParameterException",
- fmt.Sprintf("bucket name %s is not compatible with S3 Accelerate", bucketName),
- nil)
- return
- }
-
- parts := strings.Split(r.HTTPRequest.URL.Host, ".")
- if len(parts) < 3 {
- r.Error = awserr.New("InvalidParameterExecption",
- fmt.Sprintf("unable to update endpoint host for S3 accelerate, hostname invalid, %s",
- r.HTTPRequest.URL.Host), nil)
- return
- }
-
- if parts[0] == "s3" || strings.HasPrefix(parts[0], "s3-") {
- parts[0] = "s3-accelerate"
- }
- for i := 1; i+1 < len(parts); i++ {
- if parts[i] == aws.StringValue(r.Config.Region) {
- parts = append(parts[:i], parts[i+1:]...)
- break
- }
- }
-
- r.HTTPRequest.URL.Host = strings.Join(parts, ".")
-
- moveBucketToHost(r.HTTPRequest.URL, bucketName)
-}
-
-// Attempts to retrieve the bucket name from the request input parameters.
-// If no bucket is found, or the field is empty "", false will be returned.
-func bucketNameFromReqParams(params interface{}) (string, bool) {
- if iface, ok := params.(bucketGetter); ok {
- b := iface.getBucket()
- return b, len(b) > 0
- }
-
- return "", false
-}
-
-// hostCompatibleBucketName returns true if the request should
-// put the bucket in the host. This is false if S3ForcePathStyle is
-// explicitly set or if the bucket is not DNS compatible.
-func hostCompatibleBucketName(u *url.URL, bucket string) bool {
- // Bucket might be DNS compatible but dots in the hostname will fail
- // certificate validation, so do not use host-style.
- if u.Scheme == "https" && strings.Contains(bucket, ".") {
- return false
- }
-
- // if the bucket is DNS compatible
- return dnsCompatibleBucketName(bucket)
-}
-
-var reDomain = regexp.MustCompile(`^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$`)
-var reIPAddress = regexp.MustCompile(`^(\d+\.){3}\d+$`)
-
-// dnsCompatibleBucketName returns true if the bucket name is DNS compatible.
-// Buckets created outside of the classic region MUST be DNS compatible.
-func dnsCompatibleBucketName(bucket string) bool {
- return reDomain.MatchString(bucket) &&
- !reIPAddress.MatchString(bucket) &&
- !strings.Contains(bucket, "..")
-}
-
-// moveBucketToHost moves the bucket name from the URI path to URL host.
-func moveBucketToHost(u *url.URL, bucket string) {
- u.Host = bucket + "." + u.Host
- removeBucketFromPath(u)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go
deleted file mode 100644
index 8e6f3307d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// +build !go1.6
-
-package s3
-
-import "github.com/aws/aws-sdk-go/aws/request"
-
-func platformRequestHandlers(r *request.Request) {
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go b/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go
deleted file mode 100644
index 14d05f7b7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/platform_handlers_go1.6.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// +build go1.6
-
-package s3
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-func platformRequestHandlers(r *request.Request) {
- if r.Operation.HTTPMethod == "PUT" {
- // 100-Continue should only be used on put requests.
- r.Handlers.Sign.PushBack(add100Continue)
- }
-}
-
-func add100Continue(r *request.Request) {
- if aws.BoolValue(r.Config.S3Disable100Continue) {
- return
- }
- if r.HTTPRequest.ContentLength < 1024*1024*2 {
- // Ignore requests smaller than 2MB. This helps prevent delaying
- // requests unnecessarily.
- return
- }
-
- r.HTTPRequest.Header.Set("Expect", "100-Continue")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go b/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
deleted file mode 100644
index 1b78b5d45..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/service.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol/restxml"
-)
-
-// S3 provides the API operation methods for making requests to
-// Amazon Simple Storage Service. See this package's package overview docs
-// for details on the service.
-//
-// S3 methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type S3 struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "s3" // Name of service.
- EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "S3" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the S3 client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// mySession := session.Must(session.NewSession())
-//
-// // Create a S3 client from just a session.
-// svc := s3.New(mySession)
-//
-// // Create a S3 client with additional configuration
-// svc := s3.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *S3 {
- c := p.ClientConfig(EndpointsID, cfgs...)
- if c.SigningNameDerived || len(c.SigningName) == 0 {
- c.SigningName = "s3"
- }
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *S3 {
- svc := &S3{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2006-03-01",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.BuildNamedHandler(v4.SignRequestHandler.Name, func(s *v4.Signer) {
- s.DisableURIPathEscaping = true
- }))
- svc.Handlers.Build.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restxml.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restxml.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(restxml.UnmarshalErrorHandler)
-
- svc.Handlers.BuildStream.PushBackNamed(restxml.BuildHandler)
- svc.Handlers.UnmarshalStream.PushBackNamed(restxml.UnmarshalHandler)
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a S3 operation and runs any
-// custom request initialization.
-func (c *S3) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go b/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
deleted file mode 100644
index 57a0bd92c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/sse.go
+++ /dev/null
@@ -1,84 +0,0 @@
-package s3
-
-import (
- "crypto/md5"
- "encoding/base64"
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-var errSSERequiresSSL = awserr.New("ConfigError", "cannot send SSE keys over HTTP.", nil)
-
-func validateSSERequiresSSL(r *request.Request) {
- if r.HTTPRequest.URL.Scheme == "https" {
- return
- }
-
- if iface, ok := r.Params.(sseCustomerKeyGetter); ok {
- if len(iface.getSSECustomerKey()) > 0 {
- r.Error = errSSERequiresSSL
- return
- }
- }
-
- if iface, ok := r.Params.(copySourceSSECustomerKeyGetter); ok {
- if len(iface.getCopySourceSSECustomerKey()) > 0 {
- r.Error = errSSERequiresSSL
- return
- }
- }
-}
-
-const (
- sseKeyHeader = "x-amz-server-side-encryption-customer-key"
- sseKeyMD5Header = sseKeyHeader + "-md5"
-)
-
-func computeSSEKeyMD5(r *request.Request) {
- var key string
- if g, ok := r.Params.(sseCustomerKeyGetter); ok {
- key = g.getSSECustomerKey()
- }
-
- computeKeyMD5(sseKeyHeader, sseKeyMD5Header, key, r.HTTPRequest)
-}
-
-const (
- copySrcSSEKeyHeader = "x-amz-copy-source-server-side-encryption-customer-key"
- copySrcSSEKeyMD5Header = copySrcSSEKeyHeader + "-md5"
-)
-
-func computeCopySourceSSEKeyMD5(r *request.Request) {
- var key string
- if g, ok := r.Params.(copySourceSSECustomerKeyGetter); ok {
- key = g.getCopySourceSSECustomerKey()
- }
-
- computeKeyMD5(copySrcSSEKeyHeader, copySrcSSEKeyMD5Header, key, r.HTTPRequest)
-}
-
-func computeKeyMD5(keyHeader, keyMD5Header, key string, r *http.Request) {
- if len(key) == 0 {
- // Backwards compatiablity where user just set the header value instead
- // of using the API parameter, or setting the header value for an
- // operation without the parameters modeled.
- key = r.Header.Get(keyHeader)
- if len(key) == 0 {
- return
- }
-
- // In backwards compatible, the header's value is not base64 encoded,
- // and needs to be encoded and updated by the SDK's customizations.
- b64Key := base64.StdEncoding.EncodeToString([]byte(key))
- r.Header.Set(keyHeader, b64Key)
- }
-
- // Only update Key's MD5 if not already set.
- if len(r.Header.Get(keyMD5Header)) == 0 {
- sum := md5.Sum([]byte(key))
- keyMD5 := base64.StdEncoding.EncodeToString(sum[:])
- r.Header.Set(keyMD5Header, keyMD5)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go
deleted file mode 100644
index 247770e4c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/statusok_error.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package s3
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkio"
-)
-
-func copyMultipartStatusOKUnmarhsalError(r *request.Request) {
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization, "unable to read response body", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
- body := bytes.NewReader(b)
- r.HTTPResponse.Body = ioutil.NopCloser(body)
- defer body.Seek(0, sdkio.SeekStart)
-
- unmarshalError(r)
- if err, ok := r.Error.(awserr.Error); ok && err != nil {
- if err.Code() == request.ErrCodeSerialization &&
- err.OrigErr() != io.EOF {
- r.Error = nil
- return
- }
- // if empty payload
- if err.OrigErr() == io.EOF {
- r.HTTPResponse.StatusCode = http.StatusInternalServerError
- } else {
- r.HTTPResponse.StatusCode = http.StatusServiceUnavailable
- }
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
deleted file mode 100644
index 6eecf6691..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/unmarshal_error.go
+++ /dev/null
@@ -1,114 +0,0 @@
-package s3
-
-import (
- "bytes"
- "encoding/xml"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
-)
-
-type xmlErrorResponse struct {
- XMLName xml.Name `xml:"Error"`
- Code string `xml:"Code"`
- Message string `xml:"Message"`
-}
-
-func unmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- defer io.Copy(ioutil.Discard, r.HTTPResponse.Body)
-
- // Bucket exists in a different region, and request needs
- // to be made to the correct region.
- if r.HTTPResponse.StatusCode == http.StatusMovedPermanently {
- msg := fmt.Sprintf(
- "incorrect region, the bucket is not in '%s' region at endpoint '%s'",
- aws.StringValue(r.Config.Region),
- aws.StringValue(r.Config.Endpoint),
- )
- if v := r.HTTPResponse.Header.Get("x-amz-bucket-region"); len(v) != 0 {
- msg += fmt.Sprintf(", bucket is in '%s' region", v)
- }
- r.Error = awserr.NewRequestFailure(
- awserr.New("BucketRegionError", msg, nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- // Attempt to parse error from body if it is known
- var errResp xmlErrorResponse
- var err error
- if r.HTTPResponse.StatusCode >= 200 && r.HTTPResponse.StatusCode < 300 {
- err = s3unmarshalXMLError(&errResp, r.HTTPResponse.Body)
- } else {
- err = xmlutil.UnmarshalXMLError(&errResp, r.HTTPResponse.Body)
- }
-
- if err != nil {
- var errorMsg string
- if err == io.EOF {
- errorMsg = "empty response payload"
- } else {
- errorMsg = "failed to unmarshal error message"
- }
-
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- errorMsg, err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- // Fallback to status code converted to message if still no error code
- if len(errResp.Code) == 0 {
- statusText := http.StatusText(r.HTTPResponse.StatusCode)
- errResp.Code = strings.Replace(statusText, " ", "", -1)
- errResp.Message = statusText
- }
-
- r.Error = awserr.NewRequestFailure(
- awserr.New(errResp.Code, errResp.Message, err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
-}
-
-// A RequestFailure provides access to the S3 Request ID and Host ID values
-// returned from API operation errors. Getting the error as a string will
-// return the formated error with the same information as awserr.RequestFailure,
-// while also adding the HostID value from the response.
-type RequestFailure interface {
- awserr.RequestFailure
-
- // Host ID is the S3 Host ID needed for debug, and contacting support
- HostID() string
-}
-
-// s3unmarshalXMLError is s3 specific xml error unmarshaler
-// for 200 OK errors and response payloads.
-// This function differs from the xmlUtil.UnmarshalXMLError
-// func. It does not ignore the EOF error and passes it up.
-// Related to bug fix for `s3 200 OK response with empty payload`
-func s3unmarshalXMLError(v interface{}, stream io.Reader) error {
- var errBuf bytes.Buffer
- body := io.TeeReader(stream, &errBuf)
-
- err := xml.NewDecoder(body).Decode(v)
- if err != nil && err != io.EOF {
- return awserr.NewUnmarshalError(err,
- "failed to unmarshal error message", errBuf.Bytes())
- }
-
- return err
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
deleted file mode 100644
index 2596c694b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/s3/waiters.go
+++ /dev/null
@@ -1,214 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package s3
-
-import (
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// WaitUntilBucketExists uses the Amazon S3 API operation
-// HeadBucket to wait for a condition to be met before returning.
-// If the condition is not met within the max attempt window, an error will
-// be returned.
-func (c *S3) WaitUntilBucketExists(input *HeadBucketInput) error {
- return c.WaitUntilBucketExistsWithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntilBucketExistsWithContext is an extended version of WaitUntilBucketExists.
-// With the support for passing in a context and options to configure the
-// Waiter and the underlying request options.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) WaitUntilBucketExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntilBucketExists",
- MaxAttempts: 20,
- Delay: request.ConstantWaiterDelay(5 * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 200,
- },
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 301,
- },
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 403,
- },
- {
- State: request.RetryWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 404,
- },
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy *HeadBucketInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.HeadBucketRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- w.ApplyOptions(opts...)
-
- return w.WaitWithContext(ctx)
-}
-
-// WaitUntilBucketNotExists uses the Amazon S3 API operation
-// HeadBucket to wait for a condition to be met before returning.
-// If the condition is not met within the max attempt window, an error will
-// be returned.
-func (c *S3) WaitUntilBucketNotExists(input *HeadBucketInput) error {
- return c.WaitUntilBucketNotExistsWithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntilBucketNotExistsWithContext is an extended version of WaitUntilBucketNotExists.
-// With the support for passing in a context and options to configure the
-// Waiter and the underlying request options.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) WaitUntilBucketNotExistsWithContext(ctx aws.Context, input *HeadBucketInput, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntilBucketNotExists",
- MaxAttempts: 20,
- Delay: request.ConstantWaiterDelay(5 * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 404,
- },
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy *HeadBucketInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.HeadBucketRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- w.ApplyOptions(opts...)
-
- return w.WaitWithContext(ctx)
-}
-
-// WaitUntilObjectExists uses the Amazon S3 API operation
-// HeadObject to wait for a condition to be met before returning.
-// If the condition is not met within the max attempt window, an error will
-// be returned.
-func (c *S3) WaitUntilObjectExists(input *HeadObjectInput) error {
- return c.WaitUntilObjectExistsWithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntilObjectExistsWithContext is an extended version of WaitUntilObjectExists.
-// With the support for passing in a context and options to configure the
-// Waiter and the underlying request options.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) WaitUntilObjectExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntilObjectExists",
- MaxAttempts: 20,
- Delay: request.ConstantWaiterDelay(5 * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 200,
- },
- {
- State: request.RetryWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 404,
- },
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy *HeadObjectInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.HeadObjectRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- w.ApplyOptions(opts...)
-
- return w.WaitWithContext(ctx)
-}
-
-// WaitUntilObjectNotExists uses the Amazon S3 API operation
-// HeadObject to wait for a condition to be met before returning.
-// If the condition is not met within the max attempt window, an error will
-// be returned.
-func (c *S3) WaitUntilObjectNotExists(input *HeadObjectInput) error {
- return c.WaitUntilObjectNotExistsWithContext(aws.BackgroundContext(), input)
-}
-
-// WaitUntilObjectNotExistsWithContext is an extended version of WaitUntilObjectNotExists.
-// With the support for passing in a context and options to configure the
-// Waiter and the underlying request options.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *S3) WaitUntilObjectNotExistsWithContext(ctx aws.Context, input *HeadObjectInput, opts ...request.WaiterOption) error {
- w := request.Waiter{
- Name: "WaitUntilObjectNotExists",
- MaxAttempts: 20,
- Delay: request.ConstantWaiterDelay(5 * time.Second),
- Acceptors: []request.WaiterAcceptor{
- {
- State: request.SuccessWaiterState,
- Matcher: request.StatusWaiterMatch,
- Expected: 404,
- },
- },
- Logger: c.Config.Logger,
- NewRequest: func(opts []request.Option) (*request.Request, error) {
- var inCpy *HeadObjectInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.HeadObjectRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
- w.ApplyOptions(opts...)
-
- return w.WaitWithContext(ctx)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/wafv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/wafv2/api.go
deleted file mode 100644
index b068149d6..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/wafv2/api.go
+++ /dev/null
@@ -1,17265 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package wafv2
-
-import (
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-const opAssociateWebACL = "AssociateWebACL"
-
-// AssociateWebACLRequest generates a "aws/request.Request" representing the
-// client's request for the AssociateWebACL operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See AssociateWebACL for more information on using the AssociateWebACL
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the AssociateWebACLRequest method.
-// req, resp := client.AssociateWebACLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/AssociateWebACL
-func (c *WAFV2) AssociateWebACLRequest(input *AssociateWebACLInput) (req *request.Request, output *AssociateWebACLOutput) {
- op := &request.Operation{
- Name: opAssociateWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssociateWebACLInput{}
- }
-
- output = &AssociateWebACLOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// AssociateWebACL API operation for AWS WAFV2.
-//
-// Associates a web ACL with a regional application resource, to protect the
-// resource. A regional application can be an Application Load Balancer (ALB),
-// an Amazon API Gateway REST API, or an AppSync GraphQL API.
-//
-// For Amazon CloudFront, don't use this call. Instead, use your CloudFront
-// distribution configuration. To associate a web ACL, in the CloudFront call
-// UpdateDistribution, set the web ACL ID to the Amazon Resource Name (ARN)
-// of the web ACL. For information, see UpdateDistribution (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation AssociateWebACL for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFUnavailableEntityException
-// WAF couldn’t retrieve the resource that you requested. Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/AssociateWebACL
-func (c *WAFV2) AssociateWebACL(input *AssociateWebACLInput) (*AssociateWebACLOutput, error) {
- req, out := c.AssociateWebACLRequest(input)
- return out, req.Send()
-}
-
-// AssociateWebACLWithContext is the same as AssociateWebACL with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AssociateWebACL for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) AssociateWebACLWithContext(ctx aws.Context, input *AssociateWebACLInput, opts ...request.Option) (*AssociateWebACLOutput, error) {
- req, out := c.AssociateWebACLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCheckCapacity = "CheckCapacity"
-
-// CheckCapacityRequest generates a "aws/request.Request" representing the
-// client's request for the CheckCapacity operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CheckCapacity for more information on using the CheckCapacity
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CheckCapacityRequest method.
-// req, resp := client.CheckCapacityRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CheckCapacity
-func (c *WAFV2) CheckCapacityRequest(input *CheckCapacityInput) (req *request.Request, output *CheckCapacityOutput) {
- op := &request.Operation{
- Name: opCheckCapacity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CheckCapacityInput{}
- }
-
- output = &CheckCapacityOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CheckCapacity API operation for AWS WAFV2.
-//
-// Returns the web ACL capacity unit (WCU) requirements for a specified scope
-// and set of rules. You can use this to check the capacity requirements for
-// the rules you want to use in a RuleGroup or WebACL.
-//
-// WAF uses WCUs to calculate and control the operating resources that are used
-// to run your rules, rule groups, and web ACLs. WAF calculates capacity differently
-// for each rule type, to reflect the relative cost of each rule. Simple rules
-// that cost little to run use fewer WCUs than more complex rules that use more
-// processing power. Rule group capacity is fixed at creation, which helps users
-// plan their web ACL WCU usage when they use a rule group. The WCU limit for
-// web ACLs is 1,500.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation CheckCapacity for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFInvalidResourceException
-// WAF couldn’t perform the operation because the resource that you requested
-// isn’t valid. Check the resource, and try again.
-//
-// * WAFUnavailableEntityException
-// WAF couldn’t retrieve the resource that you requested. Retry your request.
-//
-// * WAFSubscriptionNotFoundException
-// You tried to use a managed rule group that's available by subscription, but
-// you aren't subscribed to it yet.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CheckCapacity
-func (c *WAFV2) CheckCapacity(input *CheckCapacityInput) (*CheckCapacityOutput, error) {
- req, out := c.CheckCapacityRequest(input)
- return out, req.Send()
-}
-
-// CheckCapacityWithContext is the same as CheckCapacity with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CheckCapacity for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) CheckCapacityWithContext(ctx aws.Context, input *CheckCapacityInput, opts ...request.Option) (*CheckCapacityOutput, error) {
- req, out := c.CheckCapacityRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateIPSet = "CreateIPSet"
-
-// CreateIPSetRequest generates a "aws/request.Request" representing the
-// client's request for the CreateIPSet operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateIPSet for more information on using the CreateIPSet
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateIPSetRequest method.
-// req, resp := client.CreateIPSetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateIPSet
-func (c *WAFV2) CreateIPSetRequest(input *CreateIPSetInput) (req *request.Request, output *CreateIPSetOutput) {
- op := &request.Operation{
- Name: opCreateIPSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateIPSetInput{}
- }
-
- output = &CreateIPSetOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateIPSet API operation for AWS WAFV2.
-//
-// Creates an IPSet, which you use to identify web requests that originate from
-// specific IP addresses or ranges of IP addresses. For example, if you're receiving
-// a lot of requests from a ranges of IP addresses, you can configure WAF to
-// block them using an IPSet that lists those IP addresses.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation CreateIPSet for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFDuplicateItemException
-// WAF couldn’t perform the operation because the resource that you tried
-// to save is a duplicate of an existing one.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateIPSet
-func (c *WAFV2) CreateIPSet(input *CreateIPSetInput) (*CreateIPSetOutput, error) {
- req, out := c.CreateIPSetRequest(input)
- return out, req.Send()
-}
-
-// CreateIPSetWithContext is the same as CreateIPSet with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateIPSet for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) CreateIPSetWithContext(ctx aws.Context, input *CreateIPSetInput, opts ...request.Option) (*CreateIPSetOutput, error) {
- req, out := c.CreateIPSetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateRegexPatternSet = "CreateRegexPatternSet"
-
-// CreateRegexPatternSetRequest generates a "aws/request.Request" representing the
-// client's request for the CreateRegexPatternSet operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateRegexPatternSet for more information on using the CreateRegexPatternSet
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateRegexPatternSetRequest method.
-// req, resp := client.CreateRegexPatternSetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRegexPatternSet
-func (c *WAFV2) CreateRegexPatternSetRequest(input *CreateRegexPatternSetInput) (req *request.Request, output *CreateRegexPatternSetOutput) {
- op := &request.Operation{
- Name: opCreateRegexPatternSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateRegexPatternSetInput{}
- }
-
- output = &CreateRegexPatternSetOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateRegexPatternSet API operation for AWS WAFV2.
-//
-// Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement,
-// to have WAF inspect a web request component for the specified patterns.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation CreateRegexPatternSet for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFDuplicateItemException
-// WAF couldn’t perform the operation because the resource that you tried
-// to save is a duplicate of an existing one.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRegexPatternSet
-func (c *WAFV2) CreateRegexPatternSet(input *CreateRegexPatternSetInput) (*CreateRegexPatternSetOutput, error) {
- req, out := c.CreateRegexPatternSetRequest(input)
- return out, req.Send()
-}
-
-// CreateRegexPatternSetWithContext is the same as CreateRegexPatternSet with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateRegexPatternSet for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) CreateRegexPatternSetWithContext(ctx aws.Context, input *CreateRegexPatternSetInput, opts ...request.Option) (*CreateRegexPatternSetOutput, error) {
- req, out := c.CreateRegexPatternSetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateRuleGroup = "CreateRuleGroup"
-
-// CreateRuleGroupRequest generates a "aws/request.Request" representing the
-// client's request for the CreateRuleGroup operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateRuleGroup for more information on using the CreateRuleGroup
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateRuleGroupRequest method.
-// req, resp := client.CreateRuleGroupRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup
-func (c *WAFV2) CreateRuleGroupRequest(input *CreateRuleGroupInput) (req *request.Request, output *CreateRuleGroupOutput) {
- op := &request.Operation{
- Name: opCreateRuleGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateRuleGroupInput{}
- }
-
- output = &CreateRuleGroupOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateRuleGroup API operation for AWS WAFV2.
-//
-// Creates a RuleGroup per the specifications provided.
-//
-// A rule group defines a collection of rules to inspect and control web requests
-// that you can use in a WebACL. When you create a rule group, you define an
-// immutable capacity limit. If you update a rule group, you must stay within
-// the capacity. This allows others to reuse the rule group with confidence
-// in its capacity requirements.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation CreateRuleGroup for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFDuplicateItemException
-// WAF couldn’t perform the operation because the resource that you tried
-// to save is a duplicate of an existing one.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFUnavailableEntityException
-// WAF couldn’t retrieve the resource that you requested. Retry your request.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFSubscriptionNotFoundException
-// You tried to use a managed rule group that's available by subscription, but
-// you aren't subscribed to it yet.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateRuleGroup
-func (c *WAFV2) CreateRuleGroup(input *CreateRuleGroupInput) (*CreateRuleGroupOutput, error) {
- req, out := c.CreateRuleGroupRequest(input)
- return out, req.Send()
-}
-
-// CreateRuleGroupWithContext is the same as CreateRuleGroup with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateRuleGroup for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) CreateRuleGroupWithContext(ctx aws.Context, input *CreateRuleGroupInput, opts ...request.Option) (*CreateRuleGroupOutput, error) {
- req, out := c.CreateRuleGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateWebACL = "CreateWebACL"
-
-// CreateWebACLRequest generates a "aws/request.Request" representing the
-// client's request for the CreateWebACL operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateWebACL for more information on using the CreateWebACL
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateWebACLRequest method.
-// req, resp := client.CreateWebACLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL
-func (c *WAFV2) CreateWebACLRequest(input *CreateWebACLInput) (req *request.Request, output *CreateWebACLOutput) {
- op := &request.Operation{
- Name: opCreateWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateWebACLInput{}
- }
-
- output = &CreateWebACLOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateWebACL API operation for AWS WAFV2.
-//
-// Creates a WebACL per the specifications provided.
-//
-// A web ACL defines a collection of rules to use to inspect and control web
-// requests. Each rule has an action defined (allow, block, or count) for requests
-// that match the statement of the rule. In the web ACL, you assign a default
-// action to take (allow, block) for any request that does not match any of
-// the rules. The rules in a web ACL can be a combination of the types Rule,
-// RuleGroup, and managed rule group. You can associate a web ACL with one or
-// more Amazon Web Services resources to protect. The resources can be an Amazon
-// CloudFront distribution, an Amazon API Gateway REST API, an Application Load
-// Balancer, or an AppSync GraphQL API.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation CreateWebACL for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFDuplicateItemException
-// WAF couldn’t perform the operation because the resource that you tried
-// to save is a duplicate of an existing one.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFInvalidResourceException
-// WAF couldn’t perform the operation because the resource that you requested
-// isn’t valid. Check the resource, and try again.
-//
-// * WAFUnavailableEntityException
-// WAF couldn’t retrieve the resource that you requested. Retry your request.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFSubscriptionNotFoundException
-// You tried to use a managed rule group that's available by subscription, but
-// you aren't subscribed to it yet.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/CreateWebACL
-func (c *WAFV2) CreateWebACL(input *CreateWebACLInput) (*CreateWebACLOutput, error) {
- req, out := c.CreateWebACLRequest(input)
- return out, req.Send()
-}
-
-// CreateWebACLWithContext is the same as CreateWebACL with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateWebACL for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) CreateWebACLWithContext(ctx aws.Context, input *CreateWebACLInput, opts ...request.Option) (*CreateWebACLOutput, error) {
- req, out := c.CreateWebACLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteFirewallManagerRuleGroups = "DeleteFirewallManagerRuleGroups"
-
-// DeleteFirewallManagerRuleGroupsRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteFirewallManagerRuleGroups operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteFirewallManagerRuleGroups for more information on using the DeleteFirewallManagerRuleGroups
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteFirewallManagerRuleGroupsRequest method.
-// req, resp := client.DeleteFirewallManagerRuleGroupsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteFirewallManagerRuleGroups
-func (c *WAFV2) DeleteFirewallManagerRuleGroupsRequest(input *DeleteFirewallManagerRuleGroupsInput) (req *request.Request, output *DeleteFirewallManagerRuleGroupsOutput) {
- op := &request.Operation{
- Name: opDeleteFirewallManagerRuleGroups,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteFirewallManagerRuleGroupsInput{}
- }
-
- output = &DeleteFirewallManagerRuleGroupsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DeleteFirewallManagerRuleGroups API operation for AWS WAFV2.
-//
-// Deletes all rule groups that are managed by Firewall Manager for the specified
-// web ACL.
-//
-// You can only use this if ManagedByFirewallManager is false in the specified
-// WebACL.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DeleteFirewallManagerRuleGroups for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteFirewallManagerRuleGroups
-func (c *WAFV2) DeleteFirewallManagerRuleGroups(input *DeleteFirewallManagerRuleGroupsInput) (*DeleteFirewallManagerRuleGroupsOutput, error) {
- req, out := c.DeleteFirewallManagerRuleGroupsRequest(input)
- return out, req.Send()
-}
-
-// DeleteFirewallManagerRuleGroupsWithContext is the same as DeleteFirewallManagerRuleGroups with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteFirewallManagerRuleGroups for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DeleteFirewallManagerRuleGroupsWithContext(ctx aws.Context, input *DeleteFirewallManagerRuleGroupsInput, opts ...request.Option) (*DeleteFirewallManagerRuleGroupsOutput, error) {
- req, out := c.DeleteFirewallManagerRuleGroupsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteIPSet = "DeleteIPSet"
-
-// DeleteIPSetRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteIPSet operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteIPSet for more information on using the DeleteIPSet
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteIPSetRequest method.
-// req, resp := client.DeleteIPSetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteIPSet
-func (c *WAFV2) DeleteIPSetRequest(input *DeleteIPSetInput) (req *request.Request, output *DeleteIPSetOutput) {
- op := &request.Operation{
- Name: opDeleteIPSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteIPSetInput{}
- }
-
- output = &DeleteIPSetOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteIPSet API operation for AWS WAFV2.
-//
-// Deletes the specified IPSet.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DeleteIPSet for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFAssociatedItemException
-// WAF couldn’t perform the operation because your resource is being used
-// by another resource or it’s associated with another resource.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteIPSet
-func (c *WAFV2) DeleteIPSet(input *DeleteIPSetInput) (*DeleteIPSetOutput, error) {
- req, out := c.DeleteIPSetRequest(input)
- return out, req.Send()
-}
-
-// DeleteIPSetWithContext is the same as DeleteIPSet with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteIPSet for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DeleteIPSetWithContext(ctx aws.Context, input *DeleteIPSetInput, opts ...request.Option) (*DeleteIPSetOutput, error) {
- req, out := c.DeleteIPSetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteLoggingConfiguration = "DeleteLoggingConfiguration"
-
-// DeleteLoggingConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteLoggingConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteLoggingConfiguration for more information on using the DeleteLoggingConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteLoggingConfigurationRequest method.
-// req, resp := client.DeleteLoggingConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteLoggingConfiguration
-func (c *WAFV2) DeleteLoggingConfigurationRequest(input *DeleteLoggingConfigurationInput) (req *request.Request, output *DeleteLoggingConfigurationOutput) {
- op := &request.Operation{
- Name: opDeleteLoggingConfiguration,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteLoggingConfigurationInput{}
- }
-
- output = &DeleteLoggingConfigurationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteLoggingConfiguration API operation for AWS WAFV2.
-//
-// Deletes the LoggingConfiguration from the specified web ACL.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DeleteLoggingConfiguration for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteLoggingConfiguration
-func (c *WAFV2) DeleteLoggingConfiguration(input *DeleteLoggingConfigurationInput) (*DeleteLoggingConfigurationOutput, error) {
- req, out := c.DeleteLoggingConfigurationRequest(input)
- return out, req.Send()
-}
-
-// DeleteLoggingConfigurationWithContext is the same as DeleteLoggingConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteLoggingConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DeleteLoggingConfigurationWithContext(ctx aws.Context, input *DeleteLoggingConfigurationInput, opts ...request.Option) (*DeleteLoggingConfigurationOutput, error) {
- req, out := c.DeleteLoggingConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeletePermissionPolicy = "DeletePermissionPolicy"
-
-// DeletePermissionPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the DeletePermissionPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeletePermissionPolicy for more information on using the DeletePermissionPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeletePermissionPolicyRequest method.
-// req, resp := client.DeletePermissionPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeletePermissionPolicy
-func (c *WAFV2) DeletePermissionPolicyRequest(input *DeletePermissionPolicyInput) (req *request.Request, output *DeletePermissionPolicyOutput) {
- op := &request.Operation{
- Name: opDeletePermissionPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeletePermissionPolicyInput{}
- }
-
- output = &DeletePermissionPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeletePermissionPolicy API operation for AWS WAFV2.
-//
-// Permanently deletes an IAM policy from the specified rule group.
-//
-// You must be the owner of the rule group to perform this operation.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DeletePermissionPolicy for usage and error information.
-//
-// Returned Error Types:
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeletePermissionPolicy
-func (c *WAFV2) DeletePermissionPolicy(input *DeletePermissionPolicyInput) (*DeletePermissionPolicyOutput, error) {
- req, out := c.DeletePermissionPolicyRequest(input)
- return out, req.Send()
-}
-
-// DeletePermissionPolicyWithContext is the same as DeletePermissionPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeletePermissionPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DeletePermissionPolicyWithContext(ctx aws.Context, input *DeletePermissionPolicyInput, opts ...request.Option) (*DeletePermissionPolicyOutput, error) {
- req, out := c.DeletePermissionPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteRegexPatternSet = "DeleteRegexPatternSet"
-
-// DeleteRegexPatternSetRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteRegexPatternSet operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteRegexPatternSet for more information on using the DeleteRegexPatternSet
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteRegexPatternSetRequest method.
-// req, resp := client.DeleteRegexPatternSetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRegexPatternSet
-func (c *WAFV2) DeleteRegexPatternSetRequest(input *DeleteRegexPatternSetInput) (req *request.Request, output *DeleteRegexPatternSetOutput) {
- op := &request.Operation{
- Name: opDeleteRegexPatternSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteRegexPatternSetInput{}
- }
-
- output = &DeleteRegexPatternSetOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteRegexPatternSet API operation for AWS WAFV2.
-//
-// Deletes the specified RegexPatternSet.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DeleteRegexPatternSet for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFAssociatedItemException
-// WAF couldn’t perform the operation because your resource is being used
-// by another resource or it’s associated with another resource.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRegexPatternSet
-func (c *WAFV2) DeleteRegexPatternSet(input *DeleteRegexPatternSetInput) (*DeleteRegexPatternSetOutput, error) {
- req, out := c.DeleteRegexPatternSetRequest(input)
- return out, req.Send()
-}
-
-// DeleteRegexPatternSetWithContext is the same as DeleteRegexPatternSet with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteRegexPatternSet for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DeleteRegexPatternSetWithContext(ctx aws.Context, input *DeleteRegexPatternSetInput, opts ...request.Option) (*DeleteRegexPatternSetOutput, error) {
- req, out := c.DeleteRegexPatternSetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteRuleGroup = "DeleteRuleGroup"
-
-// DeleteRuleGroupRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteRuleGroup operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteRuleGroup for more information on using the DeleteRuleGroup
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteRuleGroupRequest method.
-// req, resp := client.DeleteRuleGroupRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRuleGroup
-func (c *WAFV2) DeleteRuleGroupRequest(input *DeleteRuleGroupInput) (req *request.Request, output *DeleteRuleGroupOutput) {
- op := &request.Operation{
- Name: opDeleteRuleGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteRuleGroupInput{}
- }
-
- output = &DeleteRuleGroupOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteRuleGroup API operation for AWS WAFV2.
-//
-// Deletes the specified RuleGroup.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DeleteRuleGroup for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFAssociatedItemException
-// WAF couldn’t perform the operation because your resource is being used
-// by another resource or it’s associated with another resource.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteRuleGroup
-func (c *WAFV2) DeleteRuleGroup(input *DeleteRuleGroupInput) (*DeleteRuleGroupOutput, error) {
- req, out := c.DeleteRuleGroupRequest(input)
- return out, req.Send()
-}
-
-// DeleteRuleGroupWithContext is the same as DeleteRuleGroup with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteRuleGroup for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DeleteRuleGroupWithContext(ctx aws.Context, input *DeleteRuleGroupInput, opts ...request.Option) (*DeleteRuleGroupOutput, error) {
- req, out := c.DeleteRuleGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteWebACL = "DeleteWebACL"
-
-// DeleteWebACLRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteWebACL operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteWebACL for more information on using the DeleteWebACL
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteWebACLRequest method.
-// req, resp := client.DeleteWebACLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteWebACL
-func (c *WAFV2) DeleteWebACLRequest(input *DeleteWebACLInput) (req *request.Request, output *DeleteWebACLOutput) {
- op := &request.Operation{
- Name: opDeleteWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteWebACLInput{}
- }
-
- output = &DeleteWebACLOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteWebACL API operation for AWS WAFV2.
-//
-// Deletes the specified WebACL.
-//
-// You can only use this if ManagedByFirewallManager is false in the specified
-// WebACL.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DeleteWebACL for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFAssociatedItemException
-// WAF couldn’t perform the operation because your resource is being used
-// by another resource or it’s associated with another resource.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DeleteWebACL
-func (c *WAFV2) DeleteWebACL(input *DeleteWebACLInput) (*DeleteWebACLOutput, error) {
- req, out := c.DeleteWebACLRequest(input)
- return out, req.Send()
-}
-
-// DeleteWebACLWithContext is the same as DeleteWebACL with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteWebACL for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DeleteWebACLWithContext(ctx aws.Context, input *DeleteWebACLInput, opts ...request.Option) (*DeleteWebACLOutput, error) {
- req, out := c.DeleteWebACLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeManagedRuleGroup = "DescribeManagedRuleGroup"
-
-// DescribeManagedRuleGroupRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeManagedRuleGroup operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeManagedRuleGroup for more information on using the DescribeManagedRuleGroup
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeManagedRuleGroupRequest method.
-// req, resp := client.DescribeManagedRuleGroupRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DescribeManagedRuleGroup
-func (c *WAFV2) DescribeManagedRuleGroupRequest(input *DescribeManagedRuleGroupInput) (req *request.Request, output *DescribeManagedRuleGroupOutput) {
- op := &request.Operation{
- Name: opDescribeManagedRuleGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeManagedRuleGroupInput{}
- }
-
- output = &DescribeManagedRuleGroupOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeManagedRuleGroup API operation for AWS WAFV2.
-//
-// Provides high-level information for a managed rule group, including descriptions
-// of the rules.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DescribeManagedRuleGroup for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidResourceException
-// WAF couldn’t perform the operation because the resource that you requested
-// isn’t valid. Check the resource, and try again.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DescribeManagedRuleGroup
-func (c *WAFV2) DescribeManagedRuleGroup(input *DescribeManagedRuleGroupInput) (*DescribeManagedRuleGroupOutput, error) {
- req, out := c.DescribeManagedRuleGroupRequest(input)
- return out, req.Send()
-}
-
-// DescribeManagedRuleGroupWithContext is the same as DescribeManagedRuleGroup with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeManagedRuleGroup for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DescribeManagedRuleGroupWithContext(ctx aws.Context, input *DescribeManagedRuleGroupInput, opts ...request.Option) (*DescribeManagedRuleGroupOutput, error) {
- req, out := c.DescribeManagedRuleGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDisassociateWebACL = "DisassociateWebACL"
-
-// DisassociateWebACLRequest generates a "aws/request.Request" representing the
-// client's request for the DisassociateWebACL operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DisassociateWebACL for more information on using the DisassociateWebACL
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DisassociateWebACLRequest method.
-// req, resp := client.DisassociateWebACLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DisassociateWebACL
-func (c *WAFV2) DisassociateWebACLRequest(input *DisassociateWebACLInput) (req *request.Request, output *DisassociateWebACLOutput) {
- op := &request.Operation{
- Name: opDisassociateWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisassociateWebACLInput{}
- }
-
- output = &DisassociateWebACLOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DisassociateWebACL API operation for AWS WAFV2.
-//
-// Disassociates a web ACL from a regional application resource. A regional
-// application can be an Application Load Balancer (ALB), an Amazon API Gateway
-// REST API, or an AppSync GraphQL API.
-//
-// For Amazon CloudFront, don't use this call. Instead, use your CloudFront
-// distribution configuration. To disassociate a web ACL, provide an empty web
-// ACL ID in the CloudFront call UpdateDistribution. For information, see UpdateDistribution
-// (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_UpdateDistribution.html).
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation DisassociateWebACL for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/DisassociateWebACL
-func (c *WAFV2) DisassociateWebACL(input *DisassociateWebACLInput) (*DisassociateWebACLOutput, error) {
- req, out := c.DisassociateWebACLRequest(input)
- return out, req.Send()
-}
-
-// DisassociateWebACLWithContext is the same as DisassociateWebACL with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DisassociateWebACL for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) DisassociateWebACLWithContext(ctx aws.Context, input *DisassociateWebACLInput, opts ...request.Option) (*DisassociateWebACLOutput, error) {
- req, out := c.DisassociateWebACLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetIPSet = "GetIPSet"
-
-// GetIPSetRequest generates a "aws/request.Request" representing the
-// client's request for the GetIPSet operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetIPSet for more information on using the GetIPSet
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetIPSetRequest method.
-// req, resp := client.GetIPSetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetIPSet
-func (c *WAFV2) GetIPSetRequest(input *GetIPSetInput) (req *request.Request, output *GetIPSetOutput) {
- op := &request.Operation{
- Name: opGetIPSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetIPSetInput{}
- }
-
- output = &GetIPSetOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetIPSet API operation for AWS WAFV2.
-//
-// Retrieves the specified IPSet.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetIPSet for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetIPSet
-func (c *WAFV2) GetIPSet(input *GetIPSetInput) (*GetIPSetOutput, error) {
- req, out := c.GetIPSetRequest(input)
- return out, req.Send()
-}
-
-// GetIPSetWithContext is the same as GetIPSet with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetIPSet for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetIPSetWithContext(ctx aws.Context, input *GetIPSetInput, opts ...request.Option) (*GetIPSetOutput, error) {
- req, out := c.GetIPSetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetLoggingConfiguration = "GetLoggingConfiguration"
-
-// GetLoggingConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the GetLoggingConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetLoggingConfiguration for more information on using the GetLoggingConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetLoggingConfigurationRequest method.
-// req, resp := client.GetLoggingConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetLoggingConfiguration
-func (c *WAFV2) GetLoggingConfigurationRequest(input *GetLoggingConfigurationInput) (req *request.Request, output *GetLoggingConfigurationOutput) {
- op := &request.Operation{
- Name: opGetLoggingConfiguration,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetLoggingConfigurationInput{}
- }
-
- output = &GetLoggingConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetLoggingConfiguration API operation for AWS WAFV2.
-//
-// Returns the LoggingConfiguration for the specified web ACL.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetLoggingConfiguration for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetLoggingConfiguration
-func (c *WAFV2) GetLoggingConfiguration(input *GetLoggingConfigurationInput) (*GetLoggingConfigurationOutput, error) {
- req, out := c.GetLoggingConfigurationRequest(input)
- return out, req.Send()
-}
-
-// GetLoggingConfigurationWithContext is the same as GetLoggingConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetLoggingConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetLoggingConfigurationWithContext(ctx aws.Context, input *GetLoggingConfigurationInput, opts ...request.Option) (*GetLoggingConfigurationOutput, error) {
- req, out := c.GetLoggingConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetPermissionPolicy = "GetPermissionPolicy"
-
-// GetPermissionPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the GetPermissionPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetPermissionPolicy for more information on using the GetPermissionPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetPermissionPolicyRequest method.
-// req, resp := client.GetPermissionPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetPermissionPolicy
-func (c *WAFV2) GetPermissionPolicyRequest(input *GetPermissionPolicyInput) (req *request.Request, output *GetPermissionPolicyOutput) {
- op := &request.Operation{
- Name: opGetPermissionPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetPermissionPolicyInput{}
- }
-
- output = &GetPermissionPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetPermissionPolicy API operation for AWS WAFV2.
-//
-// Returns the IAM policy that is attached to the specified rule group.
-//
-// You must be the owner of the rule group to perform this operation.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetPermissionPolicy for usage and error information.
-//
-// Returned Error Types:
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetPermissionPolicy
-func (c *WAFV2) GetPermissionPolicy(input *GetPermissionPolicyInput) (*GetPermissionPolicyOutput, error) {
- req, out := c.GetPermissionPolicyRequest(input)
- return out, req.Send()
-}
-
-// GetPermissionPolicyWithContext is the same as GetPermissionPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetPermissionPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetPermissionPolicyWithContext(ctx aws.Context, input *GetPermissionPolicyInput, opts ...request.Option) (*GetPermissionPolicyOutput, error) {
- req, out := c.GetPermissionPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetRateBasedStatementManagedKeys = "GetRateBasedStatementManagedKeys"
-
-// GetRateBasedStatementManagedKeysRequest generates a "aws/request.Request" representing the
-// client's request for the GetRateBasedStatementManagedKeys operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetRateBasedStatementManagedKeys for more information on using the GetRateBasedStatementManagedKeys
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetRateBasedStatementManagedKeysRequest method.
-// req, resp := client.GetRateBasedStatementManagedKeysRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRateBasedStatementManagedKeys
-func (c *WAFV2) GetRateBasedStatementManagedKeysRequest(input *GetRateBasedStatementManagedKeysInput) (req *request.Request, output *GetRateBasedStatementManagedKeysOutput) {
- op := &request.Operation{
- Name: opGetRateBasedStatementManagedKeys,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetRateBasedStatementManagedKeysInput{}
- }
-
- output = &GetRateBasedStatementManagedKeysOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetRateBasedStatementManagedKeys API operation for AWS WAFV2.
-//
-// Retrieves the keys that are currently blocked by a rate-based rule. The maximum
-// number of managed keys that can be blocked for a single rate-based rule is
-// 10,000. If more than 10,000 addresses exceed the rate limit, those with the
-// highest rates are blocked.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetRateBasedStatementManagedKeys for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRateBasedStatementManagedKeys
-func (c *WAFV2) GetRateBasedStatementManagedKeys(input *GetRateBasedStatementManagedKeysInput) (*GetRateBasedStatementManagedKeysOutput, error) {
- req, out := c.GetRateBasedStatementManagedKeysRequest(input)
- return out, req.Send()
-}
-
-// GetRateBasedStatementManagedKeysWithContext is the same as GetRateBasedStatementManagedKeys with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetRateBasedStatementManagedKeys for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetRateBasedStatementManagedKeysWithContext(ctx aws.Context, input *GetRateBasedStatementManagedKeysInput, opts ...request.Option) (*GetRateBasedStatementManagedKeysOutput, error) {
- req, out := c.GetRateBasedStatementManagedKeysRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetRegexPatternSet = "GetRegexPatternSet"
-
-// GetRegexPatternSetRequest generates a "aws/request.Request" representing the
-// client's request for the GetRegexPatternSet operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetRegexPatternSet for more information on using the GetRegexPatternSet
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetRegexPatternSetRequest method.
-// req, resp := client.GetRegexPatternSetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRegexPatternSet
-func (c *WAFV2) GetRegexPatternSetRequest(input *GetRegexPatternSetInput) (req *request.Request, output *GetRegexPatternSetOutput) {
- op := &request.Operation{
- Name: opGetRegexPatternSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetRegexPatternSetInput{}
- }
-
- output = &GetRegexPatternSetOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetRegexPatternSet API operation for AWS WAFV2.
-//
-// Retrieves the specified RegexPatternSet.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetRegexPatternSet for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRegexPatternSet
-func (c *WAFV2) GetRegexPatternSet(input *GetRegexPatternSetInput) (*GetRegexPatternSetOutput, error) {
- req, out := c.GetRegexPatternSetRequest(input)
- return out, req.Send()
-}
-
-// GetRegexPatternSetWithContext is the same as GetRegexPatternSet with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetRegexPatternSet for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetRegexPatternSetWithContext(ctx aws.Context, input *GetRegexPatternSetInput, opts ...request.Option) (*GetRegexPatternSetOutput, error) {
- req, out := c.GetRegexPatternSetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetRuleGroup = "GetRuleGroup"
-
-// GetRuleGroupRequest generates a "aws/request.Request" representing the
-// client's request for the GetRuleGroup operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetRuleGroup for more information on using the GetRuleGroup
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetRuleGroupRequest method.
-// req, resp := client.GetRuleGroupRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup
-func (c *WAFV2) GetRuleGroupRequest(input *GetRuleGroupInput) (req *request.Request, output *GetRuleGroupOutput) {
- op := &request.Operation{
- Name: opGetRuleGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetRuleGroupInput{}
- }
-
- output = &GetRuleGroupOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetRuleGroup API operation for AWS WAFV2.
-//
-// Retrieves the specified RuleGroup.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetRuleGroup for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetRuleGroup
-func (c *WAFV2) GetRuleGroup(input *GetRuleGroupInput) (*GetRuleGroupOutput, error) {
- req, out := c.GetRuleGroupRequest(input)
- return out, req.Send()
-}
-
-// GetRuleGroupWithContext is the same as GetRuleGroup with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetRuleGroup for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetRuleGroupWithContext(ctx aws.Context, input *GetRuleGroupInput, opts ...request.Option) (*GetRuleGroupOutput, error) {
- req, out := c.GetRuleGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetSampledRequests = "GetSampledRequests"
-
-// GetSampledRequestsRequest generates a "aws/request.Request" representing the
-// client's request for the GetSampledRequests operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetSampledRequests for more information on using the GetSampledRequests
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetSampledRequestsRequest method.
-// req, resp := client.GetSampledRequestsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetSampledRequests
-func (c *WAFV2) GetSampledRequestsRequest(input *GetSampledRequestsInput) (req *request.Request, output *GetSampledRequestsOutput) {
- op := &request.Operation{
- Name: opGetSampledRequests,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetSampledRequestsInput{}
- }
-
- output = &GetSampledRequestsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetSampledRequests API operation for AWS WAFV2.
-//
-// Gets detailed information about a specified number of requests--a sample--that
-// WAF randomly selects from among the first 5,000 requests that your Amazon
-// Web Services resource received during a time range that you choose. You can
-// specify a sample size of up to 500 requests, and you can specify any time
-// range in the previous three hours.
-//
-// GetSampledRequests returns a time range, which is usually the time range
-// that you specified. However, if your resource (such as a CloudFront distribution)
-// received 5,000 requests before the specified time range elapsed, GetSampledRequests
-// returns an updated time range. This new time range indicates the actual period
-// during which WAF selected the requests in the sample.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetSampledRequests for usage and error information.
-//
-// Returned Error Types:
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetSampledRequests
-func (c *WAFV2) GetSampledRequests(input *GetSampledRequestsInput) (*GetSampledRequestsOutput, error) {
- req, out := c.GetSampledRequestsRequest(input)
- return out, req.Send()
-}
-
-// GetSampledRequestsWithContext is the same as GetSampledRequests with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetSampledRequests for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetSampledRequestsWithContext(ctx aws.Context, input *GetSampledRequestsInput, opts ...request.Option) (*GetSampledRequestsOutput, error) {
- req, out := c.GetSampledRequestsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetWebACL = "GetWebACL"
-
-// GetWebACLRequest generates a "aws/request.Request" representing the
-// client's request for the GetWebACL operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetWebACL for more information on using the GetWebACL
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetWebACLRequest method.
-// req, resp := client.GetWebACLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACL
-func (c *WAFV2) GetWebACLRequest(input *GetWebACLInput) (req *request.Request, output *GetWebACLOutput) {
- op := &request.Operation{
- Name: opGetWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetWebACLInput{}
- }
-
- output = &GetWebACLOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetWebACL API operation for AWS WAFV2.
-//
-// Retrieves the specified WebACL.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetWebACL for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACL
-func (c *WAFV2) GetWebACL(input *GetWebACLInput) (*GetWebACLOutput, error) {
- req, out := c.GetWebACLRequest(input)
- return out, req.Send()
-}
-
-// GetWebACLWithContext is the same as GetWebACL with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetWebACL for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetWebACLWithContext(ctx aws.Context, input *GetWebACLInput, opts ...request.Option) (*GetWebACLOutput, error) {
- req, out := c.GetWebACLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetWebACLForResource = "GetWebACLForResource"
-
-// GetWebACLForResourceRequest generates a "aws/request.Request" representing the
-// client's request for the GetWebACLForResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetWebACLForResource for more information on using the GetWebACLForResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetWebACLForResourceRequest method.
-// req, resp := client.GetWebACLForResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACLForResource
-func (c *WAFV2) GetWebACLForResourceRequest(input *GetWebACLForResourceInput) (req *request.Request, output *GetWebACLForResourceOutput) {
- op := &request.Operation{
- Name: opGetWebACLForResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetWebACLForResourceInput{}
- }
-
- output = &GetWebACLForResourceOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetWebACLForResource API operation for AWS WAFV2.
-//
-// Retrieves the WebACL for the specified resource.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation GetWebACLForResource for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFUnavailableEntityException
-// WAF couldn’t retrieve the resource that you requested. Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/GetWebACLForResource
-func (c *WAFV2) GetWebACLForResource(input *GetWebACLForResourceInput) (*GetWebACLForResourceOutput, error) {
- req, out := c.GetWebACLForResourceRequest(input)
- return out, req.Send()
-}
-
-// GetWebACLForResourceWithContext is the same as GetWebACLForResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetWebACLForResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) GetWebACLForResourceWithContext(ctx aws.Context, input *GetWebACLForResourceInput, opts ...request.Option) (*GetWebACLForResourceOutput, error) {
- req, out := c.GetWebACLForResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListAvailableManagedRuleGroups = "ListAvailableManagedRuleGroups"
-
-// ListAvailableManagedRuleGroupsRequest generates a "aws/request.Request" representing the
-// client's request for the ListAvailableManagedRuleGroups operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListAvailableManagedRuleGroups for more information on using the ListAvailableManagedRuleGroups
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListAvailableManagedRuleGroupsRequest method.
-// req, resp := client.ListAvailableManagedRuleGroupsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroups
-func (c *WAFV2) ListAvailableManagedRuleGroupsRequest(input *ListAvailableManagedRuleGroupsInput) (req *request.Request, output *ListAvailableManagedRuleGroupsOutput) {
- op := &request.Operation{
- Name: opListAvailableManagedRuleGroups,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListAvailableManagedRuleGroupsInput{}
- }
-
- output = &ListAvailableManagedRuleGroupsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListAvailableManagedRuleGroups API operation for AWS WAFV2.
-//
-// Retrieves an array of managed rule groups that are available for you to use.
-// This list includes all Amazon Web Services Managed Rules rule groups and
-// the Marketplace managed rule groups that you're subscribed to.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation ListAvailableManagedRuleGroups for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListAvailableManagedRuleGroups
-func (c *WAFV2) ListAvailableManagedRuleGroups(input *ListAvailableManagedRuleGroupsInput) (*ListAvailableManagedRuleGroupsOutput, error) {
- req, out := c.ListAvailableManagedRuleGroupsRequest(input)
- return out, req.Send()
-}
-
-// ListAvailableManagedRuleGroupsWithContext is the same as ListAvailableManagedRuleGroups with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAvailableManagedRuleGroups for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) ListAvailableManagedRuleGroupsWithContext(ctx aws.Context, input *ListAvailableManagedRuleGroupsInput, opts ...request.Option) (*ListAvailableManagedRuleGroupsOutput, error) {
- req, out := c.ListAvailableManagedRuleGroupsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListIPSets = "ListIPSets"
-
-// ListIPSetsRequest generates a "aws/request.Request" representing the
-// client's request for the ListIPSets operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListIPSets for more information on using the ListIPSets
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListIPSetsRequest method.
-// req, resp := client.ListIPSetsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListIPSets
-func (c *WAFV2) ListIPSetsRequest(input *ListIPSetsInput) (req *request.Request, output *ListIPSetsOutput) {
- op := &request.Operation{
- Name: opListIPSets,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListIPSetsInput{}
- }
-
- output = &ListIPSetsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListIPSets API operation for AWS WAFV2.
-//
-// Retrieves an array of IPSetSummary objects for the IP sets that you manage.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation ListIPSets for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListIPSets
-func (c *WAFV2) ListIPSets(input *ListIPSetsInput) (*ListIPSetsOutput, error) {
- req, out := c.ListIPSetsRequest(input)
- return out, req.Send()
-}
-
-// ListIPSetsWithContext is the same as ListIPSets with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListIPSets for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) ListIPSetsWithContext(ctx aws.Context, input *ListIPSetsInput, opts ...request.Option) (*ListIPSetsOutput, error) {
- req, out := c.ListIPSetsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListLoggingConfigurations = "ListLoggingConfigurations"
-
-// ListLoggingConfigurationsRequest generates a "aws/request.Request" representing the
-// client's request for the ListLoggingConfigurations operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListLoggingConfigurations for more information on using the ListLoggingConfigurations
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListLoggingConfigurationsRequest method.
-// req, resp := client.ListLoggingConfigurationsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListLoggingConfigurations
-func (c *WAFV2) ListLoggingConfigurationsRequest(input *ListLoggingConfigurationsInput) (req *request.Request, output *ListLoggingConfigurationsOutput) {
- op := &request.Operation{
- Name: opListLoggingConfigurations,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListLoggingConfigurationsInput{}
- }
-
- output = &ListLoggingConfigurationsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListLoggingConfigurations API operation for AWS WAFV2.
-//
-// Retrieves an array of your LoggingConfiguration objects.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation ListLoggingConfigurations for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListLoggingConfigurations
-func (c *WAFV2) ListLoggingConfigurations(input *ListLoggingConfigurationsInput) (*ListLoggingConfigurationsOutput, error) {
- req, out := c.ListLoggingConfigurationsRequest(input)
- return out, req.Send()
-}
-
-// ListLoggingConfigurationsWithContext is the same as ListLoggingConfigurations with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListLoggingConfigurations for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) ListLoggingConfigurationsWithContext(ctx aws.Context, input *ListLoggingConfigurationsInput, opts ...request.Option) (*ListLoggingConfigurationsOutput, error) {
- req, out := c.ListLoggingConfigurationsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListRegexPatternSets = "ListRegexPatternSets"
-
-// ListRegexPatternSetsRequest generates a "aws/request.Request" representing the
-// client's request for the ListRegexPatternSets operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListRegexPatternSets for more information on using the ListRegexPatternSets
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListRegexPatternSetsRequest method.
-// req, resp := client.ListRegexPatternSetsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRegexPatternSets
-func (c *WAFV2) ListRegexPatternSetsRequest(input *ListRegexPatternSetsInput) (req *request.Request, output *ListRegexPatternSetsOutput) {
- op := &request.Operation{
- Name: opListRegexPatternSets,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListRegexPatternSetsInput{}
- }
-
- output = &ListRegexPatternSetsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListRegexPatternSets API operation for AWS WAFV2.
-//
-// Retrieves an array of RegexPatternSetSummary objects for the regex pattern
-// sets that you manage.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation ListRegexPatternSets for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRegexPatternSets
-func (c *WAFV2) ListRegexPatternSets(input *ListRegexPatternSetsInput) (*ListRegexPatternSetsOutput, error) {
- req, out := c.ListRegexPatternSetsRequest(input)
- return out, req.Send()
-}
-
-// ListRegexPatternSetsWithContext is the same as ListRegexPatternSets with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListRegexPatternSets for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) ListRegexPatternSetsWithContext(ctx aws.Context, input *ListRegexPatternSetsInput, opts ...request.Option) (*ListRegexPatternSetsOutput, error) {
- req, out := c.ListRegexPatternSetsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListResourcesForWebACL = "ListResourcesForWebACL"
-
-// ListResourcesForWebACLRequest generates a "aws/request.Request" representing the
-// client's request for the ListResourcesForWebACL operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListResourcesForWebACL for more information on using the ListResourcesForWebACL
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListResourcesForWebACLRequest method.
-// req, resp := client.ListResourcesForWebACLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListResourcesForWebACL
-func (c *WAFV2) ListResourcesForWebACLRequest(input *ListResourcesForWebACLInput) (req *request.Request, output *ListResourcesForWebACLOutput) {
- op := &request.Operation{
- Name: opListResourcesForWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListResourcesForWebACLInput{}
- }
-
- output = &ListResourcesForWebACLOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListResourcesForWebACL API operation for AWS WAFV2.
-//
-// Retrieves an array of the Amazon Resource Names (ARNs) for the regional resources
-// that are associated with the specified web ACL. If you want the list of Amazon
-// CloudFront resources, use the CloudFront call ListDistributionsByWebACLId.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation ListResourcesForWebACL for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListResourcesForWebACL
-func (c *WAFV2) ListResourcesForWebACL(input *ListResourcesForWebACLInput) (*ListResourcesForWebACLOutput, error) {
- req, out := c.ListResourcesForWebACLRequest(input)
- return out, req.Send()
-}
-
-// ListResourcesForWebACLWithContext is the same as ListResourcesForWebACL with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListResourcesForWebACL for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) ListResourcesForWebACLWithContext(ctx aws.Context, input *ListResourcesForWebACLInput, opts ...request.Option) (*ListResourcesForWebACLOutput, error) {
- req, out := c.ListResourcesForWebACLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListRuleGroups = "ListRuleGroups"
-
-// ListRuleGroupsRequest generates a "aws/request.Request" representing the
-// client's request for the ListRuleGroups operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListRuleGroups for more information on using the ListRuleGroups
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListRuleGroupsRequest method.
-// req, resp := client.ListRuleGroupsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRuleGroups
-func (c *WAFV2) ListRuleGroupsRequest(input *ListRuleGroupsInput) (req *request.Request, output *ListRuleGroupsOutput) {
- op := &request.Operation{
- Name: opListRuleGroups,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListRuleGroupsInput{}
- }
-
- output = &ListRuleGroupsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListRuleGroups API operation for AWS WAFV2.
-//
-// Retrieves an array of RuleGroupSummary objects for the rule groups that you
-// manage.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation ListRuleGroups for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListRuleGroups
-func (c *WAFV2) ListRuleGroups(input *ListRuleGroupsInput) (*ListRuleGroupsOutput, error) {
- req, out := c.ListRuleGroupsRequest(input)
- return out, req.Send()
-}
-
-// ListRuleGroupsWithContext is the same as ListRuleGroups with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListRuleGroups for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) ListRuleGroupsWithContext(ctx aws.Context, input *ListRuleGroupsInput, opts ...request.Option) (*ListRuleGroupsOutput, error) {
- req, out := c.ListRuleGroupsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListTagsForResource = "ListTagsForResource"
-
-// ListTagsForResourceRequest generates a "aws/request.Request" representing the
-// client's request for the ListTagsForResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListTagsForResource for more information on using the ListTagsForResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListTagsForResourceRequest method.
-// req, resp := client.ListTagsForResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListTagsForResource
-func (c *WAFV2) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
- op := &request.Operation{
- Name: opListTagsForResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListTagsForResourceInput{}
- }
-
- output = &ListTagsForResourceOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListTagsForResource API operation for AWS WAFV2.
-//
-// Retrieves the TagInfoForResource for the specified resource. Tags are key:value
-// pairs that you can use to categorize and manage your resources, for purposes
-// like billing. For example, you might set the tag key to "customer" and the
-// value to the customer name or ID. You can specify one or more tags to add
-// to each Amazon Web Services resource, up to 50 tags for a resource.
-//
-// You can tag the Amazon Web Services resources that you manage through WAF:
-// web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage
-// or view tags through the WAF console.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation ListTagsForResource for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListTagsForResource
-func (c *WAFV2) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
- req, out := c.ListTagsForResourceRequest(input)
- return out, req.Send()
-}
-
-// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListTagsForResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
- req, out := c.ListTagsForResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListWebACLs = "ListWebACLs"
-
-// ListWebACLsRequest generates a "aws/request.Request" representing the
-// client's request for the ListWebACLs operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListWebACLs for more information on using the ListWebACLs
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListWebACLsRequest method.
-// req, resp := client.ListWebACLsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListWebACLs
-func (c *WAFV2) ListWebACLsRequest(input *ListWebACLsInput) (req *request.Request, output *ListWebACLsOutput) {
- op := &request.Operation{
- Name: opListWebACLs,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListWebACLsInput{}
- }
-
- output = &ListWebACLsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListWebACLs API operation for AWS WAFV2.
-//
-// Retrieves an array of WebACLSummary objects for the web ACLs that you manage.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation ListWebACLs for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/ListWebACLs
-func (c *WAFV2) ListWebACLs(input *ListWebACLsInput) (*ListWebACLsOutput, error) {
- req, out := c.ListWebACLsRequest(input)
- return out, req.Send()
-}
-
-// ListWebACLsWithContext is the same as ListWebACLs with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListWebACLs for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) ListWebACLsWithContext(ctx aws.Context, input *ListWebACLsInput, opts ...request.Option) (*ListWebACLsOutput, error) {
- req, out := c.ListWebACLsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutLoggingConfiguration = "PutLoggingConfiguration"
-
-// PutLoggingConfigurationRequest generates a "aws/request.Request" representing the
-// client's request for the PutLoggingConfiguration operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutLoggingConfiguration for more information on using the PutLoggingConfiguration
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutLoggingConfigurationRequest method.
-// req, resp := client.PutLoggingConfigurationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration
-func (c *WAFV2) PutLoggingConfigurationRequest(input *PutLoggingConfigurationInput) (req *request.Request, output *PutLoggingConfigurationOutput) {
- op := &request.Operation{
- Name: opPutLoggingConfiguration,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &PutLoggingConfigurationInput{}
- }
-
- output = &PutLoggingConfigurationOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// PutLoggingConfiguration API operation for AWS WAFV2.
-//
-// Enables the specified LoggingConfiguration, to start logging from a web ACL,
-// according to the configuration provided.
-//
-// You can access information about all traffic that WAF inspects using the
-// following steps:
-//
-// Create an Amazon Kinesis Data Firehose.
-//
-// Create the data firehose with a PUT source and in the Region that you are
-// operating. If you are capturing logs for Amazon CloudFront, always create
-// the firehose in US East (N. Virginia).
-//
-// Give the data firehose a name that starts with the prefix aws-waf-logs-.
-// For example, aws-waf-logs-us-east-2-analytics.
-//
-// Do not create the data firehose using a Kinesis stream as your source.
-//
-// Associate that firehose to your web ACL using a PutLoggingConfiguration request.
-//
-// When you successfully enable logging using a PutLoggingConfiguration request,
-// WAF will create a service linked role with the necessary permissions to write
-// logs to the Amazon Kinesis Data Firehose. For more information, see Logging
-// Web ACL Traffic Information (https://docs.aws.amazon.com/waf/latest/developerguide/logging.html)
-// in the WAF Developer Guide.
-//
-// This operation completely replaces the mutable specifications that you already
-// have for the logging configuration with the ones that you provide to this
-// call. To modify the logging configuration, retrieve it by calling GetLoggingConfiguration,
-// update the settings as needed, and then provide the complete logging configuration
-// specification to this call.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation PutLoggingConfiguration for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFServiceLinkedRoleErrorException
-// WAF is not able to access the service linked role. This can be caused by
-// a previous PutLoggingConfiguration request, which can lock the service linked
-// role for about 20 seconds. Please try your request again. The service linked
-// role can also be locked by a previous DeleteServiceLinkedRole request, which
-// can lock the role for 15 minutes or more. If you recently made a call to
-// DeleteServiceLinkedRole, wait at least 15 minutes and try the request again.
-// If you receive this same exception again, you will have to wait additional
-// time until the role is unlocked.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutLoggingConfiguration
-func (c *WAFV2) PutLoggingConfiguration(input *PutLoggingConfigurationInput) (*PutLoggingConfigurationOutput, error) {
- req, out := c.PutLoggingConfigurationRequest(input)
- return out, req.Send()
-}
-
-// PutLoggingConfigurationWithContext is the same as PutLoggingConfiguration with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutLoggingConfiguration for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) PutLoggingConfigurationWithContext(ctx aws.Context, input *PutLoggingConfigurationInput, opts ...request.Option) (*PutLoggingConfigurationOutput, error) {
- req, out := c.PutLoggingConfigurationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutPermissionPolicy = "PutPermissionPolicy"
-
-// PutPermissionPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the PutPermissionPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutPermissionPolicy for more information on using the PutPermissionPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutPermissionPolicyRequest method.
-// req, resp := client.PutPermissionPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutPermissionPolicy
-func (c *WAFV2) PutPermissionPolicyRequest(input *PutPermissionPolicyInput) (req *request.Request, output *PutPermissionPolicyOutput) {
- op := &request.Operation{
- Name: opPutPermissionPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &PutPermissionPolicyInput{}
- }
-
- output = &PutPermissionPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutPermissionPolicy API operation for AWS WAFV2.
-//
-// Attaches an IAM policy to the specified resource. Use this to share a rule
-// group across accounts.
-//
-// You must be the owner of the rule group to perform this operation.
-//
-// This action is subject to the following restrictions:
-//
-// * You can attach only one policy with each PutPermissionPolicy request.
-//
-// * The ARN in the request must be a valid WAF RuleGroup ARN and the rule
-// group must exist in the same Region.
-//
-// * The user making the request must be the owner of the rule group.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation PutPermissionPolicy for usage and error information.
-//
-// Returned Error Types:
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFInvalidPermissionPolicyException
-// The operation failed because the specified policy isn't in the proper format.
-//
-// The policy specifications must conform to the following:
-//
-// * The policy must be composed using IAM Policy version 2012-10-17 or version
-// 2015-01-01.
-//
-// * The policy must include specifications for Effect, Action, and Principal.
-//
-// * Effect must specify Allow.
-//
-// * Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups.
-// WAF rejects any extra actions or wildcard actions in the policy.
-//
-// * The policy must not include a Resource parameter.
-//
-// For more information, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html).
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/PutPermissionPolicy
-func (c *WAFV2) PutPermissionPolicy(input *PutPermissionPolicyInput) (*PutPermissionPolicyOutput, error) {
- req, out := c.PutPermissionPolicyRequest(input)
- return out, req.Send()
-}
-
-// PutPermissionPolicyWithContext is the same as PutPermissionPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutPermissionPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) PutPermissionPolicyWithContext(ctx aws.Context, input *PutPermissionPolicyInput, opts ...request.Option) (*PutPermissionPolicyOutput, error) {
- req, out := c.PutPermissionPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opTagResource = "TagResource"
-
-// TagResourceRequest generates a "aws/request.Request" representing the
-// client's request for the TagResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See TagResource for more information on using the TagResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the TagResourceRequest method.
-// req, resp := client.TagResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/TagResource
-func (c *WAFV2) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
- op := &request.Operation{
- Name: opTagResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &TagResourceInput{}
- }
-
- output = &TagResourceOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// TagResource API operation for AWS WAFV2.
-//
-// Associates tags with the specified Amazon Web Services resource. Tags are
-// key:value pairs that you can use to categorize and manage your resources,
-// for purposes like billing. For example, you might set the tag key to "customer"
-// and the value to the customer name or ID. You can specify one or more tags
-// to add to each Amazon Web Services resource, up to 50 tags for a resource.
-//
-// You can tag the Amazon Web Services resources that you manage through WAF:
-// web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage
-// or view tags through the WAF console.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation TagResource for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/TagResource
-func (c *WAFV2) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
- req, out := c.TagResourceRequest(input)
- return out, req.Send()
-}
-
-// TagResourceWithContext is the same as TagResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See TagResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
- req, out := c.TagResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUntagResource = "UntagResource"
-
-// UntagResourceRequest generates a "aws/request.Request" representing the
-// client's request for the UntagResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UntagResource for more information on using the UntagResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UntagResourceRequest method.
-// req, resp := client.UntagResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UntagResource
-func (c *WAFV2) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
- op := &request.Operation{
- Name: opUntagResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UntagResourceInput{}
- }
-
- output = &UntagResourceOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// UntagResource API operation for AWS WAFV2.
-//
-// Disassociates tags from an Amazon Web Services resource. Tags are key:value
-// pairs that you can associate with Amazon Web Services resources. For example,
-// the tag key might be "customer" and the tag value might be "companyA." You
-// can specify one or more tags to add to each container. You can add up to
-// 50 tags to each Amazon Web Services resource.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation UntagResource for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFTagOperationException
-// An error occurred during the tagging operation. Retry your request.
-//
-// * WAFTagOperationInternalErrorException
-// WAF couldn’t perform your tagging operation because of an internal error.
-// Retry your request.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UntagResource
-func (c *WAFV2) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
- req, out := c.UntagResourceRequest(input)
- return out, req.Send()
-}
-
-// UntagResourceWithContext is the same as UntagResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UntagResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
- req, out := c.UntagResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateIPSet = "UpdateIPSet"
-
-// UpdateIPSetRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateIPSet operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateIPSet for more information on using the UpdateIPSet
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateIPSetRequest method.
-// req, resp := client.UpdateIPSetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateIPSet
-func (c *WAFV2) UpdateIPSetRequest(input *UpdateIPSetInput) (req *request.Request, output *UpdateIPSetOutput) {
- op := &request.Operation{
- Name: opUpdateIPSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateIPSetInput{}
- }
-
- output = &UpdateIPSetOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UpdateIPSet API operation for AWS WAFV2.
-//
-// Updates the specified IPSet.
-//
-// This operation completely replaces the mutable specifications that you already
-// have for the IP set with the ones that you provide to this call. To modify
-// the IP set, retrieve it by calling GetIPSet, update the settings as needed,
-// and then provide the complete IP set specification to this call.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation UpdateIPSet for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFDuplicateItemException
-// WAF couldn’t perform the operation because the resource that you tried
-// to save is a duplicate of an existing one.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateIPSet
-func (c *WAFV2) UpdateIPSet(input *UpdateIPSetInput) (*UpdateIPSetOutput, error) {
- req, out := c.UpdateIPSetRequest(input)
- return out, req.Send()
-}
-
-// UpdateIPSetWithContext is the same as UpdateIPSet with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateIPSet for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) UpdateIPSetWithContext(ctx aws.Context, input *UpdateIPSetInput, opts ...request.Option) (*UpdateIPSetOutput, error) {
- req, out := c.UpdateIPSetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateRegexPatternSet = "UpdateRegexPatternSet"
-
-// UpdateRegexPatternSetRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateRegexPatternSet operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateRegexPatternSet for more information on using the UpdateRegexPatternSet
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateRegexPatternSetRequest method.
-// req, resp := client.UpdateRegexPatternSetRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRegexPatternSet
-func (c *WAFV2) UpdateRegexPatternSetRequest(input *UpdateRegexPatternSetInput) (req *request.Request, output *UpdateRegexPatternSetOutput) {
- op := &request.Operation{
- Name: opUpdateRegexPatternSet,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateRegexPatternSetInput{}
- }
-
- output = &UpdateRegexPatternSetOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UpdateRegexPatternSet API operation for AWS WAFV2.
-//
-// Updates the specified RegexPatternSet.
-//
-// This operation completely replaces the mutable specifications that you already
-// have for the regex pattern set with the ones that you provide to this call.
-// To modify the regex pattern set, retrieve it by calling GetRegexPatternSet,
-// update the settings as needed, and then provide the complete regex pattern
-// set specification to this call.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation UpdateRegexPatternSet for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFDuplicateItemException
-// WAF couldn’t perform the operation because the resource that you tried
-// to save is a duplicate of an existing one.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRegexPatternSet
-func (c *WAFV2) UpdateRegexPatternSet(input *UpdateRegexPatternSetInput) (*UpdateRegexPatternSetOutput, error) {
- req, out := c.UpdateRegexPatternSetRequest(input)
- return out, req.Send()
-}
-
-// UpdateRegexPatternSetWithContext is the same as UpdateRegexPatternSet with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateRegexPatternSet for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) UpdateRegexPatternSetWithContext(ctx aws.Context, input *UpdateRegexPatternSetInput, opts ...request.Option) (*UpdateRegexPatternSetOutput, error) {
- req, out := c.UpdateRegexPatternSetRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateRuleGroup = "UpdateRuleGroup"
-
-// UpdateRuleGroupRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateRuleGroup operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateRuleGroup for more information on using the UpdateRuleGroup
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateRuleGroupRequest method.
-// req, resp := client.UpdateRuleGroupRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup
-func (c *WAFV2) UpdateRuleGroupRequest(input *UpdateRuleGroupInput) (req *request.Request, output *UpdateRuleGroupOutput) {
- op := &request.Operation{
- Name: opUpdateRuleGroup,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateRuleGroupInput{}
- }
-
- output = &UpdateRuleGroupOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UpdateRuleGroup API operation for AWS WAFV2.
-//
-// Updates the specified RuleGroup.
-//
-// This operation completely replaces the mutable specifications that you already
-// have for the rule group with the ones that you provide to this call. To modify
-// the rule group, retrieve it by calling GetRuleGroup, update the settings
-// as needed, and then provide the complete rule group specification to this
-// call.
-//
-// A rule group defines a collection of rules to inspect and control web requests
-// that you can use in a WebACL. When you create a rule group, you define an
-// immutable capacity limit. If you update a rule group, you must stay within
-// the capacity. This allows others to reuse the rule group with confidence
-// in its capacity requirements.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation UpdateRuleGroup for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFDuplicateItemException
-// WAF couldn’t perform the operation because the resource that you tried
-// to save is a duplicate of an existing one.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFUnavailableEntityException
-// WAF couldn’t retrieve the resource that you requested. Retry your request.
-//
-// * WAFSubscriptionNotFoundException
-// You tried to use a managed rule group that's available by subscription, but
-// you aren't subscribed to it yet.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateRuleGroup
-func (c *WAFV2) UpdateRuleGroup(input *UpdateRuleGroupInput) (*UpdateRuleGroupOutput, error) {
- req, out := c.UpdateRuleGroupRequest(input)
- return out, req.Send()
-}
-
-// UpdateRuleGroupWithContext is the same as UpdateRuleGroup with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateRuleGroup for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) UpdateRuleGroupWithContext(ctx aws.Context, input *UpdateRuleGroupInput, opts ...request.Option) (*UpdateRuleGroupOutput, error) {
- req, out := c.UpdateRuleGroupRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateWebACL = "UpdateWebACL"
-
-// UpdateWebACLRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateWebACL operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateWebACL for more information on using the UpdateWebACL
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateWebACLRequest method.
-// req, resp := client.UpdateWebACLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL
-func (c *WAFV2) UpdateWebACLRequest(input *UpdateWebACLInput) (req *request.Request, output *UpdateWebACLOutput) {
- op := &request.Operation{
- Name: opUpdateWebACL,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateWebACLInput{}
- }
-
- output = &UpdateWebACLOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// UpdateWebACL API operation for AWS WAFV2.
-//
-// Updates the specified WebACL.
-//
-// This operation completely replaces the mutable specifications that you already
-// have for the web ACL with the ones that you provide to this call. To modify
-// the web ACL, retrieve it by calling GetWebACL, update the settings as needed,
-// and then provide the complete web ACL specification to this call.
-//
-// A web ACL defines a collection of rules to use to inspect and control web
-// requests. Each rule has an action defined (allow, block, or count) for requests
-// that match the statement of the rule. In the web ACL, you assign a default
-// action to take (allow, block) for any request that does not match any of
-// the rules. The rules in a web ACL can be a combination of the types Rule,
-// RuleGroup, and managed rule group. You can associate a web ACL with one or
-// more Amazon Web Services resources to protect. The resources can be an Amazon
-// CloudFront distribution, an Amazon API Gateway REST API, an Application Load
-// Balancer, or an AppSync GraphQL API.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS WAFV2's
-// API operation UpdateWebACL for usage and error information.
-//
-// Returned Error Types:
-// * WAFInternalErrorException
-// Your request is valid, but WAF couldn’t perform the operation because of
-// a system problem. Retry your request.
-//
-// * WAFInvalidParameterException
-// The operation failed because WAF didn't recognize a parameter in the request.
-// For example:
-//
-// * You specified a parameter name or value that isn't valid.
-//
-// * Your nested statement isn't valid. You might have tried to nest a statement
-// that can’t be nested.
-//
-// * You tried to update a WebACL with a DefaultAction that isn't among the
-// types available at DefaultAction.
-//
-// * Your request references an ARN that is malformed, or corresponds to
-// a resource with which a web ACL can't be associated.
-//
-// * WAFNonexistentItemException
-// WAF couldn’t perform the operation because your resource doesn’t exist.
-//
-// * WAFDuplicateItemException
-// WAF couldn’t perform the operation because the resource that you tried
-// to save is a duplicate of an existing one.
-//
-// * WAFOptimisticLockException
-// WAF couldn’t save your changes because you tried to update or delete a
-// resource that has changed since you last retrieved it. Get the resource again,
-// make any changes you need to make to the new copy, and retry your operation.
-//
-// * WAFLimitsExceededException
-// WAF couldn’t perform the operation because you exceeded your resource limit.
-// For example, the maximum number of WebACL objects that you can create for
-// an account. For more information, see Limits (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
-// in the WAF Developer Guide.
-//
-// * WAFInvalidResourceException
-// WAF couldn’t perform the operation because the resource that you requested
-// isn’t valid. Check the resource, and try again.
-//
-// * WAFUnavailableEntityException
-// WAF couldn’t retrieve the resource that you requested. Retry your request.
-//
-// * WAFSubscriptionNotFoundException
-// You tried to use a managed rule group that's available by subscription, but
-// you aren't subscribed to it yet.
-//
-// * WAFInvalidOperationException
-// The operation isn't valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/UpdateWebACL
-func (c *WAFV2) UpdateWebACL(input *UpdateWebACLInput) (*UpdateWebACLOutput, error) {
- req, out := c.UpdateWebACLRequest(input)
- return out, req.Send()
-}
-
-// UpdateWebACLWithContext is the same as UpdateWebACL with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateWebACL for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *WAFV2) UpdateWebACLWithContext(ctx aws.Context, input *UpdateWebACLInput, opts ...request.Option) (*UpdateWebACLOutput, error) {
- req, out := c.UpdateWebACLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// A single action condition for a Condition in a logging filter.
-type ActionCondition struct {
- _ struct{} `type:"structure"`
-
- // The action setting that a log record must contain in order to meet the condition.
- //
- // Action is a required field
- Action *string `type:"string" required:"true" enum:"ActionValue"`
-}
-
-// String returns the string representation
-func (s ActionCondition) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ActionCondition) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ActionCondition) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ActionCondition"}
- if s.Action == nil {
- invalidParams.Add(request.NewErrParamRequired("Action"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAction sets the Action field's value.
-func (s *ActionCondition) SetAction(v string) *ActionCondition {
- s.Action = &v
- return s
-}
-
-// Inspect all of the elements that WAF has parsed and extracted from the web
-// request JSON body that are within the JsonBody MatchScope. This is used with
-// the FieldToMatch option JsonBody.
-//
-// This is used only to indicate the web request component for WAF to inspect,
-// in the FieldToMatch specification.
-type All struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s All) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s All) GoString() string {
- return s.String()
-}
-
-// All query arguments of a web request.
-//
-// This is used only to indicate the web request component for WAF to inspect,
-// in the FieldToMatch specification.
-type AllQueryArguments struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s AllQueryArguments) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AllQueryArguments) GoString() string {
- return s.String()
-}
-
-// Specifies that WAF should allow the request and optionally defines additional
-// custom handling for the request.
-//
-// This is used in the context of other settings, for example to specify values
-// for RuleAction and web ACL DefaultAction.
-type AllowAction struct {
- _ struct{} `type:"structure"`
-
- // Defines custom handling for the web request.
- //
- // For information about customizing web requests and responses, see Customizing
- // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- CustomRequestHandling *CustomRequestHandling `type:"structure"`
-}
-
-// String returns the string representation
-func (s AllowAction) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AllowAction) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AllowAction) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AllowAction"}
- if s.CustomRequestHandling != nil {
- if err := s.CustomRequestHandling.Validate(); err != nil {
- invalidParams.AddNested("CustomRequestHandling", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomRequestHandling sets the CustomRequestHandling field's value.
-func (s *AllowAction) SetCustomRequestHandling(v *CustomRequestHandling) *AllowAction {
- s.CustomRequestHandling = v
- return s
-}
-
-// A logical rule statement used to combine other rule statements with AND logic.
-// You provide more than one Statement within the AndStatement.
-type AndStatement struct {
- _ struct{} `type:"structure"`
-
- // The statements to combine with AND logic. You can use any statements that
- // can be nested.
- //
- // Statements is a required field
- Statements []*Statement `type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s AndStatement) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AndStatement) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AndStatement) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AndStatement"}
- if s.Statements == nil {
- invalidParams.Add(request.NewErrParamRequired("Statements"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetStatements sets the Statements field's value.
-func (s *AndStatement) SetStatements(v []*Statement) *AndStatement {
- s.Statements = v
- return s
-}
-
-type AssociateWebACLInput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the resource to associate with the web
- // ACL.
- //
- // The ARN must be in one of the following formats:
- //
- // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
- //
- // * For an Amazon API Gateway REST API: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
- //
- // * For an AppSync GraphQL API: arn:aws:appsync:region:account-id:apis/GraphQLApiId
- //
- // ResourceArn is a required field
- ResourceArn *string `min:"20" type:"string" required:"true"`
-
- // The Amazon Resource Name (ARN) of the web ACL that you want to associate
- // with the resource.
- //
- // WebACLArn is a required field
- WebACLArn *string `min:"20" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s AssociateWebACLInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssociateWebACLInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AssociateWebACLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AssociateWebACLInput"}
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
- }
- if s.WebACLArn == nil {
- invalidParams.Add(request.NewErrParamRequired("WebACLArn"))
- }
- if s.WebACLArn != nil && len(*s.WebACLArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("WebACLArn", 20))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceArn sets the ResourceArn field's value.
-func (s *AssociateWebACLInput) SetResourceArn(v string) *AssociateWebACLInput {
- s.ResourceArn = &v
- return s
-}
-
-// SetWebACLArn sets the WebACLArn field's value.
-func (s *AssociateWebACLInput) SetWebACLArn(v string) *AssociateWebACLInput {
- s.WebACLArn = &v
- return s
-}
-
-type AssociateWebACLOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s AssociateWebACLOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s AssociateWebACLOutput) GoString() string {
- return s.String()
-}
-
-// Specifies that WAF should block the request and optionally defines additional
-// custom handling for the response to the web request.
-//
-// This is used in the context of other settings, for example to specify values
-// for RuleAction and web ACL DefaultAction.
-type BlockAction struct {
- _ struct{} `type:"structure"`
-
- // Defines a custom response for the web request.
- //
- // For information about customizing web requests and responses, see Customizing
- // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- CustomResponse *CustomResponse `type:"structure"`
-}
-
-// String returns the string representation
-func (s BlockAction) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s BlockAction) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *BlockAction) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "BlockAction"}
- if s.CustomResponse != nil {
- if err := s.CustomResponse.Validate(); err != nil {
- invalidParams.AddNested("CustomResponse", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomResponse sets the CustomResponse field's value.
-func (s *BlockAction) SetCustomResponse(v *CustomResponse) *BlockAction {
- s.CustomResponse = v
- return s
-}
-
-// The body of a web request. This immediately follows the request headers.
-//
-// This is used only to indicate the web request component for WAF to inspect,
-// in the FieldToMatch specification.
-type Body struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s Body) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Body) GoString() string {
- return s.String()
-}
-
-// A rule statement that defines a string match search for WAF to apply to web
-// requests. The byte match statement provides the bytes to search for, the
-// location in requests that you want WAF to search, and other settings. The
-// bytes to search for are typically a string that corresponds with ASCII characters.
-// In the WAF console and the developer guide, this is refered to as a string
-// match statement.
-type ByteMatchStatement struct {
- _ struct{} `type:"structure"`
-
- // The part of a web request that you want WAF to inspect. For more information,
- // see FieldToMatch.
- //
- // FieldToMatch is a required field
- FieldToMatch *FieldToMatch `type:"structure" required:"true"`
-
- // The area within the portion of a web request that you want WAF to search
- // for SearchString. Valid values include the following:
- //
- // CONTAINS
- //
- // The specified part of the web request must include the value of SearchString,
- // but the location doesn't matter.
- //
- // CONTAINS_WORD
- //
- // The specified part of the web request must include the value of SearchString,
- // and SearchString must contain only alphanumeric characters or underscore
- // (A-Z, a-z, 0-9, or _). In addition, SearchString must be a word, which means
- // that both of the following are true:
- //
- // * SearchString is at the beginning of the specified part of the web request
- // or is preceded by a character other than an alphanumeric character or
- // underscore (_). Examples include the value of a header and ;BadBot.
- //
- // * SearchString is at the end of the specified part of the web request
- // or is followed by a character other than an alphanumeric character or
- // underscore (_), for example, BadBot; and -BadBot;.
- //
- // EXACTLY
- //
- // The value of the specified part of the web request must exactly match the
- // value of SearchString.
- //
- // STARTS_WITH
- //
- // The value of SearchString must appear at the beginning of the specified part
- // of the web request.
- //
- // ENDS_WITH
- //
- // The value of SearchString must appear at the end of the specified part of
- // the web request.
- //
- // PositionalConstraint is a required field
- PositionalConstraint *string `type:"string" required:"true" enum:"PositionalConstraint"`
-
- // A string value that you want WAF to search for. WAF searches only in the
- // part of web requests that you designate for inspection in FieldToMatch. The
- // maximum length of the value is 50 bytes.
- //
- // Valid values depend on the component that you specify for inspection in FieldToMatch:
- //
- // * Method: The HTTP method that you want WAF to search for. This indicates
- // the type of operation specified in the request.
- //
- // * UriPath: The value that you want WAF to search for in the URI path,
- // for example, /images/daily-ad.jpg.
- //
- // If SearchString includes alphabetic characters A-Z and a-z, note that the
- // value is case sensitive.
- //
- // If you're using the WAF API
- //
- // Specify a base64-encoded version of the value. The maximum length of the
- // value before you base64-encode it is 50 bytes.
- //
- // For example, suppose the value of Type is HEADER and the value of Data is
- // User-Agent. If you want to search the User-Agent header for the value BadBot,
- // you base64-encode BadBot using MIME base64-encoding and include the resulting
- // value, QmFkQm90, in the value of SearchString.
- //
- // If you're using the CLI or one of the Amazon Web Services SDKs
- //
- // The value that you want WAF to search for. The SDK automatically base64 encodes
- // the value.
- //
- // SearchString is automatically base64 encoded/decoded by the SDK.
- //
- // SearchString is a required field
- SearchString []byte `type:"blob" required:"true"`
-
- // Text transformations eliminate some of the unusual formatting that attackers
- // use in web requests in an effort to bypass detection. If you specify one
- // or more transformations in a rule statement, WAF performs all transformations
- // on the content of the request component identified by FieldToMatch, starting
- // from the lowest priority setting, before inspecting the content for a match.
- //
- // TextTransformations is a required field
- TextTransformations []*TextTransformation `min:"1" type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s ByteMatchStatement) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s ByteMatchStatement) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ByteMatchStatement) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ByteMatchStatement"}
- if s.FieldToMatch == nil {
- invalidParams.Add(request.NewErrParamRequired("FieldToMatch"))
- }
- if s.PositionalConstraint == nil {
- invalidParams.Add(request.NewErrParamRequired("PositionalConstraint"))
- }
- if s.SearchString == nil {
- invalidParams.Add(request.NewErrParamRequired("SearchString"))
- }
- if s.TextTransformations == nil {
- invalidParams.Add(request.NewErrParamRequired("TextTransformations"))
- }
- if s.TextTransformations != nil && len(s.TextTransformations) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TextTransformations", 1))
- }
- if s.FieldToMatch != nil {
- if err := s.FieldToMatch.Validate(); err != nil {
- invalidParams.AddNested("FieldToMatch", err.(request.ErrInvalidParams))
- }
- }
- if s.TextTransformations != nil {
- for i, v := range s.TextTransformations {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TextTransformations", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetFieldToMatch sets the FieldToMatch field's value.
-func (s *ByteMatchStatement) SetFieldToMatch(v *FieldToMatch) *ByteMatchStatement {
- s.FieldToMatch = v
- return s
-}
-
-// SetPositionalConstraint sets the PositionalConstraint field's value.
-func (s *ByteMatchStatement) SetPositionalConstraint(v string) *ByteMatchStatement {
- s.PositionalConstraint = &v
- return s
-}
-
-// SetSearchString sets the SearchString field's value.
-func (s *ByteMatchStatement) SetSearchString(v []byte) *ByteMatchStatement {
- s.SearchString = v
- return s
-}
-
-// SetTextTransformations sets the TextTransformations field's value.
-func (s *ByteMatchStatement) SetTextTransformations(v []*TextTransformation) *ByteMatchStatement {
- s.TextTransformations = v
- return s
-}
-
-type CheckCapacityInput struct {
- _ struct{} `type:"structure"`
-
- // An array of Rule that you're configuring to use in a rule group or web ACL.
- //
- // Rules is a required field
- Rules []*Rule `type:"list" required:"true"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-}
-
-// String returns the string representation
-func (s CheckCapacityInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CheckCapacityInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CheckCapacityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CheckCapacityInput"}
- if s.Rules == nil {
- invalidParams.Add(request.NewErrParamRequired("Rules"))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetRules sets the Rules field's value.
-func (s *CheckCapacityInput) SetRules(v []*Rule) *CheckCapacityInput {
- s.Rules = v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *CheckCapacityInput) SetScope(v string) *CheckCapacityInput {
- s.Scope = &v
- return s
-}
-
-type CheckCapacityOutput struct {
- _ struct{} `type:"structure"`
-
- // The capacity required by the rules and scope.
- Capacity *int64 `type:"long"`
-}
-
-// String returns the string representation
-func (s CheckCapacityOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CheckCapacityOutput) GoString() string {
- return s.String()
-}
-
-// SetCapacity sets the Capacity field's value.
-func (s *CheckCapacityOutput) SetCapacity(v int64) *CheckCapacityOutput {
- s.Capacity = &v
- return s
-}
-
-// A single match condition for a Filter.
-type Condition struct {
- _ struct{} `type:"structure"`
-
- // A single action condition.
- ActionCondition *ActionCondition `type:"structure"`
-
- // A single label name condition.
- LabelNameCondition *LabelNameCondition `type:"structure"`
-}
-
-// String returns the string representation
-func (s Condition) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s Condition) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Condition) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Condition"}
- if s.ActionCondition != nil {
- if err := s.ActionCondition.Validate(); err != nil {
- invalidParams.AddNested("ActionCondition", err.(request.ErrInvalidParams))
- }
- }
- if s.LabelNameCondition != nil {
- if err := s.LabelNameCondition.Validate(); err != nil {
- invalidParams.AddNested("LabelNameCondition", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetActionCondition sets the ActionCondition field's value.
-func (s *Condition) SetActionCondition(v *ActionCondition) *Condition {
- s.ActionCondition = v
- return s
-}
-
-// SetLabelNameCondition sets the LabelNameCondition field's value.
-func (s *Condition) SetLabelNameCondition(v *LabelNameCondition) *Condition {
- s.LabelNameCondition = v
- return s
-}
-
-// Specifies that WAF should count the request. Optionally defines additional
-// custom handling for the request.
-//
-// This is used in the context of other settings, for example to specify values
-// for RuleAction and web ACL DefaultAction.
-type CountAction struct {
- _ struct{} `type:"structure"`
-
- // Defines custom handling for the web request.
- //
- // For information about customizing web requests and responses, see Customizing
- // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- CustomRequestHandling *CustomRequestHandling `type:"structure"`
-}
-
-// String returns the string representation
-func (s CountAction) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CountAction) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CountAction) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CountAction"}
- if s.CustomRequestHandling != nil {
- if err := s.CustomRequestHandling.Validate(); err != nil {
- invalidParams.AddNested("CustomRequestHandling", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomRequestHandling sets the CustomRequestHandling field's value.
-func (s *CountAction) SetCustomRequestHandling(v *CustomRequestHandling) *CountAction {
- s.CustomRequestHandling = v
- return s
-}
-
-type CreateIPSetInput struct {
- _ struct{} `type:"structure"`
-
- // Contains an array of strings that specify one or more IP addresses or blocks
- // of IP addresses in Classless Inter-Domain Routing (CIDR) notation. WAF supports
- // all IPv4 and IPv6 CIDR ranges except for /0.
- //
- // Examples:
- //
- // * To configure WAF to allow, block, or count requests that originated
- // from the IP address 192.0.2.44, specify 192.0.2.44/32.
- //
- // * To configure WAF to allow, block, or count requests that originated
- // from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.
- //
- // * To configure WAF to allow, block, or count requests that originated
- // from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.
- //
- // * To configure WAF to allow, block, or count requests that originated
- // from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff,
- // specify 1111:0000:0000:0000:0000:0000:0000:0000/64.
- //
- // For more information about CIDR notation, see the Wikipedia entry Classless
- // Inter-Domain Routing (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing).
- //
- // Addresses is a required field
- Addresses []*string `type:"list" required:"true"`
-
- // A description of the IP set that helps with identification.
- Description *string `min:"1" type:"string"`
-
- // Specify IPV4 or IPV6.
- //
- // IPAddressVersion is a required field
- IPAddressVersion *string `type:"string" required:"true" enum:"IPAddressVersion"`
-
- // The name of the IP set. You cannot change the name of an IPSet after you
- // create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-
- // An array of key:value pairs to associate with the resource.
- Tags []*Tag `min:"1" type:"list"`
-}
-
-// String returns the string representation
-func (s CreateIPSetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateIPSetInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateIPSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateIPSetInput"}
- if s.Addresses == nil {
- invalidParams.Add(request.NewErrParamRequired("Addresses"))
- }
- if s.Description != nil && len(*s.Description) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Description", 1))
- }
- if s.IPAddressVersion == nil {
- invalidParams.Add(request.NewErrParamRequired("IPAddressVersion"))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
- if s.Tags != nil && len(s.Tags) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAddresses sets the Addresses field's value.
-func (s *CreateIPSetInput) SetAddresses(v []*string) *CreateIPSetInput {
- s.Addresses = v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *CreateIPSetInput) SetDescription(v string) *CreateIPSetInput {
- s.Description = &v
- return s
-}
-
-// SetIPAddressVersion sets the IPAddressVersion field's value.
-func (s *CreateIPSetInput) SetIPAddressVersion(v string) *CreateIPSetInput {
- s.IPAddressVersion = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *CreateIPSetInput) SetName(v string) *CreateIPSetInput {
- s.Name = &v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *CreateIPSetInput) SetScope(v string) *CreateIPSetInput {
- s.Scope = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreateIPSetInput) SetTags(v []*Tag) *CreateIPSetInput {
- s.Tags = v
- return s
-}
-
-type CreateIPSetOutput struct {
- _ struct{} `type:"structure"`
-
- // High-level information about an IPSet, returned by operations like create
- // and list. This provides information like the ID, that you can use to retrieve
- // and manage an IPSet, and the ARN, that you provide to the IPSetReferenceStatement
- // to use the address set in a Rule.
- Summary *IPSetSummary `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateIPSetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateIPSetOutput) GoString() string {
- return s.String()
-}
-
-// SetSummary sets the Summary field's value.
-func (s *CreateIPSetOutput) SetSummary(v *IPSetSummary) *CreateIPSetOutput {
- s.Summary = v
- return s
-}
-
-type CreateRegexPatternSetInput struct {
- _ struct{} `type:"structure"`
-
- // A description of the set that helps with identification.
- Description *string `min:"1" type:"string"`
-
- // The name of the set. You cannot change the name after you create the set.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // Array of regular expression strings.
- //
- // RegularExpressionList is a required field
- RegularExpressionList []*Regex `type:"list" required:"true"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-
- // An array of key:value pairs to associate with the resource.
- Tags []*Tag `min:"1" type:"list"`
-}
-
-// String returns the string representation
-func (s CreateRegexPatternSetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateRegexPatternSetInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateRegexPatternSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateRegexPatternSetInput"}
- if s.Description != nil && len(*s.Description) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Description", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.RegularExpressionList == nil {
- invalidParams.Add(request.NewErrParamRequired("RegularExpressionList"))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
- if s.Tags != nil && len(s.Tags) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
- }
- if s.RegularExpressionList != nil {
- for i, v := range s.RegularExpressionList {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RegularExpressionList", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDescription sets the Description field's value.
-func (s *CreateRegexPatternSetInput) SetDescription(v string) *CreateRegexPatternSetInput {
- s.Description = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *CreateRegexPatternSetInput) SetName(v string) *CreateRegexPatternSetInput {
- s.Name = &v
- return s
-}
-
-// SetRegularExpressionList sets the RegularExpressionList field's value.
-func (s *CreateRegexPatternSetInput) SetRegularExpressionList(v []*Regex) *CreateRegexPatternSetInput {
- s.RegularExpressionList = v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *CreateRegexPatternSetInput) SetScope(v string) *CreateRegexPatternSetInput {
- s.Scope = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreateRegexPatternSetInput) SetTags(v []*Tag) *CreateRegexPatternSetInput {
- s.Tags = v
- return s
-}
-
-type CreateRegexPatternSetOutput struct {
- _ struct{} `type:"structure"`
-
- // High-level information about a RegexPatternSet, returned by operations like
- // create and list. This provides information like the ID, that you can use
- // to retrieve and manage a RegexPatternSet, and the ARN, that you provide to
- // the RegexPatternSetReferenceStatement to use the pattern set in a Rule.
- Summary *RegexPatternSetSummary `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateRegexPatternSetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateRegexPatternSetOutput) GoString() string {
- return s.String()
-}
-
-// SetSummary sets the Summary field's value.
-func (s *CreateRegexPatternSetOutput) SetSummary(v *RegexPatternSetSummary) *CreateRegexPatternSetOutput {
- s.Summary = v
- return s
-}
-
-type CreateRuleGroupInput struct {
- _ struct{} `type:"structure"`
-
- // The web ACL capacity units (WCUs) required for this rule group.
- //
- // When you create your own rule group, you define this, and you cannot change
- // it after creation. When you add or modify the rules in a rule group, WAF
- // enforces this limit. You can check the capacity for a set of rules using
- // CheckCapacity.
- //
- // WAF uses WCUs to calculate and control the operating resources that are used
- // to run your rules, rule groups, and web ACLs. WAF calculates capacity differently
- // for each rule type, to reflect the relative cost of each rule. Simple rules
- // that cost little to run use fewer WCUs than more complex rules that use more
- // processing power. Rule group capacity is fixed at creation, which helps users
- // plan their web ACL WCU usage when they use a rule group. The WCU limit for
- // web ACLs is 1,500.
- //
- // Capacity is a required field
- Capacity *int64 `min:"1" type:"long" required:"true"`
-
- // A map of custom response keys and content bodies. When you create a rule
- // with a block action, you can send a custom response to the web request. You
- // define these for the rule group, and then use them in the rules that you
- // define in the rule group.
- //
- // For information about customizing web requests and responses, see Customizing
- // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- //
- // For information about the limits on count and size for custom request and
- // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"`
-
- // A description of the rule group that helps with identification.
- Description *string `min:"1" type:"string"`
-
- // The name of the rule group. You cannot change the name of a rule group after
- // you create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // The Rule statements used to identify the web requests that you want to allow,
- // block, or count. Each rule includes one top-level statement that WAF uses
- // to identify matching web requests, and parameters that govern how WAF handles
- // them.
- Rules []*Rule `type:"list"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-
- // An array of key:value pairs to associate with the resource.
- Tags []*Tag `min:"1" type:"list"`
-
- // Defines and enables Amazon CloudWatch metrics and web request sample collection.
- //
- // VisibilityConfig is a required field
- VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s CreateRuleGroupInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateRuleGroupInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateRuleGroupInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateRuleGroupInput"}
- if s.Capacity == nil {
- invalidParams.Add(request.NewErrParamRequired("Capacity"))
- }
- if s.Capacity != nil && *s.Capacity < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Capacity", 1))
- }
- if s.CustomResponseBodies != nil && len(s.CustomResponseBodies) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodies", 1))
- }
- if s.Description != nil && len(*s.Description) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Description", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
- if s.Tags != nil && len(s.Tags) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
- }
- if s.VisibilityConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("VisibilityConfig"))
- }
- if s.CustomResponseBodies != nil {
- for i, v := range s.CustomResponseBodies {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomResponseBodies", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.VisibilityConfig != nil {
- if err := s.VisibilityConfig.Validate(); err != nil {
- invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCapacity sets the Capacity field's value.
-func (s *CreateRuleGroupInput) SetCapacity(v int64) *CreateRuleGroupInput {
- s.Capacity = &v
- return s
-}
-
-// SetCustomResponseBodies sets the CustomResponseBodies field's value.
-func (s *CreateRuleGroupInput) SetCustomResponseBodies(v map[string]*CustomResponseBody) *CreateRuleGroupInput {
- s.CustomResponseBodies = v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *CreateRuleGroupInput) SetDescription(v string) *CreateRuleGroupInput {
- s.Description = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *CreateRuleGroupInput) SetName(v string) *CreateRuleGroupInput {
- s.Name = &v
- return s
-}
-
-// SetRules sets the Rules field's value.
-func (s *CreateRuleGroupInput) SetRules(v []*Rule) *CreateRuleGroupInput {
- s.Rules = v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *CreateRuleGroupInput) SetScope(v string) *CreateRuleGroupInput {
- s.Scope = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreateRuleGroupInput) SetTags(v []*Tag) *CreateRuleGroupInput {
- s.Tags = v
- return s
-}
-
-// SetVisibilityConfig sets the VisibilityConfig field's value.
-func (s *CreateRuleGroupInput) SetVisibilityConfig(v *VisibilityConfig) *CreateRuleGroupInput {
- s.VisibilityConfig = v
- return s
-}
-
-type CreateRuleGroupOutput struct {
- _ struct{} `type:"structure"`
-
- // High-level information about a RuleGroup, returned by operations like create
- // and list. This provides information like the ID, that you can use to retrieve
- // and manage a RuleGroup, and the ARN, that you provide to the RuleGroupReferenceStatement
- // to use the rule group in a Rule.
- Summary *RuleGroupSummary `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateRuleGroupOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateRuleGroupOutput) GoString() string {
- return s.String()
-}
-
-// SetSummary sets the Summary field's value.
-func (s *CreateRuleGroupOutput) SetSummary(v *RuleGroupSummary) *CreateRuleGroupOutput {
- s.Summary = v
- return s
-}
-
-type CreateWebACLInput struct {
- _ struct{} `type:"structure"`
-
- // A map of custom response keys and content bodies. When you create a rule
- // with a block action, you can send a custom response to the web request. You
- // define these for the web ACL, and then use them in the rules and default
- // actions that you define in the web ACL.
- //
- // For information about customizing web requests and responses, see Customizing
- // web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- //
- // For information about the limits on count and size for custom request and
- // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- CustomResponseBodies map[string]*CustomResponseBody `min:"1" type:"map"`
-
- // The action to perform if none of the Rules contained in the WebACL match.
- //
- // DefaultAction is a required field
- DefaultAction *DefaultAction `type:"structure" required:"true"`
-
- // A description of the web ACL that helps with identification.
- Description *string `min:"1" type:"string"`
-
- // The name of the web ACL. You cannot change the name of a web ACL after you
- // create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // The Rule statements used to identify the web requests that you want to allow,
- // block, or count. Each rule includes one top-level statement that WAF uses
- // to identify matching web requests, and parameters that govern how WAF handles
- // them.
- Rules []*Rule `type:"list"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-
- // An array of key:value pairs to associate with the resource.
- Tags []*Tag `min:"1" type:"list"`
-
- // Defines and enables Amazon CloudWatch metrics and web request sample collection.
- //
- // VisibilityConfig is a required field
- VisibilityConfig *VisibilityConfig `type:"structure" required:"true"`
-}
-
-// String returns the string representation
-func (s CreateWebACLInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateWebACLInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateWebACLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateWebACLInput"}
- if s.CustomResponseBodies != nil && len(s.CustomResponseBodies) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodies", 1))
- }
- if s.DefaultAction == nil {
- invalidParams.Add(request.NewErrParamRequired("DefaultAction"))
- }
- if s.Description != nil && len(*s.Description) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Description", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
- if s.Tags != nil && len(s.Tags) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
- }
- if s.VisibilityConfig == nil {
- invalidParams.Add(request.NewErrParamRequired("VisibilityConfig"))
- }
- if s.CustomResponseBodies != nil {
- for i, v := range s.CustomResponseBodies {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CustomResponseBodies", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.DefaultAction != nil {
- if err := s.DefaultAction.Validate(); err != nil {
- invalidParams.AddNested("DefaultAction", err.(request.ErrInvalidParams))
- }
- }
- if s.Rules != nil {
- for i, v := range s.Rules {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Rules", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.VisibilityConfig != nil {
- if err := s.VisibilityConfig.Validate(); err != nil {
- invalidParams.AddNested("VisibilityConfig", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomResponseBodies sets the CustomResponseBodies field's value.
-func (s *CreateWebACLInput) SetCustomResponseBodies(v map[string]*CustomResponseBody) *CreateWebACLInput {
- s.CustomResponseBodies = v
- return s
-}
-
-// SetDefaultAction sets the DefaultAction field's value.
-func (s *CreateWebACLInput) SetDefaultAction(v *DefaultAction) *CreateWebACLInput {
- s.DefaultAction = v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *CreateWebACLInput) SetDescription(v string) *CreateWebACLInput {
- s.Description = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *CreateWebACLInput) SetName(v string) *CreateWebACLInput {
- s.Name = &v
- return s
-}
-
-// SetRules sets the Rules field's value.
-func (s *CreateWebACLInput) SetRules(v []*Rule) *CreateWebACLInput {
- s.Rules = v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *CreateWebACLInput) SetScope(v string) *CreateWebACLInput {
- s.Scope = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreateWebACLInput) SetTags(v []*Tag) *CreateWebACLInput {
- s.Tags = v
- return s
-}
-
-// SetVisibilityConfig sets the VisibilityConfig field's value.
-func (s *CreateWebACLInput) SetVisibilityConfig(v *VisibilityConfig) *CreateWebACLInput {
- s.VisibilityConfig = v
- return s
-}
-
-type CreateWebACLOutput struct {
- _ struct{} `type:"structure"`
-
- // High-level information about a WebACL, returned by operations like create
- // and list. This provides information like the ID, that you can use to retrieve
- // and manage a WebACL, and the ARN, that you provide to operations like AssociateWebACL.
- Summary *WebACLSummary `type:"structure"`
-}
-
-// String returns the string representation
-func (s CreateWebACLOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CreateWebACLOutput) GoString() string {
- return s.String()
-}
-
-// SetSummary sets the Summary field's value.
-func (s *CreateWebACLOutput) SetSummary(v *WebACLSummary) *CreateWebACLOutput {
- s.Summary = v
- return s
-}
-
-// A custom header for custom request and response handling. This is used in
-// CustomResponse and CustomRequestHandling.
-type CustomHTTPHeader struct {
- _ struct{} `type:"structure"`
-
- // The name of the custom header.
- //
- // For custom request header insertion, when WAF inserts the header into the
- // request, it prefixes this name x-amzn-waf-, to avoid confusion with the headers
- // that are already in the request. For example, for the header name sample,
- // WAF inserts the header x-amzn-waf-sample.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // The value of the custom header.
- //
- // Value is a required field
- Value *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s CustomHTTPHeader) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CustomHTTPHeader) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CustomHTTPHeader) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CustomHTTPHeader"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Value == nil {
- invalidParams.Add(request.NewErrParamRequired("Value"))
- }
- if s.Value != nil && len(*s.Value) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Value", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *CustomHTTPHeader) SetName(v string) *CustomHTTPHeader {
- s.Name = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *CustomHTTPHeader) SetValue(v string) *CustomHTTPHeader {
- s.Value = &v
- return s
-}
-
-// Custom request handling behavior that inserts custom headers into a web request.
-// You can add custom request handling for the rule actions allow and count.
-//
-// For information about customizing web requests and responses, see Customizing
-// web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
-// in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
-type CustomRequestHandling struct {
- _ struct{} `type:"structure"`
-
- // The HTTP headers to insert into the request. Duplicate header names are not
- // allowed.
- //
- // For information about the limits on count and size for custom request and
- // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- //
- // InsertHeaders is a required field
- InsertHeaders []*CustomHTTPHeader `min:"1" type:"list" required:"true"`
-}
-
-// String returns the string representation
-func (s CustomRequestHandling) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CustomRequestHandling) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CustomRequestHandling) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CustomRequestHandling"}
- if s.InsertHeaders == nil {
- invalidParams.Add(request.NewErrParamRequired("InsertHeaders"))
- }
- if s.InsertHeaders != nil && len(s.InsertHeaders) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("InsertHeaders", 1))
- }
- if s.InsertHeaders != nil {
- for i, v := range s.InsertHeaders {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "InsertHeaders", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetInsertHeaders sets the InsertHeaders field's value.
-func (s *CustomRequestHandling) SetInsertHeaders(v []*CustomHTTPHeader) *CustomRequestHandling {
- s.InsertHeaders = v
- return s
-}
-
-// A custom response to send to the client. You can define a custom response
-// for rule actions and default web ACL actions that are set to BlockAction.
-//
-// For information about customizing web requests and responses, see Customizing
-// web requests and responses in WAF (https://docs.aws.amazon.com/waf/latest/developerguide/waf-custom-request-response.html)
-// in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
-type CustomResponse struct {
- _ struct{} `type:"structure"`
-
- // References the response body that you want WAF to return to the web request
- // client. You can define a custom response for a rule action or a default web
- // ACL action that is set to block. To do this, you first define the response
- // body key and value in the CustomResponseBodies setting for the WebACL or
- // RuleGroup where you want to use it. Then, in the rule action or web ACL default
- // action BlockAction setting, you reference the response body using this key.
- CustomResponseBodyKey *string `min:"1" type:"string"`
-
- // The HTTP status code to return to the client.
- //
- // For a list of status codes that you can use in your custom reqponses, see
- // Supported status codes for custom response (https://docs.aws.amazon.com/waf/latest/developerguide/customizing-the-response-status-codes.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- //
- // ResponseCode is a required field
- ResponseCode *int64 `min:"200" type:"integer" required:"true"`
-
- // The HTTP headers to use in the response. Duplicate header names are not allowed.
- //
- // For information about the limits on count and size for custom request and
- // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- ResponseHeaders []*CustomHTTPHeader `min:"1" type:"list"`
-}
-
-// String returns the string representation
-func (s CustomResponse) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CustomResponse) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CustomResponse) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CustomResponse"}
- if s.CustomResponseBodyKey != nil && len(*s.CustomResponseBodyKey) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomResponseBodyKey", 1))
- }
- if s.ResponseCode == nil {
- invalidParams.Add(request.NewErrParamRequired("ResponseCode"))
- }
- if s.ResponseCode != nil && *s.ResponseCode < 200 {
- invalidParams.Add(request.NewErrParamMinValue("ResponseCode", 200))
- }
- if s.ResponseHeaders != nil && len(s.ResponseHeaders) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ResponseHeaders", 1))
- }
- if s.ResponseHeaders != nil {
- for i, v := range s.ResponseHeaders {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResponseHeaders", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomResponseBodyKey sets the CustomResponseBodyKey field's value.
-func (s *CustomResponse) SetCustomResponseBodyKey(v string) *CustomResponse {
- s.CustomResponseBodyKey = &v
- return s
-}
-
-// SetResponseCode sets the ResponseCode field's value.
-func (s *CustomResponse) SetResponseCode(v int64) *CustomResponse {
- s.ResponseCode = &v
- return s
-}
-
-// SetResponseHeaders sets the ResponseHeaders field's value.
-func (s *CustomResponse) SetResponseHeaders(v []*CustomHTTPHeader) *CustomResponse {
- s.ResponseHeaders = v
- return s
-}
-
-// The response body to use in a custom response to a web request. This is referenced
-// by key from CustomResponse CustomResponseBodyKey.
-type CustomResponseBody struct {
- _ struct{} `type:"structure"`
-
- // The payload of the custom response.
- //
- // You can use JSON escape strings in JSON content. To do this, you must specify
- // JSON content in the ContentType setting.
- //
- // For information about the limits on count and size for custom request and
- // response settings, see WAF quotas (https://docs.aws.amazon.com/waf/latest/developerguide/limits.html)
- // in the WAF Developer Guide (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
- //
- // Content is a required field
- Content *string `min:"1" type:"string" required:"true"`
-
- // The type of content in the payload that you are defining in the Content string.
- //
- // ContentType is a required field
- ContentType *string `type:"string" required:"true" enum:"ResponseContentType"`
-}
-
-// String returns the string representation
-func (s CustomResponseBody) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s CustomResponseBody) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CustomResponseBody) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CustomResponseBody"}
- if s.Content == nil {
- invalidParams.Add(request.NewErrParamRequired("Content"))
- }
- if s.Content != nil && len(*s.Content) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Content", 1))
- }
- if s.ContentType == nil {
- invalidParams.Add(request.NewErrParamRequired("ContentType"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetContent sets the Content field's value.
-func (s *CustomResponseBody) SetContent(v string) *CustomResponseBody {
- s.Content = &v
- return s
-}
-
-// SetContentType sets the ContentType field's value.
-func (s *CustomResponseBody) SetContentType(v string) *CustomResponseBody {
- s.ContentType = &v
- return s
-}
-
-// In a WebACL, this is the action that you want WAF to perform when a web request
-// doesn't match any of the rules in the WebACL. The default action must be
-// a terminating action, so you can't use count.
-type DefaultAction struct {
- _ struct{} `type:"structure"`
-
- // Specifies that WAF should allow requests by default.
- Allow *AllowAction `type:"structure"`
-
- // Specifies that WAF should block requests by default.
- Block *BlockAction `type:"structure"`
-}
-
-// String returns the string representation
-func (s DefaultAction) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DefaultAction) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DefaultAction) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DefaultAction"}
- if s.Allow != nil {
- if err := s.Allow.Validate(); err != nil {
- invalidParams.AddNested("Allow", err.(request.ErrInvalidParams))
- }
- }
- if s.Block != nil {
- if err := s.Block.Validate(); err != nil {
- invalidParams.AddNested("Block", err.(request.ErrInvalidParams))
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAllow sets the Allow field's value.
-func (s *DefaultAction) SetAllow(v *AllowAction) *DefaultAction {
- s.Allow = v
- return s
-}
-
-// SetBlock sets the Block field's value.
-func (s *DefaultAction) SetBlock(v *BlockAction) *DefaultAction {
- s.Block = v
- return s
-}
-
-type DeleteFirewallManagerRuleGroupsInput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the web ACL.
- //
- // WebACLArn is a required field
- WebACLArn *string `min:"20" type:"string" required:"true"`
-
- // A token used for optimistic locking. WAF returns a token to your get and
- // list requests, to mark the state of the entity at the time of the request.
- // To make changes to the entity associated with the token, you provide the
- // token to operations like update and delete. WAF uses the token to ensure
- // that no changes have been made to the entity since you last retrieved it.
- // If a change has been made, the update fails with a WAFOptimisticLockException.
- // If this happens, perform another get, and use the new token returned by that
- // operation.
- //
- // WebACLLockToken is a required field
- WebACLLockToken *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeleteFirewallManagerRuleGroupsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteFirewallManagerRuleGroupsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteFirewallManagerRuleGroupsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteFirewallManagerRuleGroupsInput"}
- if s.WebACLArn == nil {
- invalidParams.Add(request.NewErrParamRequired("WebACLArn"))
- }
- if s.WebACLArn != nil && len(*s.WebACLArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("WebACLArn", 20))
- }
- if s.WebACLLockToken == nil {
- invalidParams.Add(request.NewErrParamRequired("WebACLLockToken"))
- }
- if s.WebACLLockToken != nil && len(*s.WebACLLockToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("WebACLLockToken", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetWebACLArn sets the WebACLArn field's value.
-func (s *DeleteFirewallManagerRuleGroupsInput) SetWebACLArn(v string) *DeleteFirewallManagerRuleGroupsInput {
- s.WebACLArn = &v
- return s
-}
-
-// SetWebACLLockToken sets the WebACLLockToken field's value.
-func (s *DeleteFirewallManagerRuleGroupsInput) SetWebACLLockToken(v string) *DeleteFirewallManagerRuleGroupsInput {
- s.WebACLLockToken = &v
- return s
-}
-
-type DeleteFirewallManagerRuleGroupsOutput struct {
- _ struct{} `type:"structure"`
-
- // A token used for optimistic locking. WAF returns a token to your get and
- // list requests, to mark the state of the entity at the time of the request.
- // To make changes to the entity associated with the token, you provide the
- // token to operations like update and delete. WAF uses the token to ensure
- // that no changes have been made to the entity since you last retrieved it.
- // If a change has been made, the update fails with a WAFOptimisticLockException.
- // If this happens, perform another get, and use the new token returned by that
- // operation.
- NextWebACLLockToken *string `min:"1" type:"string"`
-}
-
-// String returns the string representation
-func (s DeleteFirewallManagerRuleGroupsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteFirewallManagerRuleGroupsOutput) GoString() string {
- return s.String()
-}
-
-// SetNextWebACLLockToken sets the NextWebACLLockToken field's value.
-func (s *DeleteFirewallManagerRuleGroupsOutput) SetNextWebACLLockToken(v string) *DeleteFirewallManagerRuleGroupsOutput {
- s.NextWebACLLockToken = &v
- return s
-}
-
-type DeleteIPSetInput struct {
- _ struct{} `type:"structure"`
-
- // A unique identifier for the set. This ID is returned in the responses to
- // create and list commands. You provide it to operations like update and delete.
- //
- // Id is a required field
- Id *string `min:"1" type:"string" required:"true"`
-
- // A token used for optimistic locking. WAF returns a token to your get and
- // list requests, to mark the state of the entity at the time of the request.
- // To make changes to the entity associated with the token, you provide the
- // token to operations like update and delete. WAF uses the token to ensure
- // that no changes have been made to the entity since you last retrieved it.
- // If a change has been made, the update fails with a WAFOptimisticLockException.
- // If this happens, perform another get, and use the new token returned by that
- // operation.
- //
- // LockToken is a required field
- LockToken *string `min:"1" type:"string" required:"true"`
-
- // The name of the IP set. You cannot change the name of an IPSet after you
- // create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-}
-
-// String returns the string representation
-func (s DeleteIPSetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteIPSetInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteIPSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteIPSetInput"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Id != nil && len(*s.Id) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Id", 1))
- }
- if s.LockToken == nil {
- invalidParams.Add(request.NewErrParamRequired("LockToken"))
- }
- if s.LockToken != nil && len(*s.LockToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteIPSetInput) SetId(v string) *DeleteIPSetInput {
- s.Id = &v
- return s
-}
-
-// SetLockToken sets the LockToken field's value.
-func (s *DeleteIPSetInput) SetLockToken(v string) *DeleteIPSetInput {
- s.LockToken = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *DeleteIPSetInput) SetName(v string) *DeleteIPSetInput {
- s.Name = &v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *DeleteIPSetInput) SetScope(v string) *DeleteIPSetInput {
- s.Scope = &v
- return s
-}
-
-type DeleteIPSetOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteIPSetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteIPSetOutput) GoString() string {
- return s.String()
-}
-
-type DeleteLoggingConfigurationInput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the web ACL from which you want to delete
- // the LoggingConfiguration.
- //
- // ResourceArn is a required field
- ResourceArn *string `min:"20" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeleteLoggingConfigurationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteLoggingConfigurationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteLoggingConfigurationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteLoggingConfigurationInput"}
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceArn sets the ResourceArn field's value.
-func (s *DeleteLoggingConfigurationInput) SetResourceArn(v string) *DeleteLoggingConfigurationInput {
- s.ResourceArn = &v
- return s
-}
-
-type DeleteLoggingConfigurationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteLoggingConfigurationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteLoggingConfigurationOutput) GoString() string {
- return s.String()
-}
-
-type DeletePermissionPolicyInput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the rule group from which you want to delete
- // the policy.
- //
- // You must be the owner of the rule group to perform this operation.
- //
- // ResourceArn is a required field
- ResourceArn *string `min:"20" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DeletePermissionPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletePermissionPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeletePermissionPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeletePermissionPolicyInput"}
- if s.ResourceArn == nil {
- invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
- }
- if s.ResourceArn != nil && len(*s.ResourceArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 20))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetResourceArn sets the ResourceArn field's value.
-func (s *DeletePermissionPolicyInput) SetResourceArn(v string) *DeletePermissionPolicyInput {
- s.ResourceArn = &v
- return s
-}
-
-type DeletePermissionPolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeletePermissionPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeletePermissionPolicyOutput) GoString() string {
- return s.String()
-}
-
-type DeleteRegexPatternSetInput struct {
- _ struct{} `type:"structure"`
-
- // A unique identifier for the set. This ID is returned in the responses to
- // create and list commands. You provide it to operations like update and delete.
- //
- // Id is a required field
- Id *string `min:"1" type:"string" required:"true"`
-
- // A token used for optimistic locking. WAF returns a token to your get and
- // list requests, to mark the state of the entity at the time of the request.
- // To make changes to the entity associated with the token, you provide the
- // token to operations like update and delete. WAF uses the token to ensure
- // that no changes have been made to the entity since you last retrieved it.
- // If a change has been made, the update fails with a WAFOptimisticLockException.
- // If this happens, perform another get, and use the new token returned by that
- // operation.
- //
- // LockToken is a required field
- LockToken *string `min:"1" type:"string" required:"true"`
-
- // The name of the set. You cannot change the name after you create the set.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-}
-
-// String returns the string representation
-func (s DeleteRegexPatternSetInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteRegexPatternSetInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteRegexPatternSetInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteRegexPatternSetInput"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Id != nil && len(*s.Id) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Id", 1))
- }
- if s.LockToken == nil {
- invalidParams.Add(request.NewErrParamRequired("LockToken"))
- }
- if s.LockToken != nil && len(*s.LockToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteRegexPatternSetInput) SetId(v string) *DeleteRegexPatternSetInput {
- s.Id = &v
- return s
-}
-
-// SetLockToken sets the LockToken field's value.
-func (s *DeleteRegexPatternSetInput) SetLockToken(v string) *DeleteRegexPatternSetInput {
- s.LockToken = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *DeleteRegexPatternSetInput) SetName(v string) *DeleteRegexPatternSetInput {
- s.Name = &v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *DeleteRegexPatternSetInput) SetScope(v string) *DeleteRegexPatternSetInput {
- s.Scope = &v
- return s
-}
-
-type DeleteRegexPatternSetOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteRegexPatternSetOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteRegexPatternSetOutput) GoString() string {
- return s.String()
-}
-
-type DeleteRuleGroupInput struct {
- _ struct{} `type:"structure"`
-
- // A unique identifier for the rule group. This ID is returned in the responses
- // to create and list commands. You provide it to operations like update and
- // delete.
- //
- // Id is a required field
- Id *string `min:"1" type:"string" required:"true"`
-
- // A token used for optimistic locking. WAF returns a token to your get and
- // list requests, to mark the state of the entity at the time of the request.
- // To make changes to the entity associated with the token, you provide the
- // token to operations like update and delete. WAF uses the token to ensure
- // that no changes have been made to the entity since you last retrieved it.
- // If a change has been made, the update fails with a WAFOptimisticLockException.
- // If this happens, perform another get, and use the new token returned by that
- // operation.
- //
- // LockToken is a required field
- LockToken *string `min:"1" type:"string" required:"true"`
-
- // The name of the rule group. You cannot change the name of a rule group after
- // you create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-}
-
-// String returns the string representation
-func (s DeleteRuleGroupInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteRuleGroupInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteRuleGroupInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteRuleGroupInput"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Id != nil && len(*s.Id) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Id", 1))
- }
- if s.LockToken == nil {
- invalidParams.Add(request.NewErrParamRequired("LockToken"))
- }
- if s.LockToken != nil && len(*s.LockToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteRuleGroupInput) SetId(v string) *DeleteRuleGroupInput {
- s.Id = &v
- return s
-}
-
-// SetLockToken sets the LockToken field's value.
-func (s *DeleteRuleGroupInput) SetLockToken(v string) *DeleteRuleGroupInput {
- s.LockToken = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *DeleteRuleGroupInput) SetName(v string) *DeleteRuleGroupInput {
- s.Name = &v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *DeleteRuleGroupInput) SetScope(v string) *DeleteRuleGroupInput {
- s.Scope = &v
- return s
-}
-
-type DeleteRuleGroupOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteRuleGroupOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteRuleGroupOutput) GoString() string {
- return s.String()
-}
-
-type DeleteWebACLInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier for the web ACL. This ID is returned in the responses
- // to create and list commands. You provide it to operations like update and
- // delete.
- //
- // Id is a required field
- Id *string `min:"1" type:"string" required:"true"`
-
- // A token used for optimistic locking. WAF returns a token to your get and
- // list requests, to mark the state of the entity at the time of the request.
- // To make changes to the entity associated with the token, you provide the
- // token to operations like update and delete. WAF uses the token to ensure
- // that no changes have been made to the entity since you last retrieved it.
- // If a change has been made, the update fails with a WAFOptimisticLockException.
- // If this happens, perform another get, and use the new token returned by that
- // operation.
- //
- // LockToken is a required field
- LockToken *string `min:"1" type:"string" required:"true"`
-
- // The name of the web ACL. You cannot change the name of a web ACL after you
- // create it.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-}
-
-// String returns the string representation
-func (s DeleteWebACLInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteWebACLInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteWebACLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteWebACLInput"}
- if s.Id == nil {
- invalidParams.Add(request.NewErrParamRequired("Id"))
- }
- if s.Id != nil && len(*s.Id) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Id", 1))
- }
- if s.LockToken == nil {
- invalidParams.Add(request.NewErrParamRequired("LockToken"))
- }
- if s.LockToken != nil && len(*s.LockToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("LockToken", 1))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetId sets the Id field's value.
-func (s *DeleteWebACLInput) SetId(v string) *DeleteWebACLInput {
- s.Id = &v
- return s
-}
-
-// SetLockToken sets the LockToken field's value.
-func (s *DeleteWebACLInput) SetLockToken(v string) *DeleteWebACLInput {
- s.LockToken = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *DeleteWebACLInput) SetName(v string) *DeleteWebACLInput {
- s.Name = &v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *DeleteWebACLInput) SetScope(v string) *DeleteWebACLInput {
- s.Scope = &v
- return s
-}
-
-type DeleteWebACLOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation
-func (s DeleteWebACLOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DeleteWebACLOutput) GoString() string {
- return s.String()
-}
-
-type DescribeManagedRuleGroupInput struct {
- _ struct{} `type:"structure"`
-
- // The name of the managed rule group. You use this, along with the vendor name,
- // to identify the rule group.
- //
- // Name is a required field
- Name *string `min:"1" type:"string" required:"true"`
-
- // Specifies whether this is for an Amazon CloudFront distribution or for a
- // regional application. A regional application can be an Application Load Balancer
- // (ALB), an Amazon API Gateway REST API, or an AppSync GraphQL API.
- //
- // To work with CloudFront, you must also specify the Region US East (N. Virginia)
- // as follows:
- //
- // * CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT
- // --region=us-east-1.
- //
- // * API and SDKs - For all calls, use the Region endpoint us-east-1.
- //
- // Scope is a required field
- Scope *string `type:"string" required:"true" enum:"Scope"`
-
- // The name of the managed rule group vendor. You use this, along with the rule
- // group name, to identify the rule group.
- //
- // VendorName is a required field
- VendorName *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation
-func (s DescribeManagedRuleGroupInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation
-func (s DescribeManagedRuleGroupInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeManagedRuleGroupInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeManagedRuleGroupInput"}
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Scope == nil {
- invalidParams.Add(request.NewErrParamRequired("Scope"))
- }
- if s.VendorName == nil {
- invalidParams.Add(request.NewErrParamRequired("VendorName"))
- }
- if s.VendorName != nil && len(*s.VendorName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("VendorName", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetName sets the Name field's value.
-func (s *DescribeManagedRuleGroupInput) SetName(v string) *DescribeManagedRuleGroupInput {
- s.Name = &v
- return s
-}
-
-// SetScope sets the Scope field's value.
-func (s *DescribeManagedRuleGroupInput) SetScope(v string) *DescribeManagedRuleGroupInput {
- s.Scope = &v
- return s
-}
-
-// SetVendorName sets the VendorName field's value.
-func (s *DescribeManagedRuleGroupInput) SetVendorName(v string) *DescribeManagedRuleGroupInput {
- s.VendorName = &v
- return s
-}
-
-type DescribeManagedRuleGroupOutput struct {
- _ struct{} `type:"structure"`
-
- // The labels that one or more rules in this rule group add to matching web
- // requests. These labels are defined in the RuleLabels for a Rule.
- AvailableLabels []*LabelSummary `type:"list"`
-
- // The web ACL capacity units (WCUs) required for this rule group. WAF uses
- // web ACL capacity units (WCU) to calculate and control the operating resources
- // that are used to run your rules, rule groups, and web ACLs. WAF calculates
- // capacity differently for each rule type, to reflect each rule's relative
- // cost. Rule group capacity is fixed at creation, so users can plan their web
- // ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
- Capacity *int64 `min:"1" type:"long"`
-
- // The labels that one or more rules in this rule group match against in label
- // match statements. These labels are defined in a LabelMatchStatement specification,
- // in the Statement definition of a rule.
- ConsumedLabels []*LabelSummary `type:"list"`
-
- // The label namespace prefix for this rule group. All labels added by rules
- // in this rule group have this prefix.
- //
- // * The syntax for the label namespace prefix for a managed rule group is
- // the following: awswaf:managed:::
- //
- // * When a rule with a label matches a web request, WAF adds the fully qualified
- // label to the request. A fully qualified label is made up of the label
- // namespace from the rule group or web ACL where the rule is defined and
- // the label from the rule, separated by a colon: