repo_name stringlengths 1 52 | repo_creator stringclasses 6
values | programming_language stringclasses 4
values | code stringlengths 0 9.68M | num_lines int64 1 234k |
|---|---|---|---|---|
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// The related resources of an Audit finding. The following resources can be
// returned from calling this API:
// - DEVICE_CERTIFICATE
// - CA_CERTIFICATE
// - IOT_POLICY
// - COGNITO_IDENTITY_POOL
// - CLIENT_ID
// - ACCOUNT_SETTINGS
// - ROLE_ALIAS
// - IAM_ROLE
// - ISSUER_CERTIFICATE
//
// This API is similar to DescribeAuditFinding's RelatedResources (https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeAuditFinding.html)
// but provides pagination and is not limited to 10 resources. When calling
// DescribeAuditFinding (https://docs.aws.amazon.com/iot/latest/apireference/API_DescribeAuditFinding.html)
// for the intermediate CA revoked for active device certificates check,
// RelatedResources will not be populated. You must use this API,
// ListRelatedResourcesForAuditFinding, to list the certificates.
func (c *Client) ListRelatedResourcesForAuditFinding(ctx context.Context, params *ListRelatedResourcesForAuditFindingInput, optFns ...func(*Options)) (*ListRelatedResourcesForAuditFindingOutput, error) {
if params == nil {
params = &ListRelatedResourcesForAuditFindingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListRelatedResourcesForAuditFinding", params, optFns, c.addOperationListRelatedResourcesForAuditFindingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListRelatedResourcesForAuditFindingOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListRelatedResourcesForAuditFindingInput struct {
// The finding Id.
//
// This member is required.
FindingId *string
// The maximum number of results to return at one time.
MaxResults *int32
// A token that can be used to retrieve the next set of results, or null if there
// are no additional results.
NextToken *string
noSmithyDocumentSerde
}
type ListRelatedResourcesForAuditFindingOutput struct {
// A token that can be used to retrieve the next set of results, or null for the
// first API call.
NextToken *string
// The related resources.
RelatedResources []types.RelatedResource
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListRelatedResourcesForAuditFindingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListRelatedResourcesForAuditFinding{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRelatedResourcesForAuditFinding{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListRelatedResourcesForAuditFindingValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRelatedResourcesForAuditFinding(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListRelatedResourcesForAuditFindingAPIClient is a client that implements the
// ListRelatedResourcesForAuditFinding operation.
type ListRelatedResourcesForAuditFindingAPIClient interface {
ListRelatedResourcesForAuditFinding(context.Context, *ListRelatedResourcesForAuditFindingInput, ...func(*Options)) (*ListRelatedResourcesForAuditFindingOutput, error)
}
var _ ListRelatedResourcesForAuditFindingAPIClient = (*Client)(nil)
// ListRelatedResourcesForAuditFindingPaginatorOptions is the paginator options
// for ListRelatedResourcesForAuditFinding
type ListRelatedResourcesForAuditFindingPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListRelatedResourcesForAuditFindingPaginator is a paginator for
// ListRelatedResourcesForAuditFinding
type ListRelatedResourcesForAuditFindingPaginator struct {
options ListRelatedResourcesForAuditFindingPaginatorOptions
client ListRelatedResourcesForAuditFindingAPIClient
params *ListRelatedResourcesForAuditFindingInput
nextToken *string
firstPage bool
}
// NewListRelatedResourcesForAuditFindingPaginator returns a new
// ListRelatedResourcesForAuditFindingPaginator
func NewListRelatedResourcesForAuditFindingPaginator(client ListRelatedResourcesForAuditFindingAPIClient, params *ListRelatedResourcesForAuditFindingInput, optFns ...func(*ListRelatedResourcesForAuditFindingPaginatorOptions)) *ListRelatedResourcesForAuditFindingPaginator {
if params == nil {
params = &ListRelatedResourcesForAuditFindingInput{}
}
options := ListRelatedResourcesForAuditFindingPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListRelatedResourcesForAuditFindingPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListRelatedResourcesForAuditFindingPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListRelatedResourcesForAuditFinding page.
func (p *ListRelatedResourcesForAuditFindingPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRelatedResourcesForAuditFindingOutput, 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
result, err := p.client.ListRelatedResourcesForAuditFinding(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
}
func newServiceMetadataMiddleware_opListRelatedResourcesForAuditFinding(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListRelatedResourcesForAuditFinding",
}
}
| 247 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the role aliases registered in your account. Requires permission to
// access the ListRoleAliases (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListRoleAliases(ctx context.Context, params *ListRoleAliasesInput, optFns ...func(*Options)) (*ListRoleAliasesOutput, error) {
if params == nil {
params = &ListRoleAliasesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListRoleAliases", params, optFns, c.addOperationListRoleAliasesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListRoleAliasesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListRoleAliasesInput struct {
// Return the list of role aliases in ascending alphabetical order.
AscendingOrder bool
// A marker used to get the next set of results.
Marker *string
// The maximum number of results to return at one time.
PageSize *int32
noSmithyDocumentSerde
}
type ListRoleAliasesOutput struct {
// A marker used to get the next set of results.
NextMarker *string
// The role aliases.
RoleAliases []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListRoleAliasesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListRoleAliases{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListRoleAliases{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRoleAliases(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListRoleAliasesAPIClient is a client that implements the ListRoleAliases
// operation.
type ListRoleAliasesAPIClient interface {
ListRoleAliases(context.Context, *ListRoleAliasesInput, ...func(*Options)) (*ListRoleAliasesOutput, error)
}
var _ ListRoleAliasesAPIClient = (*Client)(nil)
// ListRoleAliasesPaginatorOptions is the paginator options for ListRoleAliases
type ListRoleAliasesPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListRoleAliasesPaginator is a paginator for ListRoleAliases
type ListRoleAliasesPaginator struct {
options ListRoleAliasesPaginatorOptions
client ListRoleAliasesAPIClient
params *ListRoleAliasesInput
nextToken *string
firstPage bool
}
// NewListRoleAliasesPaginator returns a new ListRoleAliasesPaginator
func NewListRoleAliasesPaginator(client ListRoleAliasesAPIClient, params *ListRoleAliasesInput, optFns ...func(*ListRoleAliasesPaginatorOptions)) *ListRoleAliasesPaginator {
if params == nil {
params = &ListRoleAliasesInput{}
}
options := ListRoleAliasesPaginatorOptions{}
if params.PageSize != nil {
options.Limit = *params.PageSize
}
for _, fn := range optFns {
fn(&options)
}
return &ListRoleAliasesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListRoleAliasesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListRoleAliases page.
func (p *ListRoleAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRoleAliasesOutput, error) {
if !p.HasMorePages() {
return nil, fmt.Errorf("no more pages available")
}
params := *p.params
params.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.PageSize = limit
result, err := p.client.ListRoleAliases(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextMarker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListRoleAliases(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListRoleAliases",
}
}
| 221 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists all of your scheduled audits. Requires permission to access the
// ListScheduledAudits (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListScheduledAudits(ctx context.Context, params *ListScheduledAuditsInput, optFns ...func(*Options)) (*ListScheduledAuditsOutput, error) {
if params == nil {
params = &ListScheduledAuditsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListScheduledAudits", params, optFns, c.addOperationListScheduledAuditsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListScheduledAuditsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListScheduledAuditsInput struct {
// The maximum number of results to return at one time. The default is 25.
MaxResults *int32
// The token for the next set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListScheduledAuditsOutput struct {
// A token that can be used to retrieve the next set of results, or null if there
// are no additional results.
NextToken *string
// The list of scheduled audits.
ScheduledAudits []types.ScheduledAuditMetadata
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListScheduledAuditsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListScheduledAudits{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListScheduledAudits{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListScheduledAudits(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListScheduledAuditsAPIClient is a client that implements the
// ListScheduledAudits operation.
type ListScheduledAuditsAPIClient interface {
ListScheduledAudits(context.Context, *ListScheduledAuditsInput, ...func(*Options)) (*ListScheduledAuditsOutput, error)
}
var _ ListScheduledAuditsAPIClient = (*Client)(nil)
// ListScheduledAuditsPaginatorOptions is the paginator options for
// ListScheduledAudits
type ListScheduledAuditsPaginatorOptions struct {
// The maximum number of results to return at one time. The default is 25.
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
}
// ListScheduledAuditsPaginator is a paginator for ListScheduledAudits
type ListScheduledAuditsPaginator struct {
options ListScheduledAuditsPaginatorOptions
client ListScheduledAuditsAPIClient
params *ListScheduledAuditsInput
nextToken *string
firstPage bool
}
// NewListScheduledAuditsPaginator returns a new ListScheduledAuditsPaginator
func NewListScheduledAuditsPaginator(client ListScheduledAuditsAPIClient, params *ListScheduledAuditsInput, optFns ...func(*ListScheduledAuditsPaginatorOptions)) *ListScheduledAuditsPaginator {
if params == nil {
params = &ListScheduledAuditsInput{}
}
options := ListScheduledAuditsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListScheduledAuditsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListScheduledAuditsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListScheduledAudits page.
func (p *ListScheduledAuditsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListScheduledAuditsOutput, 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
result, err := p.client.ListScheduledAudits(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
}
func newServiceMetadataMiddleware_opListScheduledAudits(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListScheduledAudits",
}
}
| 221 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the Device Defender security profiles you've created. You can filter
// security profiles by dimension or custom metric. Requires permission to access
// the ListSecurityProfiles (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action. dimensionName and metricName cannot be used in the same request.
func (c *Client) ListSecurityProfiles(ctx context.Context, params *ListSecurityProfilesInput, optFns ...func(*Options)) (*ListSecurityProfilesOutput, error) {
if params == nil {
params = &ListSecurityProfilesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListSecurityProfiles", params, optFns, c.addOperationListSecurityProfilesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListSecurityProfilesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListSecurityProfilesInput struct {
// A filter to limit results to the security profiles that use the defined
// dimension. Cannot be used with metricName
DimensionName *string
// The maximum number of results to return at one time.
MaxResults *int32
// The name of the custom metric. Cannot be used with dimensionName .
MetricName *string
// The token for the next set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListSecurityProfilesOutput struct {
// A token that can be used to retrieve the next set of results, or null if there
// are no additional results.
NextToken *string
// A list of security profile identifiers (names and ARNs).
SecurityProfileIdentifiers []types.SecurityProfileIdentifier
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListSecurityProfilesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListSecurityProfiles{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListSecurityProfiles{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecurityProfiles(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListSecurityProfilesAPIClient is a client that implements the
// ListSecurityProfiles operation.
type ListSecurityProfilesAPIClient interface {
ListSecurityProfiles(context.Context, *ListSecurityProfilesInput, ...func(*Options)) (*ListSecurityProfilesOutput, error)
}
var _ ListSecurityProfilesAPIClient = (*Client)(nil)
// ListSecurityProfilesPaginatorOptions is the paginator options for
// ListSecurityProfiles
type ListSecurityProfilesPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListSecurityProfilesPaginator is a paginator for ListSecurityProfiles
type ListSecurityProfilesPaginator struct {
options ListSecurityProfilesPaginatorOptions
client ListSecurityProfilesAPIClient
params *ListSecurityProfilesInput
nextToken *string
firstPage bool
}
// NewListSecurityProfilesPaginator returns a new ListSecurityProfilesPaginator
func NewListSecurityProfilesPaginator(client ListSecurityProfilesAPIClient, params *ListSecurityProfilesInput, optFns ...func(*ListSecurityProfilesPaginatorOptions)) *ListSecurityProfilesPaginator {
if params == nil {
params = &ListSecurityProfilesInput{}
}
options := ListSecurityProfilesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListSecurityProfilesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListSecurityProfilesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListSecurityProfiles page.
func (p *ListSecurityProfilesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSecurityProfilesOutput, 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
result, err := p.client.ListSecurityProfiles(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
}
func newServiceMetadataMiddleware_opListSecurityProfiles(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListSecurityProfiles",
}
}
| 229 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the Device Defender security profiles attached to a target (thing group).
// Requires permission to access the ListSecurityProfilesForTarget (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListSecurityProfilesForTarget(ctx context.Context, params *ListSecurityProfilesForTargetInput, optFns ...func(*Options)) (*ListSecurityProfilesForTargetOutput, error) {
if params == nil {
params = &ListSecurityProfilesForTargetInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListSecurityProfilesForTarget", params, optFns, c.addOperationListSecurityProfilesForTargetMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListSecurityProfilesForTargetOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListSecurityProfilesForTargetInput struct {
// The ARN of the target (thing group) whose attached security profiles you want
// to get.
//
// This member is required.
SecurityProfileTargetArn *string
// The maximum number of results to return at one time.
MaxResults *int32
// The token for the next set of results.
NextToken *string
// If true, return child groups too.
Recursive bool
noSmithyDocumentSerde
}
type ListSecurityProfilesForTargetOutput struct {
// A token that can be used to retrieve the next set of results, or null if there
// are no additional results.
NextToken *string
// A list of security profiles and their associated targets.
SecurityProfileTargetMappings []types.SecurityProfileTargetMapping
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListSecurityProfilesForTargetMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListSecurityProfilesForTarget{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListSecurityProfilesForTarget{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListSecurityProfilesForTargetValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecurityProfilesForTarget(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListSecurityProfilesForTargetAPIClient is a client that implements the
// ListSecurityProfilesForTarget operation.
type ListSecurityProfilesForTargetAPIClient interface {
ListSecurityProfilesForTarget(context.Context, *ListSecurityProfilesForTargetInput, ...func(*Options)) (*ListSecurityProfilesForTargetOutput, error)
}
var _ ListSecurityProfilesForTargetAPIClient = (*Client)(nil)
// ListSecurityProfilesForTargetPaginatorOptions is the paginator options for
// ListSecurityProfilesForTarget
type ListSecurityProfilesForTargetPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListSecurityProfilesForTargetPaginator is a paginator for
// ListSecurityProfilesForTarget
type ListSecurityProfilesForTargetPaginator struct {
options ListSecurityProfilesForTargetPaginatorOptions
client ListSecurityProfilesForTargetAPIClient
params *ListSecurityProfilesForTargetInput
nextToken *string
firstPage bool
}
// NewListSecurityProfilesForTargetPaginator returns a new
// ListSecurityProfilesForTargetPaginator
func NewListSecurityProfilesForTargetPaginator(client ListSecurityProfilesForTargetAPIClient, params *ListSecurityProfilesForTargetInput, optFns ...func(*ListSecurityProfilesForTargetPaginatorOptions)) *ListSecurityProfilesForTargetPaginator {
if params == nil {
params = &ListSecurityProfilesForTargetInput{}
}
options := ListSecurityProfilesForTargetPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListSecurityProfilesForTargetPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListSecurityProfilesForTargetPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListSecurityProfilesForTarget page.
func (p *ListSecurityProfilesForTargetPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSecurityProfilesForTargetOutput, 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
result, err := p.client.ListSecurityProfilesForTarget(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
}
func newServiceMetadataMiddleware_opListSecurityProfilesForTarget(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListSecurityProfilesForTarget",
}
}
| 235 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists all of the streams in your Amazon Web Services account. Requires
// permission to access the ListStreams (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListStreams(ctx context.Context, params *ListStreamsInput, optFns ...func(*Options)) (*ListStreamsOutput, error) {
if params == nil {
params = &ListStreamsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListStreams", params, optFns, c.addOperationListStreamsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListStreamsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListStreamsInput struct {
// Set to true to return the list of streams in ascending order.
AscendingOrder bool
// The maximum number of results to return at a time.
MaxResults *int32
// A token used to get the next set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListStreamsOutput struct {
// A token used to get the next set of results.
NextToken *string
// A list of streams.
Streams []types.StreamSummary
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListStreams{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListStreams{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreams(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListStreamsAPIClient is a client that implements the ListStreams operation.
type ListStreamsAPIClient interface {
ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error)
}
var _ ListStreamsAPIClient = (*Client)(nil)
// ListStreamsPaginatorOptions is the paginator options for ListStreams
type ListStreamsPaginatorOptions struct {
// The maximum number of results to return at a time.
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
}
// ListStreamsPaginator is a paginator for ListStreams
type ListStreamsPaginator struct {
options ListStreamsPaginatorOptions
client ListStreamsAPIClient
params *ListStreamsInput
nextToken *string
firstPage bool
}
// NewListStreamsPaginator returns a new ListStreamsPaginator
func NewListStreamsPaginator(client ListStreamsAPIClient, params *ListStreamsInput, optFns ...func(*ListStreamsPaginatorOptions)) *ListStreamsPaginator {
if params == nil {
params = &ListStreamsInput{}
}
options := ListStreamsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListStreamsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListStreamsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListStreams page.
func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStreamsOutput, 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
result, err := p.client.ListStreams(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
}
func newServiceMetadataMiddleware_opListStreams(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListStreams",
}
}
| 221 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the tags (metadata) you have assigned to the resource. Requires
// permission to access the ListTagsForResource (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
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 ARN of the resource.
//
// This member is required.
ResourceArn *string
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListTagsForResourceOutput struct {
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// The list of tags 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) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); 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 = awsmiddleware.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
}
return 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)
// 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
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
}
func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListTagsForResource",
}
}
| 215 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List targets for the specified policy. Requires permission to access the
// ListTargetsForPolicy (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
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 {
// The policy name.
//
// This member is required.
PolicyName *string
// A marker used to get the next set of results.
Marker *string
// The maximum number of results to return at one time.
PageSize *int32
noSmithyDocumentSerde
}
type ListTargetsForPolicyOutput struct {
// A marker used to get the next set of results.
NextMarker *string
// The policy targets.
Targets []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTargetsForPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListTargetsForPolicy{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTargetsForPolicy{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); 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 = awsmiddleware.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
}
return 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)
// ListTargetsForPolicyPaginatorOptions is the paginator options for
// ListTargetsForPolicy
type ListTargetsForPolicyPaginatorOptions struct {
// The maximum number of results to return at one time.
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.PageSize != nil {
options.Limit = *params.PageSize
}
for _, fn := range optFns {
fn(&options)
}
return &ListTargetsForPolicyPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.Marker,
}
}
// 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.Marker = p.nextToken
var limit *int32
if p.options.Limit > 0 {
limit = &p.options.Limit
}
params.PageSize = limit
result, err := p.client.ListTargetsForPolicy(ctx, ¶ms, optFns...)
if err != nil {
return nil, err
}
p.firstPage = false
prevToken := p.nextToken
p.nextToken = result.NextMarker
if p.options.StopOnDuplicateToken &&
prevToken != nil &&
p.nextToken != nil &&
*prevToken == *p.nextToken {
p.nextToken = nil
}
return result, nil
}
func newServiceMetadataMiddleware_opListTargetsForPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListTargetsForPolicy",
}
}
| 227 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the targets (thing groups) associated with a given Device Defender
// security profile. Requires permission to access the
// ListTargetsForSecurityProfile (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListTargetsForSecurityProfile(ctx context.Context, params *ListTargetsForSecurityProfileInput, optFns ...func(*Options)) (*ListTargetsForSecurityProfileOutput, error) {
if params == nil {
params = &ListTargetsForSecurityProfileInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTargetsForSecurityProfile", params, optFns, c.addOperationListTargetsForSecurityProfileMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTargetsForSecurityProfileOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListTargetsForSecurityProfileInput struct {
// The security profile.
//
// This member is required.
SecurityProfileName *string
// The maximum number of results to return at one time.
MaxResults *int32
// The token for the next set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListTargetsForSecurityProfileOutput struct {
// A token that can be used to retrieve the next set of results, or null if there
// are no additional results.
NextToken *string
// The thing groups to which the security profile is attached.
SecurityProfileTargets []types.SecurityProfileTarget
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTargetsForSecurityProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListTargetsForSecurityProfile{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTargetsForSecurityProfile{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListTargetsForSecurityProfileValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTargetsForSecurityProfile(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListTargetsForSecurityProfileAPIClient is a client that implements the
// ListTargetsForSecurityProfile operation.
type ListTargetsForSecurityProfileAPIClient interface {
ListTargetsForSecurityProfile(context.Context, *ListTargetsForSecurityProfileInput, ...func(*Options)) (*ListTargetsForSecurityProfileOutput, error)
}
var _ ListTargetsForSecurityProfileAPIClient = (*Client)(nil)
// ListTargetsForSecurityProfilePaginatorOptions is the paginator options for
// ListTargetsForSecurityProfile
type ListTargetsForSecurityProfilePaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListTargetsForSecurityProfilePaginator is a paginator for
// ListTargetsForSecurityProfile
type ListTargetsForSecurityProfilePaginator struct {
options ListTargetsForSecurityProfilePaginatorOptions
client ListTargetsForSecurityProfileAPIClient
params *ListTargetsForSecurityProfileInput
nextToken *string
firstPage bool
}
// NewListTargetsForSecurityProfilePaginator returns a new
// ListTargetsForSecurityProfilePaginator
func NewListTargetsForSecurityProfilePaginator(client ListTargetsForSecurityProfileAPIClient, params *ListTargetsForSecurityProfileInput, optFns ...func(*ListTargetsForSecurityProfilePaginatorOptions)) *ListTargetsForSecurityProfilePaginator {
if params == nil {
params = &ListTargetsForSecurityProfileInput{}
}
options := ListTargetsForSecurityProfilePaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListTargetsForSecurityProfilePaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListTargetsForSecurityProfilePaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListTargetsForSecurityProfile page.
func (p *ListTargetsForSecurityProfilePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTargetsForSecurityProfileOutput, 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
result, err := p.client.ListTargetsForSecurityProfile(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
}
func newServiceMetadataMiddleware_opListTargetsForSecurityProfile(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListTargetsForSecurityProfile",
}
}
| 232 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List the thing groups in your account. Requires permission to access the
// ListThingGroups (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListThingGroups(ctx context.Context, params *ListThingGroupsInput, optFns ...func(*Options)) (*ListThingGroupsOutput, error) {
if params == nil {
params = &ListThingGroupsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThingGroups", params, optFns, c.addOperationListThingGroupsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingGroupsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListThingGroupsInput struct {
// The maximum number of results to return at one time.
MaxResults *int32
// A filter that limits the results to those with the specified name prefix.
NamePrefixFilter *string
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
// A filter that limits the results to those with the specified parent group.
ParentGroup *string
// If true, return child groups as well.
Recursive *bool
noSmithyDocumentSerde
}
type ListThingGroupsOutput struct {
// The token to use to get the next set of results. Will not be returned if
// operation has returned all results.
NextToken *string
// The thing groups.
ThingGroups []types.GroupNameAndArn
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThingGroups{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThingGroups{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingGroups(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingGroupsAPIClient is a client that implements the ListThingGroups
// operation.
type ListThingGroupsAPIClient interface {
ListThingGroups(context.Context, *ListThingGroupsInput, ...func(*Options)) (*ListThingGroupsOutput, error)
}
var _ ListThingGroupsAPIClient = (*Client)(nil)
// ListThingGroupsPaginatorOptions is the paginator options for ListThingGroups
type ListThingGroupsPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListThingGroupsPaginator is a paginator for ListThingGroups
type ListThingGroupsPaginator struct {
options ListThingGroupsPaginatorOptions
client ListThingGroupsAPIClient
params *ListThingGroupsInput
nextToken *string
firstPage bool
}
// NewListThingGroupsPaginator returns a new ListThingGroupsPaginator
func NewListThingGroupsPaginator(client ListThingGroupsAPIClient, params *ListThingGroupsInput, optFns ...func(*ListThingGroupsPaginatorOptions)) *ListThingGroupsPaginator {
if params == nil {
params = &ListThingGroupsInput{}
}
options := ListThingGroupsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingGroupsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingGroupsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThingGroups page.
func (p *ListThingGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingGroupsOutput, 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
result, err := p.client.ListThingGroups(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
}
func newServiceMetadataMiddleware_opListThingGroups(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThingGroups",
}
}
| 230 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List the thing groups to which the specified thing belongs. Requires permission
// to access the ListThingGroupsForThing (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListThingGroupsForThing(ctx context.Context, params *ListThingGroupsForThingInput, optFns ...func(*Options)) (*ListThingGroupsForThingOutput, error) {
if params == nil {
params = &ListThingGroupsForThingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThingGroupsForThing", params, optFns, c.addOperationListThingGroupsForThingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingGroupsForThingOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListThingGroupsForThingInput struct {
// The thing name.
//
// This member is required.
ThingName *string
// The maximum number of results to return at one time.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListThingGroupsForThingOutput struct {
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// The thing groups.
ThingGroups []types.GroupNameAndArn
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingGroupsForThingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThingGroupsForThing{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThingGroupsForThing{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListThingGroupsForThingValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingGroupsForThing(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingGroupsForThingAPIClient is a client that implements the
// ListThingGroupsForThing operation.
type ListThingGroupsForThingAPIClient interface {
ListThingGroupsForThing(context.Context, *ListThingGroupsForThingInput, ...func(*Options)) (*ListThingGroupsForThingOutput, error)
}
var _ ListThingGroupsForThingAPIClient = (*Client)(nil)
// ListThingGroupsForThingPaginatorOptions is the paginator options for
// ListThingGroupsForThing
type ListThingGroupsForThingPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListThingGroupsForThingPaginator is a paginator for ListThingGroupsForThing
type ListThingGroupsForThingPaginator struct {
options ListThingGroupsForThingPaginatorOptions
client ListThingGroupsForThingAPIClient
params *ListThingGroupsForThingInput
nextToken *string
firstPage bool
}
// NewListThingGroupsForThingPaginator returns a new
// ListThingGroupsForThingPaginator
func NewListThingGroupsForThingPaginator(client ListThingGroupsForThingAPIClient, params *ListThingGroupsForThingInput, optFns ...func(*ListThingGroupsForThingPaginatorOptions)) *ListThingGroupsForThingPaginator {
if params == nil {
params = &ListThingGroupsForThingInput{}
}
options := ListThingGroupsForThingPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingGroupsForThingPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingGroupsForThingPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThingGroupsForThing page.
func (p *ListThingGroupsForThingPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingGroupsForThingOutput, 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
result, err := p.client.ListThingGroupsForThing(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
}
func newServiceMetadataMiddleware_opListThingGroupsForThing(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThingGroupsForThing",
}
}
| 231 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the principals associated with the specified thing. A principal can be
// X.509 certificates, IAM users, groups, and roles, Amazon Cognito identities or
// federated identities. Requires permission to access the ListThingPrincipals (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListThingPrincipals(ctx context.Context, params *ListThingPrincipalsInput, optFns ...func(*Options)) (*ListThingPrincipalsOutput, error) {
if params == nil {
params = &ListThingPrincipalsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThingPrincipals", params, optFns, c.addOperationListThingPrincipalsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingPrincipalsOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the ListThingPrincipal operation.
type ListThingPrincipalsInput struct {
// The name of the thing.
//
// This member is required.
ThingName *string
// The maximum number of results to return in this operation.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
noSmithyDocumentSerde
}
// The output from the ListThingPrincipals operation.
type ListThingPrincipalsOutput struct {
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// The principals associated with the thing.
Principals []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingPrincipalsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThingPrincipals{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThingPrincipals{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListThingPrincipalsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingPrincipals(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingPrincipalsAPIClient is a client that implements the
// ListThingPrincipals operation.
type ListThingPrincipalsAPIClient interface {
ListThingPrincipals(context.Context, *ListThingPrincipalsInput, ...func(*Options)) (*ListThingPrincipalsOutput, error)
}
var _ ListThingPrincipalsAPIClient = (*Client)(nil)
// ListThingPrincipalsPaginatorOptions is the paginator options for
// ListThingPrincipals
type ListThingPrincipalsPaginatorOptions struct {
// The maximum number of results to return in this operation.
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
}
// ListThingPrincipalsPaginator is a paginator for ListThingPrincipals
type ListThingPrincipalsPaginator struct {
options ListThingPrincipalsPaginatorOptions
client ListThingPrincipalsAPIClient
params *ListThingPrincipalsInput
nextToken *string
firstPage bool
}
// NewListThingPrincipalsPaginator returns a new ListThingPrincipalsPaginator
func NewListThingPrincipalsPaginator(client ListThingPrincipalsAPIClient, params *ListThingPrincipalsInput, optFns ...func(*ListThingPrincipalsPaginatorOptions)) *ListThingPrincipalsPaginator {
if params == nil {
params = &ListThingPrincipalsInput{}
}
options := ListThingPrincipalsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingPrincipalsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingPrincipalsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThingPrincipals page.
func (p *ListThingPrincipalsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingPrincipalsOutput, 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
result, err := p.client.ListThingPrincipals(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
}
func newServiceMetadataMiddleware_opListThingPrincipals(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThingPrincipals",
}
}
| 232 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Information about the thing registration tasks.
func (c *Client) ListThingRegistrationTaskReports(ctx context.Context, params *ListThingRegistrationTaskReportsInput, optFns ...func(*Options)) (*ListThingRegistrationTaskReportsOutput, error) {
if params == nil {
params = &ListThingRegistrationTaskReportsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThingRegistrationTaskReports", params, optFns, c.addOperationListThingRegistrationTaskReportsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingRegistrationTaskReportsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListThingRegistrationTaskReportsInput struct {
// The type of task report.
//
// This member is required.
ReportType types.ReportType
// The id of the task.
//
// This member is required.
TaskId *string
// The maximum number of results to return per request.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListThingRegistrationTaskReportsOutput struct {
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// The type of task report.
ReportType types.ReportType
// Links to the task resources.
ResourceLinks []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingRegistrationTaskReportsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThingRegistrationTaskReports{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThingRegistrationTaskReports{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListThingRegistrationTaskReportsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingRegistrationTaskReports(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingRegistrationTaskReportsAPIClient is a client that implements the
// ListThingRegistrationTaskReports operation.
type ListThingRegistrationTaskReportsAPIClient interface {
ListThingRegistrationTaskReports(context.Context, *ListThingRegistrationTaskReportsInput, ...func(*Options)) (*ListThingRegistrationTaskReportsOutput, error)
}
var _ ListThingRegistrationTaskReportsAPIClient = (*Client)(nil)
// ListThingRegistrationTaskReportsPaginatorOptions is the paginator options for
// ListThingRegistrationTaskReports
type ListThingRegistrationTaskReportsPaginatorOptions struct {
// The maximum number of results to return per request.
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
}
// ListThingRegistrationTaskReportsPaginator is a paginator for
// ListThingRegistrationTaskReports
type ListThingRegistrationTaskReportsPaginator struct {
options ListThingRegistrationTaskReportsPaginatorOptions
client ListThingRegistrationTaskReportsAPIClient
params *ListThingRegistrationTaskReportsInput
nextToken *string
firstPage bool
}
// NewListThingRegistrationTaskReportsPaginator returns a new
// ListThingRegistrationTaskReportsPaginator
func NewListThingRegistrationTaskReportsPaginator(client ListThingRegistrationTaskReportsAPIClient, params *ListThingRegistrationTaskReportsInput, optFns ...func(*ListThingRegistrationTaskReportsPaginatorOptions)) *ListThingRegistrationTaskReportsPaginator {
if params == nil {
params = &ListThingRegistrationTaskReportsInput{}
}
options := ListThingRegistrationTaskReportsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingRegistrationTaskReportsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingRegistrationTaskReportsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThingRegistrationTaskReports page.
func (p *ListThingRegistrationTaskReportsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingRegistrationTaskReportsOutput, 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
result, err := p.client.ListThingRegistrationTaskReports(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
}
func newServiceMetadataMiddleware_opListThingRegistrationTaskReports(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThingRegistrationTaskReports",
}
}
| 238 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// List bulk thing provisioning tasks. Requires permission to access the
// ListThingRegistrationTasks (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListThingRegistrationTasks(ctx context.Context, params *ListThingRegistrationTasksInput, optFns ...func(*Options)) (*ListThingRegistrationTasksOutput, error) {
if params == nil {
params = &ListThingRegistrationTasksInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThingRegistrationTasks", params, optFns, c.addOperationListThingRegistrationTasksMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingRegistrationTasksOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListThingRegistrationTasksInput struct {
// The maximum number of results to return at one time.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
// The status of the bulk thing provisioning task.
Status types.Status
noSmithyDocumentSerde
}
type ListThingRegistrationTasksOutput struct {
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// A list of bulk thing provisioning task IDs.
TaskIds []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingRegistrationTasksMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThingRegistrationTasks{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThingRegistrationTasks{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingRegistrationTasks(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingRegistrationTasksAPIClient is a client that implements the
// ListThingRegistrationTasks operation.
type ListThingRegistrationTasksAPIClient interface {
ListThingRegistrationTasks(context.Context, *ListThingRegistrationTasksInput, ...func(*Options)) (*ListThingRegistrationTasksOutput, error)
}
var _ ListThingRegistrationTasksAPIClient = (*Client)(nil)
// ListThingRegistrationTasksPaginatorOptions is the paginator options for
// ListThingRegistrationTasks
type ListThingRegistrationTasksPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListThingRegistrationTasksPaginator is a paginator for
// ListThingRegistrationTasks
type ListThingRegistrationTasksPaginator struct {
options ListThingRegistrationTasksPaginatorOptions
client ListThingRegistrationTasksAPIClient
params *ListThingRegistrationTasksInput
nextToken *string
firstPage bool
}
// NewListThingRegistrationTasksPaginator returns a new
// ListThingRegistrationTasksPaginator
func NewListThingRegistrationTasksPaginator(client ListThingRegistrationTasksAPIClient, params *ListThingRegistrationTasksInput, optFns ...func(*ListThingRegistrationTasksPaginatorOptions)) *ListThingRegistrationTasksPaginator {
if params == nil {
params = &ListThingRegistrationTasksInput{}
}
options := ListThingRegistrationTasksPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingRegistrationTasksPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingRegistrationTasksPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThingRegistrationTasks page.
func (p *ListThingRegistrationTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingRegistrationTasksOutput, 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
result, err := p.client.ListThingRegistrationTasks(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
}
func newServiceMetadataMiddleware_opListThingRegistrationTasks(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThingRegistrationTasks",
}
}
| 227 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists your things. Use the attributeName and attributeValue parameters to
// filter your things. For example, calling ListThings with attributeName=Color
// and attributeValue=Red retrieves all things in the registry that contain an
// attribute Color with the value Red. For more information, see List Things (https://docs.aws.amazon.com/iot/latest/developerguide/thing-registry.html#list-things)
// from the Amazon Web Services IoT Core Developer Guide. Requires permission to
// access the ListThings (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action. You will not be charged for calling this API if an Access denied error
// is returned. You will also not be charged if no attributes or pagination token
// was provided in request and no pagination token and no results were returned.
func (c *Client) ListThings(ctx context.Context, params *ListThingsInput, optFns ...func(*Options)) (*ListThingsOutput, error) {
if params == nil {
params = &ListThingsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThings", params, optFns, c.addOperationListThingsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingsOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the ListThings operation.
type ListThingsInput struct {
// The attribute name used to search for things.
AttributeName *string
// The attribute value used to search for things.
AttributeValue *string
// The maximum number of results to return in this operation.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
// The name of the thing type used to search for things.
ThingTypeName *string
// When true , the action returns the thing resources with attribute values that
// start with the attributeValue provided. When false , or not present, the action
// returns only the thing resources with attribute values that match the entire
// attributeValue provided.
UsePrefixAttributeValue bool
noSmithyDocumentSerde
}
// The output from the ListThings operation.
type ListThingsOutput struct {
// The token to use to get the next set of results. Will not be returned if
// operation has returned all results.
NextToken *string
// The things.
Things []types.ThingAttribute
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThings{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThings{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThings(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingsAPIClient is a client that implements the ListThings operation.
type ListThingsAPIClient interface {
ListThings(context.Context, *ListThingsInput, ...func(*Options)) (*ListThingsOutput, error)
}
var _ ListThingsAPIClient = (*Client)(nil)
// ListThingsPaginatorOptions is the paginator options for ListThings
type ListThingsPaginatorOptions struct {
// The maximum number of results to return in this operation.
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
}
// ListThingsPaginator is a paginator for ListThings
type ListThingsPaginator struct {
options ListThingsPaginatorOptions
client ListThingsAPIClient
params *ListThingsInput
nextToken *string
firstPage bool
}
// NewListThingsPaginator returns a new ListThingsPaginator
func NewListThingsPaginator(client ListThingsAPIClient, params *ListThingsInput, optFns ...func(*ListThingsPaginatorOptions)) *ListThingsPaginator {
if params == nil {
params = &ListThingsInput{}
}
options := ListThingsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThings page.
func (p *ListThingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingsOutput, 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
result, err := p.client.ListThings(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
}
func newServiceMetadataMiddleware_opListThings(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThings",
}
}
| 243 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the things you have added to the given billing group. Requires permission
// to access the ListThingsInBillingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListThingsInBillingGroup(ctx context.Context, params *ListThingsInBillingGroupInput, optFns ...func(*Options)) (*ListThingsInBillingGroupOutput, error) {
if params == nil {
params = &ListThingsInBillingGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThingsInBillingGroup", params, optFns, c.addOperationListThingsInBillingGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingsInBillingGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListThingsInBillingGroupInput struct {
// The name of the billing group.
//
// This member is required.
BillingGroupName *string
// The maximum number of results to return per request.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListThingsInBillingGroupOutput struct {
// The token to use to get the next set of results. Will not be returned if
// operation has returned all results.
NextToken *string
// A list of things in the billing group.
Things []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingsInBillingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThingsInBillingGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThingsInBillingGroup{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListThingsInBillingGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingsInBillingGroup(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingsInBillingGroupAPIClient is a client that implements the
// ListThingsInBillingGroup operation.
type ListThingsInBillingGroupAPIClient interface {
ListThingsInBillingGroup(context.Context, *ListThingsInBillingGroupInput, ...func(*Options)) (*ListThingsInBillingGroupOutput, error)
}
var _ ListThingsInBillingGroupAPIClient = (*Client)(nil)
// ListThingsInBillingGroupPaginatorOptions is the paginator options for
// ListThingsInBillingGroup
type ListThingsInBillingGroupPaginatorOptions struct {
// The maximum number of results to return per request.
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
}
// ListThingsInBillingGroupPaginator is a paginator for ListThingsInBillingGroup
type ListThingsInBillingGroupPaginator struct {
options ListThingsInBillingGroupPaginatorOptions
client ListThingsInBillingGroupAPIClient
params *ListThingsInBillingGroupInput
nextToken *string
firstPage bool
}
// NewListThingsInBillingGroupPaginator returns a new
// ListThingsInBillingGroupPaginator
func NewListThingsInBillingGroupPaginator(client ListThingsInBillingGroupAPIClient, params *ListThingsInBillingGroupInput, optFns ...func(*ListThingsInBillingGroupPaginatorOptions)) *ListThingsInBillingGroupPaginator {
if params == nil {
params = &ListThingsInBillingGroupInput{}
}
options := ListThingsInBillingGroupPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingsInBillingGroupPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingsInBillingGroupPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThingsInBillingGroup page.
func (p *ListThingsInBillingGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingsInBillingGroupOutput, 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
result, err := p.client.ListThingsInBillingGroup(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
}
func newServiceMetadataMiddleware_opListThingsInBillingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThingsInBillingGroup",
}
}
| 230 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the things in the specified group. Requires permission to access the
// ListThingsInThingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListThingsInThingGroup(ctx context.Context, params *ListThingsInThingGroupInput, optFns ...func(*Options)) (*ListThingsInThingGroupOutput, error) {
if params == nil {
params = &ListThingsInThingGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThingsInThingGroup", params, optFns, c.addOperationListThingsInThingGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingsInThingGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListThingsInThingGroupInput struct {
// The thing group name.
//
// This member is required.
ThingGroupName *string
// The maximum number of results to return at one time.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
// When true, list things in this thing group and in all child groups as well.
Recursive bool
noSmithyDocumentSerde
}
type ListThingsInThingGroupOutput struct {
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// The things in the specified thing group.
Things []string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingsInThingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThingsInThingGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThingsInThingGroup{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListThingsInThingGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingsInThingGroup(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingsInThingGroupAPIClient is a client that implements the
// ListThingsInThingGroup operation.
type ListThingsInThingGroupAPIClient interface {
ListThingsInThingGroup(context.Context, *ListThingsInThingGroupInput, ...func(*Options)) (*ListThingsInThingGroupOutput, error)
}
var _ ListThingsInThingGroupAPIClient = (*Client)(nil)
// ListThingsInThingGroupPaginatorOptions is the paginator options for
// ListThingsInThingGroup
type ListThingsInThingGroupPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListThingsInThingGroupPaginator is a paginator for ListThingsInThingGroup
type ListThingsInThingGroupPaginator struct {
options ListThingsInThingGroupPaginatorOptions
client ListThingsInThingGroupAPIClient
params *ListThingsInThingGroupInput
nextToken *string
firstPage bool
}
// NewListThingsInThingGroupPaginator returns a new ListThingsInThingGroupPaginator
func NewListThingsInThingGroupPaginator(client ListThingsInThingGroupAPIClient, params *ListThingsInThingGroupInput, optFns ...func(*ListThingsInThingGroupPaginatorOptions)) *ListThingsInThingGroupPaginator {
if params == nil {
params = &ListThingsInThingGroupInput{}
}
options := ListThingsInThingGroupPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingsInThingGroupPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingsInThingGroupPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThingsInThingGroup page.
func (p *ListThingsInThingGroupPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingsInThingGroupOutput, 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
result, err := p.client.ListThingsInThingGroup(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
}
func newServiceMetadataMiddleware_opListThingsInThingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThingsInThingGroup",
}
}
| 232 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the existing thing types. Requires permission to access the ListThingTypes (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListThingTypes(ctx context.Context, params *ListThingTypesInput, optFns ...func(*Options)) (*ListThingTypesOutput, error) {
if params == nil {
params = &ListThingTypesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListThingTypes", params, optFns, c.addOperationListThingTypesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListThingTypesOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the ListThingTypes operation.
type ListThingTypesInput struct {
// The maximum number of results to return in this operation.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
// The name of the thing type.
ThingTypeName *string
noSmithyDocumentSerde
}
// The output for the ListThingTypes operation.
type ListThingTypesOutput struct {
// The token for the next set of results. Will not be returned if operation has
// returned all results.
NextToken *string
// The thing types.
ThingTypes []types.ThingTypeDefinition
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListThingTypesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListThingTypes{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListThingTypes{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListThingTypes(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListThingTypesAPIClient is a client that implements the ListThingTypes
// operation.
type ListThingTypesAPIClient interface {
ListThingTypes(context.Context, *ListThingTypesInput, ...func(*Options)) (*ListThingTypesOutput, error)
}
var _ ListThingTypesAPIClient = (*Client)(nil)
// ListThingTypesPaginatorOptions is the paginator options for ListThingTypes
type ListThingTypesPaginatorOptions struct {
// The maximum number of results to return in this operation.
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
}
// ListThingTypesPaginator is a paginator for ListThingTypes
type ListThingTypesPaginator struct {
options ListThingTypesPaginatorOptions
client ListThingTypesAPIClient
params *ListThingTypesInput
nextToken *string
firstPage bool
}
// NewListThingTypesPaginator returns a new ListThingTypesPaginator
func NewListThingTypesPaginator(client ListThingTypesAPIClient, params *ListThingTypesInput, optFns ...func(*ListThingTypesPaginatorOptions)) *ListThingTypesPaginator {
if params == nil {
params = &ListThingTypesInput{}
}
options := ListThingTypesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListThingTypesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListThingTypesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListThingTypes page.
func (p *ListThingTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListThingTypesOutput, 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
result, err := p.client.ListThingTypes(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
}
func newServiceMetadataMiddleware_opListThingTypes(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListThingTypes",
}
}
| 225 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists all the topic rule destinations in your Amazon Web Services account.
// Requires permission to access the ListTopicRuleDestinations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListTopicRuleDestinations(ctx context.Context, params *ListTopicRuleDestinationsInput, optFns ...func(*Options)) (*ListTopicRuleDestinationsOutput, error) {
if params == nil {
params = &ListTopicRuleDestinationsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTopicRuleDestinations", params, optFns, c.addOperationListTopicRuleDestinationsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTopicRuleDestinationsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListTopicRuleDestinationsInput struct {
// The maximum number of results to return at one time.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListTopicRuleDestinationsOutput struct {
// Information about a topic rule destination.
DestinationSummaries []types.TopicRuleDestinationSummary
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTopicRuleDestinationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListTopicRuleDestinations{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTopicRuleDestinations{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTopicRuleDestinations(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListTopicRuleDestinationsAPIClient is a client that implements the
// ListTopicRuleDestinations operation.
type ListTopicRuleDestinationsAPIClient interface {
ListTopicRuleDestinations(context.Context, *ListTopicRuleDestinationsInput, ...func(*Options)) (*ListTopicRuleDestinationsOutput, error)
}
var _ ListTopicRuleDestinationsAPIClient = (*Client)(nil)
// ListTopicRuleDestinationsPaginatorOptions is the paginator options for
// ListTopicRuleDestinations
type ListTopicRuleDestinationsPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListTopicRuleDestinationsPaginator is a paginator for ListTopicRuleDestinations
type ListTopicRuleDestinationsPaginator struct {
options ListTopicRuleDestinationsPaginatorOptions
client ListTopicRuleDestinationsAPIClient
params *ListTopicRuleDestinationsInput
nextToken *string
firstPage bool
}
// NewListTopicRuleDestinationsPaginator returns a new
// ListTopicRuleDestinationsPaginator
func NewListTopicRuleDestinationsPaginator(client ListTopicRuleDestinationsAPIClient, params *ListTopicRuleDestinationsInput, optFns ...func(*ListTopicRuleDestinationsPaginatorOptions)) *ListTopicRuleDestinationsPaginator {
if params == nil {
params = &ListTopicRuleDestinationsInput{}
}
options := ListTopicRuleDestinationsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListTopicRuleDestinationsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListTopicRuleDestinationsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListTopicRuleDestinations page.
func (p *ListTopicRuleDestinationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTopicRuleDestinationsOutput, 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
result, err := p.client.ListTopicRuleDestinations(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
}
func newServiceMetadataMiddleware_opListTopicRuleDestinations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListTopicRuleDestinations",
}
}
| 223 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the rules for the specific topic. Requires permission to access the
// ListTopicRules (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListTopicRules(ctx context.Context, params *ListTopicRulesInput, optFns ...func(*Options)) (*ListTopicRulesOutput, error) {
if params == nil {
params = &ListTopicRulesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListTopicRules", params, optFns, c.addOperationListTopicRulesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListTopicRulesOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the ListTopicRules operation.
type ListTopicRulesInput struct {
// The maximum number of results to return.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
// Specifies whether the rule is disabled.
RuleDisabled *bool
// The topic.
Topic *string
noSmithyDocumentSerde
}
// The output from the ListTopicRules operation.
type ListTopicRulesOutput struct {
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// The rules.
Rules []types.TopicRuleListItem
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTopicRulesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListTopicRules{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTopicRules{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTopicRules(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListTopicRulesAPIClient is a client that implements the ListTopicRules
// operation.
type ListTopicRulesAPIClient interface {
ListTopicRules(context.Context, *ListTopicRulesInput, ...func(*Options)) (*ListTopicRulesOutput, error)
}
var _ ListTopicRulesAPIClient = (*Client)(nil)
// ListTopicRulesPaginatorOptions is the paginator options for ListTopicRules
type ListTopicRulesPaginatorOptions struct {
// The maximum number of results to return.
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
}
// ListTopicRulesPaginator is a paginator for ListTopicRules
type ListTopicRulesPaginator struct {
options ListTopicRulesPaginatorOptions
client ListTopicRulesAPIClient
params *ListTopicRulesInput
nextToken *string
firstPage bool
}
// NewListTopicRulesPaginator returns a new ListTopicRulesPaginator
func NewListTopicRulesPaginator(client ListTopicRulesAPIClient, params *ListTopicRulesInput, optFns ...func(*ListTopicRulesPaginatorOptions)) *ListTopicRulesPaginator {
if params == nil {
params = &ListTopicRulesInput{}
}
options := ListTopicRulesPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListTopicRulesPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListTopicRulesPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListTopicRules page.
func (p *ListTopicRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTopicRulesOutput, 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
result, err := p.client.ListTopicRules(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
}
func newServiceMetadataMiddleware_opListTopicRules(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListTopicRules",
}
}
| 229 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists logging levels. Requires permission to access the ListV2LoggingLevels (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListV2LoggingLevels(ctx context.Context, params *ListV2LoggingLevelsInput, optFns ...func(*Options)) (*ListV2LoggingLevelsOutput, error) {
if params == nil {
params = &ListV2LoggingLevelsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListV2LoggingLevels", params, optFns, c.addOperationListV2LoggingLevelsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListV2LoggingLevelsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListV2LoggingLevelsInput struct {
// The maximum number of results to return at one time.
MaxResults *int32
// To retrieve the next set of results, the nextToken value from a previous
// response; otherwise null to receive the first set of results.
NextToken *string
// The type of resource for which you are configuring logging. Must be THING_Group .
TargetType types.LogTargetType
noSmithyDocumentSerde
}
type ListV2LoggingLevelsOutput struct {
// The logging configuration for a target.
LogTargetConfigurations []types.LogTargetConfiguration
// The token to use to get the next set of results, or null if there are no
// additional results.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListV2LoggingLevelsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListV2LoggingLevels{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListV2LoggingLevels{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListV2LoggingLevels(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListV2LoggingLevelsAPIClient is a client that implements the
// ListV2LoggingLevels operation.
type ListV2LoggingLevelsAPIClient interface {
ListV2LoggingLevels(context.Context, *ListV2LoggingLevelsInput, ...func(*Options)) (*ListV2LoggingLevelsOutput, error)
}
var _ ListV2LoggingLevelsAPIClient = (*Client)(nil)
// ListV2LoggingLevelsPaginatorOptions is the paginator options for
// ListV2LoggingLevels
type ListV2LoggingLevelsPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListV2LoggingLevelsPaginator is a paginator for ListV2LoggingLevels
type ListV2LoggingLevelsPaginator struct {
options ListV2LoggingLevelsPaginatorOptions
client ListV2LoggingLevelsAPIClient
params *ListV2LoggingLevelsInput
nextToken *string
firstPage bool
}
// NewListV2LoggingLevelsPaginator returns a new ListV2LoggingLevelsPaginator
func NewListV2LoggingLevelsPaginator(client ListV2LoggingLevelsAPIClient, params *ListV2LoggingLevelsInput, optFns ...func(*ListV2LoggingLevelsPaginatorOptions)) *ListV2LoggingLevelsPaginator {
if params == nil {
params = &ListV2LoggingLevelsInput{}
}
options := ListV2LoggingLevelsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListV2LoggingLevelsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListV2LoggingLevelsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListV2LoggingLevels page.
func (p *ListV2LoggingLevelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListV2LoggingLevelsOutput, 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
result, err := p.client.ListV2LoggingLevels(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
}
func newServiceMetadataMiddleware_opListV2LoggingLevels(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListV2LoggingLevels",
}
}
| 224 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Lists the Device Defender security profile violations discovered during the
// given time period. You can use filters to limit the results to those alerts
// issued for a particular security profile, behavior, or thing (device). Requires
// permission to access the ListViolationEvents (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ListViolationEvents(ctx context.Context, params *ListViolationEventsInput, optFns ...func(*Options)) (*ListViolationEventsOutput, error) {
if params == nil {
params = &ListViolationEventsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListViolationEvents", params, optFns, c.addOperationListViolationEventsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListViolationEventsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListViolationEventsInput struct {
// The end time for the alerts to be listed.
//
// This member is required.
EndTime *time.Time
// The start time for the alerts to be listed.
//
// This member is required.
StartTime *time.Time
// The criteria for a behavior.
BehaviorCriteriaType types.BehaviorCriteriaType
// A list of all suppressed alerts.
ListSuppressedAlerts *bool
// The maximum number of results to return at one time.
MaxResults *int32
// The token for the next set of results.
NextToken *string
// A filter to limit results to those alerts generated by the specified security
// profile.
SecurityProfileName *string
// A filter to limit results to those alerts caused by the specified thing.
ThingName *string
// The verification state of the violation (detect alarm).
VerificationState types.VerificationState
noSmithyDocumentSerde
}
type ListViolationEventsOutput struct {
// A token that can be used to retrieve the next set of results, or null if there
// are no additional results.
NextToken *string
// The security profile violation alerts issued for this account during the given
// time period, potentially filtered by security profile, behavior violated, or
// thing (device) violating.
ViolationEvents []types.ViolationEvent
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListViolationEventsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListViolationEvents{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListViolationEvents{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListViolationEventsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListViolationEvents(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
// ListViolationEventsAPIClient is a client that implements the
// ListViolationEvents operation.
type ListViolationEventsAPIClient interface {
ListViolationEvents(context.Context, *ListViolationEventsInput, ...func(*Options)) (*ListViolationEventsOutput, error)
}
var _ ListViolationEventsAPIClient = (*Client)(nil)
// ListViolationEventsPaginatorOptions is the paginator options for
// ListViolationEvents
type ListViolationEventsPaginatorOptions struct {
// The maximum number of results to return at one time.
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
}
// ListViolationEventsPaginator is a paginator for ListViolationEvents
type ListViolationEventsPaginator struct {
options ListViolationEventsPaginatorOptions
client ListViolationEventsAPIClient
params *ListViolationEventsInput
nextToken *string
firstPage bool
}
// NewListViolationEventsPaginator returns a new ListViolationEventsPaginator
func NewListViolationEventsPaginator(client ListViolationEventsAPIClient, params *ListViolationEventsInput, optFns ...func(*ListViolationEventsPaginatorOptions)) *ListViolationEventsPaginator {
if params == nil {
params = &ListViolationEventsInput{}
}
options := ListViolationEventsPaginatorOptions{}
if params.MaxResults != nil {
options.Limit = *params.MaxResults
}
for _, fn := range optFns {
fn(&options)
}
return &ListViolationEventsPaginator{
options: options,
client: client,
params: params,
firstPage: true,
nextToken: params.NextToken,
}
}
// HasMorePages returns a boolean indicating whether more pages are available
func (p *ListViolationEventsPaginator) HasMorePages() bool {
return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
}
// NextPage retrieves the next ListViolationEvents page.
func (p *ListViolationEventsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListViolationEventsOutput, 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
result, err := p.client.ListViolationEvents(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
}
func newServiceMetadataMiddleware_opListViolationEvents(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ListViolationEvents",
}
}
| 255 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Set a verification state and provide a description of that verification state
// on a violation (detect alarm).
func (c *Client) PutVerificationStateOnViolation(ctx context.Context, params *PutVerificationStateOnViolationInput, optFns ...func(*Options)) (*PutVerificationStateOnViolationOutput, error) {
if params == nil {
params = &PutVerificationStateOnViolationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "PutVerificationStateOnViolation", params, optFns, c.addOperationPutVerificationStateOnViolationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*PutVerificationStateOnViolationOutput)
out.ResultMetadata = metadata
return out, nil
}
type PutVerificationStateOnViolationInput struct {
// The verification state of the violation.
//
// This member is required.
VerificationState types.VerificationState
// The violation ID.
//
// This member is required.
ViolationId *string
// The description of the verification state of the violation (detect alarm).
VerificationStateDescription *string
noSmithyDocumentSerde
}
type PutVerificationStateOnViolationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationPutVerificationStateOnViolationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpPutVerificationStateOnViolation{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutVerificationStateOnViolation{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpPutVerificationStateOnViolationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutVerificationStateOnViolation(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opPutVerificationStateOnViolation(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "PutVerificationStateOnViolation",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Registers a CA certificate with Amazon Web Services IoT Core. There is no limit
// to the number of CA certificates you can register in your Amazon Web Services
// account. You can register up to 10 CA certificates with the same CA subject
// field per Amazon Web Services account. Requires permission to access the
// RegisterCACertificate (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) RegisterCACertificate(ctx context.Context, params *RegisterCACertificateInput, optFns ...func(*Options)) (*RegisterCACertificateOutput, error) {
if params == nil {
params = &RegisterCACertificateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RegisterCACertificate", params, optFns, c.addOperationRegisterCACertificateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RegisterCACertificateOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input to the RegisterCACertificate operation.
type RegisterCACertificateInput struct {
// The CA certificate.
//
// This member is required.
CaCertificate *string
// Allows this CA certificate to be used for auto registration of device
// certificates.
AllowAutoRegistration bool
// Describes the certificate mode in which the Certificate Authority (CA) will be
// registered. If the verificationCertificate field is not provided, set
// certificateMode to be SNI_ONLY . If the verificationCertificate field is
// provided, set certificateMode to be DEFAULT . When certificateMode is not
// provided, it defaults to DEFAULT . All the device certificates that are
// registered using this CA will be registered in the same certificate mode as the
// CA. For more information about certificate mode for device certificates, see
// certificate mode (https://docs.aws.amazon.com/iot/latest/apireference/API_CertificateDescription.html#iot-Type-CertificateDescription-certificateMode)
// .
CertificateMode types.CertificateMode
// Information about the registration configuration.
RegistrationConfig *types.RegistrationConfig
// A boolean value that specifies if the CA certificate is set to active. Valid
// values: ACTIVE | INACTIVE
SetAsActive bool
// Metadata which can be used to manage the CA certificate. For URI Request
// parameters use format: ...key1=value1&key2=value2... For the CLI command-line
// parameter use format: &&tags "key1=value1&key2=value2..." For the cli-input-json
// file use format: "tags": "key1=value1&key2=value2..."
Tags []types.Tag
// The private key verification certificate. If certificateMode is SNI_ONLY , the
// verificationCertificate field must be empty. If certificateMode is DEFAULT or
// not provided, the verificationCertificate field must not be empty.
VerificationCertificate *string
noSmithyDocumentSerde
}
// The output from the RegisterCACertificateResponse operation.
type RegisterCACertificateOutput struct {
// The CA certificate ARN.
CertificateArn *string
// The CA certificate identifier.
CertificateId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRegisterCACertificateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterCACertificate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterCACertificate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpRegisterCACertificateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterCACertificate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opRegisterCACertificate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "RegisterCACertificate",
}
}
| 168 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Registers a device certificate with IoT in the same certificate mode (https://docs.aws.amazon.com/iot/latest/apireference/API_CertificateDescription.html#iot-Type-CertificateDescription-certificateMode)
// as the signing CA. If you have more than one CA certificate that has the same
// subject field, you must specify the CA certificate that was used to sign the
// device certificate being registered. Requires permission to access the
// RegisterCertificate (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) RegisterCertificate(ctx context.Context, params *RegisterCertificateInput, optFns ...func(*Options)) (*RegisterCertificateOutput, error) {
if params == nil {
params = &RegisterCertificateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RegisterCertificate", params, optFns, c.addOperationRegisterCertificateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RegisterCertificateOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input to the RegisterCertificate operation.
type RegisterCertificateInput struct {
// The certificate data, in PEM format.
//
// This member is required.
CertificatePem *string
// The CA certificate used to sign the device certificate being registered.
CaCertificatePem *string
// A boolean value that specifies if the certificate is set to active. Valid
// values: ACTIVE | INACTIVE
//
// Deprecated: This member has been deprecated.
SetAsActive *bool
// The status of the register certificate request. Valid values that you can use
// include ACTIVE , INACTIVE , and REVOKED .
Status types.CertificateStatus
noSmithyDocumentSerde
}
// The output from the RegisterCertificate operation.
type RegisterCertificateOutput struct {
// The certificate ARN.
CertificateArn *string
// The certificate identifier.
CertificateId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRegisterCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterCertificate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterCertificate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpRegisterCertificateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterCertificate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opRegisterCertificate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "RegisterCertificate",
}
}
| 148 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Register a certificate that does not have a certificate authority (CA). For
// supported certificates, consult Certificate signing algorithms supported by IoT (https://docs.aws.amazon.com/iot/latest/developerguide/x509-client-certs.html#x509-cert-algorithms)
// .
func (c *Client) RegisterCertificateWithoutCA(ctx context.Context, params *RegisterCertificateWithoutCAInput, optFns ...func(*Options)) (*RegisterCertificateWithoutCAOutput, error) {
if params == nil {
params = &RegisterCertificateWithoutCAInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RegisterCertificateWithoutCA", params, optFns, c.addOperationRegisterCertificateWithoutCAMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RegisterCertificateWithoutCAOutput)
out.ResultMetadata = metadata
return out, nil
}
type RegisterCertificateWithoutCAInput struct {
// The certificate data, in PEM format.
//
// This member is required.
CertificatePem *string
// The status of the register certificate request.
Status types.CertificateStatus
noSmithyDocumentSerde
}
type RegisterCertificateWithoutCAOutput struct {
// The Amazon Resource Name (ARN) of the registered certificate.
CertificateArn *string
// The ID of the registered certificate. (The last part of the certificate ARN
// contains the certificate ID.
CertificateId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRegisterCertificateWithoutCAMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterCertificateWithoutCA{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterCertificateWithoutCA{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpRegisterCertificateWithoutCAValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterCertificateWithoutCA(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opRegisterCertificateWithoutCA(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "RegisterCertificateWithoutCA",
}
}
| 134 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Provisions a thing in the device registry. RegisterThing calls other IoT
// control plane APIs. These calls might exceed your account level IoT Throttling
// Limits (https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_iot)
// and cause throttle errors. Please contact Amazon Web Services Customer Support (https://console.aws.amazon.com/support/home)
// to raise your throttling limits if necessary. Requires permission to access the
// RegisterThing (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) RegisterThing(ctx context.Context, params *RegisterThingInput, optFns ...func(*Options)) (*RegisterThingOutput, error) {
if params == nil {
params = &RegisterThingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RegisterThing", params, optFns, c.addOperationRegisterThingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RegisterThingOutput)
out.ResultMetadata = metadata
return out, nil
}
type RegisterThingInput struct {
// The provisioning template. See Provisioning Devices That Have Device
// Certificates (https://docs.aws.amazon.com/iot/latest/developerguide/provision-w-cert.html)
// for more information.
//
// This member is required.
TemplateBody *string
// The parameters for provisioning a thing. See Provisioning Templates (https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html)
// for more information.
Parameters map[string]string
noSmithyDocumentSerde
}
type RegisterThingOutput struct {
// The certificate data, in PEM format.
CertificatePem *string
// ARNs for the generated resources.
ResourceArns map[string]string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRegisterThingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterThing{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterThing{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpRegisterThingValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterThing(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opRegisterThing(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "RegisterThing",
}
}
| 139 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Rejects a pending certificate transfer. After IoT rejects a certificate
// transfer, the certificate status changes from PENDING_TRANSFER to INACTIVE. To
// check for pending certificate transfers, call ListCertificates to enumerate
// your certificates. This operation can only be called by the transfer
// destination. After it is called, the certificate will be returned to the
// source's account in the INACTIVE state. Requires permission to access the
// RejectCertificateTransfer (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) RejectCertificateTransfer(ctx context.Context, params *RejectCertificateTransferInput, optFns ...func(*Options)) (*RejectCertificateTransferOutput, error) {
if params == nil {
params = &RejectCertificateTransferInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RejectCertificateTransfer", params, optFns, c.addOperationRejectCertificateTransferMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RejectCertificateTransferOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the RejectCertificateTransfer operation.
type RejectCertificateTransferInput struct {
// The ID of the certificate. (The last part of the certificate ARN contains the
// certificate ID.)
//
// This member is required.
CertificateId *string
// The reason the certificate transfer was rejected.
RejectReason *string
noSmithyDocumentSerde
}
type RejectCertificateTransferOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRejectCertificateTransferMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpRejectCertificateTransfer{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRejectCertificateTransfer{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpRejectCertificateTransferValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectCertificateTransfer(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opRejectCertificateTransfer(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "RejectCertificateTransfer",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Removes the given thing from the billing group. Requires permission to access
// the RemoveThingFromBillingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action. This call is asynchronous. It might take several seconds for the
// detachment to propagate.
func (c *Client) RemoveThingFromBillingGroup(ctx context.Context, params *RemoveThingFromBillingGroupInput, optFns ...func(*Options)) (*RemoveThingFromBillingGroupOutput, error) {
if params == nil {
params = &RemoveThingFromBillingGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RemoveThingFromBillingGroup", params, optFns, c.addOperationRemoveThingFromBillingGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RemoveThingFromBillingGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type RemoveThingFromBillingGroupInput struct {
// The ARN of the billing group.
BillingGroupArn *string
// The name of the billing group.
BillingGroupName *string
// The ARN of the thing to be removed from the billing group.
ThingArn *string
// The name of the thing to be removed from the billing group.
ThingName *string
noSmithyDocumentSerde
}
type RemoveThingFromBillingGroupOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRemoveThingFromBillingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpRemoveThingFromBillingGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemoveThingFromBillingGroup{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveThingFromBillingGroup(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opRemoveThingFromBillingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "RemoveThingFromBillingGroup",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Remove the specified thing from the specified group. You must specify either a
// thingGroupArn or a thingGroupName to identify the thing group and either a
// thingArn or a thingName to identify the thing to remove from the thing group.
// Requires permission to access the RemoveThingFromThingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) RemoveThingFromThingGroup(ctx context.Context, params *RemoveThingFromThingGroupInput, optFns ...func(*Options)) (*RemoveThingFromThingGroupOutput, error) {
if params == nil {
params = &RemoveThingFromThingGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "RemoveThingFromThingGroup", params, optFns, c.addOperationRemoveThingFromThingGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*RemoveThingFromThingGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type RemoveThingFromThingGroupInput struct {
// The ARN of the thing to remove from the group.
ThingArn *string
// The group ARN.
ThingGroupArn *string
// The group name.
ThingGroupName *string
// The name of the thing to remove from the group.
ThingName *string
noSmithyDocumentSerde
}
type RemoveThingFromThingGroupOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationRemoveThingFromThingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpRemoveThingFromThingGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemoveThingFromThingGroup{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveThingFromThingGroup(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opRemoveThingFromThingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "RemoveThingFromThingGroup",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Replaces the rule. You must specify all parameters for the new rule. Creating
// rules is an administrator-level action. Any user who has permission to create
// rules will be able to access data processed by the rule. Requires permission to
// access the ReplaceTopicRule (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ReplaceTopicRule(ctx context.Context, params *ReplaceTopicRuleInput, optFns ...func(*Options)) (*ReplaceTopicRuleOutput, error) {
if params == nil {
params = &ReplaceTopicRuleInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ReplaceTopicRule", params, optFns, c.addOperationReplaceTopicRuleMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ReplaceTopicRuleOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the ReplaceTopicRule operation.
type ReplaceTopicRuleInput struct {
// The name of the rule.
//
// This member is required.
RuleName *string
// The rule payload.
//
// This member is required.
TopicRulePayload *types.TopicRulePayload
noSmithyDocumentSerde
}
type ReplaceTopicRuleOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationReplaceTopicRuleMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpReplaceTopicRule{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpReplaceTopicRule{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpReplaceTopicRuleValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceTopicRule(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opReplaceTopicRule(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ReplaceTopicRule",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// The query search index. Requires permission to access the SearchIndex (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) SearchIndex(ctx context.Context, params *SearchIndexInput, optFns ...func(*Options)) (*SearchIndexOutput, error) {
if params == nil {
params = &SearchIndexInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SearchIndex", params, optFns, c.addOperationSearchIndexMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SearchIndexOutput)
out.ResultMetadata = metadata
return out, nil
}
type SearchIndexInput struct {
// The search query string. For more information about the search query syntax,
// see Query syntax (https://docs.aws.amazon.com/iot/latest/developerguide/query-syntax.html)
// .
//
// This member is required.
QueryString *string
// The search index name.
IndexName *string
// The maximum number of results to return at one time.
MaxResults *int32
// The token used to get the next set of results, or null if there are no
// additional results.
NextToken *string
// The query version.
QueryVersion *string
noSmithyDocumentSerde
}
type SearchIndexOutput struct {
// The token used to get the next set of results, or null if there are no
// additional results.
NextToken *string
// The thing groups that match the search query.
ThingGroups []types.ThingGroupDocument
// The things that match the search query.
Things []types.ThingDocument
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSearchIndexMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpSearchIndex{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSearchIndex{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSearchIndexValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchIndex(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opSearchIndex(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "SearchIndex",
}
}
| 148 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets the default authorizer. This will be used if a websocket connection is
// made without specifying an authorizer. Requires permission to access the
// SetDefaultAuthorizer (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) SetDefaultAuthorizer(ctx context.Context, params *SetDefaultAuthorizerInput, optFns ...func(*Options)) (*SetDefaultAuthorizerOutput, error) {
if params == nil {
params = &SetDefaultAuthorizerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetDefaultAuthorizer", params, optFns, c.addOperationSetDefaultAuthorizerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetDefaultAuthorizerOutput)
out.ResultMetadata = metadata
return out, nil
}
type SetDefaultAuthorizerInput struct {
// The authorizer name.
//
// This member is required.
AuthorizerName *string
noSmithyDocumentSerde
}
type SetDefaultAuthorizerOutput struct {
// The authorizer ARN.
AuthorizerArn *string
// The authorizer name.
AuthorizerName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetDefaultAuthorizerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpSetDefaultAuthorizer{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSetDefaultAuthorizer{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetDefaultAuthorizerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetDefaultAuthorizer(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opSetDefaultAuthorizer(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "SetDefaultAuthorizer",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets the specified version of the specified policy as the policy's default
// (operative) version. This action affects all certificates to which the policy is
// attached. To list the principals the policy is attached to, use the
// ListPrincipalPolicies action. Requires permission to access the
// SetDefaultPolicyVersion (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) SetDefaultPolicyVersion(ctx context.Context, params *SetDefaultPolicyVersionInput, optFns ...func(*Options)) (*SetDefaultPolicyVersionOutput, error) {
if params == nil {
params = &SetDefaultPolicyVersionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetDefaultPolicyVersion", params, optFns, c.addOperationSetDefaultPolicyVersionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetDefaultPolicyVersionOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the SetDefaultPolicyVersion operation.
type SetDefaultPolicyVersionInput struct {
// The policy name.
//
// This member is required.
PolicyName *string
// The policy version ID.
//
// This member is required.
PolicyVersionId *string
noSmithyDocumentSerde
}
type SetDefaultPolicyVersionOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetDefaultPolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpSetDefaultPolicyVersion{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSetDefaultPolicyVersion{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetDefaultPolicyVersionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetDefaultPolicyVersion(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opSetDefaultPolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "SetDefaultPolicyVersion",
}
}
| 131 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets the logging options. NOTE: use of this command is not recommended. Use
// SetV2LoggingOptions instead. Requires permission to access the SetLoggingOptions (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) SetLoggingOptions(ctx context.Context, params *SetLoggingOptionsInput, optFns ...func(*Options)) (*SetLoggingOptionsOutput, error) {
if params == nil {
params = &SetLoggingOptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetLoggingOptions", params, optFns, c.addOperationSetLoggingOptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetLoggingOptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the SetLoggingOptions operation.
type SetLoggingOptionsInput struct {
// The logging options payload.
//
// This member is required.
LoggingOptionsPayload *types.LoggingOptionsPayload
noSmithyDocumentSerde
}
type SetLoggingOptionsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetLoggingOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpSetLoggingOptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSetLoggingOptions{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetLoggingOptionsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetLoggingOptions(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opSetLoggingOptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "SetLoggingOptions",
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets the logging level. Requires permission to access the SetV2LoggingLevel (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) SetV2LoggingLevel(ctx context.Context, params *SetV2LoggingLevelInput, optFns ...func(*Options)) (*SetV2LoggingLevelOutput, error) {
if params == nil {
params = &SetV2LoggingLevelInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetV2LoggingLevel", params, optFns, c.addOperationSetV2LoggingLevelMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetV2LoggingLevelOutput)
out.ResultMetadata = metadata
return out, nil
}
type SetV2LoggingLevelInput struct {
// The log level.
//
// This member is required.
LogLevel types.LogLevel
// The log target.
//
// This member is required.
LogTarget *types.LogTarget
noSmithyDocumentSerde
}
type SetV2LoggingLevelOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetV2LoggingLevelMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpSetV2LoggingLevel{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSetV2LoggingLevel{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpSetV2LoggingLevelValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetV2LoggingLevel(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opSetV2LoggingLevel(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "SetV2LoggingLevel",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Sets the logging options for the V2 logging service. Requires permission to
// access the SetV2LoggingOptions (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) SetV2LoggingOptions(ctx context.Context, params *SetV2LoggingOptionsInput, optFns ...func(*Options)) (*SetV2LoggingOptionsOutput, error) {
if params == nil {
params = &SetV2LoggingOptionsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "SetV2LoggingOptions", params, optFns, c.addOperationSetV2LoggingOptionsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*SetV2LoggingOptionsOutput)
out.ResultMetadata = metadata
return out, nil
}
type SetV2LoggingOptionsInput struct {
// The default logging level.
DefaultLogLevel types.LogLevel
// If true all logs are disabled. The default is false.
DisableAllLogs bool
// The ARN of the role that allows IoT to write to Cloudwatch logs.
RoleArn *string
noSmithyDocumentSerde
}
type SetV2LoggingOptionsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationSetV2LoggingOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpSetV2LoggingOptions{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSetV2LoggingOptions{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSetV2LoggingOptions(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opSetV2LoggingOptions(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "SetV2LoggingOptions",
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Starts a task that applies a set of mitigation actions to the specified target.
// Requires permission to access the StartAuditMitigationActionsTask (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) StartAuditMitigationActionsTask(ctx context.Context, params *StartAuditMitigationActionsTaskInput, optFns ...func(*Options)) (*StartAuditMitigationActionsTaskOutput, error) {
if params == nil {
params = &StartAuditMitigationActionsTaskInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartAuditMitigationActionsTask", params, optFns, c.addOperationStartAuditMitigationActionsTaskMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartAuditMitigationActionsTaskOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartAuditMitigationActionsTaskInput struct {
// For an audit check, specifies which mitigation actions to apply. Those actions
// must be defined in your Amazon Web Services accounts.
//
// This member is required.
AuditCheckToActionsMapping map[string][]string
// Each audit mitigation task must have a unique client request token. If you try
// to start a new task with the same token as a task that already exists, an
// exception occurs. If you omit this value, a unique client request token is
// generated automatically.
//
// This member is required.
ClientRequestToken *string
// Specifies the audit findings to which the mitigation actions are applied. You
// can apply them to a type of audit check, to all findings from an audit, or to a
// specific set of findings.
//
// This member is required.
Target *types.AuditMitigationActionsTaskTarget
// A unique identifier for the task. You can use this identifier to check the
// status of the task or to cancel it.
//
// This member is required.
TaskId *string
noSmithyDocumentSerde
}
type StartAuditMitigationActionsTaskOutput struct {
// The unique identifier for the audit mitigation task. This matches the taskId
// that you specified in the request.
TaskId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartAuditMitigationActionsTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpStartAuditMitigationActionsTask{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartAuditMitigationActionsTask{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addIdempotencyToken_opStartAuditMitigationActionsTaskMiddleware(stack, options); err != nil {
return err
}
if err = addOpStartAuditMitigationActionsTaskValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartAuditMitigationActionsTask(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
type idempotencyToken_initializeOpStartAuditMitigationActionsTask struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpStartAuditMitigationActionsTask) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpStartAuditMitigationActionsTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
if m.tokenProvider == nil {
return next.HandleInitialize(ctx, in)
}
input, ok := in.Parameters.(*StartAuditMitigationActionsTaskInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *StartAuditMitigationActionsTaskInput ")
}
if input.ClientRequestToken == nil {
t, err := m.tokenProvider.GetIdempotencyToken()
if err != nil {
return out, metadata, err
}
input.ClientRequestToken = &t
}
return next.HandleInitialize(ctx, in)
}
func addIdempotencyToken_opStartAuditMitigationActionsTaskMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpStartAuditMitigationActionsTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opStartAuditMitigationActionsTask(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "StartAuditMitigationActionsTask",
}
}
| 187 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Starts a Device Defender ML Detect mitigation actions task. Requires permission
// to access the StartDetectMitigationActionsTask (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) StartDetectMitigationActionsTask(ctx context.Context, params *StartDetectMitigationActionsTaskInput, optFns ...func(*Options)) (*StartDetectMitigationActionsTaskOutput, error) {
if params == nil {
params = &StartDetectMitigationActionsTaskInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartDetectMitigationActionsTask", params, optFns, c.addOperationStartDetectMitigationActionsTaskMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartDetectMitigationActionsTaskOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartDetectMitigationActionsTaskInput struct {
// The actions to be performed when a device has unexpected behavior.
//
// This member is required.
Actions []string
// Each mitigation action task must have a unique client request token. If you try
// to create a new task with the same token as a task that already exists, an
// exception occurs. If you omit this value, Amazon Web Services SDKs will
// automatically generate a unique client request.
//
// This member is required.
ClientRequestToken *string
// Specifies the ML Detect findings to which the mitigation actions are applied.
//
// This member is required.
Target *types.DetectMitigationActionsTaskTarget
// The unique identifier of the task.
//
// This member is required.
TaskId *string
// Specifies to list only active violations.
IncludeOnlyActiveViolations *bool
// Specifies to include suppressed alerts.
IncludeSuppressedAlerts *bool
// Specifies the time period of which violation events occurred between.
ViolationEventOccurrenceRange *types.ViolationEventOccurrenceRange
noSmithyDocumentSerde
}
type StartDetectMitigationActionsTaskOutput struct {
// The unique identifier of the task.
TaskId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartDetectMitigationActionsTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDetectMitigationActionsTask{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartDetectMitigationActionsTask{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addIdempotencyToken_opStartDetectMitigationActionsTaskMiddleware(stack, options); err != nil {
return err
}
if err = addOpStartDetectMitigationActionsTaskValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDetectMitigationActionsTask(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
type idempotencyToken_initializeOpStartDetectMitigationActionsTask struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpStartDetectMitigationActionsTask) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpStartDetectMitigationActionsTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
if m.tokenProvider == nil {
return next.HandleInitialize(ctx, in)
}
input, ok := in.Parameters.(*StartDetectMitigationActionsTaskInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *StartDetectMitigationActionsTaskInput ")
}
if input.ClientRequestToken == nil {
t, err := m.tokenProvider.GetIdempotencyToken()
if err != nil {
return out, metadata, err
}
input.ClientRequestToken = &t
}
return next.HandleInitialize(ctx, in)
}
func addIdempotencyToken_opStartDetectMitigationActionsTaskMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpStartDetectMitigationActionsTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opStartDetectMitigationActionsTask(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "StartDetectMitigationActionsTask",
}
}
| 191 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Starts an on-demand Device Defender audit. Requires permission to access the
// StartOnDemandAuditTask (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) StartOnDemandAuditTask(ctx context.Context, params *StartOnDemandAuditTaskInput, optFns ...func(*Options)) (*StartOnDemandAuditTaskOutput, error) {
if params == nil {
params = &StartOnDemandAuditTaskInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartOnDemandAuditTask", params, optFns, c.addOperationStartOnDemandAuditTaskMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartOnDemandAuditTaskOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartOnDemandAuditTaskInput struct {
// Which checks are performed during the audit. The checks you specify must be
// enabled for your account or an exception occurs. Use
// DescribeAccountAuditConfiguration to see the list of all checks, including those
// that are enabled or UpdateAccountAuditConfiguration to select which checks are
// enabled.
//
// This member is required.
TargetCheckNames []string
noSmithyDocumentSerde
}
type StartOnDemandAuditTaskOutput struct {
// The ID of the on-demand audit you started.
TaskId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartOnDemandAuditTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpStartOnDemandAuditTask{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartOnDemandAuditTask{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpStartOnDemandAuditTaskValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartOnDemandAuditTask(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opStartOnDemandAuditTask(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "StartOnDemandAuditTask",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Creates a bulk thing provisioning task. Requires permission to access the
// StartThingRegistrationTask (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) StartThingRegistrationTask(ctx context.Context, params *StartThingRegistrationTaskInput, optFns ...func(*Options)) (*StartThingRegistrationTaskOutput, error) {
if params == nil {
params = &StartThingRegistrationTaskInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StartThingRegistrationTask", params, optFns, c.addOperationStartThingRegistrationTaskMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StartThingRegistrationTaskOutput)
out.ResultMetadata = metadata
return out, nil
}
type StartThingRegistrationTaskInput struct {
// The S3 bucket that contains the input file.
//
// This member is required.
InputFileBucket *string
// The name of input file within the S3 bucket. This file contains a newline
// delimited JSON file. Each line contains the parameter values to provision one
// device (thing).
//
// This member is required.
InputFileKey *string
// The IAM role ARN that grants permission the input file.
//
// This member is required.
RoleArn *string
// The provisioning template.
//
// This member is required.
TemplateBody *string
noSmithyDocumentSerde
}
type StartThingRegistrationTaskOutput struct {
// The bulk thing provisioning task ID.
TaskId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStartThingRegistrationTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpStartThingRegistrationTask{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartThingRegistrationTask{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpStartThingRegistrationTaskValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartThingRegistrationTask(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opStartThingRegistrationTask(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "StartThingRegistrationTask",
}
}
| 143 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Cancels a bulk thing provisioning task. Requires permission to access the
// StopThingRegistrationTask (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) StopThingRegistrationTask(ctx context.Context, params *StopThingRegistrationTaskInput, optFns ...func(*Options)) (*StopThingRegistrationTaskOutput, error) {
if params == nil {
params = &StopThingRegistrationTaskInput{}
}
result, metadata, err := c.invokeOperation(ctx, "StopThingRegistrationTask", params, optFns, c.addOperationStopThingRegistrationTaskMiddlewares)
if err != nil {
return nil, err
}
out := result.(*StopThingRegistrationTaskOutput)
out.ResultMetadata = metadata
return out, nil
}
type StopThingRegistrationTaskInput struct {
// The bulk thing provisioning task ID.
//
// This member is required.
TaskId *string
noSmithyDocumentSerde
}
type StopThingRegistrationTaskOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationStopThingRegistrationTaskMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpStopThingRegistrationTask{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStopThingRegistrationTask{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpStopThingRegistrationTaskValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopThingRegistrationTask(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opStopThingRegistrationTask(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "StopThingRegistrationTask",
}
}
| 122 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds to or modifies the tags of the given resource. Tags are metadata which can
// be used to manage a resource. Requires permission to access the TagResource (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
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 ARN of the resource.
//
// This member is required.
ResourceArn *string
// The new or modified tags for the resource.
//
// 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) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); 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 = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "TagResource",
}
}
| 128 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Tests if a specified principal is authorized to perform an IoT action on a
// specified resource. Use this to test and debug the authorization behavior of
// devices that connect to the IoT device gateway. Requires permission to access
// the TestAuthorization (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) TestAuthorization(ctx context.Context, params *TestAuthorizationInput, optFns ...func(*Options)) (*TestAuthorizationOutput, error) {
if params == nil {
params = &TestAuthorizationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "TestAuthorization", params, optFns, c.addOperationTestAuthorizationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*TestAuthorizationOutput)
out.ResultMetadata = metadata
return out, nil
}
type TestAuthorizationInput struct {
// A list of authorization info objects. Simulating authorization will create a
// response for each authInfo object in the list.
//
// This member is required.
AuthInfos []types.AuthInfo
// The MQTT client ID.
ClientId *string
// The Cognito identity pool ID.
CognitoIdentityPoolId *string
// When testing custom authorization, the policies specified here are treated as
// if they are attached to the principal being authorized.
PolicyNamesToAdd []string
// When testing custom authorization, the policies specified here are treated as
// if they are not attached to the principal being authorized.
PolicyNamesToSkip []string
// The principal. Valid principals are CertificateArn
// (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn
// (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
Principal *string
noSmithyDocumentSerde
}
type TestAuthorizationOutput struct {
// The authentication results.
AuthResults []types.AuthResult
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationTestAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpTestAuthorization{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTestAuthorization{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpTestAuthorizationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestAuthorization(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opTestAuthorization(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "TestAuthorization",
}
}
| 149 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Tests a custom authorization behavior by invoking a specified custom
// authorizer. Use this to test and debug the custom authorization behavior of
// devices that connect to the IoT device gateway. Requires permission to access
// the TestInvokeAuthorizer (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) TestInvokeAuthorizer(ctx context.Context, params *TestInvokeAuthorizerInput, optFns ...func(*Options)) (*TestInvokeAuthorizerOutput, error) {
if params == nil {
params = &TestInvokeAuthorizerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "TestInvokeAuthorizer", params, optFns, c.addOperationTestInvokeAuthorizerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*TestInvokeAuthorizerOutput)
out.ResultMetadata = metadata
return out, nil
}
type TestInvokeAuthorizerInput struct {
// The custom authorizer name.
//
// This member is required.
AuthorizerName *string
// Specifies a test HTTP authorization request.
HttpContext *types.HttpContext
// Specifies a test MQTT authorization request.
MqttContext *types.MqttContext
// Specifies a test TLS authorization request.
TlsContext *types.TlsContext
// The token returned by your custom authentication service.
Token *string
// The signature made with the token and your custom authentication service's
// private key. This value must be Base-64-encoded.
TokenSignature *string
noSmithyDocumentSerde
}
type TestInvokeAuthorizerOutput struct {
// The number of seconds after which the connection is terminated.
DisconnectAfterInSeconds *int32
// True if the token is authenticated, otherwise false.
IsAuthenticated *bool
// IAM policy documents.
PolicyDocuments []string
// The principal ID.
PrincipalId *string
// The number of seconds after which the temporary credentials are refreshed.
RefreshAfterInSeconds *int32
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationTestInvokeAuthorizerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpTestInvokeAuthorizer{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTestInvokeAuthorizer{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpTestInvokeAuthorizerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestInvokeAuthorizer(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opTestInvokeAuthorizer(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "TestInvokeAuthorizer",
}
}
| 157 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Transfers the specified certificate to the specified Amazon Web Services
// account. Requires permission to access the TransferCertificate (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action. You can cancel the transfer until it is acknowledged by the recipient.
// No notification is sent to the transfer destination's account. It is up to the
// caller to notify the transfer target. The certificate being transferred must not
// be in the ACTIVE state. You can use the UpdateCertificate action to deactivate
// it. The certificate must not have any policies attached to it. You can use the
// DetachPolicy action to detach them.
func (c *Client) TransferCertificate(ctx context.Context, params *TransferCertificateInput, optFns ...func(*Options)) (*TransferCertificateOutput, error) {
if params == nil {
params = &TransferCertificateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "TransferCertificate", params, optFns, c.addOperationTransferCertificateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*TransferCertificateOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the TransferCertificate operation.
type TransferCertificateInput struct {
// The ID of the certificate. (The last part of the certificate ARN contains the
// certificate ID.)
//
// This member is required.
CertificateId *string
// The Amazon Web Services account.
//
// This member is required.
TargetAwsAccount *string
// The transfer message.
TransferMessage *string
noSmithyDocumentSerde
}
// The output from the TransferCertificate operation.
type TransferCertificateOutput struct {
// The ARN of the certificate.
TransferredCertificateArn *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationTransferCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpTransferCertificate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTransferCertificate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpTransferCertificateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTransferCertificate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opTransferCertificate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "TransferCertificate",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Removes the given tags (metadata) from the resource. Requires permission to
// access the UntagResource (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
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 ARN of the resource.
//
// This member is required.
ResourceArn *string
// A list of the keys of the tags to be removed from the 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) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); 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 = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UntagResource",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Configures or reconfigures the Device Defender audit settings for this account.
// Settings include how audit notifications are sent and which audit checks are
// enabled or disabled. Requires permission to access the
// UpdateAccountAuditConfiguration (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateAccountAuditConfiguration(ctx context.Context, params *UpdateAccountAuditConfigurationInput, optFns ...func(*Options)) (*UpdateAccountAuditConfigurationOutput, error) {
if params == nil {
params = &UpdateAccountAuditConfigurationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateAccountAuditConfiguration", params, optFns, c.addOperationUpdateAccountAuditConfigurationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateAccountAuditConfigurationOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateAccountAuditConfigurationInput struct {
// Specifies which audit checks are enabled and disabled for this account. Use
// DescribeAccountAuditConfiguration to see the list of all checks, including those
// that are currently enabled. Some data collection might start immediately when
// certain checks are enabled. When a check is disabled, any data collected so far
// in relation to the check is deleted. You cannot disable a check if it's used by
// any scheduled audit. You must first delete the check from the scheduled audit or
// delete the scheduled audit itself. On the first call to
// UpdateAccountAuditConfiguration , this parameter is required and must specify at
// least one enabled check.
AuditCheckConfigurations map[string]types.AuditCheckConfiguration
// Information about the targets to which audit notifications are sent.
AuditNotificationTargetConfigurations map[string]types.AuditNotificationTarget
// The Amazon Resource Name (ARN) of the role that grants permission to IoT to
// access information about your devices, policies, certificates, and other items
// as required when performing an audit.
RoleArn *string
noSmithyDocumentSerde
}
type UpdateAccountAuditConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateAccountAuditConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAccountAuditConfiguration{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAccountAuditConfiguration{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAccountAuditConfiguration(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateAccountAuditConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateAccountAuditConfiguration",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Updates a Device Defender audit suppression.
func (c *Client) UpdateAuditSuppression(ctx context.Context, params *UpdateAuditSuppressionInput, optFns ...func(*Options)) (*UpdateAuditSuppressionOutput, error) {
if params == nil {
params = &UpdateAuditSuppressionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateAuditSuppression", params, optFns, c.addOperationUpdateAuditSuppressionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateAuditSuppressionOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateAuditSuppressionInput struct {
// An audit check name. Checks must be enabled for your account. (Use
// DescribeAccountAuditConfiguration to see the list of all checks, including those
// that are enabled or use UpdateAccountAuditConfiguration to select which checks
// are enabled.)
//
// This member is required.
CheckName *string
// Information that identifies the noncompliant resource.
//
// This member is required.
ResourceIdentifier *types.ResourceIdentifier
// The description of the audit suppression.
Description *string
// The expiration date (epoch timestamp in seconds) that you want the suppression
// to adhere to.
ExpirationDate *time.Time
// Indicates whether a suppression should exist indefinitely or not.
SuppressIndefinitely *bool
noSmithyDocumentSerde
}
type UpdateAuditSuppressionOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateAuditSuppressionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAuditSuppression{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAuditSuppression{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateAuditSuppressionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAuditSuppression(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateAuditSuppression(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateAuditSuppression",
}
}
| 140 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates an authorizer. Requires permission to access the UpdateAuthorizer (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateAuthorizer(ctx context.Context, params *UpdateAuthorizerInput, optFns ...func(*Options)) (*UpdateAuthorizerOutput, error) {
if params == nil {
params = &UpdateAuthorizerInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateAuthorizer", params, optFns, c.addOperationUpdateAuthorizerMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateAuthorizerOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateAuthorizerInput struct {
// The authorizer name.
//
// This member is required.
AuthorizerName *string
// The ARN of the authorizer's Lambda function.
AuthorizerFunctionArn *string
// When true , the result from the authorizer’s Lambda function is cached for the
// time specified in refreshAfterInSeconds . The cached result is used while the
// device reuses the same HTTP connection.
EnableCachingForHttp *bool
// The status of the update authorizer request.
Status types.AuthorizerStatus
// The key used to extract the token from the HTTP headers.
TokenKeyName *string
// The public keys used to verify the token signature.
TokenSigningPublicKeys map[string]string
noSmithyDocumentSerde
}
type UpdateAuthorizerOutput struct {
// The authorizer ARN.
AuthorizerArn *string
// The authorizer name.
AuthorizerName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateAuthorizerMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAuthorizer{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAuthorizer{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateAuthorizerValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAuthorizer(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateAuthorizer(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateAuthorizer",
}
}
| 146 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates information about the billing group. Requires permission to access the
// UpdateBillingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateBillingGroup(ctx context.Context, params *UpdateBillingGroupInput, optFns ...func(*Options)) (*UpdateBillingGroupOutput, error) {
if params == nil {
params = &UpdateBillingGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateBillingGroup", params, optFns, c.addOperationUpdateBillingGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateBillingGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateBillingGroupInput struct {
// The name of the billing group.
//
// This member is required.
BillingGroupName *string
// The properties of the billing group.
//
// This member is required.
BillingGroupProperties *types.BillingGroupProperties
// The expected version of the billing group. If the version of the billing group
// does not match the expected version specified in the request, the
// UpdateBillingGroup request is rejected with a VersionConflictException .
ExpectedVersion *int64
noSmithyDocumentSerde
}
type UpdateBillingGroupOutput struct {
// The latest version of the billing group.
Version int64
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateBillingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBillingGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBillingGroup{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateBillingGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBillingGroup(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateBillingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateBillingGroup",
}
}
| 137 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a registered CA certificate. Requires permission to access the
// UpdateCACertificate (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateCACertificate(ctx context.Context, params *UpdateCACertificateInput, optFns ...func(*Options)) (*UpdateCACertificateOutput, error) {
if params == nil {
params = &UpdateCACertificateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateCACertificate", params, optFns, c.addOperationUpdateCACertificateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateCACertificateOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input to the UpdateCACertificate operation.
type UpdateCACertificateInput struct {
// The CA certificate identifier.
//
// This member is required.
CertificateId *string
// The new value for the auto registration status. Valid values are: "ENABLE" or
// "DISABLE".
NewAutoRegistrationStatus types.AutoRegistrationStatus
// The updated status of the CA certificate. Note: The status value
// REGISTER_INACTIVE is deprecated and should not be used.
NewStatus types.CACertificateStatus
// Information about the registration configuration.
RegistrationConfig *types.RegistrationConfig
// If true, removes auto registration.
RemoveAutoRegistration bool
noSmithyDocumentSerde
}
type UpdateCACertificateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateCACertificateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCACertificate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCACertificate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateCACertificateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCACertificate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateCACertificate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateCACertificate",
}
}
| 138 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the status of the specified certificate. This operation is idempotent.
// Requires permission to access the UpdateCertificate (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action. Certificates must be in the ACTIVE state to authenticate devices that
// use a certificate to connect to IoT. Within a few minutes of updating a
// certificate from the ACTIVE state to any other state, IoT disconnects all
// devices that used that certificate to connect. Devices cannot use a certificate
// that is not in the ACTIVE state to reconnect.
func (c *Client) UpdateCertificate(ctx context.Context, params *UpdateCertificateInput, optFns ...func(*Options)) (*UpdateCertificateOutput, error) {
if params == nil {
params = &UpdateCertificateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateCertificate", params, optFns, c.addOperationUpdateCertificateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateCertificateOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the UpdateCertificate operation.
type UpdateCertificateInput struct {
// The ID of the certificate. (The last part of the certificate ARN contains the
// certificate ID.)
//
// This member is required.
CertificateId *string
// The new status. Note: Setting the status to PENDING_TRANSFER or
// PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER
// and PENDING_ACTIVATION are statuses used internally by IoT. They are not
// intended for developer use. Note: The status value REGISTER_INACTIVE is
// deprecated and should not be used.
//
// This member is required.
NewStatus types.CertificateStatus
noSmithyDocumentSerde
}
type UpdateCertificateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCertificate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCertificate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateCertificateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCertificate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateCertificate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateCertificate",
}
}
| 138 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Updates a Device Defender detect custom metric. Requires permission to access
// the UpdateCustomMetric (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateCustomMetric(ctx context.Context, params *UpdateCustomMetricInput, optFns ...func(*Options)) (*UpdateCustomMetricOutput, error) {
if params == nil {
params = &UpdateCustomMetricInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateCustomMetric", params, optFns, c.addOperationUpdateCustomMetricMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateCustomMetricOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateCustomMetricInput struct {
// Field represents a friendly name in the console for the custom metric, it
// doesn't have to be unique. Don't use this name as the metric identifier in the
// device metric report. Can be updated.
//
// This member is required.
DisplayName *string
// The name of the custom metric. Cannot be updated.
//
// This member is required.
MetricName *string
noSmithyDocumentSerde
}
type UpdateCustomMetricOutput struct {
// The creation date of the custom metric in milliseconds since epoch.
CreationDate *time.Time
// A friendly name in the console for the custom metric
DisplayName *string
// The time the custom metric was last modified in milliseconds since epoch.
LastModifiedDate *time.Time
// The Amazon Resource Number (ARN) of the custom metric.
MetricArn *string
// The name of the custom metric.
MetricName *string
// The type of the custom metric. The type number only takes a single metric value
// as an input, but while submitting the metrics value in the DeviceMetrics report,
// it must be passed as an array with a single value.
MetricType types.CustomMetricType
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateCustomMetricMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCustomMetric{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCustomMetric{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateCustomMetricValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCustomMetric(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateCustomMetric(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateCustomMetric",
}
}
| 152 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Updates the definition for a dimension. You cannot change the type of a
// dimension after it is created (you can delete it and recreate it). Requires
// permission to access the UpdateDimension (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateDimension(ctx context.Context, params *UpdateDimensionInput, optFns ...func(*Options)) (*UpdateDimensionOutput, error) {
if params == nil {
params = &UpdateDimensionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateDimension", params, optFns, c.addOperationUpdateDimensionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateDimensionOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateDimensionInput struct {
// A unique identifier for the dimension. Choose something that describes the type
// and value to make it easy to remember what it does.
//
// This member is required.
Name *string
// Specifies the value or list of values for the dimension. For TOPIC_FILTER
// dimensions, this is a pattern used to match the MQTT topic (for example,
// "admin/#").
//
// This member is required.
StringValues []string
noSmithyDocumentSerde
}
type UpdateDimensionOutput struct {
// The Amazon Resource Name (ARN)of the created dimension.
Arn *string
// The date and time, in milliseconds since epoch, when the dimension was
// initially created.
CreationDate *time.Time
// The date and time, in milliseconds since epoch, when the dimension was most
// recently updated.
LastModifiedDate *time.Time
// A unique identifier for the dimension.
Name *string
// The value or list of values used to scope the dimension. For example, for topic
// filters, this is the pattern used to match the MQTT topic name.
StringValues []string
// The type of the dimension.
Type types.DimensionType
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateDimensionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDimension{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDimension{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateDimensionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDimension(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateDimension(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateDimension",
}
}
| 155 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates values stored in the domain configuration. Domain configurations for
// default endpoints can't be updated. Requires permission to access the
// UpdateDomainConfiguration (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateDomainConfiguration(ctx context.Context, params *UpdateDomainConfigurationInput, optFns ...func(*Options)) (*UpdateDomainConfigurationOutput, error) {
if params == nil {
params = &UpdateDomainConfigurationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateDomainConfiguration", params, optFns, c.addOperationUpdateDomainConfigurationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateDomainConfigurationOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateDomainConfigurationInput struct {
// The name of the domain configuration to be updated.
//
// This member is required.
DomainConfigurationName *string
// An object that specifies the authorization service for a domain.
AuthorizerConfig *types.AuthorizerConfig
// The status to which the domain configuration should be updated.
DomainConfigurationStatus types.DomainConfigurationStatus
// Removes the authorization configuration from a domain.
RemoveAuthorizerConfig bool
// An object that specifies the TLS configuration for a domain.
TlsConfig *types.TlsConfig
noSmithyDocumentSerde
}
type UpdateDomainConfigurationOutput struct {
// The ARN of the domain configuration that was updated.
DomainConfigurationArn *string
// The name of the domain configuration that was updated.
DomainConfigurationName *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateDomainConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDomainConfiguration{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDomainConfiguration{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateDomainConfigurationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDomainConfiguration(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateDomainConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateDomainConfiguration",
}
}
| 143 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a dynamic thing group. Requires permission to access the
// UpdateDynamicThingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateDynamicThingGroup(ctx context.Context, params *UpdateDynamicThingGroupInput, optFns ...func(*Options)) (*UpdateDynamicThingGroupOutput, error) {
if params == nil {
params = &UpdateDynamicThingGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateDynamicThingGroup", params, optFns, c.addOperationUpdateDynamicThingGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateDynamicThingGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateDynamicThingGroupInput struct {
// The name of the dynamic thing group to update.
//
// This member is required.
ThingGroupName *string
// The dynamic thing group properties to update.
//
// This member is required.
ThingGroupProperties *types.ThingGroupProperties
// The expected version of the dynamic thing group to update.
ExpectedVersion *int64
// The dynamic thing group index to update. Currently one index is supported:
// AWS_Things .
IndexName *string
// The dynamic thing group search query string to update.
QueryString *string
// The dynamic thing group query version to update. Currently one query version is
// supported: "2017-09-30". If not specified, the query version defaults to this
// value.
QueryVersion *string
noSmithyDocumentSerde
}
type UpdateDynamicThingGroupOutput struct {
// The dynamic thing group version.
Version int64
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateDynamicThingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDynamicThingGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDynamicThingGroup{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateDynamicThingGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDynamicThingGroup(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateDynamicThingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateDynamicThingGroup",
}
}
| 147 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the event configurations. Requires permission to access the
// UpdateEventConfigurations (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateEventConfigurations(ctx context.Context, params *UpdateEventConfigurationsInput, optFns ...func(*Options)) (*UpdateEventConfigurationsOutput, error) {
if params == nil {
params = &UpdateEventConfigurationsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateEventConfigurations", params, optFns, c.addOperationUpdateEventConfigurationsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateEventConfigurationsOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateEventConfigurationsInput struct {
// The new event configuration values.
EventConfigurations map[string]types.Configuration
noSmithyDocumentSerde
}
type UpdateEventConfigurationsOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateEventConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEventConfigurations{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEventConfigurations{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventConfigurations(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateEventConfigurations(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateEventConfigurations",
}
}
| 118 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the data for a fleet metric. Requires permission to access the
// UpdateFleetMetric (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateFleetMetric(ctx context.Context, params *UpdateFleetMetricInput, optFns ...func(*Options)) (*UpdateFleetMetricOutput, error) {
if params == nil {
params = &UpdateFleetMetricInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateFleetMetric", params, optFns, c.addOperationUpdateFleetMetricMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateFleetMetricOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateFleetMetricInput struct {
// The name of the index to search.
//
// This member is required.
IndexName *string
// The name of the fleet metric to update.
//
// This member is required.
MetricName *string
// The field to aggregate.
AggregationField *string
// The type of the aggregation query.
AggregationType *types.AggregationType
// The description of the fleet metric.
Description *string
// The expected version of the fleet metric record in the registry.
ExpectedVersion *int64
// The time in seconds between fleet metric emissions. Range [60(1 min), 86400(1
// day)] and must be multiple of 60.
Period *int32
// The search query string.
QueryString *string
// The version of the query.
QueryVersion *string
// Used to support unit transformation such as milliseconds to seconds. The unit
// must be supported by CW metric (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html)
// .
Unit types.FleetMetricUnit
noSmithyDocumentSerde
}
type UpdateFleetMetricOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateFleetMetricMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFleetMetric{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFleetMetric{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateFleetMetricValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFleetMetric(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateFleetMetric(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateFleetMetric",
}
}
| 155 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the search configuration. Requires permission to access the
// UpdateIndexingConfiguration (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateIndexingConfiguration(ctx context.Context, params *UpdateIndexingConfigurationInput, optFns ...func(*Options)) (*UpdateIndexingConfigurationOutput, error) {
if params == nil {
params = &UpdateIndexingConfigurationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateIndexingConfiguration", params, optFns, c.addOperationUpdateIndexingConfigurationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateIndexingConfigurationOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateIndexingConfigurationInput struct {
// Thing group indexing configuration.
ThingGroupIndexingConfiguration *types.ThingGroupIndexingConfiguration
// Thing indexing configuration.
ThingIndexingConfiguration *types.ThingIndexingConfiguration
noSmithyDocumentSerde
}
type UpdateIndexingConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateIndexingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateIndexingConfiguration{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateIndexingConfiguration{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateIndexingConfigurationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateIndexingConfiguration(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateIndexingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateIndexingConfiguration",
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates supported fields of the specified job. Requires permission to access
// the UpdateJob (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateJob(ctx context.Context, params *UpdateJobInput, optFns ...func(*Options)) (*UpdateJobOutput, error) {
if params == nil {
params = &UpdateJobInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateJob", params, optFns, c.addOperationUpdateJobMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateJobOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateJobInput struct {
// The ID of the job to be updated.
//
// This member is required.
JobId *string
// Allows you to create criteria to abort a job.
AbortConfig *types.AbortConfig
// A short text description of the job.
Description *string
// Allows you to create the criteria to retry a job.
JobExecutionsRetryConfig *types.JobExecutionsRetryConfig
// Allows you to create a staged rollout of the job.
JobExecutionsRolloutConfig *types.JobExecutionsRolloutConfig
// The namespace used to indicate that a job is a customer-managed job. When you
// specify a value for this parameter, Amazon Web Services IoT Core sends jobs
// notifications to MQTT topics that contain the value in the following format.
// $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ The
// namespaceId feature is in public preview.
NamespaceId *string
// Configuration information for pre-signed S3 URLs.
PresignedUrlConfig *types.PresignedUrlConfig
// Specifies the amount of time each device has to finish its execution of the
// job. The timer is started when the job execution status is set to IN_PROGRESS .
// If the job execution status is not set to another terminal state before the time
// expires, it will be automatically set to TIMED_OUT .
TimeoutConfig *types.TimeoutConfig
noSmithyDocumentSerde
}
type UpdateJobOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateJobMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateJob{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateJob{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateJobValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateJob(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateJob(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateJob",
}
}
| 151 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the definition for the specified mitigation action. Requires permission
// to access the UpdateMitigationAction (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateMitigationAction(ctx context.Context, params *UpdateMitigationActionInput, optFns ...func(*Options)) (*UpdateMitigationActionOutput, error) {
if params == nil {
params = &UpdateMitigationActionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateMitigationAction", params, optFns, c.addOperationUpdateMitigationActionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateMitigationActionOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateMitigationActionInput struct {
// The friendly name for the mitigation action. You cannot change the name by
// using UpdateMitigationAction . Instead, you must delete and recreate the
// mitigation action with the new name.
//
// This member is required.
ActionName *string
// Defines the type of action and the parameters for that action.
ActionParams *types.MitigationActionParams
// The ARN of the IAM role that is used to apply the mitigation action.
RoleArn *string
noSmithyDocumentSerde
}
type UpdateMitigationActionOutput struct {
// The ARN for the new mitigation action.
ActionArn *string
// A unique identifier for the mitigation action.
ActionId *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateMitigationActionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateMitigationAction{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateMitigationAction{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateMitigationActionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMitigationAction(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateMitigationAction(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateMitigationAction",
}
}
| 138 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the supported fields for a specific package. Requires permission to
// access the UpdatePackage (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// and GetIndexingConfiguration (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// actions.
func (c *Client) UpdatePackage(ctx context.Context, params *UpdatePackageInput, optFns ...func(*Options)) (*UpdatePackageOutput, error) {
if params == nil {
params = &UpdatePackageInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdatePackage", params, optFns, c.addOperationUpdatePackageMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdatePackageOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdatePackageInput struct {
// The name of the target package.
//
// This member is required.
PackageName *string
// A unique case-sensitive identifier that you can provide to ensure the
// idempotency of the request. Don't reuse this client token if a new idempotent
// request is required.
ClientToken *string
// The name of the default package version. Note: You cannot name a defaultVersion
// and set unsetDefaultVersion equal to true at the same time.
DefaultVersionName *string
// The package description.
Description *string
// Indicates whether you want to remove the named default package version from the
// software package. Set as true to remove the default package version. Note: You
// cannot name a defaultVersion and set unsetDefaultVersion equal to true at the
// same time.
UnsetDefaultVersion *bool
noSmithyDocumentSerde
}
type UpdatePackageOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdatePackageMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdatePackage{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdatePackage{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addIdempotencyToken_opUpdatePackageMiddleware(stack, options); err != nil {
return err
}
if err = addOpUpdatePackageValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePackage(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
type idempotencyToken_initializeOpUpdatePackage struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpUpdatePackage) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpUpdatePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
if m.tokenProvider == nil {
return next.HandleInitialize(ctx, in)
}
input, ok := in.Parameters.(*UpdatePackageInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdatePackageInput ")
}
if input.ClientToken == nil {
t, err := m.tokenProvider.GetIdempotencyToken()
if err != nil {
return out, metadata, err
}
input.ClientToken = &t
}
return next.HandleInitialize(ctx, in)
}
func addIdempotencyToken_opUpdatePackageMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpUpdatePackage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opUpdatePackage(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdatePackage",
}
}
| 178 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the package configuration. Requires permission to access the
// UpdatePackageConfiguration (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// and iam:PassRole (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html)
// actions.
func (c *Client) UpdatePackageConfiguration(ctx context.Context, params *UpdatePackageConfigurationInput, optFns ...func(*Options)) (*UpdatePackageConfigurationOutput, error) {
if params == nil {
params = &UpdatePackageConfigurationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdatePackageConfiguration", params, optFns, c.addOperationUpdatePackageConfigurationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdatePackageConfigurationOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdatePackageConfigurationInput struct {
// A unique case-sensitive identifier that you can provide to ensure the
// idempotency of the request. Don't reuse this client token if a new idempotent
// request is required.
ClientToken *string
// Configuration to manage job's package version reporting. This updates the
// thing's reserved named shadow that the job targets.
VersionUpdateByJobsConfig *types.VersionUpdateByJobsConfig
noSmithyDocumentSerde
}
type UpdatePackageConfigurationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdatePackageConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdatePackageConfiguration{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdatePackageConfiguration{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addIdempotencyToken_opUpdatePackageConfigurationMiddleware(stack, options); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePackageConfiguration(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
type idempotencyToken_initializeOpUpdatePackageConfiguration struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpUpdatePackageConfiguration) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpUpdatePackageConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
if m.tokenProvider == nil {
return next.HandleInitialize(ctx, in)
}
input, ok := in.Parameters.(*UpdatePackageConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdatePackageConfigurationInput ")
}
if input.ClientToken == nil {
t, err := m.tokenProvider.GetIdempotencyToken()
if err != nil {
return out, metadata, err
}
input.ClientToken = &t
}
return next.HandleInitialize(ctx, in)
}
func addIdempotencyToken_opUpdatePackageConfigurationMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpUpdatePackageConfiguration{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opUpdatePackageConfiguration(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdatePackageConfiguration",
}
}
| 162 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the supported fields for a specific package version. Requires
// permission to access the UpdatePackageVersion (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// and GetIndexingConfiguration (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// actions.
func (c *Client) UpdatePackageVersion(ctx context.Context, params *UpdatePackageVersionInput, optFns ...func(*Options)) (*UpdatePackageVersionOutput, error) {
if params == nil {
params = &UpdatePackageVersionInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdatePackageVersion", params, optFns, c.addOperationUpdatePackageVersionMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdatePackageVersionOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdatePackageVersionInput struct {
// The name of the associated software package.
//
// This member is required.
PackageName *string
// The name of the target package version.
//
// This member is required.
VersionName *string
// The status that the package version should be assigned. For more information,
// see Package version lifecycle (https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle)
// .
Action types.PackageVersionAction
// Metadata that can be used to define a package version’s configuration. For
// example, the S3 file location, configuration options that are being sent to the
// device or fleet. Note: Attributes can be updated only when the package version
// is in a draft state. The combined size of all the attributes on a package
// version is limited to 3KB.
Attributes map[string]string
// A unique case-sensitive identifier that you can provide to ensure the
// idempotency of the request. Don't reuse this client token if a new idempotent
// request is required.
ClientToken *string
// The package version description.
Description *string
noSmithyDocumentSerde
}
type UpdatePackageVersionOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdatePackageVersionMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdatePackageVersion{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdatePackageVersion{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addIdempotencyToken_opUpdatePackageVersionMiddleware(stack, options); err != nil {
return err
}
if err = addOpUpdatePackageVersionValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePackageVersion(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
type idempotencyToken_initializeOpUpdatePackageVersion struct {
tokenProvider IdempotencyTokenProvider
}
func (*idempotencyToken_initializeOpUpdatePackageVersion) ID() string {
return "OperationIdempotencyTokenAutoFill"
}
func (m *idempotencyToken_initializeOpUpdatePackageVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
if m.tokenProvider == nil {
return next.HandleInitialize(ctx, in)
}
input, ok := in.Parameters.(*UpdatePackageVersionInput)
if !ok {
return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdatePackageVersionInput ")
}
if input.ClientToken == nil {
t, err := m.tokenProvider.GetIdempotencyToken()
if err != nil {
return out, metadata, err
}
input.ClientToken = &t
}
return next.HandleInitialize(ctx, in)
}
func addIdempotencyToken_opUpdatePackageVersionMiddleware(stack *middleware.Stack, cfg Options) error {
return stack.Initialize.Add(&idempotencyToken_initializeOpUpdatePackageVersion{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before)
}
func newServiceMetadataMiddleware_opUpdatePackageVersion(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdatePackageVersion",
}
}
| 186 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a provisioning template. Requires permission to access the
// UpdateProvisioningTemplate (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateProvisioningTemplate(ctx context.Context, params *UpdateProvisioningTemplateInput, optFns ...func(*Options)) (*UpdateProvisioningTemplateOutput, error) {
if params == nil {
params = &UpdateProvisioningTemplateInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateProvisioningTemplate", params, optFns, c.addOperationUpdateProvisioningTemplateMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateProvisioningTemplateOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateProvisioningTemplateInput struct {
// The name of the provisioning template.
//
// This member is required.
TemplateName *string
// The ID of the default provisioning template version.
DefaultVersionId *int32
// The description of the provisioning template.
Description *string
// True to enable the provisioning template, otherwise false.
Enabled bool
// Updates the pre-provisioning hook template. Only supports template of type
// FLEET_PROVISIONING . For more information about provisioning template types, see
// type (https://docs.aws.amazon.com/iot/latest/apireference/API_CreateProvisioningTemplate.html#iot-CreateProvisioningTemplate-request-type)
// .
PreProvisioningHook *types.ProvisioningHook
// The ARN of the role associated with the provisioning template. This IoT role
// grants permission to provision a device.
ProvisioningRoleArn *string
// Removes pre-provisioning hook template.
RemovePreProvisioningHook *bool
noSmithyDocumentSerde
}
type UpdateProvisioningTemplateOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateProvisioningTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateProvisioningTemplate{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateProvisioningTemplate{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateProvisioningTemplateValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProvisioningTemplate(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateProvisioningTemplate(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateProvisioningTemplate",
}
}
| 145 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a role alias. Requires permission to access the UpdateRoleAlias (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateRoleAlias(ctx context.Context, params *UpdateRoleAliasInput, optFns ...func(*Options)) (*UpdateRoleAliasOutput, error) {
if params == nil {
params = &UpdateRoleAliasInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateRoleAlias", params, optFns, c.addOperationUpdateRoleAliasMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateRoleAliasOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateRoleAliasInput struct {
// The role alias to update.
//
// This member is required.
RoleAlias *string
// The number of seconds the credential will be valid. This value must be less
// than or equal to the maximum session duration of the IAM role that the role
// alias references.
CredentialDurationSeconds *int32
// The role ARN.
RoleArn *string
noSmithyDocumentSerde
}
type UpdateRoleAliasOutput struct {
// The role alias.
RoleAlias *string
// The role alias ARN.
RoleAliasArn *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateRoleAliasMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateRoleAlias{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateRoleAlias{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateRoleAliasValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRoleAlias(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateRoleAlias(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateRoleAlias",
}
}
| 136 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a scheduled audit, including which checks are performed and how often
// the audit takes place. Requires permission to access the UpdateScheduledAudit (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateScheduledAudit(ctx context.Context, params *UpdateScheduledAuditInput, optFns ...func(*Options)) (*UpdateScheduledAuditOutput, error) {
if params == nil {
params = &UpdateScheduledAuditInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateScheduledAudit", params, optFns, c.addOperationUpdateScheduledAuditMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateScheduledAuditOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateScheduledAuditInput struct {
// The name of the scheduled audit. (Max. 128 chars)
//
// This member is required.
ScheduledAuditName *string
// The day of the month on which the scheduled audit takes place. This can be 1
// through 31 or LAST . This field is required if the frequency parameter is set
// to MONTHLY . If days 29-31 are specified, and the month does not have that many
// days, the audit takes place on the "LAST" day of the month.
DayOfMonth *string
// The day of the week on which the scheduled audit takes place. This can be one
// of SUN , MON , TUE , WED , THU , FRI , or SAT . This field is required if the
// "frequency" parameter is set to WEEKLY or BIWEEKLY .
DayOfWeek types.DayOfWeek
// How often the scheduled audit takes place, either DAILY , WEEKLY , BIWEEKLY , or
// MONTHLY . The start time of each audit is determined by the system.
Frequency types.AuditFrequency
// Which checks are performed during the scheduled audit. Checks must be enabled
// for your account. (Use DescribeAccountAuditConfiguration to see the list of all
// checks, including those that are enabled or use UpdateAccountAuditConfiguration
// to select which checks are enabled.)
TargetCheckNames []string
noSmithyDocumentSerde
}
type UpdateScheduledAuditOutput struct {
// The ARN of the scheduled audit.
ScheduledAuditArn *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateScheduledAuditMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateScheduledAudit{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateScheduledAudit{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateScheduledAuditValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateScheduledAudit(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateScheduledAudit(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateScheduledAudit",
}
}
| 148 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Updates a Device Defender security profile. Requires permission to access the
// UpdateSecurityProfile (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateSecurityProfile(ctx context.Context, params *UpdateSecurityProfileInput, optFns ...func(*Options)) (*UpdateSecurityProfileOutput, error) {
if params == nil {
params = &UpdateSecurityProfileInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateSecurityProfile", params, optFns, c.addOperationUpdateSecurityProfileMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateSecurityProfileOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateSecurityProfileInput struct {
// The name of the security profile you want to update.
//
// This member is required.
SecurityProfileName *string
// Please use UpdateSecurityProfileRequest$additionalMetricsToRetainV2 instead. A
// list of metrics whose data is retained (stored). By default, data is retained
// for any metric used in the profile's behaviors , but it is also retained for any
// metric specified here. Can be used with custom metrics; cannot be used with
// dimensions.
//
// Deprecated: Use additionalMetricsToRetainV2.
AdditionalMetricsToRetain []string
// A list of metrics whose data is retained (stored). By default, data is retained
// for any metric used in the profile's behaviors, but it is also retained for any
// metric specified here. Can be used with custom metrics; cannot be used with
// dimensions.
AdditionalMetricsToRetainV2 []types.MetricToRetain
// Where the alerts are sent. (Alerts are always sent to the console.)
AlertTargets map[string]types.AlertTarget
// Specifies the behaviors that, when violated by a device (thing), cause an alert.
Behaviors []types.Behavior
// If true, delete all additionalMetricsToRetain defined for this security
// profile. If any additionalMetricsToRetain are defined in the current
// invocation, an exception occurs.
DeleteAdditionalMetricsToRetain bool
// If true, delete all alertTargets defined for this security profile. If any
// alertTargets are defined in the current invocation, an exception occurs.
DeleteAlertTargets bool
// If true, delete all behaviors defined for this security profile. If any
// behaviors are defined in the current invocation, an exception occurs.
DeleteBehaviors bool
// The expected version of the security profile. A new version is generated
// whenever the security profile is updated. If you specify a value that is
// different from the actual version, a VersionConflictException is thrown.
ExpectedVersion *int64
// A description of the security profile.
SecurityProfileDescription *string
noSmithyDocumentSerde
}
type UpdateSecurityProfileOutput struct {
// Please use UpdateSecurityProfileResponse$additionalMetricsToRetainV2 instead. A
// list of metrics whose data is retained (stored). By default, data is retained
// for any metric used in the security profile's behaviors , but it is also
// retained for any metric specified here.
//
// Deprecated: Use additionalMetricsToRetainV2.
AdditionalMetricsToRetain []string
// A list of metrics whose data is retained (stored). By default, data is retained
// for any metric used in the profile's behaviors, but it is also retained for any
// metric specified here. Can be used with custom metrics; cannot be used with
// dimensions.
AdditionalMetricsToRetainV2 []types.MetricToRetain
// Where the alerts are sent. (Alerts are always sent to the console.)
AlertTargets map[string]types.AlertTarget
// Specifies the behaviors that, when violated by a device (thing), cause an alert.
Behaviors []types.Behavior
// The time the security profile was created.
CreationDate *time.Time
// The time the security profile was last modified.
LastModifiedDate *time.Time
// The ARN of the security profile that was updated.
SecurityProfileArn *string
// The description of the security profile.
SecurityProfileDescription *string
// The name of the security profile that was updated.
SecurityProfileName *string
// The updated version of the security profile.
Version int64
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateSecurityProfileMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSecurityProfile{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSecurityProfile{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateSecurityProfileValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecurityProfile(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateSecurityProfile(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateSecurityProfile",
}
}
| 205 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates an existing stream. The stream version will be incremented by one.
// Requires permission to access the UpdateStream (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateStream(ctx context.Context, params *UpdateStreamInput, optFns ...func(*Options)) (*UpdateStreamOutput, error) {
if params == nil {
params = &UpdateStreamInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateStream", params, optFns, c.addOperationUpdateStreamMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateStreamOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateStreamInput struct {
// The stream ID.
//
// This member is required.
StreamId *string
// The description of the stream.
Description *string
// The files associated with the stream.
Files []types.StreamFile
// An IAM role that allows the IoT service principal assumes to access your S3
// files.
RoleArn *string
noSmithyDocumentSerde
}
type UpdateStreamOutput struct {
// A description of the stream.
Description *string
// The stream ARN.
StreamArn *string
// The stream ID.
StreamId *string
// The stream version.
StreamVersion *int32
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateStreamMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateStream{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateStream{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateStreamValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateStream(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateStream(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateStream",
}
}
| 146 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the data for a thing. Requires permission to access the UpdateThing (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateThing(ctx context.Context, params *UpdateThingInput, optFns ...func(*Options)) (*UpdateThingOutput, error) {
if params == nil {
params = &UpdateThingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateThing", params, optFns, c.addOperationUpdateThingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateThingOutput)
out.ResultMetadata = metadata
return out, nil
}
// The input for the UpdateThing operation.
type UpdateThingInput struct {
// The name of the thing to update. You can't change a thing's name. To change a
// thing's name, you must create a new thing, give it the new name, and then delete
// the old thing.
//
// This member is required.
ThingName *string
// A list of thing attributes, a JSON string containing name-value pairs. For
// example: {\"attributes\":{\"name1\":\"value2\"}} This data is used to add new
// attributes or update existing attributes.
AttributePayload *types.AttributePayload
// The expected version of the thing record in the registry. If the version of the
// record in the registry does not match the expected version specified in the
// request, the UpdateThing request is rejected with a VersionConflictException .
ExpectedVersion *int64
// Remove a thing type association. If true, the association is removed.
RemoveThingType bool
// The name of the thing type.
ThingTypeName *string
noSmithyDocumentSerde
}
// The output from the UpdateThing operation.
type UpdateThingOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateThingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateThing{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateThing{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateThingValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateThing(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateThing(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateThing",
}
}
| 142 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Update a thing group. Requires permission to access the UpdateThingGroup (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateThingGroup(ctx context.Context, params *UpdateThingGroupInput, optFns ...func(*Options)) (*UpdateThingGroupOutput, error) {
if params == nil {
params = &UpdateThingGroupInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateThingGroup", params, optFns, c.addOperationUpdateThingGroupMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateThingGroupOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateThingGroupInput struct {
// The thing group to update.
//
// This member is required.
ThingGroupName *string
// The thing group properties.
//
// This member is required.
ThingGroupProperties *types.ThingGroupProperties
// The expected version of the thing group. If this does not match the version of
// the thing group being updated, the update will fail.
ExpectedVersion *int64
noSmithyDocumentSerde
}
type UpdateThingGroupOutput struct {
// The version of the updated thing group.
Version int64
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateThingGroupMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateThingGroup{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateThingGroup{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateThingGroupValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateThingGroup(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateThingGroup(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateThingGroup",
}
}
| 135 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates the groups to which the thing belongs. Requires permission to access
// the UpdateThingGroupsForThing (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateThingGroupsForThing(ctx context.Context, params *UpdateThingGroupsForThingInput, optFns ...func(*Options)) (*UpdateThingGroupsForThingOutput, error) {
if params == nil {
params = &UpdateThingGroupsForThingInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateThingGroupsForThing", params, optFns, c.addOperationUpdateThingGroupsForThingMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateThingGroupsForThingOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateThingGroupsForThingInput struct {
// Override dynamic thing groups with static thing groups when 10-group limit is
// reached. If a thing belongs to 10 thing groups, and one or more of those groups
// are dynamic thing groups, adding a thing to a static group removes the thing
// from the last dynamic group.
OverrideDynamicGroups bool
// The groups to which the thing will be added.
ThingGroupsToAdd []string
// The groups from which the thing will be removed.
ThingGroupsToRemove []string
// The thing whose group memberships will be updated.
ThingName *string
noSmithyDocumentSerde
}
type UpdateThingGroupsForThingOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateThingGroupsForThingMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateThingGroupsForThing{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateThingGroupsForThing{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateThingGroupsForThing(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateThingGroupsForThing(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateThingGroupsForThing",
}
}
| 129 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Updates a topic rule destination. You use this to change the status, endpoint
// URL, or confirmation URL of the destination. Requires permission to access the
// UpdateTopicRuleDestination (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) UpdateTopicRuleDestination(ctx context.Context, params *UpdateTopicRuleDestinationInput, optFns ...func(*Options)) (*UpdateTopicRuleDestinationOutput, error) {
if params == nil {
params = &UpdateTopicRuleDestinationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UpdateTopicRuleDestination", params, optFns, c.addOperationUpdateTopicRuleDestinationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UpdateTopicRuleDestinationOutput)
out.ResultMetadata = metadata
return out, nil
}
type UpdateTopicRuleDestinationInput struct {
// The ARN of the topic rule destination.
//
// This member is required.
Arn *string
// The status of the topic rule destination. Valid values are: IN_PROGRESS A topic
// rule destination was created but has not been confirmed. You can set status to
// IN_PROGRESS by calling UpdateTopicRuleDestination . Calling
// UpdateTopicRuleDestination causes a new confirmation challenge to be sent to
// your confirmation endpoint. ENABLED Confirmation was completed, and traffic to
// this destination is allowed. You can set status to DISABLED by calling
// UpdateTopicRuleDestination . DISABLED Confirmation was completed, and traffic to
// this destination is not allowed. You can set status to ENABLED by calling
// UpdateTopicRuleDestination . ERROR Confirmation could not be completed, for
// example if the confirmation timed out. You can call GetTopicRuleDestination for
// details about the error. You can set status to IN_PROGRESS by calling
// UpdateTopicRuleDestination . Calling UpdateTopicRuleDestination causes a new
// confirmation challenge to be sent to your confirmation endpoint.
//
// This member is required.
Status types.TopicRuleDestinationStatus
noSmithyDocumentSerde
}
type UpdateTopicRuleDestinationOutput struct {
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUpdateTopicRuleDestinationMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateTopicRuleDestination{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateTopicRuleDestination{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUpdateTopicRuleDestinationValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTopicRuleDestination(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUpdateTopicRuleDestination(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "UpdateTopicRuleDestination",
}
}
| 141 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Validates a Device Defender security profile behaviors specification. Requires
// permission to access the ValidateSecurityProfileBehaviors (https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions)
// action.
func (c *Client) ValidateSecurityProfileBehaviors(ctx context.Context, params *ValidateSecurityProfileBehaviorsInput, optFns ...func(*Options)) (*ValidateSecurityProfileBehaviorsOutput, error) {
if params == nil {
params = &ValidateSecurityProfileBehaviorsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ValidateSecurityProfileBehaviors", params, optFns, c.addOperationValidateSecurityProfileBehaviorsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ValidateSecurityProfileBehaviorsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ValidateSecurityProfileBehaviorsInput struct {
// Specifies the behaviors that, when violated by a device (thing), cause an alert.
//
// This member is required.
Behaviors []types.Behavior
noSmithyDocumentSerde
}
type ValidateSecurityProfileBehaviorsOutput struct {
// True if the behaviors were valid.
Valid bool
// The list of any errors found in the behaviors.
ValidationErrors []types.ValidationError
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationValidateSecurityProfileBehaviorsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpValidateSecurityProfileBehaviors{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpValidateSecurityProfileBehaviors{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpValidateSecurityProfileBehaviorsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opValidateSecurityProfileBehaviors(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opValidateSecurityProfileBehaviors(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot",
OperationName: "ValidateSecurityProfileBehaviors",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
// Package iot provides the API client, operations, and parameter types for AWS
// IoT.
//
// IoT IoT provides secure, bi-directional communication between
// Internet-connected devices (such as sensors, actuators, embedded devices, or
// smart appliances) and the Amazon Web Services cloud. You can discover your
// custom IoT-Data endpoint to communicate with, configure rules for data
// processing and integration with other services, organize resources associated
// with each device (Registry), configure logging, and create and manage policies
// and credentials to authenticate devices. The service endpoints that expose this
// API are listed in Amazon Web Services IoT Core Endpoints and Quotas (https://docs.aws.amazon.com/general/latest/gr/iot-core.html)
// . You must use the endpoint for the region that has the resources you want to
// access. The service name used by Amazon Web Services Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
// to sign the request is: execute-api. For more information about how IoT works,
// see the Developer Guide (https://docs.aws.amazon.com/iot/latest/developerguide/aws-iot-how-it-works.html)
// . For information about how to use the credentials provider for IoT, see
// Authorizing Direct Calls to Amazon Web Services Services (https://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html)
// .
package iot
| 22 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"errors"
"fmt"
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
internalendpoints "github.com/aws/aws-sdk-go-v2/service/iot/internal/endpoints"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"net/url"
"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)
}
func resolveDefaultEndpointConfiguration(o *Options) {
if o.EndpointResolver != nil {
return
}
o.EndpointResolver = NewDefaultEndpointResolver()
}
// 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,
) {
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 {
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 = "iot"
}
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
resolver EndpointResolver
}
func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
if w.awsResolver == nil {
goto fallback
}
endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options)
if err == nil {
return endpoint, nil
}
if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) {
return endpoint, err
}
fallback:
if w.resolver == nil {
return endpoint, fmt.Errorf("default endpoint resolver provided was nil")
}
return w.resolver.ResolveEndpoint(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 EndpointResolver that first delegates endpoint resolution to the awsResolver.
// If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided
// fallbackResolver for resolution.
//
// fallbackResolver must not be nil
func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver {
var resolver aws.EndpointResolverWithOptions
if awsResolverWithOptions != nil {
resolver = awsResolverWithOptions
} else if awsResolver != nil {
resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
}
return &wrappedEndpointResolver{
awsResolver: resolver,
resolver: fallbackResolver,
}
}
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
}
}
}
| 201 |
aws-sdk-go-v2 | aws | Go | // Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
package iot
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.38.2"
| 7 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
| 4 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot
import (
"context"
"fmt"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
smithy "github.com/aws/smithy-go"
"github.com/aws/smithy-go/middleware"
)
type validateOpAcceptCertificateTransfer struct {
}
func (*validateOpAcceptCertificateTransfer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAcceptCertificateTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AcceptCertificateTransferInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAcceptCertificateTransferInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAssociateTargetsWithJob struct {
}
func (*validateOpAssociateTargetsWithJob) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAssociateTargetsWithJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AssociateTargetsWithJobInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAssociateTargetsWithJobInput(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 validateOpAttachPrincipalPolicy struct {
}
func (*validateOpAttachPrincipalPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAttachPrincipalPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AttachPrincipalPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAttachPrincipalPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAttachSecurityProfile struct {
}
func (*validateOpAttachSecurityProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAttachSecurityProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AttachSecurityProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAttachSecurityProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpAttachThingPrincipal struct {
}
func (*validateOpAttachThingPrincipal) ID() string {
return "OperationInputValidation"
}
func (m *validateOpAttachThingPrincipal) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*AttachThingPrincipalInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpAttachThingPrincipalInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelAuditMitigationActionsTask struct {
}
func (*validateOpCancelAuditMitigationActionsTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelAuditMitigationActionsTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelAuditMitigationActionsTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelAuditMitigationActionsTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelAuditTask struct {
}
func (*validateOpCancelAuditTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelAuditTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelAuditTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelAuditTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelCertificateTransfer struct {
}
func (*validateOpCancelCertificateTransfer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelCertificateTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelCertificateTransferInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelCertificateTransferInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelDetectMitigationActionsTask struct {
}
func (*validateOpCancelDetectMitigationActionsTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelDetectMitigationActionsTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelDetectMitigationActionsTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelDetectMitigationActionsTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelJobExecution struct {
}
func (*validateOpCancelJobExecution) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelJobExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelJobExecutionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelJobExecutionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCancelJob struct {
}
func (*validateOpCancelJob) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCancelJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CancelJobInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCancelJobInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpConfirmTopicRuleDestination struct {
}
func (*validateOpConfirmTopicRuleDestination) ID() string {
return "OperationInputValidation"
}
func (m *validateOpConfirmTopicRuleDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ConfirmTopicRuleDestinationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpConfirmTopicRuleDestinationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateAuditSuppression struct {
}
func (*validateOpCreateAuditSuppression) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateAuditSuppression) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateAuditSuppressionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateAuditSuppressionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateAuthorizer struct {
}
func (*validateOpCreateAuthorizer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateAuthorizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateAuthorizerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateAuthorizerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateBillingGroup struct {
}
func (*validateOpCreateBillingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateBillingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateBillingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateBillingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateCertificateFromCsr struct {
}
func (*validateOpCreateCertificateFromCsr) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateCertificateFromCsr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateCertificateFromCsrInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateCertificateFromCsrInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateCustomMetric struct {
}
func (*validateOpCreateCustomMetric) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateCustomMetric) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateCustomMetricInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateCustomMetricInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDimension struct {
}
func (*validateOpCreateDimension) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDimension) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDimensionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDimensionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDomainConfiguration struct {
}
func (*validateOpCreateDomainConfiguration) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDomainConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDomainConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDomainConfigurationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateDynamicThingGroup struct {
}
func (*validateOpCreateDynamicThingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateDynamicThingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateDynamicThingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateDynamicThingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateFleetMetric struct {
}
func (*validateOpCreateFleetMetric) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateFleetMetric) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateFleetMetricInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateFleetMetricInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateJob struct {
}
func (*validateOpCreateJob) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateJobInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateJobInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateJobTemplate struct {
}
func (*validateOpCreateJobTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateJobTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateJobTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateJobTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateMitigationAction struct {
}
func (*validateOpCreateMitigationAction) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateMitigationAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateMitigationActionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateMitigationActionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateOTAUpdate struct {
}
func (*validateOpCreateOTAUpdate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateOTAUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateOTAUpdateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateOTAUpdateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreatePackage struct {
}
func (*validateOpCreatePackage) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreatePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreatePackageInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreatePackageInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreatePackageVersion struct {
}
func (*validateOpCreatePackageVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreatePackageVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreatePackageVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreatePackageVersionInput(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 validateOpCreatePolicyVersion struct {
}
func (*validateOpCreatePolicyVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreatePolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreatePolicyVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreatePolicyVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateProvisioningClaim struct {
}
func (*validateOpCreateProvisioningClaim) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateProvisioningClaim) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateProvisioningClaimInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateProvisioningClaimInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateProvisioningTemplate struct {
}
func (*validateOpCreateProvisioningTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateProvisioningTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateProvisioningTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateProvisioningTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateProvisioningTemplateVersion struct {
}
func (*validateOpCreateProvisioningTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateProvisioningTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateProvisioningTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateProvisioningTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateRoleAlias struct {
}
func (*validateOpCreateRoleAlias) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateRoleAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateRoleAliasInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateRoleAliasInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateScheduledAudit struct {
}
func (*validateOpCreateScheduledAudit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateScheduledAudit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateScheduledAuditInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateScheduledAuditInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateSecurityProfile struct {
}
func (*validateOpCreateSecurityProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateSecurityProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateSecurityProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateSecurityProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateStream struct {
}
func (*validateOpCreateStream) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateStreamInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateStreamInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateThingGroup struct {
}
func (*validateOpCreateThingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateThingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateThingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateThingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateThing struct {
}
func (*validateOpCreateThing) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateThing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateThingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateThingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateThingType struct {
}
func (*validateOpCreateThingType) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateThingType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateThingTypeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateThingTypeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateTopicRuleDestination struct {
}
func (*validateOpCreateTopicRuleDestination) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateTopicRuleDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateTopicRuleDestinationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateTopicRuleDestinationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpCreateTopicRule struct {
}
func (*validateOpCreateTopicRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpCreateTopicRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*CreateTopicRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpCreateTopicRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteAuditSuppression struct {
}
func (*validateOpDeleteAuditSuppression) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteAuditSuppression) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteAuditSuppressionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteAuditSuppressionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteAuthorizer struct {
}
func (*validateOpDeleteAuthorizer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteAuthorizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteAuthorizerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteAuthorizerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteBillingGroup struct {
}
func (*validateOpDeleteBillingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteBillingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteBillingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteBillingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteCACertificate struct {
}
func (*validateOpDeleteCACertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteCACertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteCACertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteCACertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteCertificate struct {
}
func (*validateOpDeleteCertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteCertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteCertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteCustomMetric struct {
}
func (*validateOpDeleteCustomMetric) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteCustomMetric) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteCustomMetricInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteCustomMetricInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDimension struct {
}
func (*validateOpDeleteDimension) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDimension) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDimensionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDimensionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDomainConfiguration struct {
}
func (*validateOpDeleteDomainConfiguration) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDomainConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDomainConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDomainConfigurationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteDynamicThingGroup struct {
}
func (*validateOpDeleteDynamicThingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteDynamicThingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteDynamicThingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteDynamicThingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteFleetMetric struct {
}
func (*validateOpDeleteFleetMetric) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteFleetMetric) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteFleetMetricInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteFleetMetricInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteJobExecution struct {
}
func (*validateOpDeleteJobExecution) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteJobExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteJobExecutionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteJobExecutionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteJob struct {
}
func (*validateOpDeleteJob) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteJobInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteJobInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteJobTemplate struct {
}
func (*validateOpDeleteJobTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteJobTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteJobTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteJobTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteMitigationAction struct {
}
func (*validateOpDeleteMitigationAction) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteMitigationAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteMitigationActionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteMitigationActionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteOTAUpdate struct {
}
func (*validateOpDeleteOTAUpdate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteOTAUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteOTAUpdateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteOTAUpdateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeletePackage struct {
}
func (*validateOpDeletePackage) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeletePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeletePackageInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeletePackageInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeletePackageVersion struct {
}
func (*validateOpDeletePackageVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeletePackageVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeletePackageVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeletePackageVersionInput(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 validateOpDeletePolicyVersion struct {
}
func (*validateOpDeletePolicyVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeletePolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeletePolicyVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeletePolicyVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteProvisioningTemplate struct {
}
func (*validateOpDeleteProvisioningTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteProvisioningTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteProvisioningTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteProvisioningTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteProvisioningTemplateVersion struct {
}
func (*validateOpDeleteProvisioningTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteProvisioningTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteProvisioningTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteProvisioningTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteRoleAlias struct {
}
func (*validateOpDeleteRoleAlias) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteRoleAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteRoleAliasInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteRoleAliasInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteScheduledAudit struct {
}
func (*validateOpDeleteScheduledAudit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteScheduledAudit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteScheduledAuditInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteScheduledAuditInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteSecurityProfile struct {
}
func (*validateOpDeleteSecurityProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteSecurityProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteSecurityProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteSecurityProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteStream struct {
}
func (*validateOpDeleteStream) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteStreamInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteStreamInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteThingGroup struct {
}
func (*validateOpDeleteThingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteThingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteThingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteThingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteThing struct {
}
func (*validateOpDeleteThing) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteThing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteThingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteThingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteThingType struct {
}
func (*validateOpDeleteThingType) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteThingType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteThingTypeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteThingTypeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteTopicRuleDestination struct {
}
func (*validateOpDeleteTopicRuleDestination) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteTopicRuleDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteTopicRuleDestinationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteTopicRuleDestinationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteTopicRule struct {
}
func (*validateOpDeleteTopicRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteTopicRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteTopicRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteTopicRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeleteV2LoggingLevel struct {
}
func (*validateOpDeleteV2LoggingLevel) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeleteV2LoggingLevel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeleteV2LoggingLevelInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeleteV2LoggingLevelInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDeprecateThingType struct {
}
func (*validateOpDeprecateThingType) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDeprecateThingType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DeprecateThingTypeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDeprecateThingTypeInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeAuditFinding struct {
}
func (*validateOpDescribeAuditFinding) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeAuditFinding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeAuditFindingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeAuditFindingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeAuditMitigationActionsTask struct {
}
func (*validateOpDescribeAuditMitigationActionsTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeAuditMitigationActionsTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeAuditMitigationActionsTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeAuditMitigationActionsTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeAuditSuppression struct {
}
func (*validateOpDescribeAuditSuppression) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeAuditSuppression) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeAuditSuppressionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeAuditSuppressionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeAuditTask struct {
}
func (*validateOpDescribeAuditTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeAuditTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeAuditTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeAuditTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeAuthorizer struct {
}
func (*validateOpDescribeAuthorizer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeAuthorizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeAuthorizerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeAuthorizerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeBillingGroup struct {
}
func (*validateOpDescribeBillingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeBillingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeBillingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeBillingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeCACertificate struct {
}
func (*validateOpDescribeCACertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeCACertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeCACertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeCACertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeCertificate struct {
}
func (*validateOpDescribeCertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeCertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeCertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeCustomMetric struct {
}
func (*validateOpDescribeCustomMetric) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeCustomMetric) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeCustomMetricInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeCustomMetricInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDetectMitigationActionsTask struct {
}
func (*validateOpDescribeDetectMitigationActionsTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDetectMitigationActionsTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDetectMitigationActionsTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDetectMitigationActionsTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDimension struct {
}
func (*validateOpDescribeDimension) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDimension) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDimensionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDimensionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeDomainConfiguration struct {
}
func (*validateOpDescribeDomainConfiguration) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeDomainConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeDomainConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeDomainConfigurationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeFleetMetric struct {
}
func (*validateOpDescribeFleetMetric) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeFleetMetric) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeFleetMetricInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeFleetMetricInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeIndex struct {
}
func (*validateOpDescribeIndex) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeIndex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeIndexInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeIndexInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeJobExecution struct {
}
func (*validateOpDescribeJobExecution) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeJobExecution) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeJobExecutionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeJobExecutionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeJob struct {
}
func (*validateOpDescribeJob) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeJobInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeJobInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeJobTemplate struct {
}
func (*validateOpDescribeJobTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeJobTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeJobTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeJobTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeManagedJobTemplate struct {
}
func (*validateOpDescribeManagedJobTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeManagedJobTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeManagedJobTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeManagedJobTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeMitigationAction struct {
}
func (*validateOpDescribeMitigationAction) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeMitigationAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeMitigationActionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeMitigationActionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeProvisioningTemplate struct {
}
func (*validateOpDescribeProvisioningTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeProvisioningTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeProvisioningTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeProvisioningTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeProvisioningTemplateVersion struct {
}
func (*validateOpDescribeProvisioningTemplateVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeProvisioningTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeProvisioningTemplateVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeProvisioningTemplateVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeRoleAlias struct {
}
func (*validateOpDescribeRoleAlias) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeRoleAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeRoleAliasInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeRoleAliasInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeScheduledAudit struct {
}
func (*validateOpDescribeScheduledAudit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeScheduledAudit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeScheduledAuditInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeScheduledAuditInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeSecurityProfile struct {
}
func (*validateOpDescribeSecurityProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeSecurityProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeSecurityProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeSecurityProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeStream struct {
}
func (*validateOpDescribeStream) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeStreamInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeStreamInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeThingGroup struct {
}
func (*validateOpDescribeThingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeThingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeThingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeThingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeThing struct {
}
func (*validateOpDescribeThing) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeThing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeThingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeThingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeThingRegistrationTask struct {
}
func (*validateOpDescribeThingRegistrationTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeThingRegistrationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeThingRegistrationTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeThingRegistrationTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDescribeThingType struct {
}
func (*validateOpDescribeThingType) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDescribeThingType) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DescribeThingTypeInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDescribeThingTypeInput(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 validateOpDetachPrincipalPolicy struct {
}
func (*validateOpDetachPrincipalPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDetachPrincipalPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DetachPrincipalPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDetachPrincipalPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDetachSecurityProfile struct {
}
func (*validateOpDetachSecurityProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDetachSecurityProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DetachSecurityProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDetachSecurityProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDetachThingPrincipal struct {
}
func (*validateOpDetachThingPrincipal) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDetachThingPrincipal) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DetachThingPrincipalInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDetachThingPrincipalInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpDisableTopicRule struct {
}
func (*validateOpDisableTopicRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpDisableTopicRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*DisableTopicRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpDisableTopicRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpEnableTopicRule struct {
}
func (*validateOpEnableTopicRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpEnableTopicRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*EnableTopicRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpEnableTopicRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetBucketsAggregation struct {
}
func (*validateOpGetBucketsAggregation) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetBucketsAggregation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetBucketsAggregationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetBucketsAggregationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetCardinality struct {
}
func (*validateOpGetCardinality) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetCardinality) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetCardinalityInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetCardinalityInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetJobDocument struct {
}
func (*validateOpGetJobDocument) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetJobDocument) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetJobDocumentInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetJobDocumentInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetOTAUpdate struct {
}
func (*validateOpGetOTAUpdate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetOTAUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetOTAUpdateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetOTAUpdateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetPackage struct {
}
func (*validateOpGetPackage) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetPackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetPackageInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetPackageInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetPackageVersion struct {
}
func (*validateOpGetPackageVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetPackageVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetPackageVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetPackageVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetPercentiles struct {
}
func (*validateOpGetPercentiles) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetPercentiles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetPercentilesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetPercentilesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetPolicy struct {
}
func (*validateOpGetPolicy) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetPolicyInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetPolicyInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetPolicyVersion struct {
}
func (*validateOpGetPolicyVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetPolicyVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetPolicyVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetStatistics struct {
}
func (*validateOpGetStatistics) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetStatistics) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetStatisticsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetStatisticsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetTopicRuleDestination struct {
}
func (*validateOpGetTopicRuleDestination) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetTopicRuleDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetTopicRuleDestinationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetTopicRuleDestinationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpGetTopicRule struct {
}
func (*validateOpGetTopicRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpGetTopicRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*GetTopicRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpGetTopicRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListAttachedPolicies struct {
}
func (*validateOpListAttachedPolicies) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListAttachedPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListAttachedPoliciesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListAttachedPoliciesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListAuditMitigationActionsExecutions struct {
}
func (*validateOpListAuditMitigationActionsExecutions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListAuditMitigationActionsExecutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListAuditMitigationActionsExecutionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListAuditMitigationActionsExecutionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListAuditMitigationActionsTasks struct {
}
func (*validateOpListAuditMitigationActionsTasks) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListAuditMitigationActionsTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListAuditMitigationActionsTasksInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListAuditMitigationActionsTasksInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListAuditTasks struct {
}
func (*validateOpListAuditTasks) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListAuditTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListAuditTasksInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListAuditTasksInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListCertificatesByCA struct {
}
func (*validateOpListCertificatesByCA) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListCertificatesByCA) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListCertificatesByCAInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListCertificatesByCAInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListDetectMitigationActionsTasks struct {
}
func (*validateOpListDetectMitigationActionsTasks) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListDetectMitigationActionsTasks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListDetectMitigationActionsTasksInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListDetectMitigationActionsTasksInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListJobExecutionsForJob struct {
}
func (*validateOpListJobExecutionsForJob) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListJobExecutionsForJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListJobExecutionsForJobInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListJobExecutionsForJobInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListJobExecutionsForThing struct {
}
func (*validateOpListJobExecutionsForThing) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListJobExecutionsForThing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListJobExecutionsForThingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListJobExecutionsForThingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListMetricValues struct {
}
func (*validateOpListMetricValues) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListMetricValues) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListMetricValuesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListMetricValuesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListPackageVersions struct {
}
func (*validateOpListPackageVersions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListPackageVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListPackageVersionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListPackageVersionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListPolicyPrincipals struct {
}
func (*validateOpListPolicyPrincipals) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListPolicyPrincipals) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListPolicyPrincipalsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListPolicyPrincipalsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListPolicyVersions struct {
}
func (*validateOpListPolicyVersions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListPolicyVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListPolicyVersionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListPolicyVersionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListPrincipalPolicies struct {
}
func (*validateOpListPrincipalPolicies) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListPrincipalPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListPrincipalPoliciesInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListPrincipalPoliciesInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListPrincipalThings struct {
}
func (*validateOpListPrincipalThings) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListPrincipalThings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListPrincipalThingsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListPrincipalThingsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListProvisioningTemplateVersions struct {
}
func (*validateOpListProvisioningTemplateVersions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListProvisioningTemplateVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListProvisioningTemplateVersionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListProvisioningTemplateVersionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListRelatedResourcesForAuditFinding struct {
}
func (*validateOpListRelatedResourcesForAuditFinding) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListRelatedResourcesForAuditFinding) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListRelatedResourcesForAuditFindingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListRelatedResourcesForAuditFindingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListSecurityProfilesForTarget struct {
}
func (*validateOpListSecurityProfilesForTarget) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListSecurityProfilesForTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListSecurityProfilesForTargetInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListSecurityProfilesForTargetInput(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 validateOpListTargetsForSecurityProfile struct {
}
func (*validateOpListTargetsForSecurityProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListTargetsForSecurityProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListTargetsForSecurityProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListTargetsForSecurityProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListThingGroupsForThing struct {
}
func (*validateOpListThingGroupsForThing) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListThingGroupsForThing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListThingGroupsForThingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListThingGroupsForThingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListThingPrincipals struct {
}
func (*validateOpListThingPrincipals) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListThingPrincipals) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListThingPrincipalsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListThingPrincipalsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListThingRegistrationTaskReports struct {
}
func (*validateOpListThingRegistrationTaskReports) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListThingRegistrationTaskReports) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListThingRegistrationTaskReportsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListThingRegistrationTaskReportsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListThingsInBillingGroup struct {
}
func (*validateOpListThingsInBillingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListThingsInBillingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListThingsInBillingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListThingsInBillingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListThingsInThingGroup struct {
}
func (*validateOpListThingsInThingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListThingsInThingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListThingsInThingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListThingsInThingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpListViolationEvents struct {
}
func (*validateOpListViolationEvents) ID() string {
return "OperationInputValidation"
}
func (m *validateOpListViolationEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ListViolationEventsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpListViolationEventsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpPutVerificationStateOnViolation struct {
}
func (*validateOpPutVerificationStateOnViolation) ID() string {
return "OperationInputValidation"
}
func (m *validateOpPutVerificationStateOnViolation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*PutVerificationStateOnViolationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpPutVerificationStateOnViolationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRegisterCACertificate struct {
}
func (*validateOpRegisterCACertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRegisterCACertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RegisterCACertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRegisterCACertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRegisterCertificate struct {
}
func (*validateOpRegisterCertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRegisterCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RegisterCertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRegisterCertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRegisterCertificateWithoutCA struct {
}
func (*validateOpRegisterCertificateWithoutCA) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRegisterCertificateWithoutCA) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RegisterCertificateWithoutCAInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRegisterCertificateWithoutCAInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRegisterThing struct {
}
func (*validateOpRegisterThing) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRegisterThing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RegisterThingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRegisterThingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpRejectCertificateTransfer struct {
}
func (*validateOpRejectCertificateTransfer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpRejectCertificateTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*RejectCertificateTransferInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpRejectCertificateTransferInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpReplaceTopicRule struct {
}
func (*validateOpReplaceTopicRule) ID() string {
return "OperationInputValidation"
}
func (m *validateOpReplaceTopicRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ReplaceTopicRuleInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpReplaceTopicRuleInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSearchIndex struct {
}
func (*validateOpSearchIndex) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSearchIndex) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SearchIndexInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSearchIndexInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetDefaultAuthorizer struct {
}
func (*validateOpSetDefaultAuthorizer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetDefaultAuthorizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetDefaultAuthorizerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetDefaultAuthorizerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetDefaultPolicyVersion struct {
}
func (*validateOpSetDefaultPolicyVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetDefaultPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetDefaultPolicyVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetDefaultPolicyVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetLoggingOptions struct {
}
func (*validateOpSetLoggingOptions) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetLoggingOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetLoggingOptionsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetLoggingOptionsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpSetV2LoggingLevel struct {
}
func (*validateOpSetV2LoggingLevel) ID() string {
return "OperationInputValidation"
}
func (m *validateOpSetV2LoggingLevel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*SetV2LoggingLevelInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpSetV2LoggingLevelInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartAuditMitigationActionsTask struct {
}
func (*validateOpStartAuditMitigationActionsTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartAuditMitigationActionsTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartAuditMitigationActionsTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartAuditMitigationActionsTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartDetectMitigationActionsTask struct {
}
func (*validateOpStartDetectMitigationActionsTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartDetectMitigationActionsTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartDetectMitigationActionsTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartDetectMitigationActionsTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartOnDemandAuditTask struct {
}
func (*validateOpStartOnDemandAuditTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartOnDemandAuditTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartOnDemandAuditTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartOnDemandAuditTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStartThingRegistrationTask struct {
}
func (*validateOpStartThingRegistrationTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStartThingRegistrationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StartThingRegistrationTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStartThingRegistrationTaskInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpStopThingRegistrationTask struct {
}
func (*validateOpStopThingRegistrationTask) ID() string {
return "OperationInputValidation"
}
func (m *validateOpStopThingRegistrationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*StopThingRegistrationTaskInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpStopThingRegistrationTaskInput(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 validateOpTestAuthorization struct {
}
func (*validateOpTestAuthorization) ID() string {
return "OperationInputValidation"
}
func (m *validateOpTestAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*TestAuthorizationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpTestAuthorizationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpTestInvokeAuthorizer struct {
}
func (*validateOpTestInvokeAuthorizer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpTestInvokeAuthorizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*TestInvokeAuthorizerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpTestInvokeAuthorizerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpTransferCertificate struct {
}
func (*validateOpTransferCertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpTransferCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*TransferCertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpTransferCertificateInput(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 validateOpUpdateAuditSuppression struct {
}
func (*validateOpUpdateAuditSuppression) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateAuditSuppression) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateAuditSuppressionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateAuditSuppressionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateAuthorizer struct {
}
func (*validateOpUpdateAuthorizer) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateAuthorizer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateAuthorizerInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateAuthorizerInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateBillingGroup struct {
}
func (*validateOpUpdateBillingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateBillingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateBillingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateBillingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateCACertificate struct {
}
func (*validateOpUpdateCACertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateCACertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateCACertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateCACertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateCertificate struct {
}
func (*validateOpUpdateCertificate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateCertificateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateCertificateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateCustomMetric struct {
}
func (*validateOpUpdateCustomMetric) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateCustomMetric) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateCustomMetricInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateCustomMetricInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateDimension struct {
}
func (*validateOpUpdateDimension) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateDimension) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateDimensionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateDimensionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateDomainConfiguration struct {
}
func (*validateOpUpdateDomainConfiguration) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateDomainConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateDomainConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateDomainConfigurationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateDynamicThingGroup struct {
}
func (*validateOpUpdateDynamicThingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateDynamicThingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateDynamicThingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateDynamicThingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateFleetMetric struct {
}
func (*validateOpUpdateFleetMetric) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateFleetMetric) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateFleetMetricInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateFleetMetricInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateIndexingConfiguration struct {
}
func (*validateOpUpdateIndexingConfiguration) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateIndexingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateIndexingConfigurationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateIndexingConfigurationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateJob struct {
}
func (*validateOpUpdateJob) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateJobInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateJobInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateMitigationAction struct {
}
func (*validateOpUpdateMitigationAction) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateMitigationAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateMitigationActionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateMitigationActionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdatePackage struct {
}
func (*validateOpUpdatePackage) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdatePackage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdatePackageInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdatePackageInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdatePackageVersion struct {
}
func (*validateOpUpdatePackageVersion) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdatePackageVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdatePackageVersionInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdatePackageVersionInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateProvisioningTemplate struct {
}
func (*validateOpUpdateProvisioningTemplate) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateProvisioningTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateProvisioningTemplateInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateProvisioningTemplateInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateRoleAlias struct {
}
func (*validateOpUpdateRoleAlias) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateRoleAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateRoleAliasInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateRoleAliasInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateScheduledAudit struct {
}
func (*validateOpUpdateScheduledAudit) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateScheduledAudit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateScheduledAuditInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateScheduledAuditInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateSecurityProfile struct {
}
func (*validateOpUpdateSecurityProfile) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateSecurityProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateSecurityProfileInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateSecurityProfileInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateStream struct {
}
func (*validateOpUpdateStream) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateStreamInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateStreamInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateThingGroup struct {
}
func (*validateOpUpdateThingGroup) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateThingGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateThingGroupInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateThingGroupInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateThing struct {
}
func (*validateOpUpdateThing) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateThing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateThingInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateThingInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpUpdateTopicRuleDestination struct {
}
func (*validateOpUpdateTopicRuleDestination) ID() string {
return "OperationInputValidation"
}
func (m *validateOpUpdateTopicRuleDestination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*UpdateTopicRuleDestinationInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpUpdateTopicRuleDestinationInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
type validateOpValidateSecurityProfileBehaviors struct {
}
func (*validateOpValidateSecurityProfileBehaviors) ID() string {
return "OperationInputValidation"
}
func (m *validateOpValidateSecurityProfileBehaviors) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
out middleware.InitializeOutput, metadata middleware.Metadata, err error,
) {
input, ok := in.Parameters.(*ValidateSecurityProfileBehaviorsInput)
if !ok {
return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
}
if err := validateOpValidateSecurityProfileBehaviorsInput(input); err != nil {
return out, metadata, err
}
return next.HandleInitialize(ctx, in)
}
func addOpAcceptCertificateTransferValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAcceptCertificateTransfer{}, middleware.After)
}
func addOpAssociateTargetsWithJobValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAssociateTargetsWithJob{}, middleware.After)
}
func addOpAttachPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAttachPolicy{}, middleware.After)
}
func addOpAttachPrincipalPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAttachPrincipalPolicy{}, middleware.After)
}
func addOpAttachSecurityProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAttachSecurityProfile{}, middleware.After)
}
func addOpAttachThingPrincipalValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpAttachThingPrincipal{}, middleware.After)
}
func addOpCancelAuditMitigationActionsTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelAuditMitigationActionsTask{}, middleware.After)
}
func addOpCancelAuditTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelAuditTask{}, middleware.After)
}
func addOpCancelCertificateTransferValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelCertificateTransfer{}, middleware.After)
}
func addOpCancelDetectMitigationActionsTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelDetectMitigationActionsTask{}, middleware.After)
}
func addOpCancelJobExecutionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelJobExecution{}, middleware.After)
}
func addOpCancelJobValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCancelJob{}, middleware.After)
}
func addOpConfirmTopicRuleDestinationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpConfirmTopicRuleDestination{}, middleware.After)
}
func addOpCreateAuditSuppressionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateAuditSuppression{}, middleware.After)
}
func addOpCreateAuthorizerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateAuthorizer{}, middleware.After)
}
func addOpCreateBillingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateBillingGroup{}, middleware.After)
}
func addOpCreateCertificateFromCsrValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateCertificateFromCsr{}, middleware.After)
}
func addOpCreateCustomMetricValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateCustomMetric{}, middleware.After)
}
func addOpCreateDimensionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDimension{}, middleware.After)
}
func addOpCreateDomainConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDomainConfiguration{}, middleware.After)
}
func addOpCreateDynamicThingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateDynamicThingGroup{}, middleware.After)
}
func addOpCreateFleetMetricValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateFleetMetric{}, middleware.After)
}
func addOpCreateJobValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateJob{}, middleware.After)
}
func addOpCreateJobTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateJobTemplate{}, middleware.After)
}
func addOpCreateMitigationActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateMitigationAction{}, middleware.After)
}
func addOpCreateOTAUpdateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateOTAUpdate{}, middleware.After)
}
func addOpCreatePackageValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreatePackage{}, middleware.After)
}
func addOpCreatePackageVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreatePackageVersion{}, middleware.After)
}
func addOpCreatePolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreatePolicy{}, middleware.After)
}
func addOpCreatePolicyVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreatePolicyVersion{}, middleware.After)
}
func addOpCreateProvisioningClaimValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateProvisioningClaim{}, middleware.After)
}
func addOpCreateProvisioningTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateProvisioningTemplate{}, middleware.After)
}
func addOpCreateProvisioningTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateProvisioningTemplateVersion{}, middleware.After)
}
func addOpCreateRoleAliasValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateRoleAlias{}, middleware.After)
}
func addOpCreateScheduledAuditValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateScheduledAudit{}, middleware.After)
}
func addOpCreateSecurityProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateSecurityProfile{}, middleware.After)
}
func addOpCreateStreamValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateStream{}, middleware.After)
}
func addOpCreateThingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateThingGroup{}, middleware.After)
}
func addOpCreateThingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateThing{}, middleware.After)
}
func addOpCreateThingTypeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateThingType{}, middleware.After)
}
func addOpCreateTopicRuleDestinationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateTopicRuleDestination{}, middleware.After)
}
func addOpCreateTopicRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpCreateTopicRule{}, middleware.After)
}
func addOpDeleteAuditSuppressionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteAuditSuppression{}, middleware.After)
}
func addOpDeleteAuthorizerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteAuthorizer{}, middleware.After)
}
func addOpDeleteBillingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteBillingGroup{}, middleware.After)
}
func addOpDeleteCACertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteCACertificate{}, middleware.After)
}
func addOpDeleteCertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteCertificate{}, middleware.After)
}
func addOpDeleteCustomMetricValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteCustomMetric{}, middleware.After)
}
func addOpDeleteDimensionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDimension{}, middleware.After)
}
func addOpDeleteDomainConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDomainConfiguration{}, middleware.After)
}
func addOpDeleteDynamicThingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteDynamicThingGroup{}, middleware.After)
}
func addOpDeleteFleetMetricValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteFleetMetric{}, middleware.After)
}
func addOpDeleteJobExecutionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteJobExecution{}, middleware.After)
}
func addOpDeleteJobValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteJob{}, middleware.After)
}
func addOpDeleteJobTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteJobTemplate{}, middleware.After)
}
func addOpDeleteMitigationActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteMitigationAction{}, middleware.After)
}
func addOpDeleteOTAUpdateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteOTAUpdate{}, middleware.After)
}
func addOpDeletePackageValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeletePackage{}, middleware.After)
}
func addOpDeletePackageVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeletePackageVersion{}, middleware.After)
}
func addOpDeletePolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeletePolicy{}, middleware.After)
}
func addOpDeletePolicyVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeletePolicyVersion{}, middleware.After)
}
func addOpDeleteProvisioningTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteProvisioningTemplate{}, middleware.After)
}
func addOpDeleteProvisioningTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteProvisioningTemplateVersion{}, middleware.After)
}
func addOpDeleteRoleAliasValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteRoleAlias{}, middleware.After)
}
func addOpDeleteScheduledAuditValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteScheduledAudit{}, middleware.After)
}
func addOpDeleteSecurityProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteSecurityProfile{}, middleware.After)
}
func addOpDeleteStreamValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteStream{}, middleware.After)
}
func addOpDeleteThingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteThingGroup{}, middleware.After)
}
func addOpDeleteThingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteThing{}, middleware.After)
}
func addOpDeleteThingTypeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteThingType{}, middleware.After)
}
func addOpDeleteTopicRuleDestinationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteTopicRuleDestination{}, middleware.After)
}
func addOpDeleteTopicRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteTopicRule{}, middleware.After)
}
func addOpDeleteV2LoggingLevelValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeleteV2LoggingLevel{}, middleware.After)
}
func addOpDeprecateThingTypeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDeprecateThingType{}, middleware.After)
}
func addOpDescribeAuditFindingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeAuditFinding{}, middleware.After)
}
func addOpDescribeAuditMitigationActionsTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeAuditMitigationActionsTask{}, middleware.After)
}
func addOpDescribeAuditSuppressionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeAuditSuppression{}, middleware.After)
}
func addOpDescribeAuditTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeAuditTask{}, middleware.After)
}
func addOpDescribeAuthorizerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeAuthorizer{}, middleware.After)
}
func addOpDescribeBillingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeBillingGroup{}, middleware.After)
}
func addOpDescribeCACertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeCACertificate{}, middleware.After)
}
func addOpDescribeCertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeCertificate{}, middleware.After)
}
func addOpDescribeCustomMetricValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeCustomMetric{}, middleware.After)
}
func addOpDescribeDetectMitigationActionsTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDetectMitigationActionsTask{}, middleware.After)
}
func addOpDescribeDimensionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDimension{}, middleware.After)
}
func addOpDescribeDomainConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeDomainConfiguration{}, middleware.After)
}
func addOpDescribeFleetMetricValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeFleetMetric{}, middleware.After)
}
func addOpDescribeIndexValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeIndex{}, middleware.After)
}
func addOpDescribeJobExecutionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeJobExecution{}, middleware.After)
}
func addOpDescribeJobValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeJob{}, middleware.After)
}
func addOpDescribeJobTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeJobTemplate{}, middleware.After)
}
func addOpDescribeManagedJobTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeManagedJobTemplate{}, middleware.After)
}
func addOpDescribeMitigationActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeMitigationAction{}, middleware.After)
}
func addOpDescribeProvisioningTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeProvisioningTemplate{}, middleware.After)
}
func addOpDescribeProvisioningTemplateVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeProvisioningTemplateVersion{}, middleware.After)
}
func addOpDescribeRoleAliasValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeRoleAlias{}, middleware.After)
}
func addOpDescribeScheduledAuditValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeScheduledAudit{}, middleware.After)
}
func addOpDescribeSecurityProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeSecurityProfile{}, middleware.After)
}
func addOpDescribeStreamValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeStream{}, middleware.After)
}
func addOpDescribeThingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeThingGroup{}, middleware.After)
}
func addOpDescribeThingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeThing{}, middleware.After)
}
func addOpDescribeThingRegistrationTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeThingRegistrationTask{}, middleware.After)
}
func addOpDescribeThingTypeValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDescribeThingType{}, middleware.After)
}
func addOpDetachPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDetachPolicy{}, middleware.After)
}
func addOpDetachPrincipalPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDetachPrincipalPolicy{}, middleware.After)
}
func addOpDetachSecurityProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDetachSecurityProfile{}, middleware.After)
}
func addOpDetachThingPrincipalValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDetachThingPrincipal{}, middleware.After)
}
func addOpDisableTopicRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpDisableTopicRule{}, middleware.After)
}
func addOpEnableTopicRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpEnableTopicRule{}, middleware.After)
}
func addOpGetBucketsAggregationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetBucketsAggregation{}, middleware.After)
}
func addOpGetCardinalityValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetCardinality{}, middleware.After)
}
func addOpGetJobDocumentValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetJobDocument{}, middleware.After)
}
func addOpGetOTAUpdateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetOTAUpdate{}, middleware.After)
}
func addOpGetPackageValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetPackage{}, middleware.After)
}
func addOpGetPackageVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetPackageVersion{}, middleware.After)
}
func addOpGetPercentilesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetPercentiles{}, middleware.After)
}
func addOpGetPolicyValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetPolicy{}, middleware.After)
}
func addOpGetPolicyVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetPolicyVersion{}, middleware.After)
}
func addOpGetStatisticsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetStatistics{}, middleware.After)
}
func addOpGetTopicRuleDestinationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetTopicRuleDestination{}, middleware.After)
}
func addOpGetTopicRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpGetTopicRule{}, middleware.After)
}
func addOpListAttachedPoliciesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListAttachedPolicies{}, middleware.After)
}
func addOpListAuditMitigationActionsExecutionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListAuditMitigationActionsExecutions{}, middleware.After)
}
func addOpListAuditMitigationActionsTasksValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListAuditMitigationActionsTasks{}, middleware.After)
}
func addOpListAuditTasksValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListAuditTasks{}, middleware.After)
}
func addOpListCertificatesByCAValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListCertificatesByCA{}, middleware.After)
}
func addOpListDetectMitigationActionsTasksValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListDetectMitigationActionsTasks{}, middleware.After)
}
func addOpListJobExecutionsForJobValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListJobExecutionsForJob{}, middleware.After)
}
func addOpListJobExecutionsForThingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListJobExecutionsForThing{}, middleware.After)
}
func addOpListMetricValuesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListMetricValues{}, middleware.After)
}
func addOpListPackageVersionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListPackageVersions{}, middleware.After)
}
func addOpListPolicyPrincipalsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListPolicyPrincipals{}, middleware.After)
}
func addOpListPolicyVersionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListPolicyVersions{}, middleware.After)
}
func addOpListPrincipalPoliciesValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListPrincipalPolicies{}, middleware.After)
}
func addOpListPrincipalThingsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListPrincipalThings{}, middleware.After)
}
func addOpListProvisioningTemplateVersionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListProvisioningTemplateVersions{}, middleware.After)
}
func addOpListRelatedResourcesForAuditFindingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListRelatedResourcesForAuditFinding{}, middleware.After)
}
func addOpListSecurityProfilesForTargetValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListSecurityProfilesForTarget{}, 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 addOpListTargetsForSecurityProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListTargetsForSecurityProfile{}, middleware.After)
}
func addOpListThingGroupsForThingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListThingGroupsForThing{}, middleware.After)
}
func addOpListThingPrincipalsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListThingPrincipals{}, middleware.After)
}
func addOpListThingRegistrationTaskReportsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListThingRegistrationTaskReports{}, middleware.After)
}
func addOpListThingsInBillingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListThingsInBillingGroup{}, middleware.After)
}
func addOpListThingsInThingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListThingsInThingGroup{}, middleware.After)
}
func addOpListViolationEventsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpListViolationEvents{}, middleware.After)
}
func addOpPutVerificationStateOnViolationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpPutVerificationStateOnViolation{}, middleware.After)
}
func addOpRegisterCACertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRegisterCACertificate{}, middleware.After)
}
func addOpRegisterCertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRegisterCertificate{}, middleware.After)
}
func addOpRegisterCertificateWithoutCAValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRegisterCertificateWithoutCA{}, middleware.After)
}
func addOpRegisterThingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRegisterThing{}, middleware.After)
}
func addOpRejectCertificateTransferValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpRejectCertificateTransfer{}, middleware.After)
}
func addOpReplaceTopicRuleValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpReplaceTopicRule{}, middleware.After)
}
func addOpSearchIndexValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSearchIndex{}, middleware.After)
}
func addOpSetDefaultAuthorizerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetDefaultAuthorizer{}, middleware.After)
}
func addOpSetDefaultPolicyVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetDefaultPolicyVersion{}, middleware.After)
}
func addOpSetLoggingOptionsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetLoggingOptions{}, middleware.After)
}
func addOpSetV2LoggingLevelValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpSetV2LoggingLevel{}, middleware.After)
}
func addOpStartAuditMitigationActionsTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartAuditMitigationActionsTask{}, middleware.After)
}
func addOpStartDetectMitigationActionsTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartDetectMitigationActionsTask{}, middleware.After)
}
func addOpStartOnDemandAuditTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartOnDemandAuditTask{}, middleware.After)
}
func addOpStartThingRegistrationTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStartThingRegistrationTask{}, middleware.After)
}
func addOpStopThingRegistrationTaskValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpStopThingRegistrationTask{}, middleware.After)
}
func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpTagResource{}, middleware.After)
}
func addOpTestAuthorizationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpTestAuthorization{}, middleware.After)
}
func addOpTestInvokeAuthorizerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpTestInvokeAuthorizer{}, middleware.After)
}
func addOpTransferCertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpTransferCertificate{}, middleware.After)
}
func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After)
}
func addOpUpdateAuditSuppressionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateAuditSuppression{}, middleware.After)
}
func addOpUpdateAuthorizerValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateAuthorizer{}, middleware.After)
}
func addOpUpdateBillingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateBillingGroup{}, middleware.After)
}
func addOpUpdateCACertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateCACertificate{}, middleware.After)
}
func addOpUpdateCertificateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateCertificate{}, middleware.After)
}
func addOpUpdateCustomMetricValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateCustomMetric{}, middleware.After)
}
func addOpUpdateDimensionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateDimension{}, middleware.After)
}
func addOpUpdateDomainConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateDomainConfiguration{}, middleware.After)
}
func addOpUpdateDynamicThingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateDynamicThingGroup{}, middleware.After)
}
func addOpUpdateFleetMetricValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateFleetMetric{}, middleware.After)
}
func addOpUpdateIndexingConfigurationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateIndexingConfiguration{}, middleware.After)
}
func addOpUpdateJobValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateJob{}, middleware.After)
}
func addOpUpdateMitigationActionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateMitigationAction{}, middleware.After)
}
func addOpUpdatePackageValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdatePackage{}, middleware.After)
}
func addOpUpdatePackageVersionValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdatePackageVersion{}, middleware.After)
}
func addOpUpdateProvisioningTemplateValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateProvisioningTemplate{}, middleware.After)
}
func addOpUpdateRoleAliasValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateRoleAlias{}, middleware.After)
}
func addOpUpdateScheduledAuditValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateScheduledAudit{}, middleware.After)
}
func addOpUpdateSecurityProfileValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateSecurityProfile{}, middleware.After)
}
func addOpUpdateStreamValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateStream{}, middleware.After)
}
func addOpUpdateThingGroupValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateThingGroup{}, middleware.After)
}
func addOpUpdateThingValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateThing{}, middleware.After)
}
func addOpUpdateTopicRuleDestinationValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpUpdateTopicRuleDestination{}, middleware.After)
}
func addOpValidateSecurityProfileBehaviorsValidationMiddleware(stack *middleware.Stack) error {
return stack.Initialize.Add(&validateOpValidateSecurityProfileBehaviors{}, middleware.After)
}
func validateAbortConfig(v *types.AbortConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AbortConfig"}
if v.CriteriaList == nil {
invalidParams.Add(smithy.NewErrParamRequired("CriteriaList"))
} else if v.CriteriaList != nil {
if err := validateAbortCriteriaList(v.CriteriaList); err != nil {
invalidParams.AddNested("CriteriaList", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAbortCriteria(v *types.AbortCriteria) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AbortCriteria"}
if len(v.FailureType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("FailureType"))
}
if len(v.Action) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Action"))
}
if v.ThresholdPercentage == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThresholdPercentage"))
}
if v.MinNumberOfExecutedThings == nil {
invalidParams.Add(smithy.NewErrParamRequired("MinNumberOfExecutedThings"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAbortCriteriaList(v []types.AbortCriteria) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AbortCriteriaList"}
for i := range v {
if err := validateAbortCriteria(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAction(v *types.Action) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Action"}
if v.DynamoDB != nil {
if err := validateDynamoDBAction(v.DynamoDB); err != nil {
invalidParams.AddNested("DynamoDB", err.(smithy.InvalidParamsError))
}
}
if v.DynamoDBv2 != nil {
if err := validateDynamoDBv2Action(v.DynamoDBv2); err != nil {
invalidParams.AddNested("DynamoDBv2", err.(smithy.InvalidParamsError))
}
}
if v.Lambda != nil {
if err := validateLambdaAction(v.Lambda); err != nil {
invalidParams.AddNested("Lambda", err.(smithy.InvalidParamsError))
}
}
if v.Sns != nil {
if err := validateSnsAction(v.Sns); err != nil {
invalidParams.AddNested("Sns", err.(smithy.InvalidParamsError))
}
}
if v.Sqs != nil {
if err := validateSqsAction(v.Sqs); err != nil {
invalidParams.AddNested("Sqs", err.(smithy.InvalidParamsError))
}
}
if v.Kinesis != nil {
if err := validateKinesisAction(v.Kinesis); err != nil {
invalidParams.AddNested("Kinesis", err.(smithy.InvalidParamsError))
}
}
if v.Republish != nil {
if err := validateRepublishAction(v.Republish); err != nil {
invalidParams.AddNested("Republish", err.(smithy.InvalidParamsError))
}
}
if v.S3 != nil {
if err := validateS3Action(v.S3); err != nil {
invalidParams.AddNested("S3", err.(smithy.InvalidParamsError))
}
}
if v.Firehose != nil {
if err := validateFirehoseAction(v.Firehose); err != nil {
invalidParams.AddNested("Firehose", err.(smithy.InvalidParamsError))
}
}
if v.CloudwatchMetric != nil {
if err := validateCloudwatchMetricAction(v.CloudwatchMetric); err != nil {
invalidParams.AddNested("CloudwatchMetric", err.(smithy.InvalidParamsError))
}
}
if v.CloudwatchAlarm != nil {
if err := validateCloudwatchAlarmAction(v.CloudwatchAlarm); err != nil {
invalidParams.AddNested("CloudwatchAlarm", err.(smithy.InvalidParamsError))
}
}
if v.CloudwatchLogs != nil {
if err := validateCloudwatchLogsAction(v.CloudwatchLogs); err != nil {
invalidParams.AddNested("CloudwatchLogs", err.(smithy.InvalidParamsError))
}
}
if v.Elasticsearch != nil {
if err := validateElasticsearchAction(v.Elasticsearch); err != nil {
invalidParams.AddNested("Elasticsearch", err.(smithy.InvalidParamsError))
}
}
if v.Salesforce != nil {
if err := validateSalesforceAction(v.Salesforce); err != nil {
invalidParams.AddNested("Salesforce", err.(smithy.InvalidParamsError))
}
}
if v.IotEvents != nil {
if err := validateIotEventsAction(v.IotEvents); err != nil {
invalidParams.AddNested("IotEvents", err.(smithy.InvalidParamsError))
}
}
if v.IotSiteWise != nil {
if err := validateIotSiteWiseAction(v.IotSiteWise); err != nil {
invalidParams.AddNested("IotSiteWise", err.(smithy.InvalidParamsError))
}
}
if v.StepFunctions != nil {
if err := validateStepFunctionsAction(v.StepFunctions); err != nil {
invalidParams.AddNested("StepFunctions", err.(smithy.InvalidParamsError))
}
}
if v.Timestream != nil {
if err := validateTimestreamAction(v.Timestream); err != nil {
invalidParams.AddNested("Timestream", err.(smithy.InvalidParamsError))
}
}
if v.Http != nil {
if err := validateHttpAction(v.Http); err != nil {
invalidParams.AddNested("Http", err.(smithy.InvalidParamsError))
}
}
if v.Kafka != nil {
if err := validateKafkaAction(v.Kafka); err != nil {
invalidParams.AddNested("Kafka", err.(smithy.InvalidParamsError))
}
}
if v.OpenSearch != nil {
if err := validateOpenSearchAction(v.OpenSearch); err != nil {
invalidParams.AddNested("OpenSearch", err.(smithy.InvalidParamsError))
}
}
if v.Location != nil {
if err := validateLocationAction(v.Location); err != nil {
invalidParams.AddNested("Location", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateActionList(v []types.Action) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ActionList"}
for i := range v {
if err := validateAction(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAdditionalMetricsToRetainV2List(v []types.MetricToRetain) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AdditionalMetricsToRetainV2List"}
for i := range v {
if err := validateMetricToRetain(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAddThingsToThingGroupParams(v *types.AddThingsToThingGroupParams) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AddThingsToThingGroupParams"}
if v.ThingGroupNames == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupNames"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAggregationType(v *types.AggregationType) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AggregationType"}
if len(v.Name) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAlertTarget(v *types.AlertTarget) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AlertTarget"}
if v.AlertTargetArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("AlertTargetArn"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAlertTargets(v map[string]types.AlertTarget) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AlertTargets"}
for key := range v {
value := v[key]
if err := validateAlertTarget(&value); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAssetPropertyTimestamp(v *types.AssetPropertyTimestamp) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AssetPropertyTimestamp"}
if v.TimeInSeconds == nil {
invalidParams.Add(smithy.NewErrParamRequired("TimeInSeconds"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAssetPropertyValue(v *types.AssetPropertyValue) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AssetPropertyValue"}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if v.Timestamp == nil {
invalidParams.Add(smithy.NewErrParamRequired("Timestamp"))
} else if v.Timestamp != nil {
if err := validateAssetPropertyTimestamp(v.Timestamp); err != nil {
invalidParams.AddNested("Timestamp", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAssetPropertyValueList(v []types.AssetPropertyValue) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AssetPropertyValueList"}
for i := range v {
if err := validateAssetPropertyValue(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAuthInfo(v *types.AuthInfo) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AuthInfo"}
if v.Resources == nil {
invalidParams.Add(smithy.NewErrParamRequired("Resources"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAuthInfos(v []types.AuthInfo) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AuthInfos"}
for i := range v {
if err := validateAuthInfo(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAwsJobAbortConfig(v *types.AwsJobAbortConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AwsJobAbortConfig"}
if v.AbortCriteriaList == nil {
invalidParams.Add(smithy.NewErrParamRequired("AbortCriteriaList"))
} else if v.AbortCriteriaList != nil {
if err := validateAwsJobAbortCriteriaList(v.AbortCriteriaList); err != nil {
invalidParams.AddNested("AbortCriteriaList", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAwsJobAbortCriteria(v *types.AwsJobAbortCriteria) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AwsJobAbortCriteria"}
if len(v.FailureType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("FailureType"))
}
if len(v.Action) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Action"))
}
if v.ThresholdPercentage == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThresholdPercentage"))
}
if v.MinNumberOfExecutedThings == nil {
invalidParams.Add(smithy.NewErrParamRequired("MinNumberOfExecutedThings"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAwsJobAbortCriteriaList(v []types.AwsJobAbortCriteria) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AwsJobAbortCriteriaList"}
for i := range v {
if err := validateAwsJobAbortCriteria(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAwsJobExecutionsRolloutConfig(v *types.AwsJobExecutionsRolloutConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AwsJobExecutionsRolloutConfig"}
if v.ExponentialRate != nil {
if err := validateAwsJobExponentialRolloutRate(v.ExponentialRate); err != nil {
invalidParams.AddNested("ExponentialRate", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateAwsJobExponentialRolloutRate(v *types.AwsJobExponentialRolloutRate) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AwsJobExponentialRolloutRate"}
if v.BaseRatePerMinute == nil {
invalidParams.Add(smithy.NewErrParamRequired("BaseRatePerMinute"))
}
if v.RateIncreaseCriteria == nil {
invalidParams.Add(smithy.NewErrParamRequired("RateIncreaseCriteria"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBehavior(v *types.Behavior) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Behavior"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.MetricDimension != nil {
if err := validateMetricDimension(v.MetricDimension); err != nil {
invalidParams.AddNested("MetricDimension", err.(smithy.InvalidParamsError))
}
}
if v.Criteria != nil {
if err := validateBehaviorCriteria(v.Criteria); err != nil {
invalidParams.AddNested("Criteria", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBehaviorCriteria(v *types.BehaviorCriteria) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "BehaviorCriteria"}
if v.MlDetectionConfig != nil {
if err := validateMachineLearningDetectionConfig(v.MlDetectionConfig); err != nil {
invalidParams.AddNested("MlDetectionConfig", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateBehaviors(v []types.Behavior) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "Behaviors"}
for i := range v {
if err := validateBehavior(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCloudwatchAlarmAction(v *types.CloudwatchAlarmAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CloudwatchAlarmAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.AlarmName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AlarmName"))
}
if v.StateReason == nil {
invalidParams.Add(smithy.NewErrParamRequired("StateReason"))
}
if v.StateValue == nil {
invalidParams.Add(smithy.NewErrParamRequired("StateValue"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCloudwatchLogsAction(v *types.CloudwatchLogsAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CloudwatchLogsAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.LogGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("LogGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateCloudwatchMetricAction(v *types.CloudwatchMetricAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CloudwatchMetricAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.MetricNamespace == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricNamespace"))
}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if v.MetricValue == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricValue"))
}
if v.MetricUnit == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricUnit"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateDynamoDBAction(v *types.DynamoDBAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DynamoDBAction"}
if v.TableName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TableName"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.HashKeyField == nil {
invalidParams.Add(smithy.NewErrParamRequired("HashKeyField"))
}
if v.HashKeyValue == nil {
invalidParams.Add(smithy.NewErrParamRequired("HashKeyValue"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateDynamoDBv2Action(v *types.DynamoDBv2Action) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DynamoDBv2Action"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.PutItem == nil {
invalidParams.Add(smithy.NewErrParamRequired("PutItem"))
} else if v.PutItem != nil {
if err := validatePutItemInput(v.PutItem); err != nil {
invalidParams.AddNested("PutItem", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateElasticsearchAction(v *types.ElasticsearchAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ElasticsearchAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.Endpoint == nil {
invalidParams.Add(smithy.NewErrParamRequired("Endpoint"))
}
if v.Index == nil {
invalidParams.Add(smithy.NewErrParamRequired("Index"))
}
if v.Type == nil {
invalidParams.Add(smithy.NewErrParamRequired("Type"))
}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateEnableIoTLoggingParams(v *types.EnableIoTLoggingParams) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "EnableIoTLoggingParams"}
if v.RoleArnForLogging == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArnForLogging"))
}
if len(v.LogLevel) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("LogLevel"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateExponentialRolloutRate(v *types.ExponentialRolloutRate) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ExponentialRolloutRate"}
if v.BaseRatePerMinute == nil {
invalidParams.Add(smithy.NewErrParamRequired("BaseRatePerMinute"))
}
if v.RateIncreaseCriteria == nil {
invalidParams.Add(smithy.NewErrParamRequired("RateIncreaseCriteria"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateFirehoseAction(v *types.FirehoseAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "FirehoseAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.DeliveryStreamName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DeliveryStreamName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateHeaderList(v []types.HttpActionHeader) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "HeaderList"}
for i := range v {
if err := validateHttpActionHeader(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateHttpAction(v *types.HttpAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "HttpAction"}
if v.Url == nil {
invalidParams.Add(smithy.NewErrParamRequired("Url"))
}
if v.Headers != nil {
if err := validateHeaderList(v.Headers); err != nil {
invalidParams.AddNested("Headers", err.(smithy.InvalidParamsError))
}
}
if v.Auth != nil {
if err := validateHttpAuthorization(v.Auth); err != nil {
invalidParams.AddNested("Auth", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateHttpActionHeader(v *types.HttpActionHeader) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "HttpActionHeader"}
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 validateHttpAuthorization(v *types.HttpAuthorization) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "HttpAuthorization"}
if v.Sigv4 != nil {
if err := validateSigV4Authorization(v.Sigv4); err != nil {
invalidParams.AddNested("Sigv4", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateHttpUrlDestinationConfiguration(v *types.HttpUrlDestinationConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "HttpUrlDestinationConfiguration"}
if v.ConfirmationUrl == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfirmationUrl"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateIotEventsAction(v *types.IotEventsAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "IotEventsAction"}
if v.InputName == nil {
invalidParams.Add(smithy.NewErrParamRequired("InputName"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateIotSiteWiseAction(v *types.IotSiteWiseAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "IotSiteWiseAction"}
if v.PutAssetPropertyValueEntries == nil {
invalidParams.Add(smithy.NewErrParamRequired("PutAssetPropertyValueEntries"))
} else if v.PutAssetPropertyValueEntries != nil {
if err := validatePutAssetPropertyValueEntryList(v.PutAssetPropertyValueEntries); err != nil {
invalidParams.AddNested("PutAssetPropertyValueEntries", err.(smithy.InvalidParamsError))
}
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateJobExecutionsRetryConfig(v *types.JobExecutionsRetryConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "JobExecutionsRetryConfig"}
if v.CriteriaList == nil {
invalidParams.Add(smithy.NewErrParamRequired("CriteriaList"))
} else if v.CriteriaList != nil {
if err := validateRetryCriteriaList(v.CriteriaList); err != nil {
invalidParams.AddNested("CriteriaList", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateJobExecutionsRolloutConfig(v *types.JobExecutionsRolloutConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "JobExecutionsRolloutConfig"}
if v.ExponentialRate != nil {
if err := validateExponentialRolloutRate(v.ExponentialRate); err != nil {
invalidParams.AddNested("ExponentialRate", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateKafkaAction(v *types.KafkaAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "KafkaAction"}
if v.DestinationArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("DestinationArn"))
}
if v.Topic == nil {
invalidParams.Add(smithy.NewErrParamRequired("Topic"))
}
if v.ClientProperties == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClientProperties"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateKinesisAction(v *types.KinesisAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "KinesisAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.StreamName == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateLambdaAction(v *types.LambdaAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "LambdaAction"}
if v.FunctionArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("FunctionArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateLocationAction(v *types.LocationAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "LocationAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.TrackerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TrackerName"))
}
if v.DeviceId == nil {
invalidParams.Add(smithy.NewErrParamRequired("DeviceId"))
}
if v.Timestamp != nil {
if err := validateLocationTimestamp(v.Timestamp); err != nil {
invalidParams.AddNested("Timestamp", err.(smithy.InvalidParamsError))
}
}
if v.Latitude == nil {
invalidParams.Add(smithy.NewErrParamRequired("Latitude"))
}
if v.Longitude == nil {
invalidParams.Add(smithy.NewErrParamRequired("Longitude"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateLocationTimestamp(v *types.LocationTimestamp) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "LocationTimestamp"}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateLoggingOptionsPayload(v *types.LoggingOptionsPayload) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "LoggingOptionsPayload"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateLogTarget(v *types.LogTarget) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "LogTarget"}
if len(v.TargetType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("TargetType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMachineLearningDetectionConfig(v *types.MachineLearningDetectionConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MachineLearningDetectionConfig"}
if len(v.ConfidenceLevel) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ConfidenceLevel"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMaintenanceWindow(v *types.MaintenanceWindow) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MaintenanceWindow"}
if v.StartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
}
if v.DurationInMinutes == nil {
invalidParams.Add(smithy.NewErrParamRequired("DurationInMinutes"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMaintenanceWindows(v []types.MaintenanceWindow) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MaintenanceWindows"}
for i := range v {
if err := validateMaintenanceWindow(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMetricDimension(v *types.MetricDimension) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MetricDimension"}
if v.DimensionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DimensionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMetricToRetain(v *types.MetricToRetain) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MetricToRetain"}
if v.Metric == nil {
invalidParams.Add(smithy.NewErrParamRequired("Metric"))
}
if v.MetricDimension != nil {
if err := validateMetricDimension(v.MetricDimension); err != nil {
invalidParams.AddNested("MetricDimension", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMitigationActionParams(v *types.MitigationActionParams) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MitigationActionParams"}
if v.UpdateDeviceCertificateParams != nil {
if err := validateUpdateDeviceCertificateParams(v.UpdateDeviceCertificateParams); err != nil {
invalidParams.AddNested("UpdateDeviceCertificateParams", err.(smithy.InvalidParamsError))
}
}
if v.UpdateCACertificateParams != nil {
if err := validateUpdateCACertificateParams(v.UpdateCACertificateParams); err != nil {
invalidParams.AddNested("UpdateCACertificateParams", err.(smithy.InvalidParamsError))
}
}
if v.AddThingsToThingGroupParams != nil {
if err := validateAddThingsToThingGroupParams(v.AddThingsToThingGroupParams); err != nil {
invalidParams.AddNested("AddThingsToThingGroupParams", err.(smithy.InvalidParamsError))
}
}
if v.ReplaceDefaultPolicyVersionParams != nil {
if err := validateReplaceDefaultPolicyVersionParams(v.ReplaceDefaultPolicyVersionParams); err != nil {
invalidParams.AddNested("ReplaceDefaultPolicyVersionParams", err.(smithy.InvalidParamsError))
}
}
if v.EnableIoTLoggingParams != nil {
if err := validateEnableIoTLoggingParams(v.EnableIoTLoggingParams); err != nil {
invalidParams.AddNested("EnableIoTLoggingParams", err.(smithy.InvalidParamsError))
}
}
if v.PublishFindingToSnsParams != nil {
if err := validatePublishFindingToSnsParams(v.PublishFindingToSnsParams); err != nil {
invalidParams.AddNested("PublishFindingToSnsParams", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateMqttHeaders(v *types.MqttHeaders) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "MqttHeaders"}
if v.UserProperties != nil {
if err := validateUserProperties(v.UserProperties); err != nil {
invalidParams.AddNested("UserProperties", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpenSearchAction(v *types.OpenSearchAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "OpenSearchAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.Endpoint == nil {
invalidParams.Add(smithy.NewErrParamRequired("Endpoint"))
}
if v.Index == nil {
invalidParams.Add(smithy.NewErrParamRequired("Index"))
}
if v.Type == nil {
invalidParams.Add(smithy.NewErrParamRequired("Type"))
}
if v.Id == nil {
invalidParams.Add(smithy.NewErrParamRequired("Id"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateProvisioningHook(v *types.ProvisioningHook) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ProvisioningHook"}
if v.TargetArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validatePublishFindingToSnsParams(v *types.PublishFindingToSnsParams) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PublishFindingToSnsParams"}
if v.TopicArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("TopicArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validatePutAssetPropertyValueEntry(v *types.PutAssetPropertyValueEntry) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PutAssetPropertyValueEntry"}
if v.PropertyValues == nil {
invalidParams.Add(smithy.NewErrParamRequired("PropertyValues"))
} else if v.PropertyValues != nil {
if err := validateAssetPropertyValueList(v.PropertyValues); err != nil {
invalidParams.AddNested("PropertyValues", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validatePutAssetPropertyValueEntryList(v []types.PutAssetPropertyValueEntry) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PutAssetPropertyValueEntryList"}
for i := range v {
if err := validatePutAssetPropertyValueEntry(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validatePutItemInput(v *types.PutItemInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PutItemInput"}
if v.TableName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TableName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateReplaceDefaultPolicyVersionParams(v *types.ReplaceDefaultPolicyVersionParams) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ReplaceDefaultPolicyVersionParams"}
if len(v.TemplateName) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateRepublishAction(v *types.RepublishAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RepublishAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.Topic == nil {
invalidParams.Add(smithy.NewErrParamRequired("Topic"))
}
if v.Headers != nil {
if err := validateMqttHeaders(v.Headers); err != nil {
invalidParams.AddNested("Headers", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateRetryCriteria(v *types.RetryCriteria) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RetryCriteria"}
if len(v.FailureType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("FailureType"))
}
if v.NumberOfRetries == nil {
invalidParams.Add(smithy.NewErrParamRequired("NumberOfRetries"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateRetryCriteriaList(v []types.RetryCriteria) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RetryCriteriaList"}
for i := range v {
if err := validateRetryCriteria(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateS3Action(v *types.S3Action) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "S3Action"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.BucketName == nil {
invalidParams.Add(smithy.NewErrParamRequired("BucketName"))
}
if v.Key == nil {
invalidParams.Add(smithy.NewErrParamRequired("Key"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSalesforceAction(v *types.SalesforceAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SalesforceAction"}
if v.Token == nil {
invalidParams.Add(smithy.NewErrParamRequired("Token"))
}
if v.Url == nil {
invalidParams.Add(smithy.NewErrParamRequired("Url"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSchedulingConfig(v *types.SchedulingConfig) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SchedulingConfig"}
if v.MaintenanceWindows != nil {
if err := validateMaintenanceWindows(v.MaintenanceWindows); err != nil {
invalidParams.AddNested("MaintenanceWindows", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSigV4Authorization(v *types.SigV4Authorization) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SigV4Authorization"}
if v.SigningRegion == nil {
invalidParams.Add(smithy.NewErrParamRequired("SigningRegion"))
}
if v.ServiceName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ServiceName"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSnsAction(v *types.SnsAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SnsAction"}
if v.TargetArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetArn"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateSqsAction(v *types.SqsAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SqsAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.QueueUrl == nil {
invalidParams.Add(smithy.NewErrParamRequired("QueueUrl"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateStepFunctionsAction(v *types.StepFunctionsAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StepFunctionsAction"}
if v.StateMachineName == nil {
invalidParams.Add(smithy.NewErrParamRequired("StateMachineName"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
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 invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTagList(v []types.Tag) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TagList"}
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 validateThingGroupIndexingConfiguration(v *types.ThingGroupIndexingConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ThingGroupIndexingConfiguration"}
if len(v.ThingGroupIndexingMode) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupIndexingMode"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateThingIndexingConfiguration(v *types.ThingIndexingConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ThingIndexingConfiguration"}
if len(v.ThingIndexingMode) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ThingIndexingMode"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTimestreamAction(v *types.TimestreamAction) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TimestreamAction"}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.DatabaseName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DatabaseName"))
}
if v.TableName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TableName"))
}
if v.Dimensions == nil {
invalidParams.Add(smithy.NewErrParamRequired("Dimensions"))
} else if v.Dimensions != nil {
if err := validateTimestreamDimensionList(v.Dimensions); err != nil {
invalidParams.AddNested("Dimensions", err.(smithy.InvalidParamsError))
}
}
if v.Timestamp != nil {
if err := validateTimestreamTimestamp(v.Timestamp); err != nil {
invalidParams.AddNested("Timestamp", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTimestreamDimension(v *types.TimestreamDimension) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TimestreamDimension"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTimestreamDimensionList(v []types.TimestreamDimension) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TimestreamDimensionList"}
for i := range v {
if err := validateTimestreamDimension(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTimestreamTimestamp(v *types.TimestreamTimestamp) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TimestreamTimestamp"}
if v.Value == nil {
invalidParams.Add(smithy.NewErrParamRequired("Value"))
}
if v.Unit == nil {
invalidParams.Add(smithy.NewErrParamRequired("Unit"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTopicRuleDestinationConfiguration(v *types.TopicRuleDestinationConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TopicRuleDestinationConfiguration"}
if v.HttpUrlConfiguration != nil {
if err := validateHttpUrlDestinationConfiguration(v.HttpUrlConfiguration); err != nil {
invalidParams.AddNested("HttpUrlConfiguration", err.(smithy.InvalidParamsError))
}
}
if v.VpcConfiguration != nil {
if err := validateVpcDestinationConfiguration(v.VpcConfiguration); err != nil {
invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateTopicRulePayload(v *types.TopicRulePayload) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TopicRulePayload"}
if v.Sql == nil {
invalidParams.Add(smithy.NewErrParamRequired("Sql"))
}
if v.Actions == nil {
invalidParams.Add(smithy.NewErrParamRequired("Actions"))
} else if v.Actions != nil {
if err := validateActionList(v.Actions); err != nil {
invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError))
}
}
if v.ErrorAction != nil {
if err := validateAction(v.ErrorAction); err != nil {
invalidParams.AddNested("ErrorAction", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateUpdateCACertificateParams(v *types.UpdateCACertificateParams) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateCACertificateParams"}
if len(v.Action) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Action"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateUpdateDeviceCertificateParams(v *types.UpdateDeviceCertificateParams) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateDeviceCertificateParams"}
if len(v.Action) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Action"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateUserProperties(v []types.UserProperty) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UserProperties"}
for i := range v {
if err := validateUserProperty(&v[i]); err != nil {
invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateUserProperty(v *types.UserProperty) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UserProperty"}
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 validateViolationEventOccurrenceRange(v *types.ViolationEventOccurrenceRange) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ViolationEventOccurrenceRange"}
if v.StartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
}
if v.EndTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndTime"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateVpcDestinationConfiguration(v *types.VpcDestinationConfiguration) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "VpcDestinationConfiguration"}
if v.SubnetIds == nil {
invalidParams.Add(smithy.NewErrParamRequired("SubnetIds"))
}
if v.VpcId == nil {
invalidParams.Add(smithy.NewErrParamRequired("VpcId"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAcceptCertificateTransferInput(v *AcceptCertificateTransferInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AcceptCertificateTransferInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAssociateTargetsWithJobInput(v *AssociateTargetsWithJobInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AssociateTargetsWithJobInput"}
if v.Targets == nil {
invalidParams.Add(smithy.NewErrParamRequired("Targets"))
}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
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.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.Target == nil {
invalidParams.Add(smithy.NewErrParamRequired("Target"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAttachPrincipalPolicyInput(v *AttachPrincipalPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AttachPrincipalPolicyInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.Principal == nil {
invalidParams.Add(smithy.NewErrParamRequired("Principal"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAttachSecurityProfileInput(v *AttachSecurityProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AttachSecurityProfileInput"}
if v.SecurityProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileName"))
}
if v.SecurityProfileTargetArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileTargetArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpAttachThingPrincipalInput(v *AttachThingPrincipalInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "AttachThingPrincipalInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if v.Principal == nil {
invalidParams.Add(smithy.NewErrParamRequired("Principal"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelAuditMitigationActionsTaskInput(v *CancelAuditMitigationActionsTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelAuditMitigationActionsTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelAuditTaskInput(v *CancelAuditTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelAuditTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelCertificateTransferInput(v *CancelCertificateTransferInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelCertificateTransferInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelDetectMitigationActionsTaskInput(v *CancelDetectMitigationActionsTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelDetectMitigationActionsTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelJobExecutionInput(v *CancelJobExecutionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelJobExecutionInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCancelJobInput(v *CancelJobInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CancelJobInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpConfirmTopicRuleDestinationInput(v *ConfirmTopicRuleDestinationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ConfirmTopicRuleDestinationInput"}
if v.ConfirmationToken == nil {
invalidParams.Add(smithy.NewErrParamRequired("ConfirmationToken"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateAuditSuppressionInput(v *CreateAuditSuppressionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateAuditSuppressionInput"}
if v.CheckName == nil {
invalidParams.Add(smithy.NewErrParamRequired("CheckName"))
}
if v.ResourceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier"))
}
if v.ClientRequestToken == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateAuthorizerInput(v *CreateAuthorizerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateAuthorizerInput"}
if v.AuthorizerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthorizerName"))
}
if v.AuthorizerFunctionArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthorizerFunctionArn"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateBillingGroupInput(v *CreateBillingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateBillingGroupInput"}
if v.BillingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("BillingGroupName"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateCertificateFromCsrInput(v *CreateCertificateFromCsrInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateCertificateFromCsrInput"}
if v.CertificateSigningRequest == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateSigningRequest"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateCustomMetricInput(v *CreateCustomMetricInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateCustomMetricInput"}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if len(v.MetricType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("MetricType"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if v.ClientRequestToken == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDimensionInput(v *CreateDimensionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDimensionInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if len(v.Type) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Type"))
}
if v.StringValues == nil {
invalidParams.Add(smithy.NewErrParamRequired("StringValues"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if v.ClientRequestToken == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDomainConfigurationInput(v *CreateDomainConfigurationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDomainConfigurationInput"}
if v.DomainConfigurationName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DomainConfigurationName"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateDynamicThingGroupInput(v *CreateDynamicThingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateDynamicThingGroupInput"}
if v.ThingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupName"))
}
if v.QueryString == nil {
invalidParams.Add(smithy.NewErrParamRequired("QueryString"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateFleetMetricInput(v *CreateFleetMetricInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateFleetMetricInput"}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if v.QueryString == nil {
invalidParams.Add(smithy.NewErrParamRequired("QueryString"))
}
if v.AggregationType == nil {
invalidParams.Add(smithy.NewErrParamRequired("AggregationType"))
} else if v.AggregationType != nil {
if err := validateAggregationType(v.AggregationType); err != nil {
invalidParams.AddNested("AggregationType", err.(smithy.InvalidParamsError))
}
}
if v.Period == nil {
invalidParams.Add(smithy.NewErrParamRequired("Period"))
}
if v.AggregationField == nil {
invalidParams.Add(smithy.NewErrParamRequired("AggregationField"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateJobInput(v *CreateJobInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateJobInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if v.Targets == nil {
invalidParams.Add(smithy.NewErrParamRequired("Targets"))
}
if v.JobExecutionsRolloutConfig != nil {
if err := validateJobExecutionsRolloutConfig(v.JobExecutionsRolloutConfig); err != nil {
invalidParams.AddNested("JobExecutionsRolloutConfig", err.(smithy.InvalidParamsError))
}
}
if v.AbortConfig != nil {
if err := validateAbortConfig(v.AbortConfig); err != nil {
invalidParams.AddNested("AbortConfig", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if v.JobExecutionsRetryConfig != nil {
if err := validateJobExecutionsRetryConfig(v.JobExecutionsRetryConfig); err != nil {
invalidParams.AddNested("JobExecutionsRetryConfig", err.(smithy.InvalidParamsError))
}
}
if v.SchedulingConfig != nil {
if err := validateSchedulingConfig(v.SchedulingConfig); err != nil {
invalidParams.AddNested("SchedulingConfig", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateJobTemplateInput(v *CreateJobTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateJobTemplateInput"}
if v.JobTemplateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobTemplateId"))
}
if v.Description == nil {
invalidParams.Add(smithy.NewErrParamRequired("Description"))
}
if v.JobExecutionsRolloutConfig != nil {
if err := validateJobExecutionsRolloutConfig(v.JobExecutionsRolloutConfig); err != nil {
invalidParams.AddNested("JobExecutionsRolloutConfig", err.(smithy.InvalidParamsError))
}
}
if v.AbortConfig != nil {
if err := validateAbortConfig(v.AbortConfig); err != nil {
invalidParams.AddNested("AbortConfig", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if v.JobExecutionsRetryConfig != nil {
if err := validateJobExecutionsRetryConfig(v.JobExecutionsRetryConfig); err != nil {
invalidParams.AddNested("JobExecutionsRetryConfig", err.(smithy.InvalidParamsError))
}
}
if v.MaintenanceWindows != nil {
if err := validateMaintenanceWindows(v.MaintenanceWindows); err != nil {
invalidParams.AddNested("MaintenanceWindows", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateMitigationActionInput(v *CreateMitigationActionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateMitigationActionInput"}
if v.ActionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ActionName"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.ActionParams == nil {
invalidParams.Add(smithy.NewErrParamRequired("ActionParams"))
} else if v.ActionParams != nil {
if err := validateMitigationActionParams(v.ActionParams); err != nil {
invalidParams.AddNested("ActionParams", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateOTAUpdateInput(v *CreateOTAUpdateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateOTAUpdateInput"}
if v.OtaUpdateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("OtaUpdateId"))
}
if v.Targets == nil {
invalidParams.Add(smithy.NewErrParamRequired("Targets"))
}
if v.AwsJobExecutionsRolloutConfig != nil {
if err := validateAwsJobExecutionsRolloutConfig(v.AwsJobExecutionsRolloutConfig); err != nil {
invalidParams.AddNested("AwsJobExecutionsRolloutConfig", err.(smithy.InvalidParamsError))
}
}
if v.AwsJobAbortConfig != nil {
if err := validateAwsJobAbortConfig(v.AwsJobAbortConfig); err != nil {
invalidParams.AddNested("AwsJobAbortConfig", err.(smithy.InvalidParamsError))
}
}
if v.Files == nil {
invalidParams.Add(smithy.NewErrParamRequired("Files"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreatePackageInput(v *CreatePackageInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreatePackageInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreatePackageVersionInput(v *CreatePackageVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreatePackageVersionInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if v.VersionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("VersionName"))
}
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.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.PolicyDocument == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreatePolicyVersionInput(v *CreatePolicyVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreatePolicyVersionInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.PolicyDocument == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyDocument"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateProvisioningClaimInput(v *CreateProvisioningClaimInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateProvisioningClaimInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateProvisioningTemplateInput(v *CreateProvisioningTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateProvisioningTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.TemplateBody == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateBody"))
}
if v.ProvisioningRoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ProvisioningRoleArn"))
}
if v.PreProvisioningHook != nil {
if err := validateProvisioningHook(v.PreProvisioningHook); err != nil {
invalidParams.AddNested("PreProvisioningHook", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateProvisioningTemplateVersionInput(v *CreateProvisioningTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateProvisioningTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.TemplateBody == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateBody"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateRoleAliasInput(v *CreateRoleAliasInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateRoleAliasInput"}
if v.RoleAlias == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleAlias"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateScheduledAuditInput(v *CreateScheduledAuditInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateScheduledAuditInput"}
if len(v.Frequency) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Frequency"))
}
if v.TargetCheckNames == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetCheckNames"))
}
if v.ScheduledAuditName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduledAuditName"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateSecurityProfileInput(v *CreateSecurityProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateSecurityProfileInput"}
if v.SecurityProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileName"))
}
if v.Behaviors != nil {
if err := validateBehaviors(v.Behaviors); err != nil {
invalidParams.AddNested("Behaviors", err.(smithy.InvalidParamsError))
}
}
if v.AlertTargets != nil {
if err := validateAlertTargets(v.AlertTargets); err != nil {
invalidParams.AddNested("AlertTargets", err.(smithy.InvalidParamsError))
}
}
if v.AdditionalMetricsToRetainV2 != nil {
if err := validateAdditionalMetricsToRetainV2List(v.AdditionalMetricsToRetainV2); err != nil {
invalidParams.AddNested("AdditionalMetricsToRetainV2", err.(smithy.InvalidParamsError))
}
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateStreamInput(v *CreateStreamInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateStreamInput"}
if v.StreamId == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamId"))
}
if v.Files == nil {
invalidParams.Add(smithy.NewErrParamRequired("Files"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateThingGroupInput(v *CreateThingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateThingGroupInput"}
if v.ThingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupName"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateThingInput(v *CreateThingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateThingInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateThingTypeInput(v *CreateThingTypeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateThingTypeInput"}
if v.ThingTypeName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingTypeName"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateTopicRuleDestinationInput(v *CreateTopicRuleDestinationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateTopicRuleDestinationInput"}
if v.DestinationConfiguration == nil {
invalidParams.Add(smithy.NewErrParamRequired("DestinationConfiguration"))
} else if v.DestinationConfiguration != nil {
if err := validateTopicRuleDestinationConfiguration(v.DestinationConfiguration); err != nil {
invalidParams.AddNested("DestinationConfiguration", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpCreateTopicRuleInput(v *CreateTopicRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "CreateTopicRuleInput"}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if v.TopicRulePayload == nil {
invalidParams.Add(smithy.NewErrParamRequired("TopicRulePayload"))
} else if v.TopicRulePayload != nil {
if err := validateTopicRulePayload(v.TopicRulePayload); err != nil {
invalidParams.AddNested("TopicRulePayload", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteAuditSuppressionInput(v *DeleteAuditSuppressionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteAuditSuppressionInput"}
if v.CheckName == nil {
invalidParams.Add(smithy.NewErrParamRequired("CheckName"))
}
if v.ResourceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteAuthorizerInput(v *DeleteAuthorizerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteAuthorizerInput"}
if v.AuthorizerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthorizerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteBillingGroupInput(v *DeleteBillingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteBillingGroupInput"}
if v.BillingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("BillingGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteCACertificateInput(v *DeleteCACertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteCACertificateInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteCertificateInput(v *DeleteCertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteCertificateInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteCustomMetricInput(v *DeleteCustomMetricInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomMetricInput"}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDimensionInput(v *DeleteDimensionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDimensionInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDomainConfigurationInput(v *DeleteDomainConfigurationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDomainConfigurationInput"}
if v.DomainConfigurationName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DomainConfigurationName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteDynamicThingGroupInput(v *DeleteDynamicThingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteDynamicThingGroupInput"}
if v.ThingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteFleetMetricInput(v *DeleteFleetMetricInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteFleetMetricInput"}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteJobExecutionInput(v *DeleteJobExecutionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteJobExecutionInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if v.ExecutionNumber == nil {
invalidParams.Add(smithy.NewErrParamRequired("ExecutionNumber"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteJobInput(v *DeleteJobInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteJobInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteJobTemplateInput(v *DeleteJobTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteJobTemplateInput"}
if v.JobTemplateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobTemplateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteMitigationActionInput(v *DeleteMitigationActionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteMitigationActionInput"}
if v.ActionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ActionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteOTAUpdateInput(v *DeleteOTAUpdateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteOTAUpdateInput"}
if v.OtaUpdateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("OtaUpdateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeletePackageInput(v *DeletePackageInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeletePackageInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeletePackageVersionInput(v *DeletePackageVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeletePackageVersionInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if v.VersionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("VersionName"))
}
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.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeletePolicyVersionInput(v *DeletePolicyVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeletePolicyVersionInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.PolicyVersionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyVersionId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteProvisioningTemplateInput(v *DeleteProvisioningTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteProvisioningTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteProvisioningTemplateVersionInput(v *DeleteProvisioningTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteProvisioningTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.VersionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("VersionId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteRoleAliasInput(v *DeleteRoleAliasInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteRoleAliasInput"}
if v.RoleAlias == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleAlias"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteScheduledAuditInput(v *DeleteScheduledAuditInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteScheduledAuditInput"}
if v.ScheduledAuditName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduledAuditName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteSecurityProfileInput(v *DeleteSecurityProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteSecurityProfileInput"}
if v.SecurityProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteStreamInput(v *DeleteStreamInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteStreamInput"}
if v.StreamId == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteThingGroupInput(v *DeleteThingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteThingGroupInput"}
if v.ThingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteThingInput(v *DeleteThingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteThingInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteThingTypeInput(v *DeleteThingTypeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteThingTypeInput"}
if v.ThingTypeName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingTypeName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteTopicRuleDestinationInput(v *DeleteTopicRuleDestinationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteTopicRuleDestinationInput"}
if v.Arn == nil {
invalidParams.Add(smithy.NewErrParamRequired("Arn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteTopicRuleInput(v *DeleteTopicRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteTopicRuleInput"}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeleteV2LoggingLevelInput(v *DeleteV2LoggingLevelInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeleteV2LoggingLevelInput"}
if len(v.TargetType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("TargetType"))
}
if v.TargetName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDeprecateThingTypeInput(v *DeprecateThingTypeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DeprecateThingTypeInput"}
if v.ThingTypeName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingTypeName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeAuditFindingInput(v *DescribeAuditFindingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeAuditFindingInput"}
if v.FindingId == nil {
invalidParams.Add(smithy.NewErrParamRequired("FindingId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeAuditMitigationActionsTaskInput(v *DescribeAuditMitigationActionsTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeAuditMitigationActionsTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeAuditSuppressionInput(v *DescribeAuditSuppressionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeAuditSuppressionInput"}
if v.CheckName == nil {
invalidParams.Add(smithy.NewErrParamRequired("CheckName"))
}
if v.ResourceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeAuditTaskInput(v *DescribeAuditTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeAuditTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeAuthorizerInput(v *DescribeAuthorizerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeAuthorizerInput"}
if v.AuthorizerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthorizerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeBillingGroupInput(v *DescribeBillingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeBillingGroupInput"}
if v.BillingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("BillingGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeCACertificateInput(v *DescribeCACertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeCACertificateInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeCertificateInput(v *DescribeCertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeCertificateInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeCustomMetricInput(v *DescribeCustomMetricInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeCustomMetricInput"}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDetectMitigationActionsTaskInput(v *DescribeDetectMitigationActionsTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDetectMitigationActionsTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDimensionInput(v *DescribeDimensionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDimensionInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeDomainConfigurationInput(v *DescribeDomainConfigurationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeDomainConfigurationInput"}
if v.DomainConfigurationName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DomainConfigurationName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeFleetMetricInput(v *DescribeFleetMetricInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeFleetMetricInput"}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeIndexInput(v *DescribeIndexInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeIndexInput"}
if v.IndexName == nil {
invalidParams.Add(smithy.NewErrParamRequired("IndexName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeJobExecutionInput(v *DescribeJobExecutionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeJobExecutionInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeJobInput(v *DescribeJobInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeJobInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeJobTemplateInput(v *DescribeJobTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeJobTemplateInput"}
if v.JobTemplateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobTemplateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeManagedJobTemplateInput(v *DescribeManagedJobTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeManagedJobTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeMitigationActionInput(v *DescribeMitigationActionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeMitigationActionInput"}
if v.ActionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ActionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeProvisioningTemplateInput(v *DescribeProvisioningTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeProvisioningTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeProvisioningTemplateVersionInput(v *DescribeProvisioningTemplateVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeProvisioningTemplateVersionInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.VersionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("VersionId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeRoleAliasInput(v *DescribeRoleAliasInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeRoleAliasInput"}
if v.RoleAlias == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleAlias"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeScheduledAuditInput(v *DescribeScheduledAuditInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeScheduledAuditInput"}
if v.ScheduledAuditName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduledAuditName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeSecurityProfileInput(v *DescribeSecurityProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeSecurityProfileInput"}
if v.SecurityProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeStreamInput(v *DescribeStreamInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeStreamInput"}
if v.StreamId == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeThingGroupInput(v *DescribeThingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeThingGroupInput"}
if v.ThingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeThingInput(v *DescribeThingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeThingInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeThingRegistrationTaskInput(v *DescribeThingRegistrationTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeThingRegistrationTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDescribeThingTypeInput(v *DescribeThingTypeInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DescribeThingTypeInput"}
if v.ThingTypeName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingTypeName"))
}
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.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.Target == nil {
invalidParams.Add(smithy.NewErrParamRequired("Target"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDetachPrincipalPolicyInput(v *DetachPrincipalPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DetachPrincipalPolicyInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.Principal == nil {
invalidParams.Add(smithy.NewErrParamRequired("Principal"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDetachSecurityProfileInput(v *DetachSecurityProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DetachSecurityProfileInput"}
if v.SecurityProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileName"))
}
if v.SecurityProfileTargetArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileTargetArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDetachThingPrincipalInput(v *DetachThingPrincipalInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DetachThingPrincipalInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if v.Principal == nil {
invalidParams.Add(smithy.NewErrParamRequired("Principal"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpDisableTopicRuleInput(v *DisableTopicRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "DisableTopicRuleInput"}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpEnableTopicRuleInput(v *EnableTopicRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "EnableTopicRuleInput"}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetBucketsAggregationInput(v *GetBucketsAggregationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetBucketsAggregationInput"}
if v.QueryString == nil {
invalidParams.Add(smithy.NewErrParamRequired("QueryString"))
}
if v.AggregationField == nil {
invalidParams.Add(smithy.NewErrParamRequired("AggregationField"))
}
if v.BucketsAggregationType == nil {
invalidParams.Add(smithy.NewErrParamRequired("BucketsAggregationType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetCardinalityInput(v *GetCardinalityInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetCardinalityInput"}
if v.QueryString == nil {
invalidParams.Add(smithy.NewErrParamRequired("QueryString"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetJobDocumentInput(v *GetJobDocumentInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetJobDocumentInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetOTAUpdateInput(v *GetOTAUpdateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetOTAUpdateInput"}
if v.OtaUpdateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("OtaUpdateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetPackageInput(v *GetPackageInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetPackageInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetPackageVersionInput(v *GetPackageVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetPackageVersionInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if v.VersionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("VersionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetPercentilesInput(v *GetPercentilesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetPercentilesInput"}
if v.QueryString == nil {
invalidParams.Add(smithy.NewErrParamRequired("QueryString"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetPolicyInput(v *GetPolicyInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetPolicyInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetPolicyVersionInput(v *GetPolicyVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetPolicyVersionInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.PolicyVersionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyVersionId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetStatisticsInput(v *GetStatisticsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetStatisticsInput"}
if v.QueryString == nil {
invalidParams.Add(smithy.NewErrParamRequired("QueryString"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetTopicRuleDestinationInput(v *GetTopicRuleDestinationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetTopicRuleDestinationInput"}
if v.Arn == nil {
invalidParams.Add(smithy.NewErrParamRequired("Arn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpGetTopicRuleInput(v *GetTopicRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "GetTopicRuleInput"}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListAttachedPoliciesInput(v *ListAttachedPoliciesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListAttachedPoliciesInput"}
if v.Target == nil {
invalidParams.Add(smithy.NewErrParamRequired("Target"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListAuditMitigationActionsExecutionsInput(v *ListAuditMitigationActionsExecutionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListAuditMitigationActionsExecutionsInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if v.FindingId == nil {
invalidParams.Add(smithy.NewErrParamRequired("FindingId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListAuditMitigationActionsTasksInput(v *ListAuditMitigationActionsTasksInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListAuditMitigationActionsTasksInput"}
if v.StartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
}
if v.EndTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndTime"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListAuditTasksInput(v *ListAuditTasksInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListAuditTasksInput"}
if v.StartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
}
if v.EndTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndTime"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListCertificatesByCAInput(v *ListCertificatesByCAInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListCertificatesByCAInput"}
if v.CaCertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CaCertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListDetectMitigationActionsTasksInput(v *ListDetectMitigationActionsTasksInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListDetectMitigationActionsTasksInput"}
if v.StartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
}
if v.EndTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndTime"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListJobExecutionsForJobInput(v *ListJobExecutionsForJobInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListJobExecutionsForJobInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListJobExecutionsForThingInput(v *ListJobExecutionsForThingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListJobExecutionsForThingInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListMetricValuesInput(v *ListMetricValuesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListMetricValuesInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if v.StartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
}
if v.EndTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndTime"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListPackageVersionsInput(v *ListPackageVersionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListPackageVersionsInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListPolicyPrincipalsInput(v *ListPolicyPrincipalsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListPolicyPrincipalsInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListPolicyVersionsInput(v *ListPolicyVersionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListPolicyVersionsInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListPrincipalPoliciesInput(v *ListPrincipalPoliciesInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListPrincipalPoliciesInput"}
if v.Principal == nil {
invalidParams.Add(smithy.NewErrParamRequired("Principal"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListPrincipalThingsInput(v *ListPrincipalThingsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListPrincipalThingsInput"}
if v.Principal == nil {
invalidParams.Add(smithy.NewErrParamRequired("Principal"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListProvisioningTemplateVersionsInput(v *ListProvisioningTemplateVersionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListProvisioningTemplateVersionsInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListRelatedResourcesForAuditFindingInput(v *ListRelatedResourcesForAuditFindingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListRelatedResourcesForAuditFindingInput"}
if v.FindingId == nil {
invalidParams.Add(smithy.NewErrParamRequired("FindingId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListSecurityProfilesForTargetInput(v *ListSecurityProfilesForTargetInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListSecurityProfilesForTargetInput"}
if v.SecurityProfileTargetArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileTargetArn"))
}
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.ResourceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
}
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.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListTargetsForSecurityProfileInput(v *ListTargetsForSecurityProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListTargetsForSecurityProfileInput"}
if v.SecurityProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListThingGroupsForThingInput(v *ListThingGroupsForThingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListThingGroupsForThingInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListThingPrincipalsInput(v *ListThingPrincipalsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListThingPrincipalsInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListThingRegistrationTaskReportsInput(v *ListThingRegistrationTaskReportsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListThingRegistrationTaskReportsInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if len(v.ReportType) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("ReportType"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListThingsInBillingGroupInput(v *ListThingsInBillingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListThingsInBillingGroupInput"}
if v.BillingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("BillingGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListThingsInThingGroupInput(v *ListThingsInThingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListThingsInThingGroupInput"}
if v.ThingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpListViolationEventsInput(v *ListViolationEventsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ListViolationEventsInput"}
if v.StartTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("StartTime"))
}
if v.EndTime == nil {
invalidParams.Add(smithy.NewErrParamRequired("EndTime"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpPutVerificationStateOnViolationInput(v *PutVerificationStateOnViolationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "PutVerificationStateOnViolationInput"}
if v.ViolationId == nil {
invalidParams.Add(smithy.NewErrParamRequired("ViolationId"))
}
if len(v.VerificationState) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("VerificationState"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRegisterCACertificateInput(v *RegisterCACertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RegisterCACertificateInput"}
if v.CaCertificate == nil {
invalidParams.Add(smithy.NewErrParamRequired("CaCertificate"))
}
if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRegisterCertificateInput(v *RegisterCertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RegisterCertificateInput"}
if v.CertificatePem == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificatePem"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRegisterCertificateWithoutCAInput(v *RegisterCertificateWithoutCAInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RegisterCertificateWithoutCAInput"}
if v.CertificatePem == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificatePem"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRegisterThingInput(v *RegisterThingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RegisterThingInput"}
if v.TemplateBody == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateBody"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpRejectCertificateTransferInput(v *RejectCertificateTransferInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "RejectCertificateTransferInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpReplaceTopicRuleInput(v *ReplaceTopicRuleInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ReplaceTopicRuleInput"}
if v.RuleName == nil {
invalidParams.Add(smithy.NewErrParamRequired("RuleName"))
}
if v.TopicRulePayload == nil {
invalidParams.Add(smithy.NewErrParamRequired("TopicRulePayload"))
} else if v.TopicRulePayload != nil {
if err := validateTopicRulePayload(v.TopicRulePayload); err != nil {
invalidParams.AddNested("TopicRulePayload", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSearchIndexInput(v *SearchIndexInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SearchIndexInput"}
if v.QueryString == nil {
invalidParams.Add(smithy.NewErrParamRequired("QueryString"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetDefaultAuthorizerInput(v *SetDefaultAuthorizerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetDefaultAuthorizerInput"}
if v.AuthorizerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthorizerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetDefaultPolicyVersionInput(v *SetDefaultPolicyVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetDefaultPolicyVersionInput"}
if v.PolicyName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyName"))
}
if v.PolicyVersionId == nil {
invalidParams.Add(smithy.NewErrParamRequired("PolicyVersionId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetLoggingOptionsInput(v *SetLoggingOptionsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetLoggingOptionsInput"}
if v.LoggingOptionsPayload == nil {
invalidParams.Add(smithy.NewErrParamRequired("LoggingOptionsPayload"))
} else if v.LoggingOptionsPayload != nil {
if err := validateLoggingOptionsPayload(v.LoggingOptionsPayload); err != nil {
invalidParams.AddNested("LoggingOptionsPayload", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpSetV2LoggingLevelInput(v *SetV2LoggingLevelInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "SetV2LoggingLevelInput"}
if v.LogTarget == nil {
invalidParams.Add(smithy.NewErrParamRequired("LogTarget"))
} else if v.LogTarget != nil {
if err := validateLogTarget(v.LogTarget); err != nil {
invalidParams.AddNested("LogTarget", err.(smithy.InvalidParamsError))
}
}
if len(v.LogLevel) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("LogLevel"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartAuditMitigationActionsTaskInput(v *StartAuditMitigationActionsTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartAuditMitigationActionsTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if v.Target == nil {
invalidParams.Add(smithy.NewErrParamRequired("Target"))
}
if v.AuditCheckToActionsMapping == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuditCheckToActionsMapping"))
}
if v.ClientRequestToken == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartDetectMitigationActionsTaskInput(v *StartDetectMitigationActionsTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartDetectMitigationActionsTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
if v.Target == nil {
invalidParams.Add(smithy.NewErrParamRequired("Target"))
}
if v.Actions == nil {
invalidParams.Add(smithy.NewErrParamRequired("Actions"))
}
if v.ViolationEventOccurrenceRange != nil {
if err := validateViolationEventOccurrenceRange(v.ViolationEventOccurrenceRange); err != nil {
invalidParams.AddNested("ViolationEventOccurrenceRange", err.(smithy.InvalidParamsError))
}
}
if v.ClientRequestToken == nil {
invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartOnDemandAuditTaskInput(v *StartOnDemandAuditTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartOnDemandAuditTaskInput"}
if v.TargetCheckNames == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetCheckNames"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStartThingRegistrationTaskInput(v *StartThingRegistrationTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StartThingRegistrationTaskInput"}
if v.TemplateBody == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateBody"))
}
if v.InputFileBucket == nil {
invalidParams.Add(smithy.NewErrParamRequired("InputFileBucket"))
}
if v.InputFileKey == nil {
invalidParams.Add(smithy.NewErrParamRequired("InputFileKey"))
}
if v.RoleArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpStopThingRegistrationTaskInput(v *StopThingRegistrationTaskInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "StopThingRegistrationTaskInput"}
if v.TaskId == nil {
invalidParams.Add(smithy.NewErrParamRequired("TaskId"))
}
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.ResourceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
}
if v.Tags == nil {
invalidParams.Add(smithy.NewErrParamRequired("Tags"))
} else if v.Tags != nil {
if err := validateTagList(v.Tags); err != nil {
invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpTestAuthorizationInput(v *TestAuthorizationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TestAuthorizationInput"}
if v.AuthInfos == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthInfos"))
} else if v.AuthInfos != nil {
if err := validateAuthInfos(v.AuthInfos); err != nil {
invalidParams.AddNested("AuthInfos", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpTestInvokeAuthorizerInput(v *TestInvokeAuthorizerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TestInvokeAuthorizerInput"}
if v.AuthorizerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthorizerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpTransferCertificateInput(v *TransferCertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "TransferCertificateInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if v.TargetAwsAccount == nil {
invalidParams.Add(smithy.NewErrParamRequired("TargetAwsAccount"))
}
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.ResourceArn == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceArn"))
}
if v.TagKeys == nil {
invalidParams.Add(smithy.NewErrParamRequired("TagKeys"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateAuditSuppressionInput(v *UpdateAuditSuppressionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateAuditSuppressionInput"}
if v.CheckName == nil {
invalidParams.Add(smithy.NewErrParamRequired("CheckName"))
}
if v.ResourceIdentifier == nil {
invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateAuthorizerInput(v *UpdateAuthorizerInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateAuthorizerInput"}
if v.AuthorizerName == nil {
invalidParams.Add(smithy.NewErrParamRequired("AuthorizerName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateBillingGroupInput(v *UpdateBillingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateBillingGroupInput"}
if v.BillingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("BillingGroupName"))
}
if v.BillingGroupProperties == nil {
invalidParams.Add(smithy.NewErrParamRequired("BillingGroupProperties"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateCACertificateInput(v *UpdateCACertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateCACertificateInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateCertificateInput(v *UpdateCertificateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateCertificateInput"}
if v.CertificateId == nil {
invalidParams.Add(smithy.NewErrParamRequired("CertificateId"))
}
if len(v.NewStatus) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("NewStatus"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateCustomMetricInput(v *UpdateCustomMetricInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateCustomMetricInput"}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if v.DisplayName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DisplayName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateDimensionInput(v *UpdateDimensionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateDimensionInput"}
if v.Name == nil {
invalidParams.Add(smithy.NewErrParamRequired("Name"))
}
if v.StringValues == nil {
invalidParams.Add(smithy.NewErrParamRequired("StringValues"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateDomainConfigurationInput(v *UpdateDomainConfigurationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateDomainConfigurationInput"}
if v.DomainConfigurationName == nil {
invalidParams.Add(smithy.NewErrParamRequired("DomainConfigurationName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateDynamicThingGroupInput(v *UpdateDynamicThingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateDynamicThingGroupInput"}
if v.ThingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupName"))
}
if v.ThingGroupProperties == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupProperties"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateFleetMetricInput(v *UpdateFleetMetricInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateFleetMetricInput"}
if v.MetricName == nil {
invalidParams.Add(smithy.NewErrParamRequired("MetricName"))
}
if v.AggregationType != nil {
if err := validateAggregationType(v.AggregationType); err != nil {
invalidParams.AddNested("AggregationType", err.(smithy.InvalidParamsError))
}
}
if v.IndexName == nil {
invalidParams.Add(smithy.NewErrParamRequired("IndexName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateIndexingConfigurationInput(v *UpdateIndexingConfigurationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateIndexingConfigurationInput"}
if v.ThingIndexingConfiguration != nil {
if err := validateThingIndexingConfiguration(v.ThingIndexingConfiguration); err != nil {
invalidParams.AddNested("ThingIndexingConfiguration", err.(smithy.InvalidParamsError))
}
}
if v.ThingGroupIndexingConfiguration != nil {
if err := validateThingGroupIndexingConfiguration(v.ThingGroupIndexingConfiguration); err != nil {
invalidParams.AddNested("ThingGroupIndexingConfiguration", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateJobInput(v *UpdateJobInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateJobInput"}
if v.JobId == nil {
invalidParams.Add(smithy.NewErrParamRequired("JobId"))
}
if v.JobExecutionsRolloutConfig != nil {
if err := validateJobExecutionsRolloutConfig(v.JobExecutionsRolloutConfig); err != nil {
invalidParams.AddNested("JobExecutionsRolloutConfig", err.(smithy.InvalidParamsError))
}
}
if v.AbortConfig != nil {
if err := validateAbortConfig(v.AbortConfig); err != nil {
invalidParams.AddNested("AbortConfig", err.(smithy.InvalidParamsError))
}
}
if v.JobExecutionsRetryConfig != nil {
if err := validateJobExecutionsRetryConfig(v.JobExecutionsRetryConfig); err != nil {
invalidParams.AddNested("JobExecutionsRetryConfig", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateMitigationActionInput(v *UpdateMitigationActionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateMitigationActionInput"}
if v.ActionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ActionName"))
}
if v.ActionParams != nil {
if err := validateMitigationActionParams(v.ActionParams); err != nil {
invalidParams.AddNested("ActionParams", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdatePackageInput(v *UpdatePackageInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdatePackageInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdatePackageVersionInput(v *UpdatePackageVersionInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdatePackageVersionInput"}
if v.PackageName == nil {
invalidParams.Add(smithy.NewErrParamRequired("PackageName"))
}
if v.VersionName == nil {
invalidParams.Add(smithy.NewErrParamRequired("VersionName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateProvisioningTemplateInput(v *UpdateProvisioningTemplateInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateProvisioningTemplateInput"}
if v.TemplateName == nil {
invalidParams.Add(smithy.NewErrParamRequired("TemplateName"))
}
if v.PreProvisioningHook != nil {
if err := validateProvisioningHook(v.PreProvisioningHook); err != nil {
invalidParams.AddNested("PreProvisioningHook", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateRoleAliasInput(v *UpdateRoleAliasInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateRoleAliasInput"}
if v.RoleAlias == nil {
invalidParams.Add(smithy.NewErrParamRequired("RoleAlias"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateScheduledAuditInput(v *UpdateScheduledAuditInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateScheduledAuditInput"}
if v.ScheduledAuditName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ScheduledAuditName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateSecurityProfileInput(v *UpdateSecurityProfileInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateSecurityProfileInput"}
if v.SecurityProfileName == nil {
invalidParams.Add(smithy.NewErrParamRequired("SecurityProfileName"))
}
if v.Behaviors != nil {
if err := validateBehaviors(v.Behaviors); err != nil {
invalidParams.AddNested("Behaviors", err.(smithy.InvalidParamsError))
}
}
if v.AlertTargets != nil {
if err := validateAlertTargets(v.AlertTargets); err != nil {
invalidParams.AddNested("AlertTargets", err.(smithy.InvalidParamsError))
}
}
if v.AdditionalMetricsToRetainV2 != nil {
if err := validateAdditionalMetricsToRetainV2List(v.AdditionalMetricsToRetainV2); err != nil {
invalidParams.AddNested("AdditionalMetricsToRetainV2", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateStreamInput(v *UpdateStreamInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateStreamInput"}
if v.StreamId == nil {
invalidParams.Add(smithy.NewErrParamRequired("StreamId"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateThingGroupInput(v *UpdateThingGroupInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateThingGroupInput"}
if v.ThingGroupName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupName"))
}
if v.ThingGroupProperties == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingGroupProperties"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateThingInput(v *UpdateThingInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateThingInput"}
if v.ThingName == nil {
invalidParams.Add(smithy.NewErrParamRequired("ThingName"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpUpdateTopicRuleDestinationInput(v *UpdateTopicRuleDestinationInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "UpdateTopicRuleDestinationInput"}
if v.Arn == nil {
invalidParams.Add(smithy.NewErrParamRequired("Arn"))
}
if len(v.Status) == 0 {
invalidParams.Add(smithy.NewErrParamRequired("Status"))
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
func validateOpValidateSecurityProfileBehaviorsInput(v *ValidateSecurityProfileBehaviorsInput) error {
if v == nil {
return nil
}
invalidParams := smithy.InvalidParamsError{Context: "ValidateSecurityProfileBehaviorsInput"}
if v.Behaviors == nil {
invalidParams.Add(smithy.NewErrParamRequired("Behaviors"))
} else if v.Behaviors != nil {
if err := validateBehaviors(v.Behaviors); err != nil {
invalidParams.AddNested("Behaviors", err.(smithy.InvalidParamsError))
}
}
if invalidParams.Len() > 0 {
return invalidParams
} else {
return nil
}
}
| 9,853 |
aws-sdk-go-v2 | aws | Go | // 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 IoT 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
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)\\-\\w+\\-\\d+$"),
AwsCn: regexp.MustCompile("^cn\\-\\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: "iot.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "iot-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "iot.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.Aws,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "ap-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-northeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ap-southeast-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "ca-central-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.ca-central-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "eu-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-north-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "eu-west-3",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "fips-ca-central-1",
}: endpoints.Endpoint{
Hostname: "iot-fips.ca-central-1.amazonaws.com",
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-east-1",
}: endpoints.Endpoint{
Hostname: "iot-fips.us-east-1.amazonaws.com",
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-east-2",
}: endpoints.Endpoint{
Hostname: "iot-fips.us-east-2.amazonaws.com",
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-west-1",
}: endpoints.Endpoint{
Hostname: "iot-fips.us-west-1.amazonaws.com",
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-west-2",
}: endpoints.Endpoint{
Hostname: "iot-fips.us-west-2.amazonaws.com",
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "me-central-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "me-south-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "sa-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.us-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-east-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-east-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.us-east-2.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.us-west-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-west-2",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-west-2",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.us-west-2.amazonaws.com",
},
},
},
{
ID: "aws-cn",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "iot.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "iot-fips.{region}.api.amazonwebservices.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "iot.{region}.amazonaws.com.cn",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsCn,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "cn-north-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "cn-northwest-1",
}: endpoints.Endpoint{},
},
},
{
ID: "aws-iso",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "iot.{region}.c2s.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIso,
IsRegionalized: true,
},
{
ID: "aws-iso-b",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "iot.{region}.sc2s.sgov.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoB,
IsRegionalized: true,
},
{
ID: "aws-iso-e",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "iot.{region}.cloud.adc-e.uk",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoE,
IsRegionalized: true,
},
{
ID: "aws-iso-f",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "iot.{region}.csp.hci.ic.gov",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsIsoF,
IsRegionalized: true,
},
{
ID: "aws-us-gov",
Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
{
Variant: endpoints.DualStackVariant,
}: {
Hostname: "iot.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
}: {
Hostname: "iot-fips.{region}.api.aws",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
{
Variant: 0,
}: {
Hostname: "iot.{region}.amazonaws.com",
Protocols: []string{"https"},
SignatureVersions: []string{"v4"},
},
},
RegionRegex: partitionRegexp.AwsUsGov,
IsRegionalized: true,
Endpoints: endpoints.Endpoints{
endpoints.EndpointKey{
Region: "fips-us-gov-east-1",
}: endpoints.Endpoint{
Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "fips-us-gov-west-1",
}: endpoints.Endpoint{
Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
Deprecated: aws.TrueTernary,
},
endpoints.EndpointKey{
Region: "us-gov-east-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-gov-east-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
},
endpoints.EndpointKey{
Region: "us-gov-west-1",
}: endpoints.Endpoint{},
endpoints.EndpointKey{
Region: "us-gov-west-1",
Variant: endpoints.FIPSVariant,
}: {
Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
},
},
},
}
| 456 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package endpoints
import (
"testing"
)
func TestRegexCompile(t *testing.T) {
_ = defaultPartitions
}
| 12 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
type AbortAction string
// Enum values for AbortAction
const (
AbortActionCancel AbortAction = "CANCEL"
)
// Values returns all known values for AbortAction. 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 (AbortAction) Values() []AbortAction {
return []AbortAction{
"CANCEL",
}
}
type ActionType string
// Enum values for ActionType
const (
ActionTypePublish ActionType = "PUBLISH"
ActionTypeSubscribe ActionType = "SUBSCRIBE"
ActionTypeReceive ActionType = "RECEIVE"
ActionTypeConnect ActionType = "CONNECT"
)
// 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{
"PUBLISH",
"SUBSCRIBE",
"RECEIVE",
"CONNECT",
}
}
type AggregationTypeName string
// Enum values for AggregationTypeName
const (
AggregationTypeNameStatistics AggregationTypeName = "Statistics"
AggregationTypeNamePercentiles AggregationTypeName = "Percentiles"
AggregationTypeNameCardinality AggregationTypeName = "Cardinality"
)
// Values returns all known values for AggregationTypeName. 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 (AggregationTypeName) Values() []AggregationTypeName {
return []AggregationTypeName{
"Statistics",
"Percentiles",
"Cardinality",
}
}
type AlertTargetType string
// Enum values for AlertTargetType
const (
AlertTargetTypeSns AlertTargetType = "SNS"
)
// Values returns all known values for AlertTargetType. 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 (AlertTargetType) Values() []AlertTargetType {
return []AlertTargetType{
"SNS",
}
}
type AuditCheckRunStatus string
// Enum values for AuditCheckRunStatus
const (
AuditCheckRunStatusInProgress AuditCheckRunStatus = "IN_PROGRESS"
AuditCheckRunStatusWaitingForDataCollection AuditCheckRunStatus = "WAITING_FOR_DATA_COLLECTION"
AuditCheckRunStatusCanceled AuditCheckRunStatus = "CANCELED"
AuditCheckRunStatusCompletedCompliant AuditCheckRunStatus = "COMPLETED_COMPLIANT"
AuditCheckRunStatusCompletedNonCompliant AuditCheckRunStatus = "COMPLETED_NON_COMPLIANT"
AuditCheckRunStatusFailed AuditCheckRunStatus = "FAILED"
)
// Values returns all known values for AuditCheckRunStatus. 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 (AuditCheckRunStatus) Values() []AuditCheckRunStatus {
return []AuditCheckRunStatus{
"IN_PROGRESS",
"WAITING_FOR_DATA_COLLECTION",
"CANCELED",
"COMPLETED_COMPLIANT",
"COMPLETED_NON_COMPLIANT",
"FAILED",
}
}
type AuditFindingSeverity string
// Enum values for AuditFindingSeverity
const (
AuditFindingSeverityCritical AuditFindingSeverity = "CRITICAL"
AuditFindingSeverityHigh AuditFindingSeverity = "HIGH"
AuditFindingSeverityMedium AuditFindingSeverity = "MEDIUM"
AuditFindingSeverityLow AuditFindingSeverity = "LOW"
)
// Values returns all known values for AuditFindingSeverity. 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 (AuditFindingSeverity) Values() []AuditFindingSeverity {
return []AuditFindingSeverity{
"CRITICAL",
"HIGH",
"MEDIUM",
"LOW",
}
}
type AuditFrequency string
// Enum values for AuditFrequency
const (
AuditFrequencyDaily AuditFrequency = "DAILY"
AuditFrequencyWeekly AuditFrequency = "WEEKLY"
AuditFrequencyBiweekly AuditFrequency = "BIWEEKLY"
AuditFrequencyMonthly AuditFrequency = "MONTHLY"
)
// Values returns all known values for AuditFrequency. 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 (AuditFrequency) Values() []AuditFrequency {
return []AuditFrequency{
"DAILY",
"WEEKLY",
"BIWEEKLY",
"MONTHLY",
}
}
type AuditMitigationActionsExecutionStatus string
// Enum values for AuditMitigationActionsExecutionStatus
const (
AuditMitigationActionsExecutionStatusInProgress AuditMitigationActionsExecutionStatus = "IN_PROGRESS"
AuditMitigationActionsExecutionStatusCompleted AuditMitigationActionsExecutionStatus = "COMPLETED"
AuditMitigationActionsExecutionStatusFailed AuditMitigationActionsExecutionStatus = "FAILED"
AuditMitigationActionsExecutionStatusCanceled AuditMitigationActionsExecutionStatus = "CANCELED"
AuditMitigationActionsExecutionStatusSkipped AuditMitigationActionsExecutionStatus = "SKIPPED"
AuditMitigationActionsExecutionStatusPending AuditMitigationActionsExecutionStatus = "PENDING"
)
// Values returns all known values for AuditMitigationActionsExecutionStatus. 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 (AuditMitigationActionsExecutionStatus) Values() []AuditMitigationActionsExecutionStatus {
return []AuditMitigationActionsExecutionStatus{
"IN_PROGRESS",
"COMPLETED",
"FAILED",
"CANCELED",
"SKIPPED",
"PENDING",
}
}
type AuditMitigationActionsTaskStatus string
// Enum values for AuditMitigationActionsTaskStatus
const (
AuditMitigationActionsTaskStatusInProgress AuditMitigationActionsTaskStatus = "IN_PROGRESS"
AuditMitigationActionsTaskStatusCompleted AuditMitigationActionsTaskStatus = "COMPLETED"
AuditMitigationActionsTaskStatusFailed AuditMitigationActionsTaskStatus = "FAILED"
AuditMitigationActionsTaskStatusCanceled AuditMitigationActionsTaskStatus = "CANCELED"
)
// Values returns all known values for AuditMitigationActionsTaskStatus. 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 (AuditMitigationActionsTaskStatus) Values() []AuditMitigationActionsTaskStatus {
return []AuditMitigationActionsTaskStatus{
"IN_PROGRESS",
"COMPLETED",
"FAILED",
"CANCELED",
}
}
type AuditNotificationType string
// Enum values for AuditNotificationType
const (
AuditNotificationTypeSns AuditNotificationType = "SNS"
)
// Values returns all known values for AuditNotificationType. 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 (AuditNotificationType) Values() []AuditNotificationType {
return []AuditNotificationType{
"SNS",
}
}
type AuditTaskStatus string
// Enum values for AuditTaskStatus
const (
AuditTaskStatusInProgress AuditTaskStatus = "IN_PROGRESS"
AuditTaskStatusCompleted AuditTaskStatus = "COMPLETED"
AuditTaskStatusFailed AuditTaskStatus = "FAILED"
AuditTaskStatusCanceled AuditTaskStatus = "CANCELED"
)
// Values returns all known values for AuditTaskStatus. 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 (AuditTaskStatus) Values() []AuditTaskStatus {
return []AuditTaskStatus{
"IN_PROGRESS",
"COMPLETED",
"FAILED",
"CANCELED",
}
}
type AuditTaskType string
// Enum values for AuditTaskType
const (
AuditTaskTypeOnDemandAuditTask AuditTaskType = "ON_DEMAND_AUDIT_TASK"
AuditTaskTypeScheduledAuditTask AuditTaskType = "SCHEDULED_AUDIT_TASK"
)
// Values returns all known values for AuditTaskType. 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 (AuditTaskType) Values() []AuditTaskType {
return []AuditTaskType{
"ON_DEMAND_AUDIT_TASK",
"SCHEDULED_AUDIT_TASK",
}
}
type AuthDecision string
// Enum values for AuthDecision
const (
AuthDecisionAllowed AuthDecision = "ALLOWED"
AuthDecisionExplicitDeny AuthDecision = "EXPLICIT_DENY"
AuthDecisionImplicitDeny AuthDecision = "IMPLICIT_DENY"
)
// Values returns all known values for AuthDecision. 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 (AuthDecision) Values() []AuthDecision {
return []AuthDecision{
"ALLOWED",
"EXPLICIT_DENY",
"IMPLICIT_DENY",
}
}
type AuthorizerStatus string
// Enum values for AuthorizerStatus
const (
AuthorizerStatusActive AuthorizerStatus = "ACTIVE"
AuthorizerStatusInactive AuthorizerStatus = "INACTIVE"
)
// Values returns all known values for AuthorizerStatus. 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 (AuthorizerStatus) Values() []AuthorizerStatus {
return []AuthorizerStatus{
"ACTIVE",
"INACTIVE",
}
}
type AutoRegistrationStatus string
// Enum values for AutoRegistrationStatus
const (
AutoRegistrationStatusEnable AutoRegistrationStatus = "ENABLE"
AutoRegistrationStatusDisable AutoRegistrationStatus = "DISABLE"
)
// Values returns all known values for AutoRegistrationStatus. 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 (AutoRegistrationStatus) Values() []AutoRegistrationStatus {
return []AutoRegistrationStatus{
"ENABLE",
"DISABLE",
}
}
type AwsJobAbortCriteriaAbortAction string
// Enum values for AwsJobAbortCriteriaAbortAction
const (
AwsJobAbortCriteriaAbortActionCancel AwsJobAbortCriteriaAbortAction = "CANCEL"
)
// Values returns all known values for AwsJobAbortCriteriaAbortAction. 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 (AwsJobAbortCriteriaAbortAction) Values() []AwsJobAbortCriteriaAbortAction {
return []AwsJobAbortCriteriaAbortAction{
"CANCEL",
}
}
type AwsJobAbortCriteriaFailureType string
// Enum values for AwsJobAbortCriteriaFailureType
const (
AwsJobAbortCriteriaFailureTypeFailed AwsJobAbortCriteriaFailureType = "FAILED"
AwsJobAbortCriteriaFailureTypeRejected AwsJobAbortCriteriaFailureType = "REJECTED"
AwsJobAbortCriteriaFailureTypeTimedOut AwsJobAbortCriteriaFailureType = "TIMED_OUT"
AwsJobAbortCriteriaFailureTypeAll AwsJobAbortCriteriaFailureType = "ALL"
)
// Values returns all known values for AwsJobAbortCriteriaFailureType. 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 (AwsJobAbortCriteriaFailureType) Values() []AwsJobAbortCriteriaFailureType {
return []AwsJobAbortCriteriaFailureType{
"FAILED",
"REJECTED",
"TIMED_OUT",
"ALL",
}
}
type BehaviorCriteriaType string
// Enum values for BehaviorCriteriaType
const (
BehaviorCriteriaTypeStatic BehaviorCriteriaType = "STATIC"
BehaviorCriteriaTypeStatistical BehaviorCriteriaType = "STATISTICAL"
BehaviorCriteriaTypeMachineLearning BehaviorCriteriaType = "MACHINE_LEARNING"
)
// Values returns all known values for BehaviorCriteriaType. 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 (BehaviorCriteriaType) Values() []BehaviorCriteriaType {
return []BehaviorCriteriaType{
"STATIC",
"STATISTICAL",
"MACHINE_LEARNING",
}
}
type CACertificateStatus string
// Enum values for CACertificateStatus
const (
CACertificateStatusActive CACertificateStatus = "ACTIVE"
CACertificateStatusInactive CACertificateStatus = "INACTIVE"
)
// Values returns all known values for CACertificateStatus. 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 (CACertificateStatus) Values() []CACertificateStatus {
return []CACertificateStatus{
"ACTIVE",
"INACTIVE",
}
}
type CACertificateUpdateAction string
// Enum values for CACertificateUpdateAction
const (
CACertificateUpdateActionDeactivate CACertificateUpdateAction = "DEACTIVATE"
)
// Values returns all known values for CACertificateUpdateAction. 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 (CACertificateUpdateAction) Values() []CACertificateUpdateAction {
return []CACertificateUpdateAction{
"DEACTIVATE",
}
}
type CannedAccessControlList string
// Enum values for CannedAccessControlList
const (
CannedAccessControlListPrivate CannedAccessControlList = "private"
CannedAccessControlListPublicRead CannedAccessControlList = "public-read"
CannedAccessControlListPublicReadWrite CannedAccessControlList = "public-read-write"
CannedAccessControlListAwsExecRead CannedAccessControlList = "aws-exec-read"
CannedAccessControlListAuthenticatedRead CannedAccessControlList = "authenticated-read"
CannedAccessControlListBucketOwnerRead CannedAccessControlList = "bucket-owner-read"
CannedAccessControlListBucketOwnerFullControl CannedAccessControlList = "bucket-owner-full-control"
CannedAccessControlListLogDeliveryWrite CannedAccessControlList = "log-delivery-write"
)
// Values returns all known values for CannedAccessControlList. 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 (CannedAccessControlList) Values() []CannedAccessControlList {
return []CannedAccessControlList{
"private",
"public-read",
"public-read-write",
"aws-exec-read",
"authenticated-read",
"bucket-owner-read",
"bucket-owner-full-control",
"log-delivery-write",
}
}
type CertificateMode string
// Enum values for CertificateMode
const (
CertificateModeDefault CertificateMode = "DEFAULT"
CertificateModeSniOnly CertificateMode = "SNI_ONLY"
)
// Values returns all known values for CertificateMode. 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 (CertificateMode) Values() []CertificateMode {
return []CertificateMode{
"DEFAULT",
"SNI_ONLY",
}
}
type CertificateStatus string
// Enum values for CertificateStatus
const (
CertificateStatusActive CertificateStatus = "ACTIVE"
CertificateStatusInactive CertificateStatus = "INACTIVE"
CertificateStatusRevoked CertificateStatus = "REVOKED"
CertificateStatusPendingTransfer CertificateStatus = "PENDING_TRANSFER"
CertificateStatusRegisterInactive CertificateStatus = "REGISTER_INACTIVE"
CertificateStatusPendingActivation CertificateStatus = "PENDING_ACTIVATION"
)
// Values returns all known values for CertificateStatus. 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 (CertificateStatus) Values() []CertificateStatus {
return []CertificateStatus{
"ACTIVE",
"INACTIVE",
"REVOKED",
"PENDING_TRANSFER",
"REGISTER_INACTIVE",
"PENDING_ACTIVATION",
}
}
type ComparisonOperator string
// Enum values for ComparisonOperator
const (
ComparisonOperatorLessThan ComparisonOperator = "less-than"
ComparisonOperatorLessThanEquals ComparisonOperator = "less-than-equals"
ComparisonOperatorGreaterThan ComparisonOperator = "greater-than"
ComparisonOperatorGreaterThanEquals ComparisonOperator = "greater-than-equals"
ComparisonOperatorInCidrSet ComparisonOperator = "in-cidr-set"
ComparisonOperatorNotInCidrSet ComparisonOperator = "not-in-cidr-set"
ComparisonOperatorInPortSet ComparisonOperator = "in-port-set"
ComparisonOperatorNotInPortSet ComparisonOperator = "not-in-port-set"
ComparisonOperatorInSet ComparisonOperator = "in-set"
ComparisonOperatorNotInSet ComparisonOperator = "not-in-set"
)
// Values returns all known values for ComparisonOperator. 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 (ComparisonOperator) Values() []ComparisonOperator {
return []ComparisonOperator{
"less-than",
"less-than-equals",
"greater-than",
"greater-than-equals",
"in-cidr-set",
"not-in-cidr-set",
"in-port-set",
"not-in-port-set",
"in-set",
"not-in-set",
}
}
type ConfidenceLevel string
// Enum values for ConfidenceLevel
const (
ConfidenceLevelLow ConfidenceLevel = "LOW"
ConfidenceLevelMedium ConfidenceLevel = "MEDIUM"
ConfidenceLevelHigh ConfidenceLevel = "HIGH"
)
// Values returns all known values for ConfidenceLevel. 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 (ConfidenceLevel) Values() []ConfidenceLevel {
return []ConfidenceLevel{
"LOW",
"MEDIUM",
"HIGH",
}
}
type CustomMetricType string
// Enum values for CustomMetricType
const (
CustomMetricTypeStringList CustomMetricType = "string-list"
CustomMetricTypeIpAddressList CustomMetricType = "ip-address-list"
CustomMetricTypeNumberList CustomMetricType = "number-list"
CustomMetricTypeNumber CustomMetricType = "number"
)
// Values returns all known values for CustomMetricType. 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 (CustomMetricType) Values() []CustomMetricType {
return []CustomMetricType{
"string-list",
"ip-address-list",
"number-list",
"number",
}
}
type DayOfWeek string
// Enum values for DayOfWeek
const (
DayOfWeekSun DayOfWeek = "SUN"
DayOfWeekMon DayOfWeek = "MON"
DayOfWeekTue DayOfWeek = "TUE"
DayOfWeekWed DayOfWeek = "WED"
DayOfWeekThu DayOfWeek = "THU"
DayOfWeekFri DayOfWeek = "FRI"
DayOfWeekSat DayOfWeek = "SAT"
)
// Values returns all known values for DayOfWeek. 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 (DayOfWeek) Values() []DayOfWeek {
return []DayOfWeek{
"SUN",
"MON",
"TUE",
"WED",
"THU",
"FRI",
"SAT",
}
}
type DetectMitigationActionExecutionStatus string
// Enum values for DetectMitigationActionExecutionStatus
const (
DetectMitigationActionExecutionStatusInProgress DetectMitigationActionExecutionStatus = "IN_PROGRESS"
DetectMitigationActionExecutionStatusSuccessful DetectMitigationActionExecutionStatus = "SUCCESSFUL"
DetectMitigationActionExecutionStatusFailed DetectMitigationActionExecutionStatus = "FAILED"
DetectMitigationActionExecutionStatusSkipped DetectMitigationActionExecutionStatus = "SKIPPED"
)
// Values returns all known values for DetectMitigationActionExecutionStatus. 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 (DetectMitigationActionExecutionStatus) Values() []DetectMitigationActionExecutionStatus {
return []DetectMitigationActionExecutionStatus{
"IN_PROGRESS",
"SUCCESSFUL",
"FAILED",
"SKIPPED",
}
}
type DetectMitigationActionsTaskStatus string
// Enum values for DetectMitigationActionsTaskStatus
const (
DetectMitigationActionsTaskStatusInProgress DetectMitigationActionsTaskStatus = "IN_PROGRESS"
DetectMitigationActionsTaskStatusSuccessful DetectMitigationActionsTaskStatus = "SUCCESSFUL"
DetectMitigationActionsTaskStatusFailed DetectMitigationActionsTaskStatus = "FAILED"
DetectMitigationActionsTaskStatusCanceled DetectMitigationActionsTaskStatus = "CANCELED"
)
// Values returns all known values for DetectMitigationActionsTaskStatus. 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 (DetectMitigationActionsTaskStatus) Values() []DetectMitigationActionsTaskStatus {
return []DetectMitigationActionsTaskStatus{
"IN_PROGRESS",
"SUCCESSFUL",
"FAILED",
"CANCELED",
}
}
type DeviceCertificateUpdateAction string
// Enum values for DeviceCertificateUpdateAction
const (
DeviceCertificateUpdateActionDeactivate DeviceCertificateUpdateAction = "DEACTIVATE"
)
// Values returns all known values for DeviceCertificateUpdateAction. 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 (DeviceCertificateUpdateAction) Values() []DeviceCertificateUpdateAction {
return []DeviceCertificateUpdateAction{
"DEACTIVATE",
}
}
type DeviceDefenderIndexingMode string
// Enum values for DeviceDefenderIndexingMode
const (
DeviceDefenderIndexingModeOff DeviceDefenderIndexingMode = "OFF"
DeviceDefenderIndexingModeViolations DeviceDefenderIndexingMode = "VIOLATIONS"
)
// Values returns all known values for DeviceDefenderIndexingMode. 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 (DeviceDefenderIndexingMode) Values() []DeviceDefenderIndexingMode {
return []DeviceDefenderIndexingMode{
"OFF",
"VIOLATIONS",
}
}
type DimensionType string
// Enum values for DimensionType
const (
DimensionTypeTopicFilter DimensionType = "TOPIC_FILTER"
)
// Values returns all known values for DimensionType. 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 (DimensionType) Values() []DimensionType {
return []DimensionType{
"TOPIC_FILTER",
}
}
type DimensionValueOperator string
// Enum values for DimensionValueOperator
const (
DimensionValueOperatorIn DimensionValueOperator = "IN"
DimensionValueOperatorNotIn DimensionValueOperator = "NOT_IN"
)
// Values returns all known values for DimensionValueOperator. 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 (DimensionValueOperator) Values() []DimensionValueOperator {
return []DimensionValueOperator{
"IN",
"NOT_IN",
}
}
type DomainConfigurationStatus string
// Enum values for DomainConfigurationStatus
const (
DomainConfigurationStatusEnabled DomainConfigurationStatus = "ENABLED"
DomainConfigurationStatusDisabled DomainConfigurationStatus = "DISABLED"
)
// Values returns all known values for DomainConfigurationStatus. 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 (DomainConfigurationStatus) Values() []DomainConfigurationStatus {
return []DomainConfigurationStatus{
"ENABLED",
"DISABLED",
}
}
type DomainType string
// Enum values for DomainType
const (
DomainTypeEndpoint DomainType = "ENDPOINT"
DomainTypeAwsManaged DomainType = "AWS_MANAGED"
DomainTypeCustomerManaged DomainType = "CUSTOMER_MANAGED"
)
// Values returns all known values for DomainType. 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 (DomainType) Values() []DomainType {
return []DomainType{
"ENDPOINT",
"AWS_MANAGED",
"CUSTOMER_MANAGED",
}
}
type DynamicGroupStatus string
// Enum values for DynamicGroupStatus
const (
DynamicGroupStatusActive DynamicGroupStatus = "ACTIVE"
DynamicGroupStatusBuilding DynamicGroupStatus = "BUILDING"
DynamicGroupStatusRebuilding DynamicGroupStatus = "REBUILDING"
)
// Values returns all known values for DynamicGroupStatus. 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 (DynamicGroupStatus) Values() []DynamicGroupStatus {
return []DynamicGroupStatus{
"ACTIVE",
"BUILDING",
"REBUILDING",
}
}
type DynamoKeyType string
// Enum values for DynamoKeyType
const (
DynamoKeyTypeString DynamoKeyType = "STRING"
DynamoKeyTypeNumber DynamoKeyType = "NUMBER"
)
// Values returns all known values for DynamoKeyType. 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 (DynamoKeyType) Values() []DynamoKeyType {
return []DynamoKeyType{
"STRING",
"NUMBER",
}
}
type EventType string
// Enum values for EventType
const (
EventTypeThing EventType = "THING"
EventTypeThingGroup EventType = "THING_GROUP"
EventTypeThingType EventType = "THING_TYPE"
EventTypeThingGroupMembership EventType = "THING_GROUP_MEMBERSHIP"
EventTypeThingGroupHierarchy EventType = "THING_GROUP_HIERARCHY"
EventTypeThingTypeAssociation EventType = "THING_TYPE_ASSOCIATION"
EventTypeJob EventType = "JOB"
EventTypeJobExecution EventType = "JOB_EXECUTION"
EventTypePolicy EventType = "POLICY"
EventTypeCertificate EventType = "CERTIFICATE"
EventTypeCaCertificate EventType = "CA_CERTIFICATE"
)
// Values returns all known values for EventType. 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 (EventType) Values() []EventType {
return []EventType{
"THING",
"THING_GROUP",
"THING_TYPE",
"THING_GROUP_MEMBERSHIP",
"THING_GROUP_HIERARCHY",
"THING_TYPE_ASSOCIATION",
"JOB",
"JOB_EXECUTION",
"POLICY",
"CERTIFICATE",
"CA_CERTIFICATE",
}
}
type FieldType string
// Enum values for FieldType
const (
FieldTypeNumber FieldType = "Number"
FieldTypeString FieldType = "String"
FieldTypeBoolean FieldType = "Boolean"
)
// Values returns all known values for FieldType. 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 (FieldType) Values() []FieldType {
return []FieldType{
"Number",
"String",
"Boolean",
}
}
type FleetMetricUnit string
// Enum values for FleetMetricUnit
const (
FleetMetricUnitSeconds FleetMetricUnit = "Seconds"
FleetMetricUnitMicroseconds FleetMetricUnit = "Microseconds"
FleetMetricUnitMilliseconds FleetMetricUnit = "Milliseconds"
FleetMetricUnitBytes FleetMetricUnit = "Bytes"
FleetMetricUnitKilobytes FleetMetricUnit = "Kilobytes"
FleetMetricUnitMegabytes FleetMetricUnit = "Megabytes"
FleetMetricUnitGigabytes FleetMetricUnit = "Gigabytes"
FleetMetricUnitTerabytes FleetMetricUnit = "Terabytes"
FleetMetricUnitBits FleetMetricUnit = "Bits"
FleetMetricUnitKilobits FleetMetricUnit = "Kilobits"
FleetMetricUnitMegabits FleetMetricUnit = "Megabits"
FleetMetricUnitGigabits FleetMetricUnit = "Gigabits"
FleetMetricUnitTerabits FleetMetricUnit = "Terabits"
FleetMetricUnitPercent FleetMetricUnit = "Percent"
FleetMetricUnitCount FleetMetricUnit = "Count"
FleetMetricUnitBytesSecond FleetMetricUnit = "Bytes/Second"
FleetMetricUnitKilobytesSecond FleetMetricUnit = "Kilobytes/Second"
FleetMetricUnitMegabytesSecond FleetMetricUnit = "Megabytes/Second"
FleetMetricUnitGigabytesSecond FleetMetricUnit = "Gigabytes/Second"
FleetMetricUnitTerabytesSecond FleetMetricUnit = "Terabytes/Second"
FleetMetricUnitBitsSecond FleetMetricUnit = "Bits/Second"
FleetMetricUnitKilobitsSecond FleetMetricUnit = "Kilobits/Second"
FleetMetricUnitMegabitsSecond FleetMetricUnit = "Megabits/Second"
FleetMetricUnitGigabitsSecond FleetMetricUnit = "Gigabits/Second"
FleetMetricUnitTerabitsSecond FleetMetricUnit = "Terabits/Second"
FleetMetricUnitCountSecond FleetMetricUnit = "Count/Second"
FleetMetricUnitNone FleetMetricUnit = "None"
)
// Values returns all known values for FleetMetricUnit. 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 (FleetMetricUnit) Values() []FleetMetricUnit {
return []FleetMetricUnit{
"Seconds",
"Microseconds",
"Milliseconds",
"Bytes",
"Kilobytes",
"Megabytes",
"Gigabytes",
"Terabytes",
"Bits",
"Kilobits",
"Megabits",
"Gigabits",
"Terabits",
"Percent",
"Count",
"Bytes/Second",
"Kilobytes/Second",
"Megabytes/Second",
"Gigabytes/Second",
"Terabytes/Second",
"Bits/Second",
"Kilobits/Second",
"Megabits/Second",
"Gigabits/Second",
"Terabits/Second",
"Count/Second",
"None",
}
}
type IndexStatus string
// Enum values for IndexStatus
const (
IndexStatusActive IndexStatus = "ACTIVE"
IndexStatusBuilding IndexStatus = "BUILDING"
IndexStatusRebuilding IndexStatus = "REBUILDING"
)
// Values returns all known values for IndexStatus. 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 (IndexStatus) Values() []IndexStatus {
return []IndexStatus{
"ACTIVE",
"BUILDING",
"REBUILDING",
}
}
type JobEndBehavior string
// Enum values for JobEndBehavior
const (
JobEndBehaviorStopRollout JobEndBehavior = "STOP_ROLLOUT"
JobEndBehaviorCancel JobEndBehavior = "CANCEL"
JobEndBehaviorForceCancel JobEndBehavior = "FORCE_CANCEL"
)
// Values returns all known values for JobEndBehavior. 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 (JobEndBehavior) Values() []JobEndBehavior {
return []JobEndBehavior{
"STOP_ROLLOUT",
"CANCEL",
"FORCE_CANCEL",
}
}
type JobExecutionFailureType string
// Enum values for JobExecutionFailureType
const (
JobExecutionFailureTypeFailed JobExecutionFailureType = "FAILED"
JobExecutionFailureTypeRejected JobExecutionFailureType = "REJECTED"
JobExecutionFailureTypeTimedOut JobExecutionFailureType = "TIMED_OUT"
JobExecutionFailureTypeAll JobExecutionFailureType = "ALL"
)
// Values returns all known values for JobExecutionFailureType. 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 (JobExecutionFailureType) Values() []JobExecutionFailureType {
return []JobExecutionFailureType{
"FAILED",
"REJECTED",
"TIMED_OUT",
"ALL",
}
}
type JobExecutionStatus string
// Enum values for JobExecutionStatus
const (
JobExecutionStatusQueued JobExecutionStatus = "QUEUED"
JobExecutionStatusInProgress JobExecutionStatus = "IN_PROGRESS"
JobExecutionStatusSucceeded JobExecutionStatus = "SUCCEEDED"
JobExecutionStatusFailed JobExecutionStatus = "FAILED"
JobExecutionStatusTimedOut JobExecutionStatus = "TIMED_OUT"
JobExecutionStatusRejected JobExecutionStatus = "REJECTED"
JobExecutionStatusRemoved JobExecutionStatus = "REMOVED"
JobExecutionStatusCanceled JobExecutionStatus = "CANCELED"
)
// Values returns all known values for JobExecutionStatus. 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 (JobExecutionStatus) Values() []JobExecutionStatus {
return []JobExecutionStatus{
"QUEUED",
"IN_PROGRESS",
"SUCCEEDED",
"FAILED",
"TIMED_OUT",
"REJECTED",
"REMOVED",
"CANCELED",
}
}
type JobStatus string
// Enum values for JobStatus
const (
JobStatusInProgress JobStatus = "IN_PROGRESS"
JobStatusCanceled JobStatus = "CANCELED"
JobStatusCompleted JobStatus = "COMPLETED"
JobStatusDeletionInProgress JobStatus = "DELETION_IN_PROGRESS"
JobStatusScheduled JobStatus = "SCHEDULED"
)
// Values returns all known values for JobStatus. 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 (JobStatus) Values() []JobStatus {
return []JobStatus{
"IN_PROGRESS",
"CANCELED",
"COMPLETED",
"DELETION_IN_PROGRESS",
"SCHEDULED",
}
}
type LogLevel string
// Enum values for LogLevel
const (
LogLevelDebug LogLevel = "DEBUG"
LogLevelInfo LogLevel = "INFO"
LogLevelError LogLevel = "ERROR"
LogLevelWarn LogLevel = "WARN"
LogLevelDisabled LogLevel = "DISABLED"
)
// Values returns all known values for LogLevel. 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 (LogLevel) Values() []LogLevel {
return []LogLevel{
"DEBUG",
"INFO",
"ERROR",
"WARN",
"DISABLED",
}
}
type LogTargetType string
// Enum values for LogTargetType
const (
LogTargetTypeDefault LogTargetType = "DEFAULT"
LogTargetTypeThingGroup LogTargetType = "THING_GROUP"
LogTargetTypeClientId LogTargetType = "CLIENT_ID"
LogTargetTypeSourceIp LogTargetType = "SOURCE_IP"
LogTargetTypePrincipalId LogTargetType = "PRINCIPAL_ID"
)
// Values returns all known values for LogTargetType. 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 (LogTargetType) Values() []LogTargetType {
return []LogTargetType{
"DEFAULT",
"THING_GROUP",
"CLIENT_ID",
"SOURCE_IP",
"PRINCIPAL_ID",
}
}
type MessageFormat string
// Enum values for MessageFormat
const (
MessageFormatRaw MessageFormat = "RAW"
MessageFormatJson MessageFormat = "JSON"
)
// Values returns all known values for MessageFormat. 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 (MessageFormat) Values() []MessageFormat {
return []MessageFormat{
"RAW",
"JSON",
}
}
type MitigationActionType string
// Enum values for MitigationActionType
const (
MitigationActionTypeUpdateDeviceCertificate MitigationActionType = "UPDATE_DEVICE_CERTIFICATE"
MitigationActionTypeUpdateCaCertificate MitigationActionType = "UPDATE_CA_CERTIFICATE"
MitigationActionTypeAddThingsToThingGroup MitigationActionType = "ADD_THINGS_TO_THING_GROUP"
MitigationActionTypeReplaceDefaultPolicyVersion MitigationActionType = "REPLACE_DEFAULT_POLICY_VERSION"
MitigationActionTypeEnableIotLogging MitigationActionType = "ENABLE_IOT_LOGGING"
MitigationActionTypePublishFindingToSns MitigationActionType = "PUBLISH_FINDING_TO_SNS"
)
// Values returns all known values for MitigationActionType. 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 (MitigationActionType) Values() []MitigationActionType {
return []MitigationActionType{
"UPDATE_DEVICE_CERTIFICATE",
"UPDATE_CA_CERTIFICATE",
"ADD_THINGS_TO_THING_GROUP",
"REPLACE_DEFAULT_POLICY_VERSION",
"ENABLE_IOT_LOGGING",
"PUBLISH_FINDING_TO_SNS",
}
}
type ModelStatus string
// Enum values for ModelStatus
const (
ModelStatusPendingBuild ModelStatus = "PENDING_BUILD"
ModelStatusActive ModelStatus = "ACTIVE"
ModelStatusExpired ModelStatus = "EXPIRED"
)
// Values returns all known values for ModelStatus. 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 (ModelStatus) Values() []ModelStatus {
return []ModelStatus{
"PENDING_BUILD",
"ACTIVE",
"EXPIRED",
}
}
type NamedShadowIndexingMode string
// Enum values for NamedShadowIndexingMode
const (
NamedShadowIndexingModeOff NamedShadowIndexingMode = "OFF"
NamedShadowIndexingModeOn NamedShadowIndexingMode = "ON"
)
// Values returns all known values for NamedShadowIndexingMode. 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 (NamedShadowIndexingMode) Values() []NamedShadowIndexingMode {
return []NamedShadowIndexingMode{
"OFF",
"ON",
}
}
type OTAUpdateStatus string
// Enum values for OTAUpdateStatus
const (
OTAUpdateStatusCreatePending OTAUpdateStatus = "CREATE_PENDING"
OTAUpdateStatusCreateInProgress OTAUpdateStatus = "CREATE_IN_PROGRESS"
OTAUpdateStatusCreateComplete OTAUpdateStatus = "CREATE_COMPLETE"
OTAUpdateStatusCreateFailed OTAUpdateStatus = "CREATE_FAILED"
OTAUpdateStatusDeleteInProgress OTAUpdateStatus = "DELETE_IN_PROGRESS"
OTAUpdateStatusDeleteFailed OTAUpdateStatus = "DELETE_FAILED"
)
// Values returns all known values for OTAUpdateStatus. 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 (OTAUpdateStatus) Values() []OTAUpdateStatus {
return []OTAUpdateStatus{
"CREATE_PENDING",
"CREATE_IN_PROGRESS",
"CREATE_COMPLETE",
"CREATE_FAILED",
"DELETE_IN_PROGRESS",
"DELETE_FAILED",
}
}
type PackageVersionAction string
// Enum values for PackageVersionAction
const (
PackageVersionActionPublish PackageVersionAction = "PUBLISH"
PackageVersionActionDeprecate PackageVersionAction = "DEPRECATE"
)
// Values returns all known values for PackageVersionAction. 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 (PackageVersionAction) Values() []PackageVersionAction {
return []PackageVersionAction{
"PUBLISH",
"DEPRECATE",
}
}
type PackageVersionStatus string
// Enum values for PackageVersionStatus
const (
PackageVersionStatusDraft PackageVersionStatus = "DRAFT"
PackageVersionStatusPublished PackageVersionStatus = "PUBLISHED"
PackageVersionStatusDeprecated PackageVersionStatus = "DEPRECATED"
)
// Values returns all known values for PackageVersionStatus. 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 (PackageVersionStatus) Values() []PackageVersionStatus {
return []PackageVersionStatus{
"DRAFT",
"PUBLISHED",
"DEPRECATED",
}
}
type PolicyTemplateName string
// Enum values for PolicyTemplateName
const (
PolicyTemplateNameBlankPolicy PolicyTemplateName = "BLANK_POLICY"
)
// Values returns all known values for PolicyTemplateName. 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 (PolicyTemplateName) Values() []PolicyTemplateName {
return []PolicyTemplateName{
"BLANK_POLICY",
}
}
type Protocol string
// Enum values for Protocol
const (
ProtocolMqtt Protocol = "MQTT"
ProtocolHttp Protocol = "HTTP"
)
// Values returns all known values for Protocol. 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 (Protocol) Values() []Protocol {
return []Protocol{
"MQTT",
"HTTP",
}
}
type ReportType string
// Enum values for ReportType
const (
ReportTypeErrors ReportType = "ERRORS"
ReportTypeResults ReportType = "RESULTS"
)
// Values returns all known values for ReportType. 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 (ReportType) Values() []ReportType {
return []ReportType{
"ERRORS",
"RESULTS",
}
}
type ResourceType string
// Enum values for ResourceType
const (
ResourceTypeDeviceCertificate ResourceType = "DEVICE_CERTIFICATE"
ResourceTypeCaCertificate ResourceType = "CA_CERTIFICATE"
ResourceTypeIotPolicy ResourceType = "IOT_POLICY"
ResourceTypeCognitoIdentityPool ResourceType = "COGNITO_IDENTITY_POOL"
ResourceTypeClientId ResourceType = "CLIENT_ID"
ResourceTypeAccountSettings ResourceType = "ACCOUNT_SETTINGS"
ResourceTypeRoleAlias ResourceType = "ROLE_ALIAS"
ResourceTypeIamRole ResourceType = "IAM_ROLE"
ResourceTypeIssuerCertificate ResourceType = "ISSUER_CERTIFICATE"
)
// Values returns all known values for ResourceType. 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 (ResourceType) Values() []ResourceType {
return []ResourceType{
"DEVICE_CERTIFICATE",
"CA_CERTIFICATE",
"IOT_POLICY",
"COGNITO_IDENTITY_POOL",
"CLIENT_ID",
"ACCOUNT_SETTINGS",
"ROLE_ALIAS",
"IAM_ROLE",
"ISSUER_CERTIFICATE",
}
}
type RetryableFailureType string
// Enum values for RetryableFailureType
const (
RetryableFailureTypeFailed RetryableFailureType = "FAILED"
RetryableFailureTypeTimedOut RetryableFailureType = "TIMED_OUT"
RetryableFailureTypeAll RetryableFailureType = "ALL"
)
// Values returns all known values for RetryableFailureType. 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 (RetryableFailureType) Values() []RetryableFailureType {
return []RetryableFailureType{
"FAILED",
"TIMED_OUT",
"ALL",
}
}
type ServerCertificateStatus string
// Enum values for ServerCertificateStatus
const (
ServerCertificateStatusInvalid ServerCertificateStatus = "INVALID"
ServerCertificateStatusValid ServerCertificateStatus = "VALID"
)
// Values returns all known values for ServerCertificateStatus. 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 (ServerCertificateStatus) Values() []ServerCertificateStatus {
return []ServerCertificateStatus{
"INVALID",
"VALID",
}
}
type ServiceType string
// Enum values for ServiceType
const (
ServiceTypeData ServiceType = "DATA"
ServiceTypeCredentialProvider ServiceType = "CREDENTIAL_PROVIDER"
ServiceTypeJobs ServiceType = "JOBS"
)
// Values returns all known values for ServiceType. 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 (ServiceType) Values() []ServiceType {
return []ServiceType{
"DATA",
"CREDENTIAL_PROVIDER",
"JOBS",
}
}
type Status string
// Enum values for Status
const (
StatusInProgress Status = "InProgress"
StatusCompleted Status = "Completed"
StatusFailed Status = "Failed"
StatusCancelled Status = "Cancelled"
StatusCancelling Status = "Cancelling"
)
// Values returns all known values for Status. 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 (Status) Values() []Status {
return []Status{
"InProgress",
"Completed",
"Failed",
"Cancelled",
"Cancelling",
}
}
type TargetSelection string
// Enum values for TargetSelection
const (
TargetSelectionContinuous TargetSelection = "CONTINUOUS"
TargetSelectionSnapshot TargetSelection = "SNAPSHOT"
)
// Values returns all known values for TargetSelection. 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 (TargetSelection) Values() []TargetSelection {
return []TargetSelection{
"CONTINUOUS",
"SNAPSHOT",
}
}
type TemplateType string
// Enum values for TemplateType
const (
TemplateTypeFleetProvisioning TemplateType = "FLEET_PROVISIONING"
TemplateTypeJitp TemplateType = "JITP"
)
// Values returns all known values for TemplateType. 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 (TemplateType) Values() []TemplateType {
return []TemplateType{
"FLEET_PROVISIONING",
"JITP",
}
}
type ThingConnectivityIndexingMode string
// Enum values for ThingConnectivityIndexingMode
const (
ThingConnectivityIndexingModeOff ThingConnectivityIndexingMode = "OFF"
ThingConnectivityIndexingModeStatus ThingConnectivityIndexingMode = "STATUS"
)
// Values returns all known values for ThingConnectivityIndexingMode. 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 (ThingConnectivityIndexingMode) Values() []ThingConnectivityIndexingMode {
return []ThingConnectivityIndexingMode{
"OFF",
"STATUS",
}
}
type ThingGroupIndexingMode string
// Enum values for ThingGroupIndexingMode
const (
ThingGroupIndexingModeOff ThingGroupIndexingMode = "OFF"
ThingGroupIndexingModeOn ThingGroupIndexingMode = "ON"
)
// Values returns all known values for ThingGroupIndexingMode. 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 (ThingGroupIndexingMode) Values() []ThingGroupIndexingMode {
return []ThingGroupIndexingMode{
"OFF",
"ON",
}
}
type ThingIndexingMode string
// Enum values for ThingIndexingMode
const (
ThingIndexingModeOff ThingIndexingMode = "OFF"
ThingIndexingModeRegistry ThingIndexingMode = "REGISTRY"
ThingIndexingModeRegistryAndShadow ThingIndexingMode = "REGISTRY_AND_SHADOW"
)
// Values returns all known values for ThingIndexingMode. 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 (ThingIndexingMode) Values() []ThingIndexingMode {
return []ThingIndexingMode{
"OFF",
"REGISTRY",
"REGISTRY_AND_SHADOW",
}
}
type TopicRuleDestinationStatus string
// Enum values for TopicRuleDestinationStatus
const (
TopicRuleDestinationStatusEnabled TopicRuleDestinationStatus = "ENABLED"
TopicRuleDestinationStatusInProgress TopicRuleDestinationStatus = "IN_PROGRESS"
TopicRuleDestinationStatusDisabled TopicRuleDestinationStatus = "DISABLED"
TopicRuleDestinationStatusError TopicRuleDestinationStatus = "ERROR"
TopicRuleDestinationStatusDeleting TopicRuleDestinationStatus = "DELETING"
)
// Values returns all known values for TopicRuleDestinationStatus. 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 (TopicRuleDestinationStatus) Values() []TopicRuleDestinationStatus {
return []TopicRuleDestinationStatus{
"ENABLED",
"IN_PROGRESS",
"DISABLED",
"ERROR",
"DELETING",
}
}
type VerificationState string
// Enum values for VerificationState
const (
VerificationStateFalsePositive VerificationState = "FALSE_POSITIVE"
VerificationStateBenignPositive VerificationState = "BENIGN_POSITIVE"
VerificationStateTruePositive VerificationState = "TRUE_POSITIVE"
VerificationStateUnknown VerificationState = "UNKNOWN"
)
// Values returns all known values for VerificationState. 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 (VerificationState) Values() []VerificationState {
return []VerificationState{
"FALSE_POSITIVE",
"BENIGN_POSITIVE",
"TRUE_POSITIVE",
"UNKNOWN",
}
}
type ViolationEventType string
// Enum values for ViolationEventType
const (
ViolationEventTypeInAlarm ViolationEventType = "in-alarm"
ViolationEventTypeAlarmCleared ViolationEventType = "alarm-cleared"
ViolationEventTypeAlarmInvalidated ViolationEventType = "alarm-invalidated"
)
// Values returns all known values for ViolationEventType. 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 (ViolationEventType) Values() []ViolationEventType {
return []ViolationEventType{
"in-alarm",
"alarm-cleared",
"alarm-invalidated",
}
}
| 1,532 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
"fmt"
smithy "github.com/aws/smithy-go"
)
// Unable to verify the CA certificate used to sign the device certificate you are
// attempting to register. This is happens when you have registered more than one
// CA certificate that has the same subject field and public key.
type CertificateConflictException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CertificateConflictException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CertificateConflictException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CertificateConflictException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CertificateConflictException"
}
return *e.ErrorCodeOverride
}
func (e *CertificateConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The certificate operation is not allowed.
type CertificateStateException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CertificateStateException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CertificateStateException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CertificateStateException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CertificateStateException"
}
return *e.ErrorCodeOverride
}
func (e *CertificateStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The certificate is invalid.
type CertificateValidationException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *CertificateValidationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *CertificateValidationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *CertificateValidationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "CertificateValidationException"
}
return *e.ErrorCodeOverride
}
func (e *CertificateValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A resource with the same name already exists.
type ConflictException struct {
Message *string
ErrorCodeOverride *string
ResourceId *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 }
// A conflicting resource update exception. This exception is thrown when two
// pending updates cause a conflict.
type ConflictingResourceUpdateException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ConflictingResourceUpdateException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ConflictingResourceUpdateException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ConflictingResourceUpdateException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ConflictingResourceUpdateException"
}
return *e.ErrorCodeOverride
}
func (e *ConflictingResourceUpdateException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// You can't delete the resource because it is attached to one or more resources.
type DeleteConflictException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *DeleteConflictException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *DeleteConflictException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *DeleteConflictException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "DeleteConflictException"
}
return *e.ErrorCodeOverride
}
func (e *DeleteConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The index is not ready.
type IndexNotReadyException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *IndexNotReadyException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *IndexNotReadyException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *IndexNotReadyException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "IndexNotReadyException"
}
return *e.ErrorCodeOverride
}
func (e *IndexNotReadyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An unexpected error has occurred.
type InternalException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InternalException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InternalException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InternalException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InternalException"
}
return *e.ErrorCodeOverride
}
func (e *InternalException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// An unexpected error has occurred.
type InternalFailureException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InternalFailureException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InternalFailureException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InternalFailureException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InternalFailureException"
}
return *e.ErrorCodeOverride
}
func (e *InternalFailureException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// Internal error from the service that indicates an unexpected error or that the
// service is unavailable.
type InternalServerException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InternalServerException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InternalServerException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InternalServerException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InternalServerException"
}
return *e.ErrorCodeOverride
}
func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// The aggregation is invalid.
type InvalidAggregationException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidAggregationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidAggregationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidAggregationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidAggregationException"
}
return *e.ErrorCodeOverride
}
func (e *InvalidAggregationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The query is invalid.
type InvalidQueryException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidQueryException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidQueryException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidQueryException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidQueryException"
}
return *e.ErrorCodeOverride
}
func (e *InvalidQueryException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request is not valid.
type InvalidRequestException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidRequestException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidRequestException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidRequestException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidRequestException"
}
return *e.ErrorCodeOverride
}
func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The response is invalid.
type InvalidResponseException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidResponseException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidResponseException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidResponseException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidResponseException"
}
return *e.ErrorCodeOverride
}
func (e *InvalidResponseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An attempt was made to change to an invalid state, for example by deleting a
// job or a job execution which is "IN_PROGRESS" without setting the force
// parameter.
type InvalidStateTransitionException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *InvalidStateTransitionException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *InvalidStateTransitionException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *InvalidStateTransitionException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "InvalidStateTransitionException"
}
return *e.ErrorCodeOverride
}
func (e *InvalidStateTransitionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// A limit has been exceeded.
type LimitExceededException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *LimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *LimitExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *LimitExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "LimitExceededException"
}
return *e.ErrorCodeOverride
}
func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The policy documentation is not valid.
type MalformedPolicyException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *MalformedPolicyException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *MalformedPolicyException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *MalformedPolicyException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "MalformedPolicyException"
}
return *e.ErrorCodeOverride
}
func (e *MalformedPolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The resource is not configured.
type NotConfiguredException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *NotConfiguredException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *NotConfiguredException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *NotConfiguredException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "NotConfiguredException"
}
return *e.ErrorCodeOverride
}
func (e *NotConfiguredException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The registration code is invalid.
type RegistrationCodeValidationException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *RegistrationCodeValidationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *RegistrationCodeValidationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *RegistrationCodeValidationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "RegistrationCodeValidationException"
}
return *e.ErrorCodeOverride
}
func (e *RegistrationCodeValidationException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// The resource already exists.
type ResourceAlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
ResourceId *string
ResourceArn *string
noSmithyDocumentSerde
}
func (e *ResourceAlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceAlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceAlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceAlreadyExistsException"
}
return *e.ErrorCodeOverride
}
func (e *ResourceAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The specified resource does not exist.
type ResourceNotFoundException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ResourceNotFoundException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceNotFoundException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceNotFoundException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceNotFoundException"
}
return *e.ErrorCodeOverride
}
func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The resource registration failed.
type ResourceRegistrationFailureException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ResourceRegistrationFailureException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ResourceRegistrationFailureException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ResourceRegistrationFailureException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ResourceRegistrationFailureException"
}
return *e.ErrorCodeOverride
}
func (e *ResourceRegistrationFailureException) ErrorFault() smithy.ErrorFault {
return smithy.FaultClient
}
// A limit has been exceeded.
type ServiceQuotaExceededException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ServiceQuotaExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ServiceQuotaExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ServiceQuotaExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ServiceQuotaExceededException"
}
return *e.ErrorCodeOverride
}
func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The service is temporarily unavailable.
type ServiceUnavailableException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ServiceUnavailableException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ServiceUnavailableException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ServiceUnavailableException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ServiceUnavailableException"
}
return *e.ErrorCodeOverride
}
func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
// The Rule-SQL expression can't be parsed correctly.
type SqlParseException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *SqlParseException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *SqlParseException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *SqlParseException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "SqlParseException"
}
return *e.ErrorCodeOverride
}
func (e *SqlParseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// This exception occurs if you attempt to start a task with the same task-id as
// an existing task but with a different clientRequestToken.
type TaskAlreadyExistsException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TaskAlreadyExistsException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TaskAlreadyExistsException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TaskAlreadyExistsException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TaskAlreadyExistsException"
}
return *e.ErrorCodeOverride
}
func (e *TaskAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The rate exceeds the limit.
type ThrottlingException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ThrottlingException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ThrottlingException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ThrottlingException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ThrottlingException"
}
return *e.ErrorCodeOverride
}
func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can't revert the certificate transfer because the transfer is already
// complete.
type TransferAlreadyCompletedException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TransferAlreadyCompletedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TransferAlreadyCompletedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TransferAlreadyCompletedException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TransferAlreadyCompletedException"
}
return *e.ErrorCodeOverride
}
func (e *TransferAlreadyCompletedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You can't transfer the certificate because authorization policies are still
// attached.
type TransferConflictException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *TransferConflictException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *TransferConflictException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *TransferConflictException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "TransferConflictException"
}
return *e.ErrorCodeOverride
}
func (e *TransferConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// You are not authorized to perform this operation.
type UnauthorizedException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *UnauthorizedException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *UnauthorizedException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *UnauthorizedException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "UnauthorizedException"
}
return *e.ErrorCodeOverride
}
func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The request is not valid.
type ValidationException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *ValidationException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *ValidationException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *ValidationException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "ValidationException"
}
return *e.ErrorCodeOverride
}
func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// An exception thrown when the version of an entity specified with the
// expectedVersion parameter does not match the latest version in the system.
type VersionConflictException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *VersionConflictException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *VersionConflictException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *VersionConflictException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "VersionConflictException"
}
return *e.ErrorCodeOverride
}
func (e *VersionConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
// The number of policy versions exceeds the limit.
type VersionsLimitExceededException struct {
Message *string
ErrorCodeOverride *string
noSmithyDocumentSerde
}
func (e *VersionsLimitExceededException) Error() string {
return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
}
func (e *VersionsLimitExceededException) ErrorMessage() string {
if e.Message == nil {
return ""
}
return *e.Message
}
func (e *VersionsLimitExceededException) ErrorCode() string {
if e == nil || e.ErrorCodeOverride == nil {
return "VersionsLimitExceededException"
}
return *e.ErrorCodeOverride
}
func (e *VersionsLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
| 888 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types
import (
smithydocument "github.com/aws/smithy-go/document"
"time"
)
// The criteria that determine when and how a job abort takes place.
type AbortConfig struct {
// The list of criteria that determine when and how to abort the job.
//
// This member is required.
CriteriaList []AbortCriteria
noSmithyDocumentSerde
}
// The criteria that determine when and how a job abort takes place.
type AbortCriteria struct {
// The type of job action to take to initiate the job abort.
//
// This member is required.
Action AbortAction
// The type of job execution failures that can initiate a job abort.
//
// This member is required.
FailureType JobExecutionFailureType
// The minimum number of things which must receive job execution notifications
// before the job can be aborted.
//
// This member is required.
MinNumberOfExecutedThings *int32
// The minimum percentage of job execution failures that must occur to initiate
// the job abort. Amazon Web Services IoT Core supports up to two digits after the
// decimal (for example, 10.9 and 10.99, but not 10.999).
//
// This member is required.
ThresholdPercentage *float64
noSmithyDocumentSerde
}
// Describes the actions associated with a rule.
type Action struct {
// Change the state of a CloudWatch alarm.
CloudwatchAlarm *CloudwatchAlarmAction
// Send data to CloudWatch Logs.
CloudwatchLogs *CloudwatchLogsAction
// Capture a CloudWatch metric.
CloudwatchMetric *CloudwatchMetricAction
// Write to a DynamoDB table.
DynamoDB *DynamoDBAction
// Write to a DynamoDB table. This is a new version of the DynamoDB action. It
// allows you to write each attribute in an MQTT message payload into a separate
// DynamoDB column.
DynamoDBv2 *DynamoDBv2Action
// Write data to an Amazon OpenSearch Service domain. The Elasticsearch action can
// only be used by existing rule actions. To create a new rule action or to update
// an existing rule action, use the OpenSearch rule action instead. For more
// information, see OpenSearchAction (https://docs.aws.amazon.com/iot/latest/apireference/API_OpenSearchAction.html)
// .
Elasticsearch *ElasticsearchAction
// Write to an Amazon Kinesis Firehose stream.
Firehose *FirehoseAction
// Send data to an HTTPS endpoint.
Http *HttpAction
// Sends message data to an IoT Analytics channel.
IotAnalytics *IotAnalyticsAction
// Sends an input to an IoT Events detector.
IotEvents *IotEventsAction
// Sends data from the MQTT message that triggered the rule to IoT SiteWise asset
// properties.
IotSiteWise *IotSiteWiseAction
// Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or
// self-managed Apache Kafka cluster.
Kafka *KafkaAction
// Write data to an Amazon Kinesis stream.
Kinesis *KinesisAction
// Invoke a Lambda function.
Lambda *LambdaAction
// The Amazon Location Service rule action sends device location updates from an
// MQTT message to an Amazon Location tracker resource.
Location *LocationAction
// Write data to an Amazon OpenSearch Service domain.
OpenSearch *OpenSearchAction
// Publish to another MQTT topic.
Republish *RepublishAction
// Write to an Amazon S3 bucket.
S3 *S3Action
// Send a message to a Salesforce IoT Cloud Input Stream.
Salesforce *SalesforceAction
// Publish to an Amazon SNS topic.
Sns *SnsAction
// Publish to an Amazon SQS queue.
Sqs *SqsAction
// Starts execution of a Step Functions state machine.
StepFunctions *StepFunctionsAction
// The Timestream rule action writes attributes (measures) from an MQTT message
// into an Amazon Timestream table. For more information, see the Timestream (https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html)
// topic rule action documentation.
Timestream *TimestreamAction
noSmithyDocumentSerde
}
// Information about an active Device Defender security profile behavior violation.
type ActiveViolation struct {
// The behavior that is being violated.
Behavior *Behavior
// The time the most recent violation occurred.
LastViolationTime *time.Time
// The value of the metric (the measurement) that caused the most recent violation.
LastViolationValue *MetricValue
// The security profile with the behavior is in violation.
SecurityProfileName *string
// The name of the thing responsible for the active violation.
ThingName *string
// The verification state of the violation (detect alarm).
VerificationState VerificationState
// The description of the verification state of the violation.
VerificationStateDescription *string
// The details of a violation event.
ViolationEventAdditionalInfo *ViolationEventAdditionalInfo
// The ID of the active violation.
ViolationId *string
// The time the violation started.
ViolationStartTime *time.Time
noSmithyDocumentSerde
}
// Parameters used when defining a mitigation action that move a set of things to
// a thing group.
type AddThingsToThingGroupParams struct {
// The list of groups to which you want to add the things that triggered the
// mitigation action. You can add a thing to a maximum of 10 groups, but you can't
// add a thing to more than one group in the same hierarchy.
//
// This member is required.
ThingGroupNames []string
// Specifies if this mitigation action can move the things that triggered the
// mitigation action even if they are part of one or more dynamic thing groups.
OverrideDynamicGroups *bool
noSmithyDocumentSerde
}
// The type of aggregation queries.
type AggregationType struct {
// The name of the aggregation type.
//
// This member is required.
Name AggregationTypeName
// A list of the values of aggregation types.
Values []string
noSmithyDocumentSerde
}
// A structure containing the alert target ARN and the role ARN.
type AlertTarget struct {
// The Amazon Resource Name (ARN) of the notification target to which alerts are
// sent.
//
// This member is required.
AlertTargetArn *string
// The ARN of the role that grants permission to send alerts to the notification
// target.
//
// This member is required.
RoleArn *string
noSmithyDocumentSerde
}
// Contains information that allowed the authorization.
type Allowed struct {
// A list of policies that allowed the authentication.
Policies []Policy
noSmithyDocumentSerde
}
// An asset property timestamp entry containing the following information.
type AssetPropertyTimestamp struct {
// A string that contains the time in seconds since epoch. Accepts substitution
// templates.
//
// This member is required.
TimeInSeconds *string
// Optional. A string that contains the nanosecond time offset. Accepts
// substitution templates.
OffsetInNanos *string
noSmithyDocumentSerde
}
// An asset property value entry containing the following information.
type AssetPropertyValue struct {
// The asset property value timestamp.
//
// This member is required.
Timestamp *AssetPropertyTimestamp
// The value of the asset property.
//
// This member is required.
Value AssetPropertyVariant
// Optional. A string that describes the quality of the value. Accepts
// substitution templates. Must be GOOD , BAD , or UNCERTAIN .
Quality *string
noSmithyDocumentSerde
}
// Contains an asset property value (of a single type).
//
// The following types satisfy this interface:
//
// AssetPropertyVariantMemberBooleanValue
// AssetPropertyVariantMemberDoubleValue
// AssetPropertyVariantMemberIntegerValue
// AssetPropertyVariantMemberStringValue
type AssetPropertyVariant interface {
isAssetPropertyVariant()
}
// Optional. A string that contains the boolean value ( true or false ) of the
// value entry. Accepts substitution templates.
type AssetPropertyVariantMemberBooleanValue struct {
Value string
noSmithyDocumentSerde
}
func (*AssetPropertyVariantMemberBooleanValue) isAssetPropertyVariant() {}
// Optional. A string that contains the double value of the value entry. Accepts
// substitution templates.
type AssetPropertyVariantMemberDoubleValue struct {
Value string
noSmithyDocumentSerde
}
func (*AssetPropertyVariantMemberDoubleValue) isAssetPropertyVariant() {}
// Optional. A string that contains the integer value of the value entry. Accepts
// substitution templates.
type AssetPropertyVariantMemberIntegerValue struct {
Value string
noSmithyDocumentSerde
}
func (*AssetPropertyVariantMemberIntegerValue) isAssetPropertyVariant() {}
// Optional. The string value of the value entry. Accepts substitution templates.
type AssetPropertyVariantMemberStringValue struct {
Value string
noSmithyDocumentSerde
}
func (*AssetPropertyVariantMemberStringValue) isAssetPropertyVariant() {}
// The attribute payload.
type AttributePayload struct {
// A JSON string containing up to three key-value pair in JSON format. For
// example: {\"attributes\":{\"string1\":\"string2\"}}
Attributes map[string]string
// Specifies whether the list of attributes provided in the AttributePayload is
// merged with the attributes stored in the registry, instead of overwriting them.
// To remove an attribute, call UpdateThing with an empty attribute value. The
// merge attribute is only valid when calling UpdateThing or UpdateThingGroup .
Merge bool
noSmithyDocumentSerde
}
// Which audit checks are enabled and disabled for this account.
type AuditCheckConfiguration struct {
// True if this audit check is enabled for this account.
Enabled bool
noSmithyDocumentSerde
}
// Information about the audit check.
type AuditCheckDetails struct {
// True if the check is complete and found all resources compliant.
CheckCompliant *bool
// The completion status of this check. One of "IN_PROGRESS",
// "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT",
// "COMPLETED_NON_COMPLIANT", or "FAILED".
CheckRunStatus AuditCheckRunStatus
// The code of any error encountered when this check is performed during this
// audit. One of "INSUFFICIENT_PERMISSIONS" or "AUDIT_CHECK_DISABLED".
ErrorCode *string
// The message associated with any error encountered when this check is performed
// during this audit.
Message *string
// The number of resources that were found noncompliant during the check.
NonCompliantResourcesCount *int64
// Describes how many of the non-compliant resources created during the evaluation
// of an audit check were marked as suppressed.
SuppressedNonCompliantResourcesCount *int64
// The number of resources on which the check was performed.
TotalResourcesCount *int64
noSmithyDocumentSerde
}
// The findings (results) of the audit.
type AuditFinding struct {
// The audit check that generated this result.
CheckName *string
// A unique identifier for this set of audit findings. This identifier is used to
// apply mitigation tasks to one or more sets of findings.
FindingId *string
// The time the result (finding) was discovered.
FindingTime *time.Time
// Indicates whether the audit finding was suppressed or not during reporting.
IsSuppressed *bool
// The resource that was found to be noncompliant with the audit check.
NonCompliantResource *NonCompliantResource
// The reason the resource was noncompliant.
ReasonForNonCompliance *string
// A code that indicates the reason that the resource was noncompliant.
ReasonForNonComplianceCode *string
// The list of related resources.
RelatedResources []RelatedResource
// The severity of the result (finding).
Severity AuditFindingSeverity
// The ID of the audit that generated this result (finding).
TaskId *string
// The time the audit started.
TaskStartTime *time.Time
noSmithyDocumentSerde
}
// Returned by ListAuditMitigationActionsTask, this object contains information
// that describes a mitigation action that has been started.
type AuditMitigationActionExecutionMetadata struct {
// The unique identifier for the mitigation action being applied by the task.
ActionId *string
// The friendly name of the mitigation action being applied by the task.
ActionName *string
// The date and time when the task was completed or canceled. Blank if the task is
// still running.
EndTime *time.Time
// If an error occurred, the code that indicates which type of error occurred.
ErrorCode *string
// The unique identifier for the findings to which the task and associated
// mitigation action are applied.
FindingId *string
// If an error occurred, a message that describes the error.
Message *string
// The date and time when the task was started.
StartTime *time.Time
// The current status of the task being executed.
Status AuditMitigationActionsExecutionStatus
// The unique identifier for the task that applies the mitigation action.
TaskId *string
noSmithyDocumentSerde
}
// Information about an audit mitigation actions task that is returned by
// ListAuditMitigationActionsTasks .
type AuditMitigationActionsTaskMetadata struct {
// The time at which the audit mitigation actions task was started.
StartTime *time.Time
// The unique identifier for the task.
TaskId *string
// The current state of the audit mitigation actions task.
TaskStatus AuditMitigationActionsTaskStatus
noSmithyDocumentSerde
}
// Used in MitigationActionParams, this information identifies the target findings
// to which the mitigation actions are applied. Only one entry appears.
type AuditMitigationActionsTaskTarget struct {
// Specifies a filter in the form of an audit check and set of reason codes that
// identify the findings from the audit to which the audit mitigation actions task
// apply.
AuditCheckToReasonCodeFilter map[string][]string
// If the task will apply a mitigation action to findings from a specific audit,
// this value uniquely identifies the audit.
AuditTaskId *string
// If the task will apply a mitigation action to one or more listed findings, this
// value uniquely identifies those findings.
FindingIds []string
noSmithyDocumentSerde
}
// Information about the targets to which audit notifications are sent.
type AuditNotificationTarget struct {
// True if notifications to the target are enabled.
Enabled bool
// The ARN of the role that grants permission to send notifications to the target.
RoleArn *string
// The ARN of the target (SNS topic) to which audit notifications are sent.
TargetArn *string
noSmithyDocumentSerde
}
// Filters out specific findings of a Device Defender audit.
type AuditSuppression struct {
// An audit check name. Checks must be enabled for your account. (Use
// DescribeAccountAuditConfiguration to see the list of all checks, including those
// that are enabled or use UpdateAccountAuditConfiguration to select which checks
// are enabled.)
//
// This member is required.
CheckName *string
// Information that identifies the noncompliant resource.
//
// This member is required.
ResourceIdentifier *ResourceIdentifier
// The description of the audit suppression.
Description *string
// The expiration date (epoch timestamp in seconds) that you want the suppression
// to adhere to.
ExpirationDate *time.Time
// Indicates whether a suppression should exist indefinitely or not.
SuppressIndefinitely *bool
noSmithyDocumentSerde
}
// The audits that were performed.
type AuditTaskMetadata struct {
// The ID of this audit.
TaskId *string
// The status of this audit. One of "IN_PROGRESS", "COMPLETED", "FAILED", or
// "CANCELED".
TaskStatus AuditTaskStatus
// The type of this audit. One of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".
TaskType AuditTaskType
noSmithyDocumentSerde
}
// A collection of authorization information.
type AuthInfo struct {
// The resources for which the principal is being authorized to perform the
// specified action.
//
// This member is required.
Resources []string
// The type of action for which the principal is being authorized.
ActionType ActionType
noSmithyDocumentSerde
}
// An object that specifies the authorization service for a domain.
type AuthorizerConfig struct {
// A Boolean that specifies whether the domain configuration's authorization
// service can be overridden.
AllowAuthorizerOverride *bool
// The name of the authorization service for a domain configuration.
DefaultAuthorizerName *string
noSmithyDocumentSerde
}
// The authorizer description.
type AuthorizerDescription struct {
// The authorizer ARN.
AuthorizerArn *string
// The authorizer's Lambda function ARN.
AuthorizerFunctionArn *string
// The authorizer name.
AuthorizerName *string
// The UNIX timestamp of when the authorizer was created.
CreationDate *time.Time
// When true , the result from the authorizer’s Lambda function is cached for the
// time specified in refreshAfterInSeconds . The cached result is used while the
// device reuses the same HTTP connection.
EnableCachingForHttp *bool
// The UNIX timestamp of when the authorizer was last updated.
LastModifiedDate *time.Time
// Specifies whether IoT validates the token signature in an authorization request.
SigningDisabled *bool
// The status of the authorizer.
Status AuthorizerStatus
// The key used to extract the token from the HTTP headers.
TokenKeyName *string
// The public keys used to validate the token signature returned by your custom
// authentication service.
TokenSigningPublicKeys map[string]string
noSmithyDocumentSerde
}
// The authorizer summary.
type AuthorizerSummary struct {
// The authorizer ARN.
AuthorizerArn *string
// The authorizer name.
AuthorizerName *string
noSmithyDocumentSerde
}
// The authorizer result.
type AuthResult struct {
// The policies and statements that allowed the specified action.
Allowed *Allowed
// The final authorization decision of this scenario. Multiple statements are
// taken into account when determining the authorization decision. An explicit deny
// statement can override multiple allow statements.
AuthDecision AuthDecision
// Authorization information.
AuthInfo *AuthInfo
// The policies and statements that denied the specified action.
Denied *Denied
// Contains any missing context values found while evaluating policy.
MissingContextValues []string
noSmithyDocumentSerde
}
// The criteria that determine when and how a job abort takes place.
type AwsJobAbortConfig struct {
// The list of criteria that determine when and how to abort the job.
//
// This member is required.
AbortCriteriaList []AwsJobAbortCriteria
noSmithyDocumentSerde
}
// The criteria that determine when and how a job abort takes place.
type AwsJobAbortCriteria struct {
// The type of job action to take to initiate the job abort.
//
// This member is required.
Action AwsJobAbortCriteriaAbortAction
// The type of job execution failures that can initiate a job abort.
//
// This member is required.
FailureType AwsJobAbortCriteriaFailureType
// The minimum number of things which must receive job execution notifications
// before the job can be aborted.
//
// This member is required.
MinNumberOfExecutedThings *int32
// The minimum percentage of job execution failures that must occur to initiate
// the job abort. Amazon Web Services IoT Core supports up to two digits after the
// decimal (for example, 10.9 and 10.99, but not 10.999).
//
// This member is required.
ThresholdPercentage *float64
noSmithyDocumentSerde
}
// Configuration for the rollout of OTA updates.
type AwsJobExecutionsRolloutConfig struct {
// The rate of increase for a job rollout. This parameter allows you to define an
// exponential rate increase for a job rollout.
ExponentialRate *AwsJobExponentialRolloutRate
// The maximum number of OTA update job executions started per minute.
MaximumPerMinute *int32
noSmithyDocumentSerde
}
// The rate of increase for a job rollout. This parameter allows you to define an
// exponential rate increase for a job rollout.
type AwsJobExponentialRolloutRate struct {
// The minimum number of things that will be notified of a pending job, per
// minute, at the start of the job rollout. This is the initial rate of the
// rollout.
//
// This member is required.
BaseRatePerMinute *int32
// The rate of increase for a job rollout. The number of things notified is
// multiplied by this factor.
//
// This member is required.
IncrementFactor float64
// The criteria to initiate the increase in rate of rollout for a job. Amazon Web
// Services IoT Core supports up to one digit after the decimal (for example, 1.5,
// but not 1.55).
//
// This member is required.
RateIncreaseCriteria *AwsJobRateIncreaseCriteria
noSmithyDocumentSerde
}
// Configuration information for pre-signed URLs. Valid when protocols contains
// HTTP.
type AwsJobPresignedUrlConfig struct {
// How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600,
// the default value is 1800 seconds. Pre-signed URLs are generated when a request
// for the job document is received.
ExpiresInSec *int64
noSmithyDocumentSerde
}
// The criteria to initiate the increase in rate of rollout for a job.
type AwsJobRateIncreaseCriteria struct {
// When this number of things have been notified, it will initiate an increase in
// the rollout rate.
NumberOfNotifiedThings *int32
// When this number of things have succeeded in their job execution, it will
// initiate an increase in the rollout rate.
NumberOfSucceededThings *int32
noSmithyDocumentSerde
}
// Specifies the amount of time each device has to finish its execution of the
// job. A timer is started when the job execution status is set to IN_PROGRESS . If
// the job execution status is not set to another terminal state before the timer
// expires, it will be automatically set to TIMED_OUT .
type AwsJobTimeoutConfig struct {
// Specifies the amount of time, in minutes, this device has to finish execution
// of this job. The timeout interval can be anywhere between 1 minute and 7 days (1
// to 10080 minutes). The in progress timer can't be updated and will apply to all
// job executions for the job. Whenever a job execution remains in the IN_PROGRESS
// status for longer than this interval, the job execution will fail and switch to
// the terminal TIMED_OUT status.
InProgressTimeoutInMinutes *int64
noSmithyDocumentSerde
}
// A Device Defender security profile behavior.
type Behavior struct {
// The name you've given to the behavior.
//
// This member is required.
Name *string
// The criteria that determine if a device is behaving normally in regard to the
// metric .
Criteria *BehaviorCriteria
// What is measured by the behavior.
Metric *string
// The dimension for a metric in your behavior. For example, using a TOPIC_FILTER
// dimension, you can narrow down the scope of the metric to only MQTT topics where
// the name matches the pattern specified in the dimension. This can't be used with
// custom metrics.
MetricDimension *MetricDimension
// Suppresses alerts.
SuppressAlerts *bool
noSmithyDocumentSerde
}
// The criteria by which the behavior is determined to be normal.
type BehaviorCriteria struct {
// The operator that relates the thing measured ( metric ) to the criteria
// (containing a value or statisticalThreshold ). Valid operators include:
// - string-list : in-set and not-in-set
// - number-list : in-set and not-in-set
// - ip-address-list : in-cidr-set and not-in-cidr-set
// - number : less-than , less-than-equals , greater-than , and
// greater-than-equals
ComparisonOperator ComparisonOperator
// If a device is in violation of the behavior for the specified number of
// consecutive datapoints, an alarm occurs. If not specified, the default is 1.
ConsecutiveDatapointsToAlarm *int32
// If an alarm has occurred and the offending device is no longer in violation of
// the behavior for the specified number of consecutive datapoints, the alarm is
// cleared. If not specified, the default is 1.
ConsecutiveDatapointsToClear *int32
// Use this to specify the time duration over which the behavior is evaluated, for
// those criteria that have a time dimension (for example, NUM_MESSAGES_SENT ). For
// a statisticalThreshhold metric comparison, measurements from all devices are
// accumulated over this time duration before being used to calculate percentiles,
// and later, measurements from an individual device are also accumulated over this
// time duration before being given a percentile rank. Cannot be used with
// list-based metric datatypes.
DurationSeconds *int32
// The configuration of an ML Detect
MlDetectionConfig *MachineLearningDetectionConfig
// A statistical ranking (percentile)that indicates a threshold value by which a
// behavior is determined to be in compliance or in violation of the behavior.
StatisticalThreshold *StatisticalThreshold
// The value to be compared with the metric .
Value *MetricValue
noSmithyDocumentSerde
}
// The summary of an ML Detect behavior model.
type BehaviorModelTrainingSummary struct {
// The name of the behavior.
BehaviorName *string
// The percentage of datapoints collected.
DatapointsCollectionPercentage *float64
// The date the model was last refreshed.
LastModelRefreshDate *time.Time
// The status of the behavior model.
ModelStatus ModelStatus
// The name of the security profile.
SecurityProfileName *string
// The date a training model started collecting data.
TrainingDataCollectionStartDate *time.Time
noSmithyDocumentSerde
}
// Additional information about the billing group.
type BillingGroupMetadata struct {
// The date the billing group was created.
CreationDate *time.Time
noSmithyDocumentSerde
}
// The properties of a billing group.
type BillingGroupProperties struct {
// The description of the billing group.
BillingGroupDescription *string
noSmithyDocumentSerde
}
// A count of documents that meets a specific aggregation criteria.
type Bucket struct {
// The number of documents that have the value counted for the particular bucket.
Count int32
// The value counted for the particular bucket.
KeyValue *string
noSmithyDocumentSerde
}
// The type of bucketed aggregation performed.
type BucketsAggregationType struct {
// Performs an aggregation that will return a list of buckets. The list of buckets
// is a ranked list of the number of occurrences of an aggregation field value.
TermsAggregation *TermsAggregation
noSmithyDocumentSerde
}
// A CA certificate.
type CACertificate struct {
// The ARN of the CA certificate.
CertificateArn *string
// The ID of the CA certificate.
CertificateId *string
// The date the CA certificate was created.
CreationDate *time.Time
// The status of the CA certificate. The status value REGISTER_INACTIVE is
// deprecated and should not be used.
Status CACertificateStatus
noSmithyDocumentSerde
}
// Describes a CA certificate.
type CACertificateDescription struct {
// Whether the CA certificate configured for auto registration of device
// certificates. Valid values are "ENABLE" and "DISABLE"
AutoRegistrationStatus AutoRegistrationStatus
// The CA certificate ARN.
CertificateArn *string
// The CA certificate ID.
CertificateId *string
// The mode of the CA. All the device certificates that are registered using this
// CA will be registered in the same mode as the CA. For more information about
// certificate mode for device certificates, see certificate mode (https://docs.aws.amazon.com/iot/latest/apireference/API_CertificateDescription.html#iot-Type-CertificateDescription-certificateMode)
// .
CertificateMode CertificateMode
// The CA certificate data, in PEM format.
CertificatePem *string
// The date the CA certificate was created.
CreationDate *time.Time
// The customer version of the CA certificate.
CustomerVersion *int32
// The generation ID of the CA certificate.
GenerationId *string
// The date the CA certificate was last modified.
LastModifiedDate *time.Time
// The owner of the CA certificate.
OwnedBy *string
// The status of a CA certificate.
Status CACertificateStatus
// When the CA certificate is valid.
Validity *CertificateValidity
noSmithyDocumentSerde
}
// Information about a certificate.
type Certificate struct {
// The ARN of the certificate.
CertificateArn *string
// The ID of the certificate. (The last part of the certificate ARN contains the
// certificate ID.)
CertificateId *string
// The mode of the certificate. DEFAULT : A certificate in DEFAULT mode is either
// generated by Amazon Web Services IoT Core or registered with an issuer
// certificate authority (CA) in DEFAULT mode. Devices with certificates in DEFAULT
// mode aren't required to send the Server Name Indication (SNI) extension when
// connecting to Amazon Web Services IoT Core. However, to use features such as
// custom domains and VPC endpoints, we recommend that you use the SNI extension
// when connecting to Amazon Web Services IoT Core. SNI_ONLY : A certificate in
// SNI_ONLY mode is registered without an issuer CA. Devices with certificates in
// SNI_ONLY mode must send the SNI extension when connecting to Amazon Web Services
// IoT Core.
CertificateMode CertificateMode
// The date and time the certificate was created.
CreationDate *time.Time
// The status of the certificate. The status value REGISTER_INACTIVE is deprecated
// and should not be used.
Status CertificateStatus
noSmithyDocumentSerde
}
// Describes a certificate.
type CertificateDescription struct {
// The certificate ID of the CA certificate used to sign this certificate.
CaCertificateId *string
// The ARN of the certificate.
CertificateArn *string
// The ID of the certificate.
CertificateId *string
// The mode of the certificate. DEFAULT : A certificate in DEFAULT mode is either
// generated by Amazon Web Services IoT Core or registered with an issuer
// certificate authority (CA) in DEFAULT mode. Devices with certificates in DEFAULT
// mode aren't required to send the Server Name Indication (SNI) extension when
// connecting to Amazon Web Services IoT Core. However, to use features such as
// custom domains and VPC endpoints, we recommend that you use the SNI extension
// when connecting to Amazon Web Services IoT Core. SNI_ONLY : A certificate in
// SNI_ONLY mode is registered without an issuer CA. Devices with certificates in
// SNI_ONLY mode must send the SNI extension when connecting to Amazon Web Services
// IoT Core. For more information about the value for SNI extension, see Transport
// security in IoT (https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html)
// .
CertificateMode CertificateMode
// The certificate data, in PEM format.
CertificatePem *string
// The date and time the certificate was created.
CreationDate *time.Time
// The customer version of the certificate.
CustomerVersion *int32
// The generation ID of the certificate.
GenerationId *string
// The date and time the certificate was last modified.
LastModifiedDate *time.Time
// The ID of the Amazon Web Services account that owns the certificate.
OwnedBy *string
// The ID of the Amazon Web Services account of the previous owner of the
// certificate.
PreviousOwnedBy *string
// The status of the certificate.
Status CertificateStatus
// The transfer data.
TransferData *TransferData
// When the certificate is valid.
Validity *CertificateValidity
noSmithyDocumentSerde
}
// When the certificate is valid.
type CertificateValidity struct {
// The certificate is not valid after this date.
NotAfter *time.Time
// The certificate is not valid before this date.
NotBefore *time.Time
noSmithyDocumentSerde
}
// Describes an action that updates a CloudWatch alarm.
type CloudwatchAlarmAction struct {
// The CloudWatch alarm name.
//
// This member is required.
AlarmName *string
// The IAM role that allows access to the CloudWatch alarm.
//
// This member is required.
RoleArn *string
// The reason for the alarm change.
//
// This member is required.
StateReason *string
// The value of the alarm state. Acceptable values are: OK, ALARM,
// INSUFFICIENT_DATA.
//
// This member is required.
StateValue *string
noSmithyDocumentSerde
}
// Describes an action that sends data to CloudWatch Logs.
type CloudwatchLogsAction struct {
// The CloudWatch log group to which the action sends data.
//
// This member is required.
LogGroupName *string
// The IAM role that allows access to the CloudWatch log.
//
// This member is required.
RoleArn *string
// Indicates whether batches of log records will be extracted and uploaded into
// CloudWatch. Values include true or false (default).
BatchMode *bool
noSmithyDocumentSerde
}
// Describes an action that captures a CloudWatch metric.
type CloudwatchMetricAction struct {
// The CloudWatch metric name.
//
// This member is required.
MetricName *string
// The CloudWatch metric namespace name.
//
// This member is required.
MetricNamespace *string
// The metric unit (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Unit)
// supported by CloudWatch.
//
// This member is required.
MetricUnit *string
// The CloudWatch metric value.
//
// This member is required.
MetricValue *string
// The IAM role that allows access to the CloudWatch metric.
//
// This member is required.
RoleArn *string
// An optional Unix timestamp (https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp)
// .
MetricTimestamp *string
noSmithyDocumentSerde
}
// Describes the method to use when code signing a file.
type CodeSigning struct {
// The ID of the AWSSignerJob which was created to sign the file.
AwsSignerJobId *string
// A custom method for code signing a file.
CustomCodeSigning *CustomCodeSigning
// Describes the code-signing job.
StartSigningJobParameter *StartSigningJobParameter
noSmithyDocumentSerde
}
// Describes the certificate chain being used when code signing a file.
type CodeSigningCertificateChain struct {
// The name of the certificate.
CertificateName *string
// A base64 encoded binary representation of the code signing certificate chain.
InlineDocument *string
noSmithyDocumentSerde
}
// Describes the signature for a file.
type CodeSigningSignature struct {
// A base64 encoded binary representation of the code signing signature.
InlineDocument []byte
noSmithyDocumentSerde
}
// Configuration.
type Configuration struct {
// True to enable the configuration.
Enabled bool
noSmithyDocumentSerde
}
// Describes a custom method used to code sign a file.
type CustomCodeSigning struct {
// The certificate chain.
CertificateChain *CodeSigningCertificateChain
// The hash algorithm used to code sign the file. You can use a string as the
// algorithm name if the target over-the-air (OTA) update devices are able to
// verify the signature that was generated using the same signature algorithm. For
// example, FreeRTOS uses SHA256 or SHA1 , so you can pass either of them based on
// which was used for generating the signature.
HashAlgorithm *string
// The signature for the file.
Signature *CodeSigningSignature
// The signature algorithm used to code sign the file. You can use a string as the
// algorithm name if the target over-the-air (OTA) update devices are able to
// verify the signature that was generated using the same signature algorithm. For
// example, FreeRTOS uses ECDSA or RSA , so you can pass either of them based on
// which was used for generating the signature.
SignatureAlgorithm *string
noSmithyDocumentSerde
}
// Contains information that denied the authorization.
type Denied struct {
// Information that explicitly denies the authorization.
ExplicitDeny *ExplicitDeny
// Information that implicitly denies the authorization. When a policy doesn't
// explicitly deny or allow an action on a resource it is considered an implicit
// deny.
ImplicitDeny *ImplicitDeny
noSmithyDocumentSerde
}
// Describes the location of the updated firmware.
type Destination struct {
// Describes the location in S3 of the updated firmware.
S3Destination *S3Destination
noSmithyDocumentSerde
}
// Describes which mitigation actions should be executed.
type DetectMitigationActionExecution struct {
// The friendly name that uniquely identifies the mitigation action.
ActionName *string
// The error code of a mitigation action.
ErrorCode *string
// The date a mitigation action ended.
ExecutionEndDate *time.Time
// The date a mitigation action was started.
ExecutionStartDate *time.Time
// The message of a mitigation action.
Message *string
// The status of a mitigation action.
Status DetectMitigationActionExecutionStatus
// The unique identifier of the task.
TaskId *string
// The name of the thing.
ThingName *string
// The unique identifier of the violation.
ViolationId *string
noSmithyDocumentSerde
}
// The statistics of a mitigation action task.
type DetectMitigationActionsTaskStatistics struct {
// The actions that were performed.
ActionsExecuted *int64
// The actions that failed.
ActionsFailed *int64
// The actions that were skipped.
ActionsSkipped *int64
noSmithyDocumentSerde
}
// The summary of the mitigation action tasks.
type DetectMitigationActionsTaskSummary struct {
// The definition of the actions.
ActionsDefinition []MitigationAction
// Includes only active violations.
OnlyActiveViolationsIncluded bool
// Includes suppressed alerts.
SuppressedAlertsIncluded bool
// Specifies the ML Detect findings to which the mitigation actions are applied.
Target *DetectMitigationActionsTaskTarget
// The date the task ended.
TaskEndTime *time.Time
// The unique identifier of the task.
TaskId *string
// The date the task started.
TaskStartTime *time.Time
// The statistics of a mitigation action task.
TaskStatistics *DetectMitigationActionsTaskStatistics
// The status of the task.
TaskStatus DetectMitigationActionsTaskStatus
// Specifies the time period of which violation events occurred between.
ViolationEventOccurrenceRange *ViolationEventOccurrenceRange
noSmithyDocumentSerde
}
// The target of a mitigation action task.
type DetectMitigationActionsTaskTarget struct {
// The name of the behavior.
BehaviorName *string
// The name of the security profile.
SecurityProfileName *string
// The unique identifiers of the violations.
ViolationIds []string
noSmithyDocumentSerde
}
// A map of key-value pairs containing the patterns that need to be replaced in a
// managed template job document schema. You can use the description of each key as
// a guidance to specify the inputs during runtime when creating a job.
// documentParameters can only be used when creating jobs from Amazon Web Services
// managed templates. This parameter can't be used with custom job templates or to
// create jobs from them.
type DocumentParameter struct {
// Description of the map field containing the patterns that need to be replaced
// in a managed template job document schema.
Description *string
// An example illustrating a pattern that need to be replaced in a managed
// template job document schema.
Example *string
// Key of the map field containing the patterns that need to be replaced in a
// managed template job document schema.
Key *string
// Specifies whether a pattern that needs to be replaced in a managed template job
// document schema is optional or required.
Optional bool
// A regular expression of the patterns that need to be replaced in a managed
// template job document schema.
Regex *string
noSmithyDocumentSerde
}
// The summary of a domain configuration. A domain configuration specifies custom
// IoT-specific information about a domain. A domain configuration can be
// associated with an Amazon Web Services-managed domain (for example,
// dbc123defghijk.iot.us-west-2.amazonaws.com), a customer managed domain, or a
// default endpoint.
// - Data
// - Jobs
// - CredentialProvider
type DomainConfigurationSummary struct {
// The ARN of the domain configuration.
DomainConfigurationArn *string
// The name of the domain configuration. This value must be unique to a region.
DomainConfigurationName *string
// The type of service delivered by the endpoint.
ServiceType ServiceType
noSmithyDocumentSerde
}
// Describes an action to write to a DynamoDB table. The tableName , hashKeyField ,
// and rangeKeyField values must match the values used when you created the table.
// The hashKeyValue and rangeKeyvalue fields use a substitution template syntax.
// These templates provide data at runtime. The syntax is as follows:
// ${sql-expression}. You can specify any valid expression in a WHERE or SELECT
// clause, including JSON properties, comparisons, calculations, and functions. For
// example, the following field uses the third level of the topic: "hashKeyValue":
// "${topic(3)}" The following field uses the timestamp: "rangeKeyValue":
// "${timestamp()}"
type DynamoDBAction struct {
// The hash key name.
//
// This member is required.
HashKeyField *string
// The hash key value.
//
// This member is required.
HashKeyValue *string
// The ARN of the IAM role that grants access to the DynamoDB table.
//
// This member is required.
RoleArn *string
// The name of the DynamoDB table.
//
// This member is required.
TableName *string
// The hash key type. Valid values are "STRING" or "NUMBER"
HashKeyType DynamoKeyType
// The type of operation to be performed. This follows the substitution template,
// so it can be ${operation} , but the substitution must result in one of the
// following: INSERT , UPDATE , or DELETE .
Operation *string
// The action payload. This name can be customized.
PayloadField *string
// The range key name.
RangeKeyField *string
// The range key type. Valid values are "STRING" or "NUMBER"
RangeKeyType DynamoKeyType
// The range key value.
RangeKeyValue *string
noSmithyDocumentSerde
}
// Describes an action to write to a DynamoDB table. This DynamoDB action writes
// each attribute in the message payload into it's own column in the DynamoDB
// table.
type DynamoDBv2Action struct {
// Specifies the DynamoDB table to which the message data will be written. For
// example: { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": {
// "tableName": "my-table" } } } Each attribute in the message payload will be
// written to a separate column in the DynamoDB database.
//
// This member is required.
PutItem *PutItemInput
// The ARN of the IAM role that grants access to the DynamoDB table.
//
// This member is required.
RoleArn *string
noSmithyDocumentSerde
}
// The policy that has the effect on the authorization results.
type EffectivePolicy struct {
// The policy ARN.
PolicyArn *string
// The IAM policy document.
PolicyDocument *string
// The policy name.
PolicyName *string
noSmithyDocumentSerde
}
// Describes an action that writes data to an Amazon OpenSearch Service domain.
// The Elasticsearch action can only be used by existing rule actions. To create a
// new rule action or to update an existing rule action, use the OpenSearch rule
// action instead. For more information, see OpenSearchAction (https://docs.aws.amazon.com/iot/latest/apireference/API_OpenSearchAction.html)
// .
type ElasticsearchAction struct {
// The endpoint of your OpenSearch domain.
//
// This member is required.
Endpoint *string
// The unique identifier for the document you are storing.
//
// This member is required.
Id *string
// The index where you want to store your data.
//
// This member is required.
Index *string
// The IAM role ARN that has access to OpenSearch.
//
// This member is required.
RoleArn *string
// The type of document you are storing.
//
// This member is required.
Type *string
noSmithyDocumentSerde
}
// Parameters used when defining a mitigation action that enable Amazon Web
// Services IoT Core logging.
type EnableIoTLoggingParams struct {
// Specifies the type of information to be logged.
//
// This member is required.
LogLevel LogLevel
// The Amazon Resource Name (ARN) of the IAM role used for logging.
//
// This member is required.
RoleArnForLogging *string
noSmithyDocumentSerde
}
// Error information.
type ErrorInfo struct {
// The error code.
Code *string
// The error message.
Message *string
noSmithyDocumentSerde
}
// Information that explicitly denies authorization.
type ExplicitDeny struct {
// The policies that denied the authorization.
Policies []Policy
noSmithyDocumentSerde
}
// Allows you to create an exponential rate of rollout for a job.
type ExponentialRolloutRate struct {
// The minimum number of things that will be notified of a pending job, per minute
// at the start of job rollout. This parameter allows you to define the initial
// rate of rollout.
//
// This member is required.
BaseRatePerMinute *int32
// The exponential factor to increase the rate of rollout for a job. Amazon Web
// Services IoT Core supports up to one digit after the decimal (for example, 1.5,
// but not 1.55).
//
// This member is required.
IncrementFactor float64
// The criteria to initiate the increase in rate of rollout for a job.
//
// This member is required.
RateIncreaseCriteria *RateIncreaseCriteria
noSmithyDocumentSerde
}
// Describes the name and data type at a field.
type Field struct {
// The name of the field.
Name *string
// The data type of the field.
Type FieldType
noSmithyDocumentSerde
}
// The location of the OTA update.
type FileLocation struct {
// The location of the updated firmware in S3.
S3Location *S3Location
// The stream that contains the OTA update.
Stream *Stream
noSmithyDocumentSerde
}
// Describes an action that writes data to an Amazon Kinesis Firehose stream.
type FirehoseAction struct {
// The delivery stream name.
//
// This member is required.
DeliveryStreamName *string
// The IAM role that grants access to the Amazon Kinesis Firehose stream.
//
// This member is required.
RoleArn *string
// Whether to deliver the Kinesis Data Firehose stream as a batch by using
// PutRecordBatch (https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html)
// . The default value is false . When batchMode is true and the rule's SQL
// statement evaluates to an Array, each Array element forms one record in the
// PutRecordBatch (https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html)
// request. The resulting array can't have more than 500 records.
BatchMode *bool
// A character separator that will be used to separate records written to the
// Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows
// newline), ',' (comma).
Separator *string
noSmithyDocumentSerde
}
// The name and ARN of a fleet metric.
type FleetMetricNameAndArn struct {
// The fleet metric ARN.
MetricArn *string
// The fleet metric name.
MetricName *string
noSmithyDocumentSerde
}
// The name and ARN of a group.
type GroupNameAndArn struct {
// The group ARN.
GroupArn *string
// The group name.
GroupName *string
noSmithyDocumentSerde
}
// Send data to an HTTPS endpoint.
type HttpAction struct {
// The endpoint URL. If substitution templates are used in the URL, you must also
// specify a confirmationUrl . If this is a new destination, a new
// TopicRuleDestination is created if possible.
//
// This member is required.
Url *string
// The authentication method to use when sending data to an HTTPS endpoint.
Auth *HttpAuthorization
// The URL to which IoT sends a confirmation message. The value of the
// confirmation URL must be a prefix of the endpoint URL. If you do not specify a
// confirmation URL IoT uses the endpoint URL as the confirmation URL. If you use
// substitution templates in the confirmationUrl, you must create and enable topic
// rule destinations that match each possible value of the substitution template
// before traffic is allowed to your endpoint URL.
ConfirmationUrl *string
// The HTTP headers to send with the message data.
Headers []HttpActionHeader
noSmithyDocumentSerde
}
// The HTTP action header.
type HttpActionHeader struct {
// The HTTP header key.
//
// This member is required.
Key *string
// The HTTP header value. Substitution templates are supported.
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// The authorization method used to send messages.
type HttpAuthorization struct {
// Use Sig V4 authorization. For more information, see Signature Version 4 Signing
// Process (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
// .
Sigv4 *SigV4Authorization
noSmithyDocumentSerde
}
// Specifies the HTTP context to use for the test authorizer request.
type HttpContext struct {
// The header keys and values in an HTTP authorization request.
Headers map[string]string
// The query string keys and values in an HTTP authorization request.
QueryString *string
noSmithyDocumentSerde
}
// HTTP URL destination configuration used by the topic rule's HTTP action.
type HttpUrlDestinationConfiguration struct {
// The URL IoT uses to confirm ownership of or access to the topic rule
// destination URL.
//
// This member is required.
ConfirmationUrl *string
noSmithyDocumentSerde
}
// HTTP URL destination properties.
type HttpUrlDestinationProperties struct {
// The URL used to confirm the HTTP topic rule destination URL.
ConfirmationUrl *string
noSmithyDocumentSerde
}
// Information about an HTTP URL destination.
type HttpUrlDestinationSummary struct {
// The URL used to confirm ownership of or access to the HTTP topic rule
// destination URL.
ConfirmationUrl *string
noSmithyDocumentSerde
}
// Information that implicitly denies authorization. When policy doesn't
// explicitly deny or allow an action on a resource it is considered an implicit
// deny.
type ImplicitDeny struct {
// Policies that don't contain a matching allow or deny statement for the
// specified action on the specified resource.
Policies []Policy
noSmithyDocumentSerde
}
// Provides additional filters for specific data sources. Named shadow is the only
// data source that currently supports and requires a filter. To add named shadows
// to your fleet indexing configuration, set namedShadowIndexingMode to be ON and
// specify your shadow names in filter .
type IndexingFilter struct {
// The shadow names that you select to index. The default maximum number of shadow
// names for indexing is 10. To increase the limit, see Amazon Web Services IoT
// Device Management Quotas (https://docs.aws.amazon.com/general/latest/gr/iot_device_management.html#fleet-indexing-limits)
// in the Amazon Web Services General Reference.
NamedShadowNames []string
noSmithyDocumentSerde
}
// Sends message data to an IoT Analytics channel.
type IotAnalyticsAction struct {
// Whether to process the action as a batch. The default value is false . When
// batchMode is true and the rule SQL statement evaluates to an Array, each Array
// element is delivered as a separate message when passed by BatchPutMessage (https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html)
// to the IoT Analytics channel. The resulting array can't have more than 100
// messages.
BatchMode *bool
// (deprecated) The ARN of the IoT Analytics channel to which message data will be
// sent.
ChannelArn *string
// The name of the IoT Analytics channel to which message data will be sent.
ChannelName *string
// The ARN of the role which has a policy that grants IoT Analytics permission to
// send message data via IoT Analytics (iotanalytics:BatchPutMessage).
RoleArn *string
noSmithyDocumentSerde
}
// Sends an input to an IoT Events detector.
type IotEventsAction struct {
// The name of the IoT Events input.
//
// This member is required.
InputName *string
// The ARN of the role that grants IoT permission to send an input to an IoT
// Events detector. ("Action":"iotevents:BatchPutMessage").
//
// This member is required.
RoleArn *string
// Whether to process the event actions as a batch. The default value is false .
// When batchMode is true , you can't specify a messageId . When batchMode is true
// and the rule SQL statement evaluates to an Array, each Array element is treated
// as a separate message when it's sent to IoT Events by calling BatchPutMessage (https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html)
// . The resulting array can't have more than 10 messages.
BatchMode *bool
// The ID of the message. The default messageId is a new UUID value. When batchMode
// is true , you can't specify a messageId --a new UUID value will be assigned.
// Assign a value to this property to ensure that only one input (message) with a
// given messageId will be processed by an IoT Events detector.
MessageId *string
noSmithyDocumentSerde
}
// Describes an action to send data from an MQTT message that triggered the rule
// to IoT SiteWise asset properties.
type IotSiteWiseAction struct {
// A list of asset property value entries.
//
// This member is required.
PutAssetPropertyValueEntries []PutAssetPropertyValueEntry
// The ARN of the role that grants IoT permission to send an asset property value
// to IoT SiteWise. ( "Action": "iotsitewise:BatchPutAssetPropertyValue" ). The
// trust policy can restrict access to specific asset hierarchy paths.
//
// This member is required.
RoleArn *string
noSmithyDocumentSerde
}
// The certificate issuer indentifier.
type IssuerCertificateIdentifier struct {
// The issuer certificate serial number.
IssuerCertificateSerialNumber *string
// The subject of the issuer certificate.
IssuerCertificateSubject *string
// The issuer ID.
IssuerId *string
noSmithyDocumentSerde
}
// The Job object contains details about a job.
type Job struct {
// Configuration for criteria to abort the job.
AbortConfig *AbortConfig
// If the job was updated, describes the reason for the update.
Comment *string
// The time, in seconds since the epoch, when the job was completed.
CompletedAt *time.Time
// The time, in seconds since the epoch, when the job was created.
CreatedAt *time.Time
// A short text description of the job.
Description *string
// The package version Amazon Resource Names (ARNs) that are installed on the
// device when the job successfully completes. Note:The following Length
// Constraints relates to a single string. Up to five strings are allowed.
DestinationPackageVersions []string
// A key-value map that pairs the patterns that need to be replaced in a managed
// template job document schema. You can use the description of each key as a
// guidance to specify the inputs during runtime when creating a job.
// documentParameters can only be used when creating jobs from Amazon Web Services
// managed templates. This parameter can't be used with custom job templates or to
// create jobs from them.
DocumentParameters map[string]string
// Will be true if the job was canceled with the optional force parameter set to
// true .
ForceCanceled *bool
// Indicates whether a job is concurrent. Will be true when a job is rolling out
// new job executions or canceling previously created executions, otherwise false.
IsConcurrent *bool
// An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".
JobArn *string
// The configuration for the criteria to retry the job.
JobExecutionsRetryConfig *JobExecutionsRetryConfig
// Allows you to create a staged rollout of a job.
JobExecutionsRolloutConfig *JobExecutionsRolloutConfig
// The unique identifier you assigned to this job when it was created.
JobId *string
// Details about the job process.
JobProcessDetails *JobProcessDetails
// The ARN of the job template used to create the job.
JobTemplateArn *string
// The time, in seconds since the epoch, when the job was last updated.
LastUpdatedAt *time.Time
// The namespace used to indicate that a job is a customer-managed job. When you
// specify a value for this parameter, Amazon Web Services IoT Core sends jobs
// notifications to MQTT topics that contain the value in the following format.
// $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ The
// namespaceId feature is in public preview.
NamespaceId *string
// Configuration for pre-signed S3 URLs.
PresignedUrlConfig *PresignedUrlConfig
// If the job was updated, provides the reason code for the update.
ReasonCode *string
// Displays the next seven maintenance window occurrences and their start times.
ScheduledJobRollouts []ScheduledJobRollout
// The configuration that allows you to schedule a job for a future date and time
// in addition to specifying the end behavior for each job execution.
SchedulingConfig *SchedulingConfig
// The status of the job, one of IN_PROGRESS , CANCELED , DELETION_IN_PROGRESS or
// COMPLETED .
Status JobStatus
// Specifies whether the job will continue to run (CONTINUOUS), or will be
// complete after all those things specified as targets have completed the job
// (SNAPSHOT). If continuous, the job may also be run on a thing when a change is
// detected in a target. For example, a job will run on a device when the thing
// representing the device is added to a target group, even after the job was
// completed by all things originally in the group. We recommend that you use
// continuous jobs instead of snapshot jobs for dynamic thing group targets. By
// using continuous jobs, devices that join the group receive the job execution
// even after the job has been created.
TargetSelection TargetSelection
// A list of IoT things and thing groups to which the job should be sent.
Targets []string
// Specifies the amount of time each device has to finish its execution of the
// job. A timer is started when the job execution status is set to IN_PROGRESS . If
// the job execution status is not set to another terminal state before the timer
// expires, it will be automatically set to TIMED_OUT .
TimeoutConfig *TimeoutConfig
noSmithyDocumentSerde
}
// The job execution object represents the execution of a job on a particular
// device.
type JobExecution struct {
// The estimated number of seconds that remain before the job execution status
// will be changed to TIMED_OUT . The timeout interval can be anywhere between 1
// minute and 7 days (1 to 10080 minutes). The actual job execution timeout can
// occur up to 60 seconds later than the estimated duration. This value will not be
// included if the job execution has reached a terminal status.
ApproximateSecondsBeforeTimedOut *int64
// A string (consisting of the digits "0" through "9") which identifies this
// particular job execution on this particular device. It can be used in commands
// which return or update job execution information.
ExecutionNumber *int64
// Will be true if the job execution was canceled with the optional force
// parameter set to true .
ForceCanceled *bool
// The unique identifier you assigned to the job when it was created.
JobId *string
// The time, in seconds since the epoch, when the job execution was last updated.
LastUpdatedAt *time.Time
// The time, in seconds since the epoch, when the job execution was queued.
QueuedAt *time.Time
// The time, in seconds since the epoch, when the job execution started.
StartedAt *time.Time
// The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED,
// TIMED_OUT, CANCELED, or REJECTED).
Status JobExecutionStatus
// A collection of name/value pairs that describe the status of the job execution.
StatusDetails *JobExecutionStatusDetails
// The ARN of the thing on which the job execution is running.
ThingArn *string
// The version of the job execution. Job execution versions are incremented each
// time they are updated by a device.
VersionNumber int64
noSmithyDocumentSerde
}
// The configuration that determines how many retries are allowed for each failure
// type for a job.
type JobExecutionsRetryConfig struct {
// The list of criteria that determines how many retries are allowed for each
// failure type for a job.
//
// This member is required.
CriteriaList []RetryCriteria
noSmithyDocumentSerde
}
// Allows you to create a staged rollout of a job.
type JobExecutionsRolloutConfig struct {
// The rate of increase for a job rollout. This parameter allows you to define an
// exponential rate for a job rollout.
ExponentialRate *ExponentialRolloutRate
// The maximum number of things that will be notified of a pending job, per
// minute. This parameter allows you to create a staged rollout.
MaximumPerMinute *int32
noSmithyDocumentSerde
}
// Details of the job execution status.
type JobExecutionStatusDetails struct {
// The job execution status.
DetailsMap map[string]string
noSmithyDocumentSerde
}
// The job execution summary.
type JobExecutionSummary struct {
// A string (consisting of the digits "0" through "9") which identifies this
// particular job execution on this particular device. It can be used later in
// commands which return or update job execution information.
ExecutionNumber *int64
// The time, in seconds since the epoch, when the job execution was last updated.
LastUpdatedAt *time.Time
// The time, in seconds since the epoch, when the job execution was queued.
QueuedAt *time.Time
// The number that indicates how many retry attempts have been completed for this
// job on this device.
RetryAttempt *int32
// The time, in seconds since the epoch, when the job execution started.
StartedAt *time.Time
// The status of the job execution.
Status JobExecutionStatus
noSmithyDocumentSerde
}
// Contains a summary of information about job executions for a specific job.
type JobExecutionSummaryForJob struct {
// Contains a subset of information about a job execution.
JobExecutionSummary *JobExecutionSummary
// The ARN of the thing on which the job execution is running.
ThingArn *string
noSmithyDocumentSerde
}
// The job execution summary for a thing.
type JobExecutionSummaryForThing struct {
// Contains a subset of information about a job execution.
JobExecutionSummary *JobExecutionSummary
// The unique identifier you assigned to this job when it was created.
JobId *string
noSmithyDocumentSerde
}
// The job process details.
type JobProcessDetails struct {
// The number of things that cancelled the job.
NumberOfCanceledThings *int32
// The number of things that failed executing the job.
NumberOfFailedThings *int32
// The number of things currently executing the job.
NumberOfInProgressThings *int32
// The number of things that are awaiting execution of the job.
NumberOfQueuedThings *int32
// The number of things that rejected the job.
NumberOfRejectedThings *int32
// The number of things that are no longer scheduled to execute the job because
// they have been deleted or have been removed from the group that was a target of
// the job.
NumberOfRemovedThings *int32
// The number of things which successfully completed the job.
NumberOfSucceededThings *int32
// The number of things whose job execution status is TIMED_OUT .
NumberOfTimedOutThings *int32
// The target devices to which the job execution is being rolled out. This value
// will be null after the job execution has finished rolling out to all the target
// devices.
ProcessingTargets []string
noSmithyDocumentSerde
}
// The job summary.
type JobSummary struct {
// The time, in seconds since the epoch, when the job completed.
CompletedAt *time.Time
// The time, in seconds since the epoch, when the job was created.
CreatedAt *time.Time
// Indicates whether a job is concurrent. Will be true when a job is rolling out
// new job executions or canceling previously created executions, otherwise false.
IsConcurrent *bool
// The job ARN.
JobArn *string
// The unique identifier you assigned to this job when it was created.
JobId *string
// The time, in seconds since the epoch, when the job was last updated.
LastUpdatedAt *time.Time
// The job summary status.
Status JobStatus
// Specifies whether the job will continue to run (CONTINUOUS), or will be
// complete after all those things specified as targets have completed the job
// (SNAPSHOT). If continuous, the job may also be run on a thing when a change is
// detected in a target. For example, a job will run on a thing when the thing is
// added to a target group, even after the job was completed by all things
// originally in the group. We recommend that you use continuous jobs instead of
// snapshot jobs for dynamic thing group targets. By using continuous jobs, devices
// that join the group receive the job execution even after the job has been
// created.
TargetSelection TargetSelection
// The ID of the thing group.
ThingGroupId *string
noSmithyDocumentSerde
}
// An object that contains information about the job template.
type JobTemplateSummary struct {
// The time, in seconds since the epoch, when the job template was created.
CreatedAt *time.Time
// A description of the job template.
Description *string
// The ARN of the job template.
JobTemplateArn *string
// The unique identifier of the job template.
JobTemplateId *string
noSmithyDocumentSerde
}
// Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or
// self-managed Apache Kafka cluster.
type KafkaAction struct {
// Properties of the Apache Kafka producer client.
//
// This member is required.
ClientProperties map[string]string
// The ARN of Kafka action's VPC TopicRuleDestination .
//
// This member is required.
DestinationArn *string
// The Kafka topic for messages to be sent to the Kafka broker.
//
// This member is required.
Topic *string
// The Kafka message key.
Key *string
// The Kafka message partition.
Partition *string
noSmithyDocumentSerde
}
// Describes a key pair.
type KeyPair struct {
// The private key.
PrivateKey *string
// The public key.
PublicKey *string
noSmithyDocumentSerde
}
// Describes an action to write data to an Amazon Kinesis stream.
type KinesisAction struct {
// The ARN of the IAM role that grants access to the Amazon Kinesis stream.
//
// This member is required.
RoleArn *string
// The name of the Amazon Kinesis stream.
//
// This member is required.
StreamName *string
// The partition key.
PartitionKey *string
noSmithyDocumentSerde
}
// Describes an action to invoke a Lambda function.
type LambdaAction struct {
// The ARN of the Lambda function.
//
// This member is required.
FunctionArn *string
noSmithyDocumentSerde
}
// The Amazon Location rule action sends device location updates from an MQTT
// message to an Amazon Location tracker resource.
type LocationAction struct {
// The unique ID of the device providing the location data.
//
// This member is required.
DeviceId *string
// A string that evaluates to a double value that represents the latitude of the
// device's location.
//
// This member is required.
Latitude *string
// A string that evaluates to a double value that represents the longitude of the
// device's location.
//
// This member is required.
Longitude *string
// The IAM role that grants permission to write to the Amazon Location resource.
//
// This member is required.
RoleArn *string
// The name of the tracker resource in Amazon Location in which the location is
// updated.
//
// This member is required.
TrackerName *string
// The time that the location data was sampled. The default value is the time the
// MQTT message was processed.
Timestamp *LocationTimestamp
noSmithyDocumentSerde
}
// Describes how to interpret an application-defined timestamp value from an MQTT
// message payload and the precision of that value.
type LocationTimestamp struct {
// An expression that returns a long epoch time value.
//
// This member is required.
Value *string
// The precision of the timestamp value that results from the expression described
// in value . Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS .
// The default is MILLISECONDS .
Unit *string
noSmithyDocumentSerde
}
// Describes the logging options payload.
type LoggingOptionsPayload struct {
// The ARN of the IAM role that grants access.
//
// This member is required.
RoleArn *string
// The log level.
LogLevel LogLevel
noSmithyDocumentSerde
}
// A log target.
type LogTarget struct {
// The target type.
//
// This member is required.
TargetType LogTargetType
// The target name.
TargetName *string
noSmithyDocumentSerde
}
// The target configuration.
type LogTargetConfiguration struct {
// The logging level.
LogLevel LogLevel
// A log target
LogTarget *LogTarget
noSmithyDocumentSerde
}
// The configuration of an ML Detect Security Profile.
type MachineLearningDetectionConfig struct {
// The sensitivity of anomalous behavior evaluation. Can be Low , Medium , or High .
//
// This member is required.
ConfidenceLevel ConfidenceLevel
noSmithyDocumentSerde
}
// An optional configuration within the SchedulingConfig to setup a recurring
// maintenance window with a predetermined start time and duration for the rollout
// of a job document to all devices in a target group for a job.
type MaintenanceWindow struct {
// Displays the duration of the next maintenance window.
//
// This member is required.
DurationInMinutes *int32
// Displays the start time of the next maintenance window.
//
// This member is required.
StartTime *string
noSmithyDocumentSerde
}
// An object that contains information about the managed template.
type ManagedJobTemplateSummary struct {
// The description for a managed template.
Description *string
// A list of environments that are supported with the managed job template.
Environments []string
// The Amazon Resource Name (ARN) for a managed template.
TemplateArn *string
// The unique Name for a managed template.
TemplateName *string
// The version for a managed template.
TemplateVersion *string
noSmithyDocumentSerde
}
// A metric.
type MetricDatum struct {
// The time the metric value was reported.
Timestamp *time.Time
// The value reported for the metric.
Value *MetricValue
noSmithyDocumentSerde
}
// The dimension of a metric.
type MetricDimension struct {
// A unique identifier for the dimension.
//
// This member is required.
DimensionName *string
// Defines how the dimensionValues of a dimension are interpreted. For example,
// for dimension type TOPIC_FILTER, the IN operator, a message will be counted
// only if its topic matches one of the topic filters. With NOT_IN operator, a
// message will be counted only if it doesn't match any of the topic filters. The
// operator is optional: if it's not provided (is null ), it will be interpreted as
// IN .
Operator DimensionValueOperator
noSmithyDocumentSerde
}
// The metric you want to retain. Dimensions are optional.
type MetricToRetain struct {
// What is measured by the behavior.
//
// This member is required.
Metric *string
// The dimension of a metric. This can't be used with custom metrics.
MetricDimension *MetricDimension
noSmithyDocumentSerde
}
// The value to be compared with the metric .
type MetricValue struct {
// If the comparisonOperator calls for a set of CIDRs, use this to specify that
// set to be compared with the metric .
Cidrs []string
// If the comparisonOperator calls for a numeric value, use this to specify that
// numeric value to be compared with the metric .
Count *int64
// The numeral value of a metric.
Number *float64
// The numeral values of a metric.
Numbers []float64
// If the comparisonOperator calls for a set of ports, use this to specify that
// set to be compared with the metric .
Ports []int32
// The string values of a metric.
Strings []string
noSmithyDocumentSerde
}
// Describes which changes should be applied as part of a mitigation action.
type MitigationAction struct {
// The set of parameters for this mitigation action. The parameters vary,
// depending on the kind of action you apply.
ActionParams *MitigationActionParams
// A unique identifier for the mitigation action.
Id *string
// A user-friendly name for the mitigation action.
Name *string
// The IAM role ARN used to apply this mitigation action.
RoleArn *string
noSmithyDocumentSerde
}
// Information that identifies a mitigation action. This information is returned
// by ListMitigationActions.
type MitigationActionIdentifier struct {
// The IAM role ARN used to apply this mitigation action.
ActionArn *string
// The friendly name of the mitigation action.
ActionName *string
// The date when this mitigation action was created.
CreationDate *time.Time
noSmithyDocumentSerde
}
// The set of parameters for this mitigation action. You can specify only one type
// of parameter (in other words, you can apply only one action for each defined
// mitigation action).
type MitigationActionParams struct {
// Parameters to define a mitigation action that moves devices associated with a
// certificate to one or more specified thing groups, typically for quarantine.
AddThingsToThingGroupParams *AddThingsToThingGroupParams
// Parameters to define a mitigation action that enables Amazon Web Services IoT
// Core logging at a specified level of detail.
EnableIoTLoggingParams *EnableIoTLoggingParams
// Parameters to define a mitigation action that publishes findings to Amazon
// Simple Notification Service (Amazon SNS. You can implement your own custom
// actions in response to the Amazon SNS messages.
PublishFindingToSnsParams *PublishFindingToSnsParams
// Parameters to define a mitigation action that adds a blank policy to restrict
// permissions.
ReplaceDefaultPolicyVersionParams *ReplaceDefaultPolicyVersionParams
// Parameters to define a mitigation action that changes the state of the CA
// certificate to inactive.
UpdateCACertificateParams *UpdateCACertificateParams
// Parameters to define a mitigation action that changes the state of the device
// certificate to inactive.
UpdateDeviceCertificateParams *UpdateDeviceCertificateParams
noSmithyDocumentSerde
}
// Specifies the MQTT context to use for the test authorizer request
type MqttContext struct {
// The value of the clientId key in an MQTT authorization request.
ClientId *string
// The value of the password key in an MQTT authorization request.
Password []byte
// The value of the username key in an MQTT authorization request.
Username *string
noSmithyDocumentSerde
}
// Specifies MQTT Version 5.0 headers information. For more information, see MQTT (https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html)
// from Amazon Web Services IoT Core Developer Guide.
type MqttHeaders struct {
// A UTF-8 encoded string that describes the content of the publishing message.
// For more information, see Content Type (https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901118)
// from the MQTT Version 5.0 specification. Supports substitution templates (https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html)
// .
ContentType *string
// The base64-encoded binary data used by the sender of the request message to
// identify which request the response message is for when it's received. For more
// information, see Correlation Data (https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901115)
// from the MQTT Version 5.0 specification. This binary data must be
// based64-encoded. Supports substitution templates (https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html)
// .
CorrelationData *string
// A user-defined integer value that will persist a message at the message broker
// for a specified amount of time to ensure that the message will expire if it's no
// longer relevant to the subscriber. The value of messageExpiry represents the
// number of seconds before it expires. For more information about the limits of
// messageExpiry , see Amazon Web Services IoT Core message broker and protocol
// limits and quotas (https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html)
// from the Amazon Web Services Reference Guide. Supports substitution templates (https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html)
// .
MessageExpiry *string
// An Enum string value that indicates whether the payload is formatted as UTF-8.
// Valid values are UNSPECIFIED_BYTES and UTF8_DATA . For more information, see
// Payload Format Indicator (https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901111)
// from the MQTT Version 5.0 specification. Supports substitution templates (https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html)
// .
PayloadFormatIndicator *string
// A UTF-8 encoded string that's used as the topic name for a response message.
// The response topic is used to describe the topic which the receiver should
// publish to as part of the request-response flow. The topic must not contain
// wildcard characters. For more information, see Response Topic (https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901114)
// from the MQTT Version 5.0 specification. Supports substitution templates (https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html)
// .
ResponseTopic *string
// An array of key-value pairs that you define in the MQTT5 header.
UserProperties []UserProperty
noSmithyDocumentSerde
}
// Information about the resource that was noncompliant with the audit check.
type NonCompliantResource struct {
// Other information about the noncompliant resource.
AdditionalInfo map[string]string
// Information that identifies the noncompliant resource.
ResourceIdentifier *ResourceIdentifier
// The type of the noncompliant resource.
ResourceType ResourceType
noSmithyDocumentSerde
}
// Describes an action that writes data to an Amazon OpenSearch Service domain.
type OpenSearchAction struct {
// The endpoint of your OpenSearch domain.
//
// This member is required.
Endpoint *string
// The unique identifier for the document you are storing.
//
// This member is required.
Id *string
// The OpenSearch index where you want to store your data.
//
// This member is required.
Index *string
// The IAM role ARN that has access to OpenSearch.
//
// This member is required.
RoleArn *string
// The type of document you are storing.
//
// This member is required.
Type *string
noSmithyDocumentSerde
}
// Describes a file to be associated with an OTA update.
type OTAUpdateFile struct {
// A list of name/attribute pairs.
Attributes map[string]string
// The code signing method of the file.
CodeSigning *CodeSigning
// The location of the updated firmware.
FileLocation *FileLocation
// The name of the file.
FileName *string
// An integer value you can include in the job document to allow your devices to
// identify the type of file received from the cloud.
FileType *int32
// The file version.
FileVersion *string
noSmithyDocumentSerde
}
// Information about an OTA update.
type OTAUpdateInfo struct {
// A collection of name/value pairs
AdditionalParameters map[string]string
// The IoT job ARN associated with the OTA update.
AwsIotJobArn *string
// The IoT job ID associated with the OTA update.
AwsIotJobId *string
// Configuration for the rollout of OTA updates.
AwsJobExecutionsRolloutConfig *AwsJobExecutionsRolloutConfig
// Configuration information for pre-signed URLs. Valid when protocols contains
// HTTP.
AwsJobPresignedUrlConfig *AwsJobPresignedUrlConfig
// The date when the OTA update was created.
CreationDate *time.Time
// A description of the OTA update.
Description *string
// Error information associated with the OTA update.
ErrorInfo *ErrorInfo
// The date when the OTA update was last updated.
LastModifiedDate *time.Time
// The OTA update ARN.
OtaUpdateArn *string
// A list of files associated with the OTA update.
OtaUpdateFiles []OTAUpdateFile
// The OTA update ID.
OtaUpdateId *string
// The status of the OTA update.
OtaUpdateStatus OTAUpdateStatus
// The protocol used to transfer the OTA update image. Valid values are [HTTP],
// [MQTT], [HTTP, MQTT]. When both HTTP and MQTT are specified, the target device
// can choose the protocol.
Protocols []Protocol
// Specifies whether the OTA update will continue to run (CONTINUOUS), or will be
// complete after all those things specified as targets have completed the OTA
// update (SNAPSHOT). If continuous, the OTA update may also be run on a thing when
// a change is detected in a target. For example, an OTA update will run on a thing
// when the thing is added to a target group, even after the OTA update was
// completed by all things originally in the group.
TargetSelection TargetSelection
// The targets of the OTA update.
Targets []string
noSmithyDocumentSerde
}
// An OTA update summary.
type OTAUpdateSummary struct {
// The date when the OTA update was created.
CreationDate *time.Time
// The OTA update ARN.
OtaUpdateArn *string
// The OTA update ID.
OtaUpdateId *string
noSmithyDocumentSerde
}
// A certificate that has been transferred but not yet accepted.
type OutgoingCertificate struct {
// The certificate ARN.
CertificateArn *string
// The certificate ID.
CertificateId *string
// The certificate creation date.
CreationDate *time.Time
// The date the transfer was initiated.
TransferDate *time.Time
// The transfer message.
TransferMessage *string
// The Amazon Web Services account to which the transfer was made.
TransferredTo *string
noSmithyDocumentSerde
}
// A summary of information about a software package.
type PackageSummary struct {
// The date that the package was created.
CreationDate *time.Time
// The name of the default package version.
DefaultVersionName *string
// The date that the package was last updated.
LastModifiedDate *time.Time
// The name for the target package.
PackageName *string
noSmithyDocumentSerde
}
// A summary of information about a package version.
type PackageVersionSummary struct {
// The date that the package version was created.
CreationDate *time.Time
// The date that the package version was last updated.
LastModifiedDate *time.Time
// The name of the associated software package.
PackageName *string
// The status of the package version. For more information, see Package version
// lifecycle (https://docs.aws.amazon.com/iot/latest/developerguide/preparing-to-use-software-package-catalog.html#package-version-lifecycle)
// .
Status PackageVersionStatus
// The name of the target package version.
VersionName *string
noSmithyDocumentSerde
}
// Describes the percentile and percentile value.
type PercentPair struct {
// The percentile.
Percent float64
// The value of the percentile.
Value float64
noSmithyDocumentSerde
}
// Describes an IoT policy.
type Policy struct {
// The policy ARN.
PolicyArn *string
// The policy name.
PolicyName *string
noSmithyDocumentSerde
}
// Describes a policy version.
type PolicyVersion struct {
// The date and time the policy was created.
CreateDate *time.Time
// Specifies whether the policy version is the default.
IsDefaultVersion bool
// The policy version ID.
VersionId *string
noSmithyDocumentSerde
}
// Information about the version of the policy associated with the resource.
type PolicyVersionIdentifier struct {
// The name of the policy.
PolicyName *string
// The ID of the version of the policy associated with the resource.
PolicyVersionId *string
noSmithyDocumentSerde
}
// Configuration for pre-signed S3 URLs.
type PresignedUrlConfig struct {
// How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600,
// the default value is 3600 seconds. Pre-signed URLs are generated when Jobs
// receives an MQTT request for the job document.
ExpiresInSec *int64
// The ARN of an IAM role that grants permission to download files from the S3
// bucket where the job data/updates are stored. The role must also grant
// permission for IoT to download the files. For information about addressing the
// confused deputy problem, see cross-service confused deputy prevention (https://docs.aws.amazon.com/iot/latest/developerguide/cross-service-confused-deputy-prevention.html)
// in the Amazon Web Services IoT Core developer guide.
RoleArn *string
noSmithyDocumentSerde
}
// Structure that contains payloadVersion and targetArn .
type ProvisioningHook struct {
// The ARN of the target function. Note: Only Lambda functions are currently
// supported.
//
// This member is required.
TargetArn *string
// The payload that was sent to the target function. Note: Only Lambda functions
// are currently supported.
PayloadVersion *string
noSmithyDocumentSerde
}
// A summary of information about a provisioning template.
type ProvisioningTemplateSummary struct {
// The date when the provisioning template summary was created.
CreationDate *time.Time
// The description of the provisioning template.
Description *string
// True if the fleet provision template is enabled, otherwise false.
Enabled bool
// The date when the provisioning template summary was last modified.
LastModifiedDate *time.Time
// The ARN of the provisioning template.
TemplateArn *string
// The name of the provisioning template.
TemplateName *string
// The type you define in a provisioning template. You can create a template with
// only one type. You can't change the template type after its creation. The
// default value is FLEET_PROVISIONING . For more information about provisioning
// template, see: Provisioning template (https://docs.aws.amazon.com/iot/latest/developerguide/provision-template.html)
// .
Type TemplateType
noSmithyDocumentSerde
}
// A summary of information about a fleet provision template version.
type ProvisioningTemplateVersionSummary struct {
// The date when the provisioning template version was created
CreationDate *time.Time
// True if the provisioning template version is the default version, otherwise
// false.
IsDefaultVersion bool
// The ID of the fleet provisioning template version.
VersionId *int32
noSmithyDocumentSerde
}
// Parameters to define a mitigation action that publishes findings to Amazon SNS.
// You can implement your own custom actions in response to the Amazon SNS
// messages.
type PublishFindingToSnsParams struct {
// The ARN of the topic to which you want to publish the findings.
//
// This member is required.
TopicArn *string
noSmithyDocumentSerde
}
// An asset property value entry containing the following information.
type PutAssetPropertyValueEntry struct {
// A list of property values to insert that each contain timestamp, quality, and
// value (TQV) information.
//
// This member is required.
PropertyValues []AssetPropertyValue
// The ID of the IoT SiteWise asset. You must specify either a propertyAlias or
// both an aliasId and a propertyId . Accepts substitution templates.
AssetId *string
// Optional. A unique identifier for this entry that you can define to better
// track which message caused an error in case of failure. Accepts substitution
// templates. Defaults to a new UUID.
EntryId *string
// The name of the property alias associated with your asset property. You must
// specify either a propertyAlias or both an aliasId and a propertyId . Accepts
// substitution templates.
PropertyAlias *string
// The ID of the asset's property. You must specify either a propertyAlias or both
// an aliasId and a propertyId . Accepts substitution templates.
PropertyId *string
noSmithyDocumentSerde
}
// The input for the DynamoActionVS action that specifies the DynamoDB table to
// which the message data will be written.
type PutItemInput struct {
// The table where the message data will be written.
//
// This member is required.
TableName *string
noSmithyDocumentSerde
}
// Allows you to define a criteria to initiate the increase in rate of rollout for
// a job.
type RateIncreaseCriteria struct {
// The threshold for number of notified things that will initiate the increase in
// rate of rollout.
NumberOfNotifiedThings *int32
// The threshold for number of succeeded things that will initiate the increase in
// rate of rollout.
NumberOfSucceededThings *int32
noSmithyDocumentSerde
}
// The registration configuration.
type RegistrationConfig struct {
// The ARN of the role.
RoleArn *string
// The template body.
TemplateBody *string
// The name of the provisioning template.
TemplateName *string
noSmithyDocumentSerde
}
// Information about a related resource.
type RelatedResource struct {
// Other information about the resource.
AdditionalInfo map[string]string
// Information that identifies the resource.
ResourceIdentifier *ResourceIdentifier
// The type of resource.
ResourceType ResourceType
noSmithyDocumentSerde
}
// Parameters to define a mitigation action that adds a blank policy to restrict
// permissions.
type ReplaceDefaultPolicyVersionParams struct {
// The name of the template to be applied. The only supported value is BLANK_POLICY
// .
//
// This member is required.
TemplateName PolicyTemplateName
noSmithyDocumentSerde
}
// Describes an action to republish to another topic.
type RepublishAction struct {
// The ARN of the IAM role that grants access.
//
// This member is required.
RoleArn *string
// The name of the MQTT topic.
//
// This member is required.
Topic *string
// MQTT Version 5.0 headers information. For more information, see MQTT (https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html)
// from the Amazon Web Services IoT Core Developer Guide.
Headers *MqttHeaders
// The Quality of Service (QoS) level to use when republishing messages. The
// default value is 0.
Qos *int32
noSmithyDocumentSerde
}
// Information that identifies the noncompliant resource.
type ResourceIdentifier struct {
// The account with which the resource is associated.
Account *string
// The ID of the CA certificate used to authorize the certificate.
CaCertificateId *string
// The client ID.
ClientId *string
// The ID of the Amazon Cognito identity pool.
CognitoIdentityPoolId *string
// The ARN of the identified device certificate.
DeviceCertificateArn *string
// The ID of the certificate attached to the resource.
DeviceCertificateId *string
// The ARN of the IAM role that has overly permissive actions.
IamRoleArn *string
// The issuer certificate identifier.
IssuerCertificateIdentifier *IssuerCertificateIdentifier
// The version of the policy associated with the resource.
PolicyVersionIdentifier *PolicyVersionIdentifier
// The ARN of the role alias that has overly permissive actions.
RoleAliasArn *string
noSmithyDocumentSerde
}
// The criteria that determines how many retries are allowed for each failure type
// for a job.
type RetryCriteria struct {
// The type of job execution failures that can initiate a job retry.
//
// This member is required.
FailureType RetryableFailureType
// The number of retries allowed for a failure type for the job.
//
// This member is required.
NumberOfRetries *int32
noSmithyDocumentSerde
}
// Role alias description.
type RoleAliasDescription struct {
// The UNIX timestamp of when the role alias was created.
CreationDate *time.Time
// The number of seconds for which the credential is valid.
CredentialDurationSeconds *int32
// The UNIX timestamp of when the role alias was last modified.
LastModifiedDate *time.Time
// The role alias owner.
Owner *string
// The role alias.
RoleAlias *string
// The ARN of the role alias.
RoleAliasArn *string
// The role ARN.
RoleArn *string
noSmithyDocumentSerde
}
// Describes an action to write data to an Amazon S3 bucket.
type S3Action struct {
// The Amazon S3 bucket.
//
// This member is required.
BucketName *string
// The object key. For more information, see Actions, resources, and condition
// keys for Amazon S3 (https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html)
// .
//
// This member is required.
Key *string
// The ARN of the IAM role that grants access.
//
// This member is required.
RoleArn *string
// The Amazon S3 canned ACL that controls access to the object identified by the
// object key. For more information, see S3 canned ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl)
// .
CannedAcl CannedAccessControlList
noSmithyDocumentSerde
}
// Describes the location of updated firmware in S3.
type S3Destination struct {
// The S3 bucket that contains the updated firmware.
Bucket *string
// The S3 prefix.
Prefix *string
noSmithyDocumentSerde
}
// The S3 location.
type S3Location struct {
// The S3 bucket.
Bucket *string
// The S3 key.
Key *string
// The S3 bucket version.
Version *string
noSmithyDocumentSerde
}
// Describes an action to write a message to a Salesforce IoT Cloud Input Stream.
type SalesforceAction struct {
// The token used to authenticate access to the Salesforce IoT Cloud Input Stream.
// The token is available from the Salesforce IoT Cloud platform after creation of
// the Input Stream.
//
// This member is required.
Token *string
// The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available
// from the Salesforce IoT Cloud platform after creation of the Input Stream.
//
// This member is required.
Url *string
noSmithyDocumentSerde
}
// Information about the scheduled audit.
type ScheduledAuditMetadata struct {
// The day of the month on which the scheduled audit is run (if the frequency is
// "MONTHLY"). If days 29-31 are specified, and the month does not have that many
// days, the audit takes place on the "LAST" day of the month.
DayOfMonth *string
// The day of the week on which the scheduled audit is run (if the frequency is
// "WEEKLY" or "BIWEEKLY").
DayOfWeek DayOfWeek
// How often the scheduled audit occurs.
Frequency AuditFrequency
// The ARN of the scheduled audit.
ScheduledAuditArn *string
// The name of the scheduled audit.
ScheduledAuditName *string
noSmithyDocumentSerde
}
// Displays the next seven maintenance window occurrences and their start times.
type ScheduledJobRollout struct {
// Displays the start times of the next seven maintenance window occurrences.
StartTime *string
noSmithyDocumentSerde
}
// Specifies the date and time that a job will begin the rollout of the job
// document to all devices in the target group. Additionally, you can specify the
// end behavior for each job execution when it reaches the scheduled end time.
type SchedulingConfig struct {
// Specifies the end behavior for all job executions after a job reaches the
// selected endTime . If endTime is not selected when creating the job, then
// endBehavior does not apply.
EndBehavior JobEndBehavior
// The time a job will stop rollout of the job document to all devices in the
// target group for a job. The endTime must take place no later than two years
// from the current time and be scheduled a minimum of thirty minutes from the
// current time. The minimum duration between startTime and endTime is thirty
// minutes. The maximum duration between startTime and endTime is two years. The
// date and time format for the endTime is YYYY-MM-DD for the date and HH:MM for
// the time.
EndTime *string
// An optional configuration within the SchedulingConfig to setup a recurring
// maintenance window with a predetermined start time and duration for the rollout
// of a job document to all devices in a target group for a job.
MaintenanceWindows []MaintenanceWindow
// The time a job will begin rollout of the job document to all devices in the
// target group for a job. The startTime can be scheduled up to a year in advance
// and must be scheduled a minimum of thirty minutes from the current time. The
// date and time format for the startTime is YYYY-MM-DD for the date and HH:MM for
// the time.
StartTime *string
noSmithyDocumentSerde
}
// Identifying information for a Device Defender security profile.
type SecurityProfileIdentifier struct {
// The ARN of the security profile.
//
// This member is required.
Arn *string
// The name you've given to the security profile.
//
// This member is required.
Name *string
noSmithyDocumentSerde
}
// A target to which an alert is sent when a security profile behavior is violated.
type SecurityProfileTarget struct {
// The ARN of the security profile.
//
// This member is required.
Arn *string
noSmithyDocumentSerde
}
// Information about a security profile and the target associated with it.
type SecurityProfileTargetMapping struct {
// Information that identifies the security profile.
SecurityProfileIdentifier *SecurityProfileIdentifier
// Information about the target (thing group) associated with the security profile.
Target *SecurityProfileTarget
noSmithyDocumentSerde
}
// An object that contains information about a server certificate.
type ServerCertificateSummary struct {
// The ARN of the server certificate.
ServerCertificateArn *string
// The status of the server certificate.
ServerCertificateStatus ServerCertificateStatus
// Details that explain the status of the server certificate.
ServerCertificateStatusDetail *string
noSmithyDocumentSerde
}
// Describes the code-signing profile.
type SigningProfileParameter struct {
// Certificate ARN.
CertificateArn *string
// The location of the code-signing certificate on your device.
CertificatePathOnDevice *string
// The hardware platform of your device.
Platform *string
noSmithyDocumentSerde
}
// For more information, see Signature Version 4 signing process (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
// .
type SigV4Authorization struct {
// The ARN of the signing role.
//
// This member is required.
RoleArn *string
// The service name to use while signing with Sig V4.
//
// This member is required.
ServiceName *string
// The signing region.
//
// This member is required.
SigningRegion *string
noSmithyDocumentSerde
}
// Describes an action to publish to an Amazon SNS topic.
type SnsAction struct {
// The ARN of the IAM role that grants access.
//
// This member is required.
RoleArn *string
// The ARN of the SNS topic.
//
// This member is required.
TargetArn *string
// (Optional) The message format of the message to publish. Accepted values are
// "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this
// setting to determine if the payload should be parsed and relevant
// platform-specific bits of the payload should be extracted. To read more about
// SNS message formats, see
// https://docs.aws.amazon.com/sns/latest/dg/json-formats.html (https://docs.aws.amazon.com/sns/latest/dg/json-formats.html)
// refer to their official documentation.
MessageFormat MessageFormat
noSmithyDocumentSerde
}
// Describes an action to publish data to an Amazon SQS queue.
type SqsAction struct {
// The URL of the Amazon SQS queue.
//
// This member is required.
QueueUrl *string
// The ARN of the IAM role that grants access.
//
// This member is required.
RoleArn *string
// Specifies whether to use Base64 encoding.
UseBase64 *bool
noSmithyDocumentSerde
}
// Information required to start a signing job.
type StartSigningJobParameter struct {
// The location to write the code-signed file.
Destination *Destination
// The code-signing profile name.
SigningProfileName *string
// Describes the code-signing profile.
SigningProfileParameter *SigningProfileParameter
noSmithyDocumentSerde
}
// A statistical ranking (percentile) that indicates a threshold value by which a
// behavior is determined to be in compliance or in violation of the behavior.
type StatisticalThreshold struct {
// The percentile that resolves to a threshold value by which compliance with a
// behavior is determined. Metrics are collected over the specified period (
// durationSeconds ) from all reporting devices in your account and statistical
// ranks are calculated. Then, the measurements from a device are collected over
// the same period. If the accumulated measurements from the device fall above or
// below ( comparisonOperator ) the value associated with the percentile specified,
// then the device is considered to be in compliance with the behavior, otherwise a
// violation occurs.
Statistic *string
noSmithyDocumentSerde
}
// A map of key-value pairs for all supported statistics. For issues with missing
// or unexpected values for this API, consult Fleet indexing troubleshooting guide (https://docs.aws.amazon.com/iot/latest/developerguide/fleet-indexing-troubleshooting.html)
// .
type Statistics struct {
// The average of the aggregated field values.
Average *float64
// The count of things that match the query string criteria and contain a valid
// aggregation field value.
Count int32
// The maximum aggregated field value.
Maximum *float64
// The minimum aggregated field value.
Minimum *float64
// The standard deviation of the aggregated field values.
StdDeviation *float64
// The sum of the aggregated field values.
Sum *float64
// The sum of the squares of the aggregated field values.
SumOfSquares *float64
// The variance of the aggregated field values.
Variance *float64
noSmithyDocumentSerde
}
// Starts execution of a Step Functions state machine.
type StepFunctionsAction struct {
// The ARN of the role that grants IoT permission to start execution of a state
// machine ("Action":"states:StartExecution").
//
// This member is required.
RoleArn *string
// The name of the Step Functions state machine whose execution will be started.
//
// This member is required.
StateMachineName *string
// (Optional) A name will be given to the state machine execution consisting of
// this prefix followed by a UUID. Step Functions automatically creates a unique
// name for each state machine execution if one is not provided.
ExecutionNamePrefix *string
noSmithyDocumentSerde
}
// Describes a group of files that can be streamed.
type Stream struct {
// The ID of a file associated with a stream.
FileId *int32
// The stream ID.
StreamId *string
noSmithyDocumentSerde
}
// Represents a file to stream.
type StreamFile struct {
// The file ID.
FileId *int32
// The location of the file in S3.
S3Location *S3Location
noSmithyDocumentSerde
}
// Information about a stream.
type StreamInfo struct {
// The date when the stream was created.
CreatedAt *time.Time
// The description of the stream.
Description *string
// The files to stream.
Files []StreamFile
// The date when the stream was last updated.
LastUpdatedAt *time.Time
// An IAM role IoT assumes to access your S3 files.
RoleArn *string
// The stream ARN.
StreamArn *string
// The stream ID.
StreamId *string
// The stream version.
StreamVersion *int32
noSmithyDocumentSerde
}
// A summary of a stream.
type StreamSummary struct {
// A description of the stream.
Description *string
// The stream ARN.
StreamArn *string
// The stream ID.
StreamId *string
// The stream version.
StreamVersion *int32
noSmithyDocumentSerde
}
// A set of key/value pairs that are used to manage the resource.
type Tag struct {
// The tag's key.
//
// This member is required.
Key *string
// The tag's value.
Value *string
noSmithyDocumentSerde
}
// Statistics for the checks performed during the audit.
type TaskStatistics struct {
// The number of checks that did not run because the audit was canceled.
CanceledChecks *int32
// The number of checks that found compliant resources.
CompliantChecks *int32
// The number of checks.
FailedChecks *int32
// The number of checks in progress.
InProgressChecks *int32
// The number of checks that found noncompliant resources.
NonCompliantChecks *int32
// The number of checks in this audit.
TotalChecks *int32
// The number of checks waiting for data collection.
WaitingForDataCollectionChecks *int32
noSmithyDocumentSerde
}
// Provides summary counts of how many tasks for findings are in a particular
// state. This information is included in the response from
// DescribeAuditMitigationActionsTask.
type TaskStatisticsForAuditCheck struct {
// The number of findings to which the mitigation action task was canceled when
// applied.
CanceledFindingsCount *int64
// The number of findings for which at least one of the actions failed when
// applied.
FailedFindingsCount *int64
// The number of findings skipped because of filter conditions provided in the
// parameters to the command.
SkippedFindingsCount *int64
// The number of findings for which all mitigation actions succeeded when applied.
SucceededFindingsCount *int64
// The total number of findings to which a task is being applied.
TotalFindingsCount *int64
noSmithyDocumentSerde
}
// Performs an aggregation that will return a list of buckets. The list of buckets
// is a ranked list of the number of occurrences of an aggregation field value.
type TermsAggregation struct {
// The number of buckets to return in the response. Default to 10.
MaxBuckets int32
noSmithyDocumentSerde
}
// The properties of the thing, including thing name, thing type name, and a list
// of thing attributes.
type ThingAttribute struct {
// A list of thing attributes which are name-value pairs.
Attributes map[string]string
// The thing ARN.
ThingArn *string
// The name of the thing.
ThingName *string
// The name of the thing type, if the thing has been associated with a type.
ThingTypeName *string
// The version of the thing record in the registry.
Version int64
noSmithyDocumentSerde
}
// The connectivity status of the thing.
type ThingConnectivity struct {
// True if the thing is connected to the Amazon Web Services IoT Core service;
// false if it is not connected.
Connected bool
// The reason why the client is disconnected. If the thing has been disconnected
// for approximately an hour, the disconnectReason value might be missing.
DisconnectReason *string
// The epoch time (in milliseconds) when the thing last connected or disconnected.
// If the thing has been disconnected for approximately an hour, the time value
// might be missing.
Timestamp *int64
noSmithyDocumentSerde
}
// The thing search index document.
type ThingDocument struct {
// The attributes.
Attributes map[string]string
// Indicates whether the thing is connected to the Amazon Web Services IoT Core
// service.
Connectivity *ThingConnectivity
// Contains Device Defender data. For more information about Device Defender, see
// Device Defender (https://docs.aws.amazon.com/iot/latest/developerguide/device-defender.html)
// .
DeviceDefender *string
// The unnamed shadow and named shadow. For more information about shadows, see
// IoT Device Shadow service. (https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html)
Shadow *string
// Thing group names.
ThingGroupNames []string
// The thing ID.
ThingId *string
// The thing name.
ThingName *string
// The thing type name.
ThingTypeName *string
noSmithyDocumentSerde
}
// The thing group search index document.
type ThingGroupDocument struct {
// The thing group attributes.
Attributes map[string]string
// Parent group names.
ParentGroupNames []string
// The thing group description.
ThingGroupDescription *string
// The thing group ID.
ThingGroupId *string
// The thing group name.
ThingGroupName *string
noSmithyDocumentSerde
}
// Thing group indexing configuration.
type ThingGroupIndexingConfiguration struct {
// Thing group indexing mode.
//
// This member is required.
ThingGroupIndexingMode ThingGroupIndexingMode
// A list of thing group fields to index. This list cannot contain any managed
// fields. Use the GetIndexingConfiguration API to get a list of managed fields.
// Contains custom field names and their data type.
CustomFields []Field
// Contains fields that are indexed and whose types are already known by the Fleet
// Indexing service. This is an optional field. For more information, see Managed
// fields (https://docs.aws.amazon.com/iot/latest/developerguide/managing-fleet-index.html#managed-field)
// in the Amazon Web Services IoT Core Developer Guide.
ManagedFields []Field
noSmithyDocumentSerde
}
// Thing group metadata.
type ThingGroupMetadata struct {
// The UNIX timestamp of when the thing group was created.
CreationDate *time.Time
// The parent thing group name.
ParentGroupName *string
// The root parent thing group.
RootToParentThingGroups []GroupNameAndArn
noSmithyDocumentSerde
}
// Thing group properties.
type ThingGroupProperties struct {
// The thing group attributes in JSON format.
AttributePayload *AttributePayload
// The thing group description.
ThingGroupDescription *string
noSmithyDocumentSerde
}
// The thing indexing configuration. For more information, see Managing Thing
// Indexing (https://docs.aws.amazon.com/iot/latest/developerguide/managing-index.html)
// .
type ThingIndexingConfiguration struct {
// Thing indexing mode. Valid values are:
// - REGISTRY – Your thing index contains registry data only.
// - REGISTRY_AND_SHADOW - Your thing index contains registry and shadow data.
// - OFF - Thing indexing is disabled.
//
// This member is required.
ThingIndexingMode ThingIndexingMode
// Contains custom field names and their data type.
CustomFields []Field
// Device Defender indexing mode. Valid values are:
// - VIOLATIONS – Your thing index contains Device Defender violations. To
// enable Device Defender indexing, deviceDefenderIndexingMode must not be set to
// OFF.
// - OFF - Device Defender indexing is disabled.
// For more information about Device Defender violations, see Device Defender
// Detect. (https://docs.aws.amazon.com/iot/latest/developerguide/device-defender-detect.html)
DeviceDefenderIndexingMode DeviceDefenderIndexingMode
// Provides additional filters for specific data sources. Named shadow is the only
// data source that currently supports and requires a filter. To add named shadows
// to your fleet indexing configuration, set namedShadowIndexingMode to be ON and
// specify your shadow names in filter .
Filter *IndexingFilter
// Contains fields that are indexed and whose types are already known by the Fleet
// Indexing service.
ManagedFields []Field
// Named shadow indexing mode. Valid values are:
// - ON – Your thing index contains named shadow. To enable thing named shadow
// indexing, namedShadowIndexingMode must not be set to OFF.
// - OFF - Named shadow indexing is disabled.
// For more information about Shadows, see IoT Device Shadow service. (https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html)
NamedShadowIndexingMode NamedShadowIndexingMode
// Thing connectivity indexing mode. Valid values are:
// - STATUS – Your thing index contains connectivity status. To enable thing
// connectivity indexing, thingIndexMode must not be set to OFF.
// - OFF - Thing connectivity status indexing is disabled.
ThingConnectivityIndexingMode ThingConnectivityIndexingMode
noSmithyDocumentSerde
}
// The definition of the thing type, including thing type name and description.
type ThingTypeDefinition struct {
// The thing type ARN.
ThingTypeArn *string
// The ThingTypeMetadata contains additional information about the thing type
// including: creation date and time, a value indicating whether the thing type is
// deprecated, and a date and time when it was deprecated.
ThingTypeMetadata *ThingTypeMetadata
// The name of the thing type.
ThingTypeName *string
// The ThingTypeProperties for the thing type.
ThingTypeProperties *ThingTypeProperties
noSmithyDocumentSerde
}
// The ThingTypeMetadata contains additional information about the thing type
// including: creation date and time, a value indicating whether the thing type is
// deprecated, and a date and time when time was deprecated.
type ThingTypeMetadata struct {
// The date and time when the thing type was created.
CreationDate *time.Time
// Whether the thing type is deprecated. If true, no new things could be
// associated with this type.
Deprecated bool
// The date and time when the thing type was deprecated.
DeprecationDate *time.Time
noSmithyDocumentSerde
}
// The ThingTypeProperties contains information about the thing type including: a
// thing type description, and a list of searchable thing attribute names.
type ThingTypeProperties struct {
// A list of searchable thing attribute names.
SearchableAttributes []string
// The description of the thing type.
ThingTypeDescription *string
noSmithyDocumentSerde
}
// Specifies the amount of time each device has to finish its execution of the
// job. A timer is started when the job execution status is set to IN_PROGRESS . If
// the job execution status is not set to another terminal state before the timer
// expires, it will be automatically set to TIMED_OUT .
type TimeoutConfig struct {
// Specifies the amount of time, in minutes, this device has to finish execution
// of this job. The timeout interval can be anywhere between 1 minute and 7 days (1
// to 10080 minutes). The in progress timer can't be updated and will apply to all
// job executions for the job. Whenever a job execution remains in the IN_PROGRESS
// status for longer than this interval, the job execution will fail and switch to
// the terminal TIMED_OUT status.
InProgressTimeoutInMinutes *int64
noSmithyDocumentSerde
}
// The Timestream rule action writes attributes (measures) from an MQTT message
// into an Amazon Timestream table. For more information, see the Timestream (https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html)
// topic rule action documentation.
type TimestreamAction struct {
// The name of an Amazon Timestream database.
//
// This member is required.
DatabaseName *string
// Metadata attributes of the time series that are written in each measure record.
//
// This member is required.
Dimensions []TimestreamDimension
// The ARN of the role that grants permission to write to the Amazon Timestream
// database table.
//
// This member is required.
RoleArn *string
// The name of the database table into which to write the measure records.
//
// This member is required.
TableName *string
// Specifies an application-defined value to replace the default value assigned to
// the Timestream record's timestamp in the time column. You can use this property
// to specify the value and the precision of the Timestream record's timestamp. You
// can specify a value from the message payload or a value computed by a
// substitution template. If omitted, the topic rule action assigns the timestamp,
// in milliseconds, at the time it processed the rule.
Timestamp *TimestreamTimestamp
noSmithyDocumentSerde
}
// Metadata attributes of the time series that are written in each measure record.
type TimestreamDimension struct {
// The metadata dimension name. This is the name of the column in the Amazon
// Timestream database table record. Dimensions cannot be named: measure_name ,
// measure_value , or time . These names are reserved. Dimension names cannot start
// with ts_ or measure_value and they cannot contain the colon ( : ) character.
//
// This member is required.
Name *string
// The value to write in this column of the database record.
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// Describes how to interpret an application-defined timestamp value from an MQTT
// message payload and the precision of that value.
type TimestreamTimestamp struct {
// The precision of the timestamp value that results from the expression described
// in value . Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS .
// The default is MILLISECONDS .
//
// This member is required.
Unit *string
// An expression that returns a long epoch time value.
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// An object that specifies the TLS configuration for a domain.
type TlsConfig struct {
// The security policy for a domain configuration. For more information, see
// Security policies (https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html#tls-policy-table)
// in the Amazon Web Services IoT Core developer guide.
SecurityPolicy *string
noSmithyDocumentSerde
}
// Specifies the TLS context to use for the test authorizer request.
type TlsContext struct {
// The value of the serverName key in a TLS authorization request.
ServerName *string
noSmithyDocumentSerde
}
// Describes a rule.
type TopicRule struct {
// The actions associated with the rule.
Actions []Action
// The version of the SQL rules engine to use when evaluating the rule.
AwsIotSqlVersion *string
// The date and time the rule was created.
CreatedAt *time.Time
// The description of the rule.
Description *string
// The action to perform when an error occurs.
ErrorAction *Action
// Specifies whether the rule is disabled.
RuleDisabled *bool
// The name of the rule.
RuleName *string
// The SQL statement used to query the topic. When using a SQL query with multiple
// lines, be sure to escape the newline characters.
Sql *string
noSmithyDocumentSerde
}
// A topic rule destination.
type TopicRuleDestination struct {
// The topic rule destination URL.
Arn *string
// The date and time when the topic rule destination was created.
CreatedAt *time.Time
// Properties of the HTTP URL.
HttpUrlProperties *HttpUrlDestinationProperties
// The date and time when the topic rule destination was last updated.
LastUpdatedAt *time.Time
// The status of the topic rule destination. Valid values are: IN_PROGRESS A topic
// rule destination was created but has not been confirmed. You can set status to
// IN_PROGRESS by calling UpdateTopicRuleDestination . Calling
// UpdateTopicRuleDestination causes a new confirmation challenge to be sent to
// your confirmation endpoint. ENABLED Confirmation was completed, and traffic to
// this destination is allowed. You can set status to DISABLED by calling
// UpdateTopicRuleDestination . DISABLED Confirmation was completed, and traffic to
// this destination is not allowed. You can set status to ENABLED by calling
// UpdateTopicRuleDestination . ERROR Confirmation could not be completed, for
// example if the confirmation timed out. You can call GetTopicRuleDestination for
// details about the error. You can set status to IN_PROGRESS by calling
// UpdateTopicRuleDestination . Calling UpdateTopicRuleDestination causes a new
// confirmation challenge to be sent to your confirmation endpoint.
Status TopicRuleDestinationStatus
// Additional details or reason why the topic rule destination is in the current
// status.
StatusReason *string
// Properties of the virtual private cloud (VPC) connection.
VpcProperties *VpcDestinationProperties
noSmithyDocumentSerde
}
// Configuration of the topic rule destination.
type TopicRuleDestinationConfiguration struct {
// Configuration of the HTTP URL.
HttpUrlConfiguration *HttpUrlDestinationConfiguration
// Configuration of the virtual private cloud (VPC) connection.
VpcConfiguration *VpcDestinationConfiguration
noSmithyDocumentSerde
}
// Information about the topic rule destination.
type TopicRuleDestinationSummary struct {
// The topic rule destination ARN.
Arn *string
// The date and time when the topic rule destination was created.
CreatedAt *time.Time
// Information about the HTTP URL.
HttpUrlSummary *HttpUrlDestinationSummary
// The date and time when the topic rule destination was last updated.
LastUpdatedAt *time.Time
// The status of the topic rule destination. Valid values are: IN_PROGRESS A topic
// rule destination was created but has not been confirmed. You can set status to
// IN_PROGRESS by calling UpdateTopicRuleDestination . Calling
// UpdateTopicRuleDestination causes a new confirmation challenge to be sent to
// your confirmation endpoint. ENABLED Confirmation was completed, and traffic to
// this destination is allowed. You can set status to DISABLED by calling
// UpdateTopicRuleDestination . DISABLED Confirmation was completed, and traffic to
// this destination is not allowed. You can set status to ENABLED by calling
// UpdateTopicRuleDestination . ERROR Confirmation could not be completed, for
// example if the confirmation timed out. You can call GetTopicRuleDestination for
// details about the error. You can set status to IN_PROGRESS by calling
// UpdateTopicRuleDestination . Calling UpdateTopicRuleDestination causes a new
// confirmation challenge to be sent to your confirmation endpoint.
Status TopicRuleDestinationStatus
// The reason the topic rule destination is in the current status.
StatusReason *string
// Information about the virtual private cloud (VPC) connection.
VpcDestinationSummary *VpcDestinationSummary
noSmithyDocumentSerde
}
// Describes a rule.
type TopicRuleListItem struct {
// The date and time the rule was created.
CreatedAt *time.Time
// The rule ARN.
RuleArn *string
// Specifies whether the rule is disabled.
RuleDisabled *bool
// The name of the rule.
RuleName *string
// The pattern for the topic names that apply.
TopicPattern *string
noSmithyDocumentSerde
}
// Describes a rule.
type TopicRulePayload struct {
// The actions associated with the rule.
//
// This member is required.
Actions []Action
// The SQL statement used to query the topic. For more information, see IoT SQL
// Reference (https://docs.aws.amazon.com/iot/latest/developerguide/iot-sql-reference.html)
// in the IoT Developer Guide.
//
// This member is required.
Sql *string
// The version of the SQL rules engine to use when evaluating the rule.
AwsIotSqlVersion *string
// The description of the rule.
Description *string
// The action to take when an error occurs.
ErrorAction *Action
// Specifies whether the rule is disabled.
RuleDisabled *bool
noSmithyDocumentSerde
}
// Data used to transfer a certificate to an Amazon Web Services account.
type TransferData struct {
// The date the transfer was accepted.
AcceptDate *time.Time
// The date the transfer was rejected.
RejectDate *time.Time
// The reason why the transfer was rejected.
RejectReason *string
// The date the transfer took place.
TransferDate *time.Time
// The transfer message.
TransferMessage *string
noSmithyDocumentSerde
}
// Parameters to define a mitigation action that changes the state of the CA
// certificate to inactive.
type UpdateCACertificateParams struct {
// The action that you want to apply to the CA certificate. The only supported
// value is DEACTIVATE .
//
// This member is required.
Action CACertificateUpdateAction
noSmithyDocumentSerde
}
// Parameters to define a mitigation action that changes the state of the device
// certificate to inactive.
type UpdateDeviceCertificateParams struct {
// The action that you want to apply to the device certificate. The only supported
// value is DEACTIVATE .
//
// This member is required.
Action DeviceCertificateUpdateAction
noSmithyDocumentSerde
}
// A key-value pair that you define in the header. Both the key and the value are
// either literal strings or valid substitution templates (https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html)
// .
type UserProperty struct {
// A key to be specified in UserProperty .
//
// This member is required.
Key *string
// A value to be specified in UserProperty .
//
// This member is required.
Value *string
noSmithyDocumentSerde
}
// Information about an error found in a behavior specification.
type ValidationError struct {
// The description of an error found in the behaviors.
ErrorMessage *string
noSmithyDocumentSerde
}
// Configuration to manage IoT Job's package version reporting. If configured,
// Jobs updates the thing's reserved named shadow with the package version
// information up on successful job completion. Note: For each job, the
// destinationPackageVersions attribute has to be set with the correct data for
// Jobs to report to the thing shadow.
type VersionUpdateByJobsConfig struct {
// Indicates whether the Job is enabled or not.
Enabled *bool
// The Amazon Resource Name (ARN) of the role that grants permission to the IoT
// jobs service to update the reserved named shadow when the job successfully
// completes.
RoleArn *string
noSmithyDocumentSerde
}
// Information about a Device Defender security profile behavior violation.
type ViolationEvent struct {
// The behavior that was violated.
Behavior *Behavior
// The value of the metric (the measurement).
MetricValue *MetricValue
// The name of the security profile whose behavior was violated.
SecurityProfileName *string
// The name of the thing responsible for the violation event.
ThingName *string
// The verification state of the violation (detect alarm).
VerificationState VerificationState
// The description of the verification state of the violation.
VerificationStateDescription *string
// The details of a violation event.
ViolationEventAdditionalInfo *ViolationEventAdditionalInfo
// The time the violation event occurred.
ViolationEventTime *time.Time
// The type of violation event.
ViolationEventType ViolationEventType
// The ID of the violation event.
ViolationId *string
noSmithyDocumentSerde
}
// The details of a violation event.
type ViolationEventAdditionalInfo struct {
// The sensitivity of anomalous behavior evaluation. Can be Low , Medium , or High .
ConfidenceLevel ConfidenceLevel
noSmithyDocumentSerde
}
// Specifies the time period of which violation events occurred between.
type ViolationEventOccurrenceRange struct {
// The end date and time of a time period in which violation events occurred.
//
// This member is required.
EndTime *time.Time
// The start date and time of a time period in which violation events occurred.
//
// This member is required.
StartTime *time.Time
noSmithyDocumentSerde
}
// The configuration information for a virtual private cloud (VPC) destination.
type VpcDestinationConfiguration struct {
// The ARN of a role that has permission to create and attach to elastic network
// interfaces (ENIs).
//
// This member is required.
RoleArn *string
// The subnet IDs of the VPC destination.
//
// This member is required.
SubnetIds []string
// The ID of the VPC.
//
// This member is required.
VpcId *string
// The security groups of the VPC destination.
SecurityGroups []string
noSmithyDocumentSerde
}
// The properties of a virtual private cloud (VPC) destination.
type VpcDestinationProperties struct {
// The ARN of a role that has permission to create and attach to elastic network
// interfaces (ENIs).
RoleArn *string
// The security groups of the VPC destination.
SecurityGroups []string
// The subnet IDs of the VPC destination.
SubnetIds []string
// The ID of the VPC.
VpcId *string
noSmithyDocumentSerde
}
// The summary of a virtual private cloud (VPC) destination.
type VpcDestinationSummary struct {
// The ARN of a role that has permission to create and attach to elastic network
// interfaces (ENIs).
RoleArn *string
// The security groups of the VPC destination.
SecurityGroups []string
// The subnet IDs of the VPC destination.
SubnetIds []string
// The ID of the VPC.
VpcId *string
noSmithyDocumentSerde
}
type noSmithyDocumentSerde = smithydocument.NoSerde
// UnknownUnionMember is returned when a union member is returned over the wire,
// but has an unknown tag.
type UnknownUnionMember struct {
Tag string
Value []byte
noSmithyDocumentSerde
}
func (*UnknownUnionMember) isAssetPropertyVariant() {}
| 4,475 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package types_test
import (
"fmt"
"github.com/aws/aws-sdk-go-v2/service/iot/types"
)
func ExampleAssetPropertyVariant_outputUsage() {
var union types.AssetPropertyVariant
// type switches can be used to check the union value
switch v := union.(type) {
case *types.AssetPropertyVariantMemberBooleanValue:
_ = v.Value // Value is string
case *types.AssetPropertyVariantMemberDoubleValue:
_ = v.Value // Value is string
case *types.AssetPropertyVariantMemberIntegerValue:
_ = v.Value // Value is string
case *types.AssetPropertyVariantMemberStringValue:
_ = v.Value // Value is string
case *types.UnknownUnionMember:
fmt.Println("unknown tag:", v.Tag)
default:
fmt.Println("union is nil or unknown type")
}
}
var _ *string
var _ *string
var _ *string
var _ *string
| 39 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
"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"
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/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"net"
"net/http"
"time"
)
const ServiceID = "IoT 1Click Devices Service"
const ServiceAPIVersion = "2018-05-14"
// Client provides the API client to make operations call for AWS IoT 1-Click
// Devices Service.
type Client struct {
options Options
}
// 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)
resolveDefaultEndpointConfiguration(&options)
for _, fn := range optFns {
fn(&options)
}
client := &Client{
options: options,
}
return client
}
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
// 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.
EndpointResolver EndpointResolver
// Signature Version 4 (SigV4) Signer
HTTPSignerV4 HTTPSignerV4
// The logger writer interface to write logging messages to.
Logger logging.Logger
// 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. 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. 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 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
}
// 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...)
}
}
// WithEndpointResolver returns a functional option for setting the Client's
// EndpointResolver option.
func WithEndpointResolver(v EndpointResolver) func(*Options) {
return func(o *Options) {
o.EndpointResolver = v
}
}
type HTTPClient interface {
Do(*http.Request) (*http.Response, error)
}
// 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)
return to
}
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)
stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
options := c.options.Copy()
for _, fn := range optFns {
fn(&options)
}
finalizeRetryMaxAttemptOptions(&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
}
}
handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack)
result, metadata, err = handler.Handle(ctx, params)
if err != nil {
err = &smithy.OperationError{
ServiceID: ServiceID,
OperationName: opID,
Err: err,
}
}
return result, metadata, err
}
type noSmithyDocumentSerde = smithydocument.NoSerde
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,
}
resolveAWSRetryerProvider(cfg, &opts)
resolveAWSRetryMaxAttempts(cfg, &opts)
resolveAWSRetryMode(cfg, &opts)
resolveAWSEndpointResolver(cfg, &opts)
resolveUseDualStackEndpoint(cfg, &opts)
resolveUseFIPSEndpoint(cfg, &opts)
return New(opts, optFns...)
}
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 finalizeRetryMaxAttemptOptions(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, NewDefaultEndpointResolver())
}
func addClientUserAgent(stack *middleware.Stack) error {
return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "iot1clickdevicesservice", goModuleVersion)(stack)
}
func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error {
mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{
CredentialsProvider: o.Credentials,
Signer: o.HTTPSignerV4,
LogSigning: o.ClientLogMode.IsSigning(),
})
return stack.Finalize.Add(mw, middleware.After)
}
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 addRetryMiddlewares(stack *middleware.Stack, o Options) error {
mo := retry.AddRetryMiddlewaresOptions{
Retryer: o.Retryer,
LogRetryAttempts: o.ClientLogMode.IsRetries(),
}
return retry.AddRetryMiddlewares(stack, mo)
}
// 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 addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
return awsmiddleware.AddRequestIDRetrieverMiddleware(stack)
}
func addResponseErrorMiddleware(stack *middleware.Stack) error {
return awshttp.AddResponseErrorMiddleware(stack)
}
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)
}
| 435 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"io/ioutil"
"net/http"
"strings"
"testing"
)
func TestClient_resolveRetryOptions(t *testing.T) {
nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) {
return &http.Response{
StatusCode: 200,
Header: http.Header{},
Body: ioutil.NopCloser(strings.NewReader("")),
}, nil
})
cases := map[string]struct {
defaultsMode aws.DefaultsMode
retryer aws.Retryer
retryMaxAttempts int
opRetryMaxAttempts *int
retryMode aws.RetryMode
expectClientRetryMode aws.RetryMode
expectClientMaxAttempts int
expectOpMaxAttempts int
}{
"defaults": {
defaultsMode: aws.DefaultsModeStandard,
expectClientRetryMode: aws.RetryModeStandard,
expectClientMaxAttempts: 3,
expectOpMaxAttempts: 3,
},
"custom default retry": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
"custom op max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(2),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 2,
},
"custom op no change max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(10),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
"custom op 0 max attempts": {
retryMode: aws.RetryModeAdaptive,
retryMaxAttempts: 10,
opRetryMaxAttempts: aws.Int(0),
expectClientRetryMode: aws.RetryModeAdaptive,
expectClientMaxAttempts: 10,
expectOpMaxAttempts: 10,
},
}
for name, c := range cases {
t.Run(name, func(t *testing.T) {
client := NewFromConfig(aws.Config{
DefaultsMode: c.defaultsMode,
Retryer: func() func() aws.Retryer {
if c.retryer == nil {
return nil
}
return func() aws.Retryer { return c.retryer }
}(),
HTTPClient: nopClient,
RetryMaxAttempts: c.retryMaxAttempts,
RetryMode: c.retryMode,
})
if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a {
t.Errorf("expect %v retry mode, got %v", e, a)
}
if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a {
t.Errorf("expect %v max attempts, got %v", e, a)
}
_, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{},
[]func(*Options){
func(o *Options) {
if c.opRetryMaxAttempts == nil {
return
}
o.RetryMaxAttempts = *c.opRetryMaxAttempts
},
},
func(s *middleware.Stack, o Options) error {
s.Initialize.Clear()
s.Serialize.Clear()
s.Build.Clear()
s.Finalize.Clear()
s.Deserialize.Clear()
if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a {
t.Errorf("expect %v op max attempts, got %v", e, a)
}
return nil
})
if err != nil {
t.Fatalf("expect no operation error, got %v", err)
}
})
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds device(s) to your account (i.e., claim one or more devices) if and only if
// you received a claim code with the device(s).
func (c *Client) ClaimDevicesByClaimCode(ctx context.Context, params *ClaimDevicesByClaimCodeInput, optFns ...func(*Options)) (*ClaimDevicesByClaimCodeOutput, error) {
if params == nil {
params = &ClaimDevicesByClaimCodeInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ClaimDevicesByClaimCode", params, optFns, c.addOperationClaimDevicesByClaimCodeMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ClaimDevicesByClaimCodeOutput)
out.ResultMetadata = metadata
return out, nil
}
type ClaimDevicesByClaimCodeInput struct {
// The claim code, starting with "C-", as provided by the device manufacturer.
//
// This member is required.
ClaimCode *string
noSmithyDocumentSerde
}
type ClaimDevicesByClaimCodeOutput struct {
// The claim code provided by the device manufacturer.
ClaimCode *string
// The total number of devices associated with the claim code that has been
// processed in the claim request.
Total int32
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationClaimDevicesByClaimCodeMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpClaimDevicesByClaimCode{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpClaimDevicesByClaimCode{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpClaimDevicesByClaimCodeValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opClaimDevicesByClaimCode(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opClaimDevicesByClaimCode(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "ClaimDevicesByClaimCode",
}
}
| 129 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Given a device ID, returns a DescribeDeviceResponse object describing the
// details of the device.
func (c *Client) DescribeDevice(ctx context.Context, params *DescribeDeviceInput, optFns ...func(*Options)) (*DescribeDeviceOutput, error) {
if params == nil {
params = &DescribeDeviceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "DescribeDevice", params, optFns, c.addOperationDescribeDeviceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*DescribeDeviceOutput)
out.ResultMetadata = metadata
return out, nil
}
type DescribeDeviceInput struct {
// The unique identifier of the device.
//
// This member is required.
DeviceId *string
noSmithyDocumentSerde
}
type DescribeDeviceOutput struct {
// Device details.
DeviceDescription *types.DeviceDescription
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationDescribeDeviceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDevice{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDevice{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpDescribeDeviceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDevice(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opDescribeDevice(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "DescribeDevice",
}
}
| 126 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Given a device ID, finalizes the claim request for the associated device.
// Claiming a device consists of initiating a claim, then publishing a device
// event, and finalizing the claim. For a device of type button, a device event can
// be published by simply clicking the device.
func (c *Client) FinalizeDeviceClaim(ctx context.Context, params *FinalizeDeviceClaimInput, optFns ...func(*Options)) (*FinalizeDeviceClaimOutput, error) {
if params == nil {
params = &FinalizeDeviceClaimInput{}
}
result, metadata, err := c.invokeOperation(ctx, "FinalizeDeviceClaim", params, optFns, c.addOperationFinalizeDeviceClaimMiddlewares)
if err != nil {
return nil, err
}
out := result.(*FinalizeDeviceClaimOutput)
out.ResultMetadata = metadata
return out, nil
}
type FinalizeDeviceClaimInput struct {
// The unique identifier of the device.
//
// This member is required.
DeviceId *string
// A collection of key/value pairs defining the resource tags. For example, {
// "tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
// Tagging Strategies (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/)
// .
Tags map[string]string
noSmithyDocumentSerde
}
type FinalizeDeviceClaimOutput struct {
// The device's final claim state.
State *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationFinalizeDeviceClaimMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpFinalizeDeviceClaim{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpFinalizeDeviceClaim{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpFinalizeDeviceClaimValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFinalizeDeviceClaim(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opFinalizeDeviceClaim(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "FinalizeDeviceClaim",
}
}
| 133 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Given a device ID, returns the invokable methods associated with the device.
func (c *Client) GetDeviceMethods(ctx context.Context, params *GetDeviceMethodsInput, optFns ...func(*Options)) (*GetDeviceMethodsOutput, error) {
if params == nil {
params = &GetDeviceMethodsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "GetDeviceMethods", params, optFns, c.addOperationGetDeviceMethodsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*GetDeviceMethodsOutput)
out.ResultMetadata = metadata
return out, nil
}
type GetDeviceMethodsInput struct {
// The unique identifier of the device.
//
// This member is required.
DeviceId *string
noSmithyDocumentSerde
}
type GetDeviceMethodsOutput struct {
// List of available device APIs.
DeviceMethods []types.DeviceMethod
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationGetDeviceMethodsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDeviceMethods{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDeviceMethods{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpGetDeviceMethodsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDeviceMethods(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opGetDeviceMethods(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "GetDeviceMethods",
}
}
| 125 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Given a device ID, initiates a claim request for the associated device.
// Claiming a device consists of initiating a claim, then publishing a device
// event, and finalizing the claim. For a device of type button, a device event can
// be published by simply clicking the device.
func (c *Client) InitiateDeviceClaim(ctx context.Context, params *InitiateDeviceClaimInput, optFns ...func(*Options)) (*InitiateDeviceClaimOutput, error) {
if params == nil {
params = &InitiateDeviceClaimInput{}
}
result, metadata, err := c.invokeOperation(ctx, "InitiateDeviceClaim", params, optFns, c.addOperationInitiateDeviceClaimMiddlewares)
if err != nil {
return nil, err
}
out := result.(*InitiateDeviceClaimOutput)
out.ResultMetadata = metadata
return out, nil
}
type InitiateDeviceClaimInput struct {
// The unique identifier of the device.
//
// This member is required.
DeviceId *string
noSmithyDocumentSerde
}
type InitiateDeviceClaimOutput struct {
// The device's final claim state.
State *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationInitiateDeviceClaimMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpInitiateDeviceClaim{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInitiateDeviceClaim{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpInitiateDeviceClaimValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInitiateDeviceClaim(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opInitiateDeviceClaim(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "InitiateDeviceClaim",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Given a device ID, issues a request to invoke a named device method (with
// possible parameters). See the "Example POST" code snippet below.
func (c *Client) InvokeDeviceMethod(ctx context.Context, params *InvokeDeviceMethodInput, optFns ...func(*Options)) (*InvokeDeviceMethodOutput, error) {
if params == nil {
params = &InvokeDeviceMethodInput{}
}
result, metadata, err := c.invokeOperation(ctx, "InvokeDeviceMethod", params, optFns, c.addOperationInvokeDeviceMethodMiddlewares)
if err != nil {
return nil, err
}
out := result.(*InvokeDeviceMethodOutput)
out.ResultMetadata = metadata
return out, nil
}
type InvokeDeviceMethodInput struct {
// The unique identifier of the device.
//
// This member is required.
DeviceId *string
// The device method to invoke.
DeviceMethod *types.DeviceMethod
// A JSON encoded string containing the device method request parameters.
DeviceMethodParameters *string
noSmithyDocumentSerde
}
type InvokeDeviceMethodOutput struct {
// A JSON encoded string containing the device method response.
DeviceMethodResponse *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationInvokeDeviceMethodMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpInvokeDeviceMethod{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpInvokeDeviceMethod{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpInvokeDeviceMethodValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opInvokeDeviceMethod(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opInvokeDeviceMethod(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "InvokeDeviceMethod",
}
}
| 132 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
"time"
)
// Using a device ID, returns a DeviceEventsResponse object containing an array of
// events for the device.
func (c *Client) ListDeviceEvents(ctx context.Context, params *ListDeviceEventsInput, optFns ...func(*Options)) (*ListDeviceEventsOutput, error) {
if params == nil {
params = &ListDeviceEventsInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListDeviceEvents", params, optFns, c.addOperationListDeviceEventsMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListDeviceEventsOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListDeviceEventsInput struct {
// The unique identifier of the device.
//
// This member is required.
DeviceId *string
// The start date for the device event query, in ISO8061 format. For example,
// 2018-03-28T15:45:12.880Z
//
// This member is required.
FromTimeStamp *time.Time
// The end date for the device event query, in ISO8061 format. For example,
// 2018-03-28T15:45:12.880Z
//
// This member is required.
ToTimeStamp *time.Time
// The maximum number of results to return per request. If not set, a default
// value of 100 is used.
MaxResults int32
// The token to retrieve the next set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListDeviceEventsOutput struct {
// An array of zero or more elements describing the event(s) associated with the
// device.
Events []types.DeviceEvent
// The token to retrieve the next set of results.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListDeviceEventsMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListDeviceEvents{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDeviceEvents{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpListDeviceEventsValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDeviceEvents(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opListDeviceEvents(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "ListDeviceEvents",
}
}
| 150 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/aws-sdk-go-v2/service/iot1clickdevicesservice/types"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the 1-Click compatible devices associated with your AWS account.
func (c *Client) ListDevices(ctx context.Context, params *ListDevicesInput, optFns ...func(*Options)) (*ListDevicesOutput, error) {
if params == nil {
params = &ListDevicesInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ListDevices", params, optFns, c.addOperationListDevicesMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ListDevicesOutput)
out.ResultMetadata = metadata
return out, nil
}
type ListDevicesInput struct {
// The type of the device, such as "button".
DeviceType *string
// The maximum number of results to return per request. If not set, a default
// value of 100 is used.
MaxResults int32
// The token to retrieve the next set of results.
NextToken *string
noSmithyDocumentSerde
}
type ListDevicesOutput struct {
// A list of devices.
Devices []types.DeviceDescription
// The token to retrieve the next set of results.
NextToken *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListDevicesMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListDevices{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListDevices{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListDevices(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opListDevices(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "ListDevices",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Lists the tags associated with the specified resource ARN.
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 ARN of the resource.
//
// This member is required.
ResourceArn *string
noSmithyDocumentSerde
}
type ListTagsForResourceOutput struct {
// A collection of key/value pairs defining the resource tags. For example, {
// "tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
// Tagging Strategies (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/)
// .
Tags map[string]string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); 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 = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "ListTagsForResource",
}
}
| 127 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Adds or updates the tags associated with the resource ARN. See AWS IoT 1-Click
// Service Limits (https://docs.aws.amazon.com/iot-1-click/latest/developerguide/1click-appendix.html#1click-limits)
// for the maximum number of tags allowed per resource.
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 ARN of the resource.
//
// This member is required.
ResourceArn *string
// A collection of key/value pairs defining the resource tags. For example, {
// "tags": {"key1": "value1", "key2": "value2"} }. For more information, see AWS
// Tagging Strategies (https://aws.amazon.com/answers/account-management/aws-tagging-strategies/)
// .
//
// This member is required.
Tags map[string]string
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) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); 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 = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "TagResource",
}
}
| 130 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Disassociates a device from your AWS account using its device ID.
func (c *Client) UnclaimDevice(ctx context.Context, params *UnclaimDeviceInput, optFns ...func(*Options)) (*UnclaimDeviceOutput, error) {
if params == nil {
params = &UnclaimDeviceInput{}
}
result, metadata, err := c.invokeOperation(ctx, "UnclaimDevice", params, optFns, c.addOperationUnclaimDeviceMiddlewares)
if err != nil {
return nil, err
}
out := result.(*UnclaimDeviceOutput)
out.ResultMetadata = metadata
return out, nil
}
type UnclaimDeviceInput struct {
// The unique identifier of the device.
//
// This member is required.
DeviceId *string
noSmithyDocumentSerde
}
type UnclaimDeviceOutput struct {
// The device's final claim state.
State *string
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
noSmithyDocumentSerde
}
func (c *Client) addOperationUnclaimDeviceMiddlewares(stack *middleware.Stack, options Options) (err error) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUnclaimDevice{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUnclaimDevice{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = addOpUnclaimDeviceValidationMiddleware(stack); err != nil {
return err
}
if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnclaimDevice(options.Region), middleware.Before); err != nil {
return err
}
if err = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUnclaimDevice(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "UnclaimDevice",
}
}
| 124 |
aws-sdk-go-v2 | aws | Go | // Code generated by smithy-go-codegen DO NOT EDIT.
package iot1clickdevicesservice
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/aws/smithy-go/middleware"
smithyhttp "github.com/aws/smithy-go/transport/http"
)
// Using tag keys, deletes the tags (key/value pairs) associated with the
// specified resource ARN.
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 ARN of the resource.
//
// This member is required.
ResourceArn *string
// A collections of tag keys. For example, {"key1","key2"}
//
// 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) {
err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After)
if err != nil {
return err
}
if err = addSetLoggerMiddleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil {
return err
}
if err = addResolveEndpointMiddleware(stack, options); err != nil {
return err
}
if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil {
return err
}
if err = addRetryMiddlewares(stack, options); err != nil {
return err
}
if err = addHTTPSignerV4Middleware(stack, options); err != nil {
return err
}
if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil {
return err
}
if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil {
return err
}
if err = addClientUserAgent(stack); err != nil {
return err
}
if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
return err
}
if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); 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 = awsmiddleware.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
}
return nil
}
func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata {
return &awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "iot1click",
OperationName: "UntagResource",
}
}
| 126 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.