From 558cc46704aa8366812485563a2079cd9ed15a1b Mon Sep 17 00:00:00 2001 From: awssdkgo Date: Tue, 21 Jul 2020 18:08:12 +0000 Subject: [PATCH] Release v1.33.9 (2020-07-21) === ### Service Client Updates * `service/codeguruprofiler`: Updates service API and documentation --- CHANGELOG.md | 6 + aws/version.go | 2 +- .../codeguruprofiler/2019-07-18/api-2.json | 123 ++++- .../codeguruprofiler/2019-07-18/docs-2.json | 56 +- service/codeguruprofiler/api.go | 481 ++++++++++++++++++ .../codeguruprofileriface/interface.go | 12 + 6 files changed, 675 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f31ef776f5..4d224c89795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Release v1.33.9 (2020-07-21) +=== + +### Service Client Updates +* `service/codeguruprofiler`: Updates service API and documentation + Release v1.33.8 (2020-07-20) === diff --git a/aws/version.go b/aws/version.go index ab2e5269e07..c0b9b28f6d3 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.33.8" +const SDKVersion = "1.33.9" diff --git a/models/apis/codeguruprofiler/2019-07-18/api-2.json b/models/apis/codeguruprofiler/2019-07-18/api-2.json index 0adf9cb63be..05ea54a7051 100644 --- a/models/apis/codeguruprofiler/2019-07-18/api-2.json +++ b/models/apis/codeguruprofiler/2019-07-18/api-2.json @@ -237,6 +237,21 @@ {"shape":"ThrottlingException"} ] }, + "ListTagsForResource":{ + "name":"ListTagsForResource", + "http":{ + "method":"GET", + "requestUri":"/tags/{resourceArn}", + "responseCode":200 + }, + "input":{"shape":"ListTagsForResourceRequest"}, + "output":{"shape":"ListTagsForResourceResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} + ] + }, "PostAgentProfile":{ "name":"PostAgentProfile", "http":{ @@ -321,6 +336,37 @@ {"shape":"ResourceNotFoundException"} ] }, + "TagResource":{ + "name":"TagResource", + "http":{ + "method":"POST", + "requestUri":"/tags/{resourceArn}", + "responseCode":204 + }, + "input":{"shape":"TagResourceRequest"}, + "output":{"shape":"TagResourceResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} + ] + }, + "UntagResource":{ + "name":"UntagResource", + "http":{ + "method":"DELETE", + "requestUri":"/tags/{resourceArn}", + "responseCode":204 + }, + "input":{"shape":"UntagResourceRequest"}, + "output":{"shape":"UntagResourceResponse"}, + "errors":[ + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ResourceNotFoundException"} + ], + "idempotent":true + }, "UpdateProfilingGroup":{ "name":"UpdateProfilingGroup", "http":{ @@ -594,7 +640,8 @@ "locationName":"clientToken" }, "computePlatform":{"shape":"ComputePlatform"}, - "profilingGroupName":{"shape":"ProfilingGroupName"} + "profilingGroupName":{"shape":"ProfilingGroupName"}, + "tags":{"shape":"TagsMap"} } }, "CreateProfilingGroupResponse":{ @@ -682,8 +729,7 @@ "FleetInstanceId":{ "type":"string", "max":255, - "min":1, - "pattern":"^[\\w-.:/]+$" + "min":1 }, "FrameMetric":{ "type":"structure", @@ -1042,6 +1088,23 @@ "profilingGroups":{"shape":"ProfilingGroupDescriptions"} } }, + "ListTagsForResourceRequest":{ + "type":"structure", + "required":["resourceArn"], + "members":{ + "resourceArn":{ + "shape":"ProfilingGroupArn", + "location":"uri", + "locationName":"resourceArn" + } + } + }, + "ListTagsForResourceResponse":{ + "type":"structure", + "members":{ + "tags":{"shape":"TagsMap"} + } + }, "Locale":{"type":"string"}, "Match":{ "type":"structure", @@ -1204,6 +1267,7 @@ "createdAt":{"shape":"Timestamp"}, "name":{"shape":"ProfilingGroupName"}, "profilingStatus":{"shape":"ProfilingStatus"}, + "tags":{"shape":"TagsMap"}, "updatedAt":{"shape":"Timestamp"} } }, @@ -1406,6 +1470,35 @@ "members":{ } }, + "TagKeys":{ + "type":"list", + "member":{"shape":"String"} + }, + "TagResourceRequest":{ + "type":"structure", + "required":[ + "resourceArn", + "tags" + ], + "members":{ + "resourceArn":{ + "shape":"ProfilingGroupArn", + "location":"uri", + "locationName":"resourceArn" + }, + "tags":{"shape":"TagsMap"} + } + }, + "TagResourceResponse":{ + "type":"structure", + "members":{ + } + }, + "TagsMap":{ + "type":"map", + "key":{"shape":"String"}, + "value":{"shape":"String"} + }, "TargetFrame":{ "type":"list", "member":{"shape":"String"} @@ -1446,6 +1539,30 @@ "key":{"shape":"String"}, "value":{"shape":"ListOfTimestamps"} }, + "UntagResourceRequest":{ + "type":"structure", + "required":[ + "resourceArn", + "tagKeys" + ], + "members":{ + "resourceArn":{ + "shape":"ProfilingGroupArn", + "location":"uri", + "locationName":"resourceArn" + }, + "tagKeys":{ + "shape":"TagKeys", + "location":"querystring", + "locationName":"tagKeys" + } + } + }, + "UntagResourceResponse":{ + "type":"structure", + "members":{ + } + }, "UpdateProfilingGroupRequest":{ "type":"structure", "required":[ diff --git a/models/apis/codeguruprofiler/2019-07-18/docs-2.json b/models/apis/codeguruprofiler/2019-07-18/docs-2.json index a0722cb1c36..3dbda5b3c1a 100644 --- a/models/apis/codeguruprofiler/2019-07-18/docs-2.json +++ b/models/apis/codeguruprofiler/2019-07-18/docs-2.json @@ -16,11 +16,14 @@ "ListFindingsReports": "

List the available reports for a given profiling group and time range.

", "ListProfileTimes": "

Lists the start times of the available aggregated profiles of a profiling group for an aggregation period within the specified time range.

", "ListProfilingGroups": "

Returns a list of profiling groups. The profiling groups are returned as ProfilingGroupDescription objects.

", + "ListTagsForResource": "

Returns a list of the tags that are assigned to a specified resource.

", "PostAgentProfile": "

Submits profiling data to an aggregated profile of a profiling group. To get an aggregated profile that is created with this profiling data, use GetProfile .

", "PutPermission": "

Adds permissions to a profiling group's resource-based policy that are provided using an action group. If a profiling group doesn't have a resource-based policy, one is created for it using the permissions in the action group and the roles and users in the principals parameter.

 <p> The one supported action group that can be added is <code>agentPermission</code> which grants <code>ConfigureAgent</code> and <code>PostAgent</code> permissions. For more information, see <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-ug/resource-based-policies.html">Resource-based policies in CodeGuru Profiler</a> in the <i>Amazon CodeGuru Profiler User Guide</i>, <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_ConfigureAgent.html"> <code>ConfigureAgent</code> </a>, and <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_PostAgentProfile.html"> <code>PostAgentProfile</code> </a>. </p> <p> The first time you call <code>PutPermission</code> on a profiling group, do not specify a <code>revisionId</code> because it doesn't have a resource-based policy. Subsequent calls must provide a <code>revisionId</code> to specify which revision of the resource-based policy to add the permissions to. </p> <p> The response contains the profiling group's JSON-formatted resource policy. </p> 
", "RemoveNotificationChannel": "

Remove one anomaly notifications channel for a profiling group.

", "RemovePermission": "

Removes permissions from a profiling group's resource-based policy that are provided using an action group. The one supported action group that can be removed is agentPermission which grants ConfigureAgent and PostAgent permissions. For more information, see Resource-based policies in CodeGuru Profiler in the Amazon CodeGuru Profiler User Guide, ConfigureAgent , and PostAgentProfile .

", "SubmitFeedback": "

Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is useful or not.

", + "TagResource": "

Use to assign one or more tags to a resource.

", + "UntagResource": "

Use to remove one or more tags from a resource.

", "UpdateProfilingGroup": "

Updates a profiling group.

" }, "shapes": { @@ -413,6 +416,16 @@ "refs": { } }, + "ListTagsForResourceRequest": { + "base": null, + "refs": { + } + }, + "ListTagsForResourceResponse": { + "base": null, + "refs": { + } + }, "Locale": { "base": "

BCP47 language code. Supported locales: de-DE, en-GB, en-US, es-ES, fr-FR, it-IT, ja-JP, ko-KR, pt-BR, zh-CN, zh-TW

", "refs": { @@ -554,7 +567,10 @@ "ProfilingGroupArn": { "base": null, "refs": { - "ProfilingGroupDescription$arn": "

The Amazon Resource Name (ARN) identifying the profiling group resource.

" + "ListTagsForResourceRequest$resourceArn": "

The Amazon Resource Name (ARN) of the resource that contains the tags to return.

", + "ProfilingGroupDescription$arn": "

The Amazon Resource Name (ARN) identifying the profiling group resource.

", + "TagResourceRequest$resourceArn": "

The Amazon Resource Name (ARN) of the resource that the tags are added to.

", + "UntagResourceRequest$resourceArn": "

The Amazon Resource Name (ARN) of the resource that contains the tags to remove.

" } }, "ProfilingGroupDescription": { @@ -700,6 +716,9 @@ "ServiceQuotaExceededException$message": null, "Strings$member": null, "SubmitFeedbackRequest$comment": "

Optional feedback about this anomaly.

", + "TagKeys$member": null, + "TagsMap$key": null, + "TagsMap$value": null, "TargetFrame$member": null, "ThreadStates$member": null, "ThrottlingException$message": null, @@ -724,6 +743,31 @@ "refs": { } }, + "TagKeys": { + "base": null, + "refs": { + "UntagResourceRequest$tagKeys": "

A list of tag keys. Existing tags of resources with keys in this list are removed from the specified resource.

" + } + }, + "TagResourceRequest": { + "base": null, + "refs": { + } + }, + "TagResourceResponse": { + "base": null, + "refs": { + } + }, + "TagsMap": { + "base": null, + "refs": { + "CreateProfilingGroupRequest$tags": "

A list of tags to add to the created profiling group.

", + "ListTagsForResourceResponse$tags": "

The list of tags assigned to the specified resource. This is the list of tags returned in the response.

", + "ProfilingGroupDescription$tags": "

A list of the tags that belong to this profiling group.

", + "TagResourceRequest$tags": "

The list of tags that are added to the specified resource.

" + } + }, "TargetFrame": { "base": null, "refs": { @@ -791,6 +835,16 @@ "BatchGetFrameMetricDataResponse$unprocessedEndTimes": "

List of instances which remained unprocessed. This will create a missing time step in the list of end times.

" } }, + "UntagResourceRequest": { + "base": null, + "refs": { + } + }, + "UntagResourceResponse": { + "base": null, + "refs": { + } + }, "UpdateProfilingGroupRequest": { "base": "

The structure representing the updateProfilingGroupRequest.

", "refs": { diff --git a/service/codeguruprofiler/api.go b/service/codeguruprofiler/api.go index 24a6846fc30..b7378563090 100644 --- a/service/codeguruprofiler/api.go +++ b/service/codeguruprofiler/api.go @@ -1530,6 +1530,91 @@ func (c *CodeGuruProfiler) ListProfilingGroupsPagesWithContext(ctx aws.Context, 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/codeguruprofiler-2019-07-18/ListTagsForResource +func (c *CodeGuruProfiler) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { + op := &request.Operation{ + Name: opListTagsForResource, + HTTPMethod: "GET", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &ListTagsForResourceInput{} + } + + output = &ListTagsForResourceOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListTagsForResource API operation for Amazon CodeGuru Profiler. +// +// Returns a list of the tags that are assigned to a 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 Amazon CodeGuru Profiler's +// API operation ListTagsForResource for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// The server encountered an internal error and is unable to complete the request. +// +// * ValidationException +// The parameter is not valid. +// +// * ResourceNotFoundException +// The resource specified in the request does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/ListTagsForResource +func (c *CodeGuruProfiler) 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 *CodeGuruProfiler) 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 opPostAgentProfile = "PostAgentProfile" // PostAgentProfileRequest generates a "aws/request.Request" representing the @@ -2006,6 +2091,178 @@ func (c *CodeGuruProfiler) SubmitFeedbackWithContext(ctx aws.Context, input *Sub 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/codeguruprofiler-2019-07-18/TagResource +func (c *CodeGuruProfiler) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { + op := &request.Operation{ + Name: opTagResource, + HTTPMethod: "POST", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &TagResourceInput{} + } + + output = &TagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// TagResource API operation for Amazon CodeGuru Profiler. +// +// Use to assign one or more tags to a 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 Amazon CodeGuru Profiler's +// API operation TagResource for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// The server encountered an internal error and is unable to complete the request. +// +// * ValidationException +// The parameter is not valid. +// +// * ResourceNotFoundException +// The resource specified in the request does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/TagResource +func (c *CodeGuruProfiler) 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 *CodeGuruProfiler) 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/codeguruprofiler-2019-07-18/UntagResource +func (c *CodeGuruProfiler) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { + op := &request.Operation{ + Name: opUntagResource, + HTTPMethod: "DELETE", + HTTPPath: "/tags/{resourceArn}", + } + + if input == nil { + input = &UntagResourceInput{} + } + + output = &UntagResourceOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UntagResource API operation for Amazon CodeGuru Profiler. +// +// Use to remove one or more tags from a 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 Amazon CodeGuru Profiler's +// API operation UntagResource for usage and error information. +// +// Returned Error Types: +// * InternalServerException +// The server encountered an internal error and is unable to complete the request. +// +// * ValidationException +// The parameter is not valid. +// +// * ResourceNotFoundException +// The resource specified in the request does not exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguruprofiler-2019-07-18/UntagResource +func (c *CodeGuruProfiler) 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 *CodeGuruProfiler) 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 opUpdateProfilingGroup = "UpdateProfilingGroup" // UpdateProfilingGroupRequest generates a "aws/request.Request" representing the @@ -2955,6 +3212,9 @@ type CreateProfilingGroupInput struct { // // ProfilingGroupName is a required field ProfilingGroupName *string `locationName:"profilingGroupName" min:"1" type:"string" required:"true"` + + // A list of tags to add to the created profiling group. + Tags map[string]*string `locationName:"tags" type:"map"` } // String returns the string representation @@ -3015,6 +3275,12 @@ func (s *CreateProfilingGroupInput) SetProfilingGroupName(v string) *CreateProfi return s } +// SetTags sets the Tags field's value. +func (s *CreateProfilingGroupInput) SetTags(v map[string]*string) *CreateProfilingGroupInput { + s.Tags = v + return s +} + // The structure representing the createProfilingGroupResponse. type CreateProfilingGroupOutput struct { _ struct{} `type:"structure" payload:"ProfilingGroup"` @@ -4466,6 +4732,72 @@ func (s *ListProfilingGroupsOutput) SetProfilingGroups(v []*ProfilingGroupDescri return s } +type ListTagsForResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that contains the tags to + // return. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" 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.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { + s.ResourceArn = &v + return s +} + +type ListTagsForResourceOutput struct { + _ struct{} `type:"structure"` + + // The list of tags assigned to the specified resource. This is the list of + // tags returned in the response. + Tags map[string]*string `locationName:"tags" type:"map"` +} + +// 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() +} + +// SetTags sets the Tags field's value. +func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { + s.Tags = v + return s +} + // The part of a profile that contains a recommendation found during analysis. type Match struct { _ struct{} `type:"structure"` @@ -4837,6 +5169,9 @@ type ProfilingGroupDescription struct { // start time for the most recent aggregated profile. ProfilingStatus *ProfilingStatus `locationName:"profilingStatus" type:"structure"` + // A list of the tags that belong to this profiling group. + Tags map[string]*string `locationName:"tags" type:"map"` + // The date and time when the profiling group was last updated. Specify using // the ISO 8601 format. For example, 2020-06-01T13:15:02.001Z represents 1 millisecond // past June 1, 2020 1:15:02 PM UTC. @@ -4889,6 +5224,12 @@ func (s *ProfilingGroupDescription) SetProfilingStatus(v *ProfilingStatus) *Prof return s } +// SetTags sets the Tags field's value. +func (s *ProfilingGroupDescription) SetTags(v map[string]*string) *ProfilingGroupDescription { + s.Tags = v + return s +} + // SetUpdatedAt sets the UpdatedAt field's value. func (s *ProfilingGroupDescription) SetUpdatedAt(v time.Time) *ProfilingGroupDescription { s.UpdatedAt = &v @@ -5573,6 +5914,75 @@ func (s SubmitFeedbackOutput) GoString() string { return s.String() } +type TagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that the tags are added to. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // The list of tags that are added to the specified resource. + // + // Tags is a required field + Tags map[string]*string `locationName:"tags" type:"map" 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.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.Tags == nil { + invalidParams.Add(request.NewErrParamRequired("Tags")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { + s.ResourceArn = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TagResourceInput) SetTags(v map[string]*string) *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() +} + // The request was denied due to request throttling. type ThrottlingException struct { _ struct{} `type:"structure"` @@ -5658,6 +6068,77 @@ func (s *TimestampStructure) SetValue(v time.Time) *TimestampStructure { return s } +type UntagResourceInput struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the resource that contains the tags to + // remove. + // + // ResourceArn is a required field + ResourceArn *string `location:"uri" locationName:"resourceArn" type:"string" required:"true"` + + // A list of tag keys. Existing tags of resources with keys in this list are + // removed from the specified resource. + // + // TagKeys is a required field + TagKeys []*string `location:"querystring" locationName:"tagKeys" 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.ResourceArn == nil { + invalidParams.Add(request.NewErrParamRequired("ResourceArn")) + } + if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) + } + if s.TagKeys == nil { + invalidParams.Add(request.NewErrParamRequired("TagKeys")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetResourceArn sets the ResourceArn field's value. +func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { + s.ResourceArn = &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() +} + // The structure representing the updateProfilingGroupRequest. type UpdateProfilingGroupInput struct { _ struct{} `type:"structure"` diff --git a/service/codeguruprofiler/codeguruprofileriface/interface.go b/service/codeguruprofiler/codeguruprofileriface/interface.go index 8091ebc1a4c..ae80f3e0f8d 100644 --- a/service/codeguruprofiler/codeguruprofileriface/interface.go +++ b/service/codeguruprofiler/codeguruprofileriface/interface.go @@ -128,6 +128,10 @@ type CodeGuruProfilerAPI interface { ListProfilingGroupsPages(*codeguruprofiler.ListProfilingGroupsInput, func(*codeguruprofiler.ListProfilingGroupsOutput, bool) bool) error ListProfilingGroupsPagesWithContext(aws.Context, *codeguruprofiler.ListProfilingGroupsInput, func(*codeguruprofiler.ListProfilingGroupsOutput, bool) bool, ...request.Option) error + ListTagsForResource(*codeguruprofiler.ListTagsForResourceInput) (*codeguruprofiler.ListTagsForResourceOutput, error) + ListTagsForResourceWithContext(aws.Context, *codeguruprofiler.ListTagsForResourceInput, ...request.Option) (*codeguruprofiler.ListTagsForResourceOutput, error) + ListTagsForResourceRequest(*codeguruprofiler.ListTagsForResourceInput) (*request.Request, *codeguruprofiler.ListTagsForResourceOutput) + PostAgentProfile(*codeguruprofiler.PostAgentProfileInput) (*codeguruprofiler.PostAgentProfileOutput, error) PostAgentProfileWithContext(aws.Context, *codeguruprofiler.PostAgentProfileInput, ...request.Option) (*codeguruprofiler.PostAgentProfileOutput, error) PostAgentProfileRequest(*codeguruprofiler.PostAgentProfileInput) (*request.Request, *codeguruprofiler.PostAgentProfileOutput) @@ -148,6 +152,14 @@ type CodeGuruProfilerAPI interface { SubmitFeedbackWithContext(aws.Context, *codeguruprofiler.SubmitFeedbackInput, ...request.Option) (*codeguruprofiler.SubmitFeedbackOutput, error) SubmitFeedbackRequest(*codeguruprofiler.SubmitFeedbackInput) (*request.Request, *codeguruprofiler.SubmitFeedbackOutput) + TagResource(*codeguruprofiler.TagResourceInput) (*codeguruprofiler.TagResourceOutput, error) + TagResourceWithContext(aws.Context, *codeguruprofiler.TagResourceInput, ...request.Option) (*codeguruprofiler.TagResourceOutput, error) + TagResourceRequest(*codeguruprofiler.TagResourceInput) (*request.Request, *codeguruprofiler.TagResourceOutput) + + UntagResource(*codeguruprofiler.UntagResourceInput) (*codeguruprofiler.UntagResourceOutput, error) + UntagResourceWithContext(aws.Context, *codeguruprofiler.UntagResourceInput, ...request.Option) (*codeguruprofiler.UntagResourceOutput, error) + UntagResourceRequest(*codeguruprofiler.UntagResourceInput) (*request.Request, *codeguruprofiler.UntagResourceOutput) + UpdateProfilingGroup(*codeguruprofiler.UpdateProfilingGroupInput) (*codeguruprofiler.UpdateProfilingGroupOutput, error) UpdateProfilingGroupWithContext(aws.Context, *codeguruprofiler.UpdateProfilingGroupInput, ...request.Option) (*codeguruprofiler.UpdateProfilingGroupOutput, error) UpdateProfilingGroupRequest(*codeguruprofiler.UpdateProfilingGroupInput) (*request.Request, *codeguruprofiler.UpdateProfilingGroupOutput)