// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package applicationdiscoveryservice import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type DescribeTagsInput struct { _ struct{} `type:"structure"` // You can filter the list using a key-value format. You can separate these // items by using logical operators. Allowed filters include tagKey, tagValue, // and configurationId. Filters []TagFilter `locationName:"filters" type:"list"` // The total number of items to return in a single page of output. The maximum // value is 100. MaxResults *int64 `locationName:"maxResults" type:"integer"` // A token to start the list. Use this token to get the next set of results. NextToken *string `locationName:"nextToken" type:"string"` } // String returns the string representation func (s DescribeTagsInput) String() string { return awsutil.Prettify(s) } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeTagsInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "DescribeTagsInput"} if s.Filters != nil { for i, v := range s.Filters { if err := v.Validate(); err != nil { invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(aws.ErrInvalidParams)) } } } if invalidParams.Len() > 0 { return invalidParams } return nil } type DescribeTagsOutput struct { _ struct{} `type:"structure"` // The call returns a token. Use this token to get the next set of results. NextToken *string `locationName:"nextToken" type:"string"` // Depending on the input, this is a list of configuration items tagged with // a specific tag, or a list of tags for a specific configuration item. Tags []ConfigurationTag `locationName:"tags" type:"list"` } // String returns the string representation func (s DescribeTagsOutput) String() string { return awsutil.Prettify(s) } const opDescribeTags = "DescribeTags" // DescribeTagsRequest returns a request value for making API operation for // AWS Application Discovery Service. // // Retrieves a list of configuration items that have tags as specified by the // key-value pairs, name and value, passed to the optional parameter filters. // // There are three valid tag filter names: // // * tagKey // // * tagValue // // * configurationId // // Also, all configuration items associated with your user account that have // tags can be listed if you call DescribeTags as is without passing any parameters. // // // Example sending a request using DescribeTagsRequest. // req := client.DescribeTagsRequest(params) // resp, err := req.Send(context.TODO()) // if err == nil { // fmt.Println(resp) // } // // Please also see https://docs.aws.amazon.com/goto/WebAPI/discovery-2015-11-01/DescribeTags func (c *Client) DescribeTagsRequest(input *DescribeTagsInput) DescribeTagsRequest { op := &aws.Operation{ Name: opDescribeTags, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeTagsInput{} } req := c.newRequest(op, input, &DescribeTagsOutput{}) return DescribeTagsRequest{Request: req, Input: input, Copy: c.DescribeTagsRequest} } // DescribeTagsRequest is the request type for the // DescribeTags API operation. type DescribeTagsRequest struct { *aws.Request Input *DescribeTagsInput Copy func(*DescribeTagsInput) DescribeTagsRequest } // Send marshals and sends the DescribeTags API request. func (r DescribeTagsRequest) Send(ctx context.Context) (*DescribeTagsResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &DescribeTagsResponse{ DescribeTagsOutput: r.Request.Data.(*DescribeTagsOutput), response: &aws.Response{Request: r.Request}, } return resp, nil } // DescribeTagsResponse is the response type for the // DescribeTags API operation. type DescribeTagsResponse struct { *DescribeTagsOutput response *aws.Response } // SDKResponseMetdata returns the response metadata for the // DescribeTags request. func (r *DescribeTagsResponse) SDKResponseMetdata() *aws.Response { return r.response }