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 neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modify a setting for a DB cluster. You can change one or more database // configuration parameters by specifying these parameters and the new values in // the request. func (c *Client) ModifyDBCluster(ctx context.Context, params *ModifyDBClusterInput, optFns ...func(*Options)) (*ModifyDBClusterOutput, error) { if params == nil { params = &ModifyDBClusterInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyDBCluster", params, optFns, c.addOperationModifyDBClusterMiddlewares) if err != nil { return nil, err } out := result.(*ModifyDBClusterOutput) out.ResultMetadata = metadata return out, nil } type ModifyDBClusterInput struct { // The DB cluster identifier for the cluster being modified. This parameter is not // case-sensitive. Constraints: // - Must match the identifier of an existing DBCluster. // // This member is required. DBClusterIdentifier *string // A value that indicates whether upgrades between different major versions are // allowed. Constraints: You must set the allow-major-version-upgrade flag when // providing an EngineVersion parameter that uses a different major version than // the DB cluster's current version. AllowMajorVersionUpgrade bool // A value that specifies whether the modifications in this request and any // pending modifications are asynchronously applied as soon as possible, regardless // of the PreferredMaintenanceWindow setting for the DB cluster. If this parameter // is set to false , changes to the DB cluster are applied during the next // maintenance window. The ApplyImmediately parameter only affects // NewDBClusterIdentifier values. If you set the ApplyImmediately parameter value // to false, then changes to NewDBClusterIdentifier values are applied during the // next maintenance window. All other changes are applied immediately, regardless // of the value of the ApplyImmediately parameter. Default: false ApplyImmediately bool // The number of days for which automated backups are retained. You must specify a // minimum value of 1. Default: 1 Constraints: // - Must be a value from 1 to 35 BackupRetentionPeriod *int32 // The configuration setting for the log types to be enabled for export to // CloudWatch Logs for a specific DB cluster. CloudwatchLogsExportConfiguration *types.CloudwatchLogsExportConfiguration // If set to true , tags are copied to any snapshot of the DB cluster that is // created. CopyTagsToSnapshot *bool // The name of the DB cluster parameter group to use for the DB cluster. DBClusterParameterGroupName *string // The name of the DB parameter group to apply to all instances of the DB cluster. // When you apply a parameter group using DBInstanceParameterGroupName , parameter // changes aren't applied during the next maintenance window but instead are // applied immediately. Default: The existing name setting Constraints: // - The DB parameter group must be in the same DB parameter group family as the // target DB cluster version. // - The DBInstanceParameterGroupName parameter is only valid in combination with // the AllowMajorVersionUpgrade parameter. DBInstanceParameterGroupName *string // A value that indicates whether the DB cluster has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, // deletion protection is disabled. DeletionProtection *bool // True to enable mapping of Amazon Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. Default: false EnableIAMDatabaseAuthentication *bool // The version number of the database engine to which you want to upgrade. // Changing this parameter results in an outage. The change is applied during the // next maintenance window unless the ApplyImmediately parameter is set to true. // For a list of valid engine versions, see Engine Releases for Amazon Neptune (https://docs.aws.amazon.com/neptune/latest/userguide/engine-releases.html) // , or call DescribeDBEngineVersions (https://docs.aws.amazon.com/neptune/latest/userguide/api-other-apis.html#DescribeDBEngineVersions) // . EngineVersion *string // Not supported by Neptune. MasterUserPassword *string // The new DB cluster identifier for the DB cluster when renaming a DB cluster. // This value is stored as a lowercase string. Constraints: // - Must contain from 1 to 63 letters, numbers, or hyphens // - The first character must be a letter // - Cannot end with a hyphen or contain two consecutive hyphens // Example: my-cluster2 NewDBClusterIdentifier *string // Not supported by Neptune. OptionGroupName *string // The port number on which the DB cluster accepts connections. Constraints: Value // must be 1150-65535 Default: The same port as the original DB cluster. Port *int32 // The daily time range during which automated backups are created if automated // backups are enabled, using the BackupRetentionPeriod parameter. The default is // a 30-minute window selected at random from an 8-hour block of time for each // Amazon Region. Constraints: // - Must be in the format hh24:mi-hh24:mi . // - Must be in Universal Coordinated Time (UTC). // - Must not conflict with the preferred maintenance window. // - Must be at least 30 minutes. PreferredBackupWindow *string // The weekly time range during which system maintenance can occur, in Universal // Coordinated Time (UTC). Format: ddd:hh24:mi-ddd:hh24:mi The default is a // 30-minute window selected at random from an 8-hour block of time for each Amazon // Region, occurring on a random day of the week. Valid Days: Mon, Tue, Wed, Thu, // Fri, Sat, Sun. Constraints: Minimum 30-minute window. PreferredMaintenanceWindow *string // Contains the scaling configuration of a Neptune Serverless DB cluster. For more // information, see Using Amazon Neptune Serverless (https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) // in the Amazon Neptune User Guide. ServerlessV2ScalingConfiguration *types.ServerlessV2ScalingConfiguration // A list of VPC security groups that the DB cluster will belong to. VpcSecurityGroupIds []string noSmithyDocumentSerde } type ModifyDBClusterOutput struct { // Contains the details of an Amazon Neptune DB cluster. This data type is used as // a response element in the DescribeDBClusters action. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBCluster{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBCluster{}, 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 = addOpModifyDBClusterValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBCluster(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_opModifyDBCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyDBCluster", } }
233
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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" ) // Modifies the properties of an endpoint in an Amazon Neptune DB cluster. func (c *Client) ModifyDBClusterEndpoint(ctx context.Context, params *ModifyDBClusterEndpointInput, optFns ...func(*Options)) (*ModifyDBClusterEndpointOutput, error) { if params == nil { params = &ModifyDBClusterEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyDBClusterEndpoint", params, optFns, c.addOperationModifyDBClusterEndpointMiddlewares) if err != nil { return nil, err } out := result.(*ModifyDBClusterEndpointOutput) out.ResultMetadata = metadata return out, nil } type ModifyDBClusterEndpointInput struct { // The identifier of the endpoint to modify. This parameter is stored as a // lowercase string. // // This member is required. DBClusterEndpointIdentifier *string // The type of the endpoint. One of: READER , WRITER , ANY . EndpointType *string // List of DB instance identifiers that aren't part of the custom endpoint group. // All other eligible instances are reachable through the custom endpoint. Only // relevant if the list of static members is empty. ExcludedMembers []string // List of DB instance identifiers that are part of the custom endpoint group. StaticMembers []string noSmithyDocumentSerde } // This data type represents the information you need to connect to an Amazon // Neptune DB cluster. This data type is used as a response element in the // following actions: // - CreateDBClusterEndpoint // - DescribeDBClusterEndpoints // - ModifyDBClusterEndpoint // - DeleteDBClusterEndpoint // // For the data structure that represents Amazon RDS DB instance endpoints, see // Endpoint . type ModifyDBClusterEndpointOutput struct { // The type associated with a custom endpoint. One of: READER , WRITER , ANY . CustomEndpointType *string // The Amazon Resource Name (ARN) for the endpoint. DBClusterEndpointArn *string // The identifier associated with the endpoint. This parameter is stored as a // lowercase string. DBClusterEndpointIdentifier *string // A unique system-generated identifier for an endpoint. It remains the same for // the whole life of the endpoint. DBClusterEndpointResourceIdentifier *string // The DB cluster identifier of the DB cluster associated with the endpoint. This // parameter is stored as a lowercase string. DBClusterIdentifier *string // The DNS address of the endpoint. Endpoint *string // The type of the endpoint. One of: READER , WRITER , CUSTOM . EndpointType *string // List of DB instance identifiers that aren't part of the custom endpoint group. // All other eligible instances are reachable through the custom endpoint. Only // relevant if the list of static members is empty. ExcludedMembers []string // List of DB instance identifiers that are part of the custom endpoint group. StaticMembers []string // The current status of the endpoint. One of: creating , available , deleting , // inactive , modifying . The inactive state applies to an endpoint that cannot be // used for a certain kind of cluster, such as a writer endpoint for a read-only // secondary cluster in a global database. Status *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyDBClusterEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBClusterEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBClusterEndpoint{}, 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 = addOpModifyDBClusterEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBClusterEndpoint(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_opModifyDBClusterEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyDBClusterEndpoint", } }
181
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the parameters of a DB cluster parameter group. To modify more than // one parameter, submit a list of the following: ParameterName , ParameterValue , // and ApplyMethod . A maximum of 20 parameters can be modified in a single // request. Changes to dynamic parameters are applied immediately. Changes to // static parameters require a reboot without failover to the DB cluster associated // with the parameter group before the change can take effect. After you create a // DB cluster parameter group, you should wait at least 5 minutes before creating // your first DB cluster that uses that DB cluster parameter group as the default // parameter group. This allows Amazon Neptune to fully complete the create action // before the parameter group is used as the default for a new DB cluster. This is // especially important for parameters that are critical when creating the default // database for a DB cluster, such as the character set for the default database // defined by the character_set_database parameter. You can use the Parameter // Groups option of the Amazon Neptune console or the DescribeDBClusterParameters // command to verify that your DB cluster parameter group has been created or // modified. func (c *Client) ModifyDBClusterParameterGroup(ctx context.Context, params *ModifyDBClusterParameterGroupInput, optFns ...func(*Options)) (*ModifyDBClusterParameterGroupOutput, error) { if params == nil { params = &ModifyDBClusterParameterGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyDBClusterParameterGroup", params, optFns, c.addOperationModifyDBClusterParameterGroupMiddlewares) if err != nil { return nil, err } out := result.(*ModifyDBClusterParameterGroupOutput) out.ResultMetadata = metadata return out, nil } type ModifyDBClusterParameterGroupInput struct { // The name of the DB cluster parameter group to modify. // // This member is required. DBClusterParameterGroupName *string // A list of parameters in the DB cluster parameter group to modify. // // This member is required. Parameters []types.Parameter noSmithyDocumentSerde } type ModifyDBClusterParameterGroupOutput struct { // The name of the DB cluster parameter group. Constraints: // - Must be 1 to 255 letters or numbers. // - First character must be a letter // - Cannot end with a hyphen or contain two consecutive hyphens // This value is stored as a lowercase string. DBClusterParameterGroupName *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyDBClusterParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBClusterParameterGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBClusterParameterGroup{}, 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 = addOpModifyDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBClusterParameterGroup(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_opModifyDBClusterParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyDBClusterParameterGroup", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds an attribute and values to, or removes an attribute and values from, a // manual DB cluster snapshot. To share a manual DB cluster snapshot with other // Amazon accounts, specify restore as the AttributeName and use the ValuesToAdd // parameter to add a list of IDs of the Amazon accounts that are authorized to // restore the manual DB cluster snapshot. Use the value all to make the manual DB // cluster snapshot public, which means that it can be copied or restored by all // Amazon accounts. Do not add the all value for any manual DB cluster snapshots // that contain private information that you don't want available to all Amazon // accounts. If a manual DB cluster snapshot is encrypted, it can be shared, but // only by specifying a list of authorized Amazon account IDs for the ValuesToAdd // parameter. You can't use all as a value for that parameter in this case. To // view which Amazon accounts have access to copy or restore a manual DB cluster // snapshot, or whether a manual DB cluster snapshot public or private, use the // DescribeDBClusterSnapshotAttributes API action. func (c *Client) ModifyDBClusterSnapshotAttribute(ctx context.Context, params *ModifyDBClusterSnapshotAttributeInput, optFns ...func(*Options)) (*ModifyDBClusterSnapshotAttributeOutput, error) { if params == nil { params = &ModifyDBClusterSnapshotAttributeInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyDBClusterSnapshotAttribute", params, optFns, c.addOperationModifyDBClusterSnapshotAttributeMiddlewares) if err != nil { return nil, err } out := result.(*ModifyDBClusterSnapshotAttributeOutput) out.ResultMetadata = metadata return out, nil } type ModifyDBClusterSnapshotAttributeInput struct { // The name of the DB cluster snapshot attribute to modify. To manage // authorization for other Amazon accounts to copy or restore a manual DB cluster // snapshot, set this value to restore . // // This member is required. AttributeName *string // The identifier for the DB cluster snapshot to modify the attributes for. // // This member is required. DBClusterSnapshotIdentifier *string // A list of DB cluster snapshot attributes to add to the attribute specified by // AttributeName . To authorize other Amazon accounts to copy or restore a manual // DB cluster snapshot, set this list to include one or more Amazon account IDs, or // all to make the manual DB cluster snapshot restorable by any Amazon account. Do // not add the all value for any manual DB cluster snapshots that contain private // information that you don't want available to all Amazon accounts. ValuesToAdd []string // A list of DB cluster snapshot attributes to remove from the attribute specified // by AttributeName . To remove authorization for other Amazon accounts to copy or // restore a manual DB cluster snapshot, set this list to include one or more // Amazon account identifiers, or all to remove authorization for any Amazon // account to copy or restore the DB cluster snapshot. If you specify all , an // Amazon account whose account ID is explicitly added to the restore attribute // can still copy or restore a manual DB cluster snapshot. ValuesToRemove []string noSmithyDocumentSerde } type ModifyDBClusterSnapshotAttributeOutput struct { // Contains the results of a successful call to the // DescribeDBClusterSnapshotAttributes API action. Manual DB cluster snapshot // attributes are used to authorize other Amazon accounts to copy or restore a // manual DB cluster snapshot. For more information, see the // ModifyDBClusterSnapshotAttribute API action. DBClusterSnapshotAttributesResult *types.DBClusterSnapshotAttributesResult // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyDBClusterSnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBClusterSnapshotAttribute{}, 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 = addOpModifyDBClusterSnapshotAttributeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBClusterSnapshotAttribute(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_opModifyDBClusterSnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyDBClusterSnapshotAttribute", } }
166
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies settings for a DB instance. You can change one or more database // configuration parameters by specifying these parameters and the new values in // the request. To learn what modifications you can make to your DB instance, call // DescribeValidDBInstanceModifications before you call ModifyDBInstance . func (c *Client) ModifyDBInstance(ctx context.Context, params *ModifyDBInstanceInput, optFns ...func(*Options)) (*ModifyDBInstanceOutput, error) { if params == nil { params = &ModifyDBInstanceInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyDBInstance", params, optFns, c.addOperationModifyDBInstanceMiddlewares) if err != nil { return nil, err } out := result.(*ModifyDBInstanceOutput) out.ResultMetadata = metadata return out, nil } type ModifyDBInstanceInput struct { // The DB instance identifier. This value is stored as a lowercase string. // Constraints: // - Must match the identifier of an existing DBInstance. // // This member is required. DBInstanceIdentifier *string // Not supported by Neptune. AllocatedStorage *int32 // Indicates that major version upgrades are allowed. Changing this parameter // doesn't result in an outage and the change is asynchronously applied as soon as // possible. AllowMajorVersionUpgrade bool // Specifies whether the modifications in this request and any pending // modifications are asynchronously applied as soon as possible, regardless of the // PreferredMaintenanceWindow setting for the DB instance. If this parameter is set // to false , changes to the DB instance are applied during the next maintenance // window. Some parameter changes can cause an outage and are applied on the next // call to RebootDBInstance , or the next failure reboot. Default: false ApplyImmediately bool // Indicates that minor version upgrades are applied automatically to the DB // instance during the maintenance window. Changing this parameter doesn't result // in an outage except in the following case and the change is asynchronously // applied as soon as possible. An outage will result if this parameter is set to // true during the maintenance window, and a newer minor version is available, and // Neptune has enabled auto patching for that engine version. AutoMinorVersionUpgrade *bool // Not applicable. The retention period for automated backups is managed by the DB // cluster. For more information, see ModifyDBCluster . Default: Uses existing // setting BackupRetentionPeriod *int32 // Indicates the certificate that needs to be associated with the instance. CACertificateIdentifier *string // The configuration setting for the log types to be enabled for export to // CloudWatch Logs for a specific DB instance or DB cluster. CloudwatchLogsExportConfiguration *types.CloudwatchLogsExportConfiguration // True to copy all tags from the DB instance to snapshots of the DB instance, and // otherwise false. The default is false. CopyTagsToSnapshot *bool // The new compute and memory capacity of the DB instance, for example, db.m4.large // . Not all DB instance classes are available in all Amazon Regions. If you modify // the DB instance class, an outage occurs during the change. The change is applied // during the next maintenance window, unless ApplyImmediately is specified as true // for this request. Default: Uses existing setting DBInstanceClass *string // The name of the DB parameter group to apply to the DB instance. Changing this // setting doesn't result in an outage. The parameter group name itself is changed // immediately, but the actual parameter changes are not applied until you reboot // the instance without failover. The db instance will NOT be rebooted // automatically and the parameter changes will NOT be applied during the next // maintenance window. Default: Uses existing setting Constraints: The DB parameter // group must be in the same DB parameter group family as this DB instance. DBParameterGroupName *string // The port number on which the database accepts connections. The value of the // DBPortNumber parameter must not match any of the port values specified for // options in the option group for the DB instance. Your database will restart when // you change the DBPortNumber value regardless of the value of the // ApplyImmediately parameter. Default: 8182 DBPortNumber *int32 // A list of DB security groups to authorize on this DB instance. Changing this // setting doesn't result in an outage and the change is asynchronously applied as // soon as possible. Constraints: // - If supplied, must match existing DBSecurityGroups. DBSecurityGroups []string // The new DB subnet group for the DB instance. You can use this parameter to move // your DB instance to a different VPC. Changing the subnet group causes an outage // during the change. The change is applied during the next maintenance window, // unless you specify true for the ApplyImmediately parameter. Constraints: If // supplied, must match the name of an existing DBSubnetGroup. Example: // mySubnetGroup DBSubnetGroupName *string // A value that indicates whether the DB instance has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, // deletion protection is disabled. See Deleting a DB Instance (https://docs.aws.amazon.com/neptune/latest/userguide/manage-console-instances-delete.html) // . DeletionProtection *bool // Not supported. Domain *string // Not supported DomainIAMRoleName *string // True to enable mapping of Amazon Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. You can enable IAM database // authentication for the following database engines Not applicable. Mapping Amazon // IAM accounts to database accounts is managed by the DB cluster. For more // information, see ModifyDBCluster . Default: false EnableIAMDatabaseAuthentication *bool // (Not supported by Neptune) EnablePerformanceInsights *bool // The version number of the database engine to upgrade to. Currently, setting // this parameter has no effect. To upgrade your database engine to the most recent // release, use the ApplyPendingMaintenanceAction API. EngineVersion *string // The new Provisioned IOPS (I/O operations per second) value for the instance. // Changing this setting doesn't result in an outage and the change is applied // during the next maintenance window unless the ApplyImmediately parameter is set // to true for this request. Default: Uses existing setting Iops *int32 // Not supported by Neptune. LicenseModel *string // Not supported by Neptune. MasterUserPassword *string // The interval, in seconds, between points when Enhanced Monitoring metrics are // collected for the DB instance. To disable collecting Enhanced Monitoring // metrics, specify 0. The default is 0. If MonitoringRoleArn is specified, then // you must also set MonitoringInterval to a value other than 0. Valid Values: 0, // 1, 5, 10, 15, 30, 60 MonitoringInterval *int32 // The ARN for the IAM role that permits Neptune to send enhanced monitoring // metrics to Amazon CloudWatch Logs. For example, // arn:aws:iam:123456789012:role/emaccess . If MonitoringInterval is set to a // value other than 0, then you must supply a MonitoringRoleArn value. MonitoringRoleArn *string // Specifies if the DB instance is a Multi-AZ deployment. Changing this parameter // doesn't result in an outage and the change is applied during the next // maintenance window unless the ApplyImmediately parameter is set to true for // this request. MultiAZ *bool // The new DB instance identifier for the DB instance when renaming a DB instance. // When you change the DB instance identifier, an instance reboot will occur // immediately if you set Apply Immediately to true, or will occur during the next // maintenance window if Apply Immediately to false. This value is stored as a // lowercase string. Constraints: // - Must contain from 1 to 63 letters, numbers, or hyphens. // - The first character must be a letter. // - Cannot end with a hyphen or contain two consecutive hyphens. // Example: mydbinstance NewDBInstanceIdentifier *string // (Not supported by Neptune) OptionGroupName *string // (Not supported by Neptune) PerformanceInsightsKMSKeyId *string // The daily time range during which automated backups are created if automated // backups are enabled. Not applicable. The daily time range for creating automated // backups is managed by the DB cluster. For more information, see ModifyDBCluster // . Constraints: // - Must be in the format hh24:mi-hh24:mi // - Must be in Universal Time Coordinated (UTC) // - Must not conflict with the preferred maintenance window // - Must be at least 30 minutes PreferredBackupWindow *string // The weekly time range (in UTC) during which system maintenance can occur, which // might result in an outage. Changing this parameter doesn't result in an outage, // except in the following situation, and the change is asynchronously applied as // soon as possible. If there are pending actions that cause a reboot, and the // maintenance window is changed to include the current time, then changing this // parameter will cause a reboot of the DB instance. If moving this window to the // current time, there must be at least 30 minutes between the current time and end // of the window to ensure pending changes are applied. Default: Uses existing // setting Format: ddd:hh24:mi-ddd:hh24:mi Valid Days: Mon | Tue | Wed | Thu | Fri // | Sat | Sun Constraints: Must be at least 30 minutes PreferredMaintenanceWindow *string // A value that specifies the order in which a Read Replica is promoted to the // primary instance after a failure of the existing primary instance. Default: 1 // Valid Values: 0 - 15 PromotionTier *int32 // This flag should no longer be used. // // Deprecated: This member has been deprecated. PubliclyAccessible *bool // Not supported. StorageType *string // The ARN from the key store with which to associate the instance for TDE // encryption. TdeCredentialArn *string // The password for the given ARN from the key store in order to access the device. TdeCredentialPassword *string // A list of EC2 VPC security groups to authorize on this DB instance. This change // is asynchronously applied as soon as possible. Not applicable. The associated // list of EC2 VPC security groups is managed by the DB cluster. For more // information, see ModifyDBCluster . Constraints: // - If supplied, must match existing VpcSecurityGroupIds. VpcSecurityGroupIds []string noSmithyDocumentSerde } type ModifyDBInstanceOutput struct { // Contains the details of an Amazon Neptune DB instance. This data type is used // as a response element in the DescribeDBInstances action. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBInstance{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBInstance{}, 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 = addOpModifyDBInstanceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBInstance(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_opModifyDBInstance(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyDBInstance", } }
332
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the parameters of a DB parameter group. To modify more than one // parameter, submit a list of the following: ParameterName , ParameterValue , and // ApplyMethod . A maximum of 20 parameters can be modified in a single request. // Changes to dynamic parameters are applied immediately. Changes to static // parameters require a reboot without failover to the DB instance associated with // the parameter group before the change can take effect. After you modify a DB // parameter group, you should wait at least 5 minutes before creating your first // DB instance that uses that DB parameter group as the default parameter group. // This allows Amazon Neptune to fully complete the modify action before the // parameter group is used as the default for a new DB instance. This is especially // important for parameters that are critical when creating the default database // for a DB instance, such as the character set for the default database defined by // the character_set_database parameter. You can use the Parameter Groups option // of the Amazon Neptune console or the DescribeDBParameters command to verify that // your DB parameter group has been created or modified. func (c *Client) ModifyDBParameterGroup(ctx context.Context, params *ModifyDBParameterGroupInput, optFns ...func(*Options)) (*ModifyDBParameterGroupOutput, error) { if params == nil { params = &ModifyDBParameterGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyDBParameterGroup", params, optFns, c.addOperationModifyDBParameterGroupMiddlewares) if err != nil { return nil, err } out := result.(*ModifyDBParameterGroupOutput) out.ResultMetadata = metadata return out, nil } type ModifyDBParameterGroupInput struct { // The name of the DB parameter group. Constraints: // - If supplied, must match the name of an existing DBParameterGroup. // // This member is required. DBParameterGroupName *string // An array of parameter names, values, and the apply method for the parameter // update. At least one parameter name, value, and apply method must be supplied; // subsequent arguments are optional. A maximum of 20 parameters can be modified in // a single request. Valid Values (for the application method): immediate | // pending-reboot You can use the immediate value with dynamic parameters only. You // can use the pending-reboot value for both dynamic and static parameters, and // changes are applied when you reboot the DB instance without failover. // // This member is required. Parameters []types.Parameter noSmithyDocumentSerde } type ModifyDBParameterGroupOutput struct { // Provides the name of the DB parameter group. DBParameterGroupName *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyDBParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBParameterGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBParameterGroup{}, 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 = addOpModifyDBParameterGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBParameterGroup(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_opModifyDBParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyDBParameterGroup", } }
151
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies an existing DB subnet group. DB subnet groups must contain at least // one subnet in at least two AZs in the Amazon Region. func (c *Client) ModifyDBSubnetGroup(ctx context.Context, params *ModifyDBSubnetGroupInput, optFns ...func(*Options)) (*ModifyDBSubnetGroupOutput, error) { if params == nil { params = &ModifyDBSubnetGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyDBSubnetGroup", params, optFns, c.addOperationModifyDBSubnetGroupMiddlewares) if err != nil { return nil, err } out := result.(*ModifyDBSubnetGroupOutput) out.ResultMetadata = metadata return out, nil } type ModifyDBSubnetGroupInput struct { // The name for the DB subnet group. This value is stored as a lowercase string. // You can't modify the default subnet group. Constraints: Must match the name of // an existing DBSubnetGroup. Must not be default. Example: mySubnetgroup // // This member is required. DBSubnetGroupName *string // The EC2 subnet IDs for the DB subnet group. // // This member is required. SubnetIds []string // The description for the DB subnet group. DBSubnetGroupDescription *string noSmithyDocumentSerde } type ModifyDBSubnetGroupOutput struct { // Contains the details of an Amazon Neptune DB subnet group. This data type is // used as a response element in the DescribeDBSubnetGroups action. DBSubnetGroup *types.DBSubnetGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyDBSubnetGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyDBSubnetGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyDBSubnetGroup{}, 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 = addOpModifyDBSubnetGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDBSubnetGroup(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_opModifyDBSubnetGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyDBSubnetGroup", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies an existing event notification subscription. Note that you can't // modify the source identifiers using this call; to change source identifiers for // a subscription, use the AddSourceIdentifierToSubscription and // RemoveSourceIdentifierFromSubscription calls. You can see a list of the event // categories for a given SourceType by using the DescribeEventCategories action. func (c *Client) ModifyEventSubscription(ctx context.Context, params *ModifyEventSubscriptionInput, optFns ...func(*Options)) (*ModifyEventSubscriptionOutput, error) { if params == nil { params = &ModifyEventSubscriptionInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyEventSubscription", params, optFns, c.addOperationModifyEventSubscriptionMiddlewares) if err != nil { return nil, err } out := result.(*ModifyEventSubscriptionOutput) out.ResultMetadata = metadata return out, nil } type ModifyEventSubscriptionInput struct { // The name of the event notification subscription. // // This member is required. SubscriptionName *string // A Boolean value; set to true to activate the subscription. Enabled *bool // A list of event categories for a SourceType that you want to subscribe to. You // can see a list of the categories for a given SourceType by using the // DescribeEventCategories action. EventCategories []string // The Amazon Resource Name (ARN) of the SNS topic created for event notification. // The ARN is created by Amazon SNS when you create a topic and subscribe to it. SnsTopicArn *string // The type of source that is generating the events. For example, if you want to // be notified of events generated by a DB instance, you would set this parameter // to db-instance. if this value is not specified, all events are returned. Valid // values: db-instance | db-parameter-group | db-security-group | db-snapshot SourceType *string noSmithyDocumentSerde } type ModifyEventSubscriptionOutput struct { // Contains the results of a successful invocation of the // DescribeEventSubscriptions action. EventSubscription *types.EventSubscription // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyEventSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyEventSubscription{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyEventSubscription{}, 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 = addOpModifyEventSubscriptionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyEventSubscription(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_opModifyEventSubscription(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyEventSubscription", } }
148
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modify a setting for an Amazon Neptune global cluster. You can change one or // more database configuration parameters by specifying these parameters and their // new values in the request. func (c *Client) ModifyGlobalCluster(ctx context.Context, params *ModifyGlobalClusterInput, optFns ...func(*Options)) (*ModifyGlobalClusterOutput, error) { if params == nil { params = &ModifyGlobalClusterInput{} } result, metadata, err := c.invokeOperation(ctx, "ModifyGlobalCluster", params, optFns, c.addOperationModifyGlobalClusterMiddlewares) if err != nil { return nil, err } out := result.(*ModifyGlobalClusterOutput) out.ResultMetadata = metadata return out, nil } type ModifyGlobalClusterInput struct { // The DB cluster identifier for the global cluster being modified. This parameter // is not case-sensitive. Constraints: Must match the identifier of an existing // global database cluster. // // This member is required. GlobalClusterIdentifier *string // A value that indicates whether major version upgrades are allowed. Constraints: // You must allow major version upgrades if you specify a value for the // EngineVersion parameter that is a different major version than the DB cluster's // current version. If you upgrade the major version of a global database, the // cluster and DB instance parameter groups are set to the default parameter groups // for the new version, so you will need to apply any custom parameter groups after // completing the upgrade. AllowMajorVersionUpgrade *bool // Indicates whether the global database has deletion protection enabled. The // global database cannot be deleted when deletion protection is enabled. DeletionProtection *bool // The version number of the database engine to which you want to upgrade. // Changing this parameter will result in an outage. The change is applied during // the next maintenance window unless ApplyImmediately is enabled. To list all of // the available Neptune engine versions, use the following command: EngineVersion *string // A new cluster identifier to assign to the global database. This value is stored // as a lowercase string. Constraints: // - Must contain from 1 to 63 letters, numbers, or hyphens. // - The first character must be a letter. // - Can't end with a hyphen or contain two consecutive hyphens // Example: my-cluster2 NewGlobalClusterIdentifier *string noSmithyDocumentSerde } type ModifyGlobalClusterOutput struct { // Contains the details of an Amazon Neptune global database. This data type is // used as a response element for the CreateGlobalCluster , DescribeGlobalClusters // , ModifyGlobalCluster , DeleteGlobalCluster , FailoverGlobalCluster , and // RemoveFromGlobalCluster actions. GlobalCluster *types.GlobalCluster // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationModifyGlobalClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpModifyGlobalCluster{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpModifyGlobalCluster{}, 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 = addOpModifyGlobalClusterValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyGlobalCluster(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_opModifyGlobalCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ModifyGlobalCluster", } }
159
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Not supported. func (c *Client) PromoteReadReplicaDBCluster(ctx context.Context, params *PromoteReadReplicaDBClusterInput, optFns ...func(*Options)) (*PromoteReadReplicaDBClusterOutput, error) { if params == nil { params = &PromoteReadReplicaDBClusterInput{} } result, metadata, err := c.invokeOperation(ctx, "PromoteReadReplicaDBCluster", params, optFns, c.addOperationPromoteReadReplicaDBClusterMiddlewares) if err != nil { return nil, err } out := result.(*PromoteReadReplicaDBClusterOutput) out.ResultMetadata = metadata return out, nil } type PromoteReadReplicaDBClusterInput struct { // Not supported. // // This member is required. DBClusterIdentifier *string noSmithyDocumentSerde } type PromoteReadReplicaDBClusterOutput struct { // Contains the details of an Amazon Neptune DB cluster. This data type is used as // a response element in the DescribeDBClusters action. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPromoteReadReplicaDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpPromoteReadReplicaDBCluster{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpPromoteReadReplicaDBCluster{}, 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 = addOpPromoteReadReplicaDBClusterValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPromoteReadReplicaDBCluster(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_opPromoteReadReplicaDBCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "PromoteReadReplicaDBCluster", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // You might need to reboot your DB instance, usually for maintenance reasons. For // example, if you make certain modifications, or if you change the DB parameter // group associated with the DB instance, you must reboot the instance for the // changes to take effect. Rebooting a DB instance restarts the database engine // service. Rebooting a DB instance results in a momentary outage, during which the // DB instance status is set to rebooting. func (c *Client) RebootDBInstance(ctx context.Context, params *RebootDBInstanceInput, optFns ...func(*Options)) (*RebootDBInstanceOutput, error) { if params == nil { params = &RebootDBInstanceInput{} } result, metadata, err := c.invokeOperation(ctx, "RebootDBInstance", params, optFns, c.addOperationRebootDBInstanceMiddlewares) if err != nil { return nil, err } out := result.(*RebootDBInstanceOutput) out.ResultMetadata = metadata return out, nil } type RebootDBInstanceInput struct { // The DB instance identifier. This parameter is stored as a lowercase string. // Constraints: // - Must match the identifier of an existing DBInstance. // // This member is required. DBInstanceIdentifier *string // When true , the reboot is conducted through a MultiAZ failover. Constraint: You // can't specify true if the instance is not configured for MultiAZ. ForceFailover *bool noSmithyDocumentSerde } type RebootDBInstanceOutput struct { // Contains the details of an Amazon Neptune DB instance. This data type is used // as a response element in the DescribeDBInstances action. DBInstance *types.DBInstance // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRebootDBInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpRebootDBInstance{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRebootDBInstance{}, 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 = addOpRebootDBInstanceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebootDBInstance(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_opRebootDBInstance(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "RebootDBInstance", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Detaches a Neptune DB cluster from a Neptune global database. A secondary // cluster becomes a normal standalone cluster with read-write capability instead // of being read-only, and no longer receives data from a the primary cluster. func (c *Client) RemoveFromGlobalCluster(ctx context.Context, params *RemoveFromGlobalClusterInput, optFns ...func(*Options)) (*RemoveFromGlobalClusterOutput, error) { if params == nil { params = &RemoveFromGlobalClusterInput{} } result, metadata, err := c.invokeOperation(ctx, "RemoveFromGlobalCluster", params, optFns, c.addOperationRemoveFromGlobalClusterMiddlewares) if err != nil { return nil, err } out := result.(*RemoveFromGlobalClusterOutput) out.ResultMetadata = metadata return out, nil } type RemoveFromGlobalClusterInput struct { // The Amazon Resource Name (ARN) identifying the cluster to be detached from the // Neptune global database cluster. // // This member is required. DbClusterIdentifier *string // The identifier of the Neptune global database from which to detach the // specified Neptune DB cluster. // // This member is required. GlobalClusterIdentifier *string noSmithyDocumentSerde } type RemoveFromGlobalClusterOutput struct { // Contains the details of an Amazon Neptune global database. This data type is // used as a response element for the CreateGlobalCluster , DescribeGlobalClusters // , ModifyGlobalCluster , DeleteGlobalCluster , FailoverGlobalCluster , and // RemoveFromGlobalCluster actions. GlobalCluster *types.GlobalCluster // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRemoveFromGlobalClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveFromGlobalCluster{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveFromGlobalCluster{}, 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 = addOpRemoveFromGlobalClusterValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveFromGlobalCluster(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_opRemoveFromGlobalCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "RemoveFromGlobalCluster", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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 an Identity and Access Management (IAM) role from a DB cluster. func (c *Client) RemoveRoleFromDBCluster(ctx context.Context, params *RemoveRoleFromDBClusterInput, optFns ...func(*Options)) (*RemoveRoleFromDBClusterOutput, error) { if params == nil { params = &RemoveRoleFromDBClusterInput{} } result, metadata, err := c.invokeOperation(ctx, "RemoveRoleFromDBCluster", params, optFns, c.addOperationRemoveRoleFromDBClusterMiddlewares) if err != nil { return nil, err } out := result.(*RemoveRoleFromDBClusterOutput) out.ResultMetadata = metadata return out, nil } type RemoveRoleFromDBClusterInput struct { // The name of the DB cluster to disassociate the IAM role from. // // This member is required. DBClusterIdentifier *string // The Amazon Resource Name (ARN) of the IAM role to disassociate from the DB // cluster, for example arn:aws:iam::123456789012:role/NeptuneAccessRole . // // This member is required. RoleArn *string // The name of the feature for the DB cluster that the IAM role is to be // disassociated from. For the list of supported feature names, see // DescribeDBEngineVersions (https://docs.aws.amazon.com/neptune/latest/userguide/api-other-apis.html#DescribeDBEngineVersions) // . FeatureName *string noSmithyDocumentSerde } type RemoveRoleFromDBClusterOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRemoveRoleFromDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveRoleFromDBCluster{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveRoleFromDBCluster{}, 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 = addOpRemoveRoleFromDBClusterValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveRoleFromDBCluster(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_opRemoveRoleFromDBCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "RemoveRoleFromDBCluster", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes a source identifier from an existing event notification subscription. func (c *Client) RemoveSourceIdentifierFromSubscription(ctx context.Context, params *RemoveSourceIdentifierFromSubscriptionInput, optFns ...func(*Options)) (*RemoveSourceIdentifierFromSubscriptionOutput, error) { if params == nil { params = &RemoveSourceIdentifierFromSubscriptionInput{} } result, metadata, err := c.invokeOperation(ctx, "RemoveSourceIdentifierFromSubscription", params, optFns, c.addOperationRemoveSourceIdentifierFromSubscriptionMiddlewares) if err != nil { return nil, err } out := result.(*RemoveSourceIdentifierFromSubscriptionOutput) out.ResultMetadata = metadata return out, nil } type RemoveSourceIdentifierFromSubscriptionInput struct { // The source identifier to be removed from the subscription, such as the DB // instance identifier for a DB instance or the name of a security group. // // This member is required. SourceIdentifier *string // The name of the event notification subscription you want to remove a source // identifier from. // // This member is required. SubscriptionName *string noSmithyDocumentSerde } type RemoveSourceIdentifierFromSubscriptionOutput struct { // Contains the results of a successful invocation of the // DescribeEventSubscriptions action. EventSubscription *types.EventSubscription // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRemoveSourceIdentifierFromSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveSourceIdentifierFromSubscription{}, 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 = addOpRemoveSourceIdentifierFromSubscriptionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveSourceIdentifierFromSubscription(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_opRemoveSourceIdentifierFromSubscription(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "RemoveSourceIdentifierFromSubscription", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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 metadata tags from an Amazon Neptune resource. func (c *Client) RemoveTagsFromResource(ctx context.Context, params *RemoveTagsFromResourceInput, optFns ...func(*Options)) (*RemoveTagsFromResourceOutput, error) { if params == nil { params = &RemoveTagsFromResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "RemoveTagsFromResource", params, optFns, c.addOperationRemoveTagsFromResourceMiddlewares) if err != nil { return nil, err } out := result.(*RemoveTagsFromResourceOutput) out.ResultMetadata = metadata return out, nil } type RemoveTagsFromResourceInput struct { // The Amazon Neptune resource that the tags are removed from. This value is an // Amazon Resource Name (ARN). For information about creating an ARN, see // Constructing an Amazon Resource Name (ARN) (https://docs.aws.amazon.com/neptune/latest/UserGuide/tagging.ARN.html#tagging.ARN.Constructing) // . // // This member is required. ResourceName *string // The tag key (name) of the tag to be removed. // // This member is required. TagKeys []string noSmithyDocumentSerde } type RemoveTagsFromResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRemoveTagsFromResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpRemoveTagsFromResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRemoveTagsFromResource{}, 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 = addOpRemoveTagsFromResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveTagsFromResource(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_opRemoveTagsFromResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "RemoveTagsFromResource", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the parameters of a DB cluster parameter group to the default value. // To reset specific parameters submit a list of the following: ParameterName and // ApplyMethod . To reset the entire DB cluster parameter group, specify the // DBClusterParameterGroupName and ResetAllParameters parameters. When resetting // the entire group, dynamic parameters are updated immediately and static // parameters are set to pending-reboot to take effect on the next DB instance // restart or RebootDBInstance request. You must call RebootDBInstance for every // DB instance in your DB cluster that you want the updated static parameter to // apply to. func (c *Client) ResetDBClusterParameterGroup(ctx context.Context, params *ResetDBClusterParameterGroupInput, optFns ...func(*Options)) (*ResetDBClusterParameterGroupOutput, error) { if params == nil { params = &ResetDBClusterParameterGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "ResetDBClusterParameterGroup", params, optFns, c.addOperationResetDBClusterParameterGroupMiddlewares) if err != nil { return nil, err } out := result.(*ResetDBClusterParameterGroupOutput) out.ResultMetadata = metadata return out, nil } type ResetDBClusterParameterGroupInput struct { // The name of the DB cluster parameter group to reset. // // This member is required. DBClusterParameterGroupName *string // A list of parameter names in the DB cluster parameter group to reset to the // default values. You can't use this parameter if the ResetAllParameters // parameter is set to true . Parameters []types.Parameter // A value that is set to true to reset all parameters in the DB cluster parameter // group to their default values, and false otherwise. You can't use this // parameter if there is a list of parameter names specified for the Parameters // parameter. ResetAllParameters bool noSmithyDocumentSerde } type ResetDBClusterParameterGroupOutput struct { // The name of the DB cluster parameter group. Constraints: // - Must be 1 to 255 letters or numbers. // - First character must be a letter // - Cannot end with a hyphen or contain two consecutive hyphens // This value is stored as a lowercase string. DBClusterParameterGroupName *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationResetDBClusterParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpResetDBClusterParameterGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResetDBClusterParameterGroup{}, 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 = addOpResetDBClusterParameterGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetDBClusterParameterGroup(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_opResetDBClusterParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ResetDBClusterParameterGroup", } }
148
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Modifies the parameters of a DB parameter group to the engine/system default // value. To reset specific parameters, provide a list of the following: // ParameterName and ApplyMethod . To reset the entire DB parameter group, specify // the DBParameterGroup name and ResetAllParameters parameters. When resetting the // entire group, dynamic parameters are updated immediately and static parameters // are set to pending-reboot to take effect on the next DB instance restart or // RebootDBInstance request. func (c *Client) ResetDBParameterGroup(ctx context.Context, params *ResetDBParameterGroupInput, optFns ...func(*Options)) (*ResetDBParameterGroupOutput, error) { if params == nil { params = &ResetDBParameterGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "ResetDBParameterGroup", params, optFns, c.addOperationResetDBParameterGroupMiddlewares) if err != nil { return nil, err } out := result.(*ResetDBParameterGroupOutput) out.ResultMetadata = metadata return out, nil } type ResetDBParameterGroupInput struct { // The name of the DB parameter group. Constraints: // - Must match the name of an existing DBParameterGroup. // // This member is required. DBParameterGroupName *string // To reset the entire DB parameter group, specify the DBParameterGroup name and // ResetAllParameters parameters. To reset specific parameters, provide a list of // the following: ParameterName and ApplyMethod . A maximum of 20 parameters can be // modified in a single request. Valid Values (for Apply method): pending-reboot Parameters []types.Parameter // Specifies whether ( true ) or not ( false ) to reset all parameters in the DB // parameter group to default values. Default: true ResetAllParameters bool noSmithyDocumentSerde } type ResetDBParameterGroupOutput struct { // Provides the name of the DB parameter group. DBParameterGroupName *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationResetDBParameterGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpResetDBParameterGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpResetDBParameterGroup{}, 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 = addOpResetDBParameterGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetDBParameterGroup(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_opResetDBParameterGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "ResetDBParameterGroup", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new DB cluster from a DB snapshot or DB cluster snapshot. If a DB // snapshot is specified, the target DB cluster is created from the source DB // snapshot with a default configuration and default security group. If a DB // cluster snapshot is specified, the target DB cluster is created from the source // DB cluster restore point with the same configuration as the original source DB // cluster, except that the new DB cluster is created with the default security // group. func (c *Client) RestoreDBClusterFromSnapshot(ctx context.Context, params *RestoreDBClusterFromSnapshotInput, optFns ...func(*Options)) (*RestoreDBClusterFromSnapshotOutput, error) { if params == nil { params = &RestoreDBClusterFromSnapshotInput{} } result, metadata, err := c.invokeOperation(ctx, "RestoreDBClusterFromSnapshot", params, optFns, c.addOperationRestoreDBClusterFromSnapshotMiddlewares) if err != nil { return nil, err } out := result.(*RestoreDBClusterFromSnapshotOutput) out.ResultMetadata = metadata return out, nil } type RestoreDBClusterFromSnapshotInput struct { // The name of the DB cluster to create from the DB snapshot or DB cluster // snapshot. This parameter isn't case-sensitive. Constraints: // - Must contain from 1 to 63 letters, numbers, or hyphens // - First character must be a letter // - Cannot end with a hyphen or contain two consecutive hyphens // Example: my-snapshot-id // // This member is required. DBClusterIdentifier *string // The database engine to use for the new DB cluster. Default: The same as source // Constraint: Must be compatible with the engine of the source // // This member is required. Engine *string // The identifier for the DB snapshot or DB cluster snapshot to restore from. You // can use either the name or the Amazon Resource Name (ARN) to specify a DB // cluster snapshot. However, you can use only the ARN to specify a DB snapshot. // Constraints: // - Must match the identifier of an existing Snapshot. // // This member is required. SnapshotIdentifier *string // Provides the list of EC2 Availability Zones that instances in the restored DB // cluster can be created in. AvailabilityZones []string // If set to true , tags are copied to any snapshot of the restored DB cluster that // is created. CopyTagsToSnapshot *bool // The name of the DB cluster parameter group to associate with the new DB // cluster. Constraints: // - If supplied, must match the name of an existing DBClusterParameterGroup. DBClusterParameterGroupName *string // The name of the DB subnet group to use for the new DB cluster. Constraints: If // supplied, must match the name of an existing DBSubnetGroup. Example: // mySubnetgroup DBSubnetGroupName *string // Not supported. DatabaseName *string // A value that indicates whether the DB cluster has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, // deletion protection is disabled. DeletionProtection *bool // The list of logs that the restored DB cluster is to export to Amazon CloudWatch // Logs. EnableCloudwatchLogsExports []string // True to enable mapping of Amazon Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. Default: false EnableIAMDatabaseAuthentication *bool // The version of the database engine to use for the new DB cluster. EngineVersion *string // The Amazon KMS key identifier to use when restoring an encrypted DB cluster // from a DB snapshot or DB cluster snapshot. The KMS key identifier is the Amazon // Resource Name (ARN) for the KMS encryption key. If you are restoring a DB // cluster with the same Amazon account that owns the KMS encryption key used to // encrypt the new DB cluster, then you can use the KMS key alias instead of the // ARN for the KMS encryption key. If you do not specify a value for the KmsKeyId // parameter, then the following will occur: // - If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is // encrypted, then the restored DB cluster is encrypted using the KMS key that was // used to encrypt the DB snapshot or DB cluster snapshot. // - If the DB snapshot or DB cluster snapshot in SnapshotIdentifier is not // encrypted, then the restored DB cluster is not encrypted. KmsKeyId *string // (Not supported by Neptune) OptionGroupName *string // The port number on which the new DB cluster accepts connections. Constraints: // Value must be 1150-65535 Default: The same port as the original DB cluster. Port *int32 // Contains the scaling configuration of a Neptune Serverless DB cluster. For more // information, see Using Amazon Neptune Serverless (https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) // in the Amazon Neptune User Guide. ServerlessV2ScalingConfiguration *types.ServerlessV2ScalingConfiguration // The tags to be assigned to the restored DB cluster. Tags []types.Tag // A list of VPC security groups that the new DB cluster will belong to. VpcSecurityGroupIds []string noSmithyDocumentSerde } type RestoreDBClusterFromSnapshotOutput struct { // Contains the details of an Amazon Neptune DB cluster. This data type is used as // a response element in the DescribeDBClusters action. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRestoreDBClusterFromSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreDBClusterFromSnapshot{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreDBClusterFromSnapshot{}, 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 = addOpRestoreDBClusterFromSnapshotValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreDBClusterFromSnapshot(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_opRestoreDBClusterFromSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "RestoreDBClusterFromSnapshot", } }
221
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Restores a DB cluster to an arbitrary point in time. Users can restore to any // point in time before LatestRestorableTime for up to BackupRetentionPeriod days. // The target DB cluster is created from the source DB cluster with the same // configuration as the original DB cluster, except that the new DB cluster is // created with the default DB security group. This action only restores the DB // cluster, not the DB instances for that DB cluster. You must invoke the // CreateDBInstance action to create DB instances for the restored DB cluster, // specifying the identifier of the restored DB cluster in DBClusterIdentifier . // You can create DB instances only after the RestoreDBClusterToPointInTime action // has completed and the DB cluster is available. func (c *Client) RestoreDBClusterToPointInTime(ctx context.Context, params *RestoreDBClusterToPointInTimeInput, optFns ...func(*Options)) (*RestoreDBClusterToPointInTimeOutput, error) { if params == nil { params = &RestoreDBClusterToPointInTimeInput{} } result, metadata, err := c.invokeOperation(ctx, "RestoreDBClusterToPointInTime", params, optFns, c.addOperationRestoreDBClusterToPointInTimeMiddlewares) if err != nil { return nil, err } out := result.(*RestoreDBClusterToPointInTimeOutput) out.ResultMetadata = metadata return out, nil } type RestoreDBClusterToPointInTimeInput struct { // The name of the new DB cluster to be created. Constraints: // - Must contain from 1 to 63 letters, numbers, or hyphens // - First character must be a letter // - Cannot end with a hyphen or contain two consecutive hyphens // // This member is required. DBClusterIdentifier *string // The identifier of the source DB cluster from which to restore. Constraints: // - Must match the identifier of an existing DBCluster. // // This member is required. SourceDBClusterIdentifier *string // The name of the DB cluster parameter group to associate with the new DB // cluster. Constraints: // - If supplied, must match the name of an existing DBClusterParameterGroup. DBClusterParameterGroupName *string // The DB subnet group name to use for the new DB cluster. Constraints: If // supplied, must match the name of an existing DBSubnetGroup. Example: // mySubnetgroup DBSubnetGroupName *string // A value that indicates whether the DB cluster has deletion protection enabled. // The database can't be deleted when deletion protection is enabled. By default, // deletion protection is disabled. DeletionProtection *bool // The list of logs that the restored DB cluster is to export to CloudWatch Logs. EnableCloudwatchLogsExports []string // True to enable mapping of Amazon Identity and Access Management (IAM) accounts // to database accounts, and otherwise false. Default: false EnableIAMDatabaseAuthentication *bool // The Amazon KMS key identifier to use when restoring an encrypted DB cluster // from an encrypted DB cluster. The KMS key identifier is the Amazon Resource Name // (ARN) for the KMS encryption key. If you are restoring a DB cluster with the // same Amazon account that owns the KMS encryption key used to encrypt the new DB // cluster, then you can use the KMS key alias instead of the ARN for the KMS // encryption key. You can restore to a new DB cluster and encrypt the new DB // cluster with a KMS key that is different than the KMS key used to encrypt the // source DB cluster. The new DB cluster is encrypted with the KMS key identified // by the KmsKeyId parameter. If you do not specify a value for the KmsKeyId // parameter, then the following will occur: // - If the DB cluster is encrypted, then the restored DB cluster is encrypted // using the KMS key that was used to encrypt the source DB cluster. // - If the DB cluster is not encrypted, then the restored DB cluster is not // encrypted. // If DBClusterIdentifier refers to a DB cluster that is not encrypted, then the // restore request is rejected. KmsKeyId *string // (Not supported by Neptune) OptionGroupName *string // The port number on which the new DB cluster accepts connections. Constraints: // Value must be 1150-65535 Default: The same port as the original DB cluster. Port *int32 // The date and time to restore the DB cluster to. Valid Values: Value must be a // time in Universal Coordinated Time (UTC) format Constraints: // - Must be before the latest restorable time for the DB instance // - Must be specified if UseLatestRestorableTime parameter is not provided // - Cannot be specified if UseLatestRestorableTime parameter is true // - Cannot be specified if RestoreType parameter is copy-on-write // Example: 2015-03-07T23:45:00Z RestoreToTime *time.Time // The type of restore to be performed. You can specify one of the following // values: // - full-copy - The new DB cluster is restored as a full copy of the source DB // cluster. // - copy-on-write - The new DB cluster is restored as a clone of the source DB // cluster. // If you don't specify a RestoreType value, then the new DB cluster is restored // as a full copy of the source DB cluster. RestoreType *string // Contains the scaling configuration of a Neptune Serverless DB cluster. For more // information, see Using Amazon Neptune Serverless (https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) // in the Amazon Neptune User Guide. ServerlessV2ScalingConfiguration *types.ServerlessV2ScalingConfiguration // The tags to be applied to the restored DB cluster. Tags []types.Tag // A value that is set to true to restore the DB cluster to the latest restorable // backup time, and false otherwise. Default: false Constraints: Cannot be // specified if RestoreToTime parameter is provided. UseLatestRestorableTime bool // A list of VPC security groups that the new DB cluster belongs to. VpcSecurityGroupIds []string noSmithyDocumentSerde } type RestoreDBClusterToPointInTimeOutput struct { // Contains the details of an Amazon Neptune DB cluster. This data type is used as // a response element in the DescribeDBClusters action. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRestoreDBClusterToPointInTimeMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpRestoreDBClusterToPointInTime{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpRestoreDBClusterToPointInTime{}, 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 = addOpRestoreDBClusterToPointInTimeValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreDBClusterToPointInTime(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_opRestoreDBClusterToPointInTime(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "RestoreDBClusterToPointInTime", } }
227
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Starts an Amazon Neptune DB cluster that was stopped using the Amazon console, // the Amazon CLI stop-db-cluster command, or the StopDBCluster API. func (c *Client) StartDBCluster(ctx context.Context, params *StartDBClusterInput, optFns ...func(*Options)) (*StartDBClusterOutput, error) { if params == nil { params = &StartDBClusterInput{} } result, metadata, err := c.invokeOperation(ctx, "StartDBCluster", params, optFns, c.addOperationStartDBClusterMiddlewares) if err != nil { return nil, err } out := result.(*StartDBClusterOutput) out.ResultMetadata = metadata return out, nil } type StartDBClusterInput struct { // The DB cluster identifier of the Neptune DB cluster to be started. This // parameter is stored as a lowercase string. // // This member is required. DBClusterIdentifier *string noSmithyDocumentSerde } type StartDBClusterOutput struct { // Contains the details of an Amazon Neptune DB cluster. This data type is used as // a response element in the DescribeDBClusters action. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStartDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpStartDBCluster{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStartDBCluster{}, 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 = addOpStartDBClusterValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDBCluster(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_opStartDBCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "StartDBCluster", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Stops an Amazon Neptune DB cluster. When you stop a DB cluster, Neptune retains // the DB cluster's metadata, including its endpoints and DB parameter groups. // Neptune also retains the transaction logs so you can do a point-in-time restore // if necessary. func (c *Client) StopDBCluster(ctx context.Context, params *StopDBClusterInput, optFns ...func(*Options)) (*StopDBClusterOutput, error) { if params == nil { params = &StopDBClusterInput{} } result, metadata, err := c.invokeOperation(ctx, "StopDBCluster", params, optFns, c.addOperationStopDBClusterMiddlewares) if err != nil { return nil, err } out := result.(*StopDBClusterOutput) out.ResultMetadata = metadata return out, nil } type StopDBClusterInput struct { // The DB cluster identifier of the Neptune DB cluster to be stopped. This // parameter is stored as a lowercase string. // // This member is required. DBClusterIdentifier *string noSmithyDocumentSerde } type StopDBClusterOutput struct { // Contains the details of an Amazon Neptune DB cluster. This data type is used as // a response element in the DescribeDBClusters action. DBCluster *types.DBCluster // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStopDBClusterMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsquery_serializeOpStopDBCluster{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsquery_deserializeOpStopDBCluster{}, 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 = addOpStopDBClusterValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopDBCluster(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_opStopDBCluster(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "rds", OperationName: "StopDBCluster", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package neptune provides the API client, operations, and parameter types for // Amazon Neptune. // // Amazon Neptune Amazon Neptune is a fast, reliable, fully-managed graph database // service that makes it easy to build and run applications that work with highly // connected datasets. The core of Amazon Neptune is a purpose-built, // high-performance graph database engine optimized for storing billions of // relationships and querying the graph with milliseconds latency. Amazon Neptune // supports popular graph models Property Graph and W3C's RDF, and their respective // query languages Apache TinkerPop Gremlin and SPARQL, allowing you to easily // build queries that efficiently navigate highly connected datasets. Neptune // powers graph use cases such as recommendation engines, fraud detection, // knowledge graphs, drug discovery, and network security. This interface reference // for Amazon Neptune contains documentation for a programming or command line // interface you can use to manage Amazon Neptune. Note that Amazon Neptune is // asynchronous, which means that some interfaces might require techniques such as // polling or callback functions to determine when a command has been applied. In // this reference, the parameter descriptions indicate whether a command is applied // immediately, on the next instance reboot, or during the maintenance window. The // reference structure is as follows, and we list following some related topics // from the user guide. package neptune
25
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune 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/neptune/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 = "rds" } 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 neptune // goModuleVersion is the tagged release for this module const goModuleVersion = "1.20.7"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/query" "github.com/aws/aws-sdk-go-v2/service/neptune/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" "path" ) type awsAwsquery_serializeOpAddRoleToDBCluster struct { } func (*awsAwsquery_serializeOpAddRoleToDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAddRoleToDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AddRoleToDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AddRoleToDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentAddRoleToDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpAddSourceIdentifierToSubscription struct { } func (*awsAwsquery_serializeOpAddSourceIdentifierToSubscription) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAddSourceIdentifierToSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AddSourceIdentifierToSubscriptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AddSourceIdentifierToSubscription") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentAddSourceIdentifierToSubscriptionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpAddTagsToResource struct { } func (*awsAwsquery_serializeOpAddTagsToResource) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpAddTagsToResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AddTagsToResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("AddTagsToResource") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentAddTagsToResourceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpApplyPendingMaintenanceAction struct { } func (*awsAwsquery_serializeOpApplyPendingMaintenanceAction) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpApplyPendingMaintenanceAction) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ApplyPendingMaintenanceActionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ApplyPendingMaintenanceAction") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentApplyPendingMaintenanceActionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCopyDBClusterParameterGroup struct { } func (*awsAwsquery_serializeOpCopyDBClusterParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCopyDBClusterParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CopyDBClusterParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CopyDBClusterParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCopyDBClusterParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCopyDBClusterSnapshot struct { } func (*awsAwsquery_serializeOpCopyDBClusterSnapshot) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCopyDBClusterSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CopyDBClusterSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CopyDBClusterSnapshot") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCopyDBClusterSnapshotInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCopyDBParameterGroup struct { } func (*awsAwsquery_serializeOpCopyDBParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCopyDBParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CopyDBParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CopyDBParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCopyDBParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateDBCluster struct { } func (*awsAwsquery_serializeOpCreateDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateDBClusterEndpoint struct { } func (*awsAwsquery_serializeOpCreateDBClusterEndpoint) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateDBClusterEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateDBClusterEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateDBClusterEndpoint") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateDBClusterEndpointInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateDBClusterParameterGroup struct { } func (*awsAwsquery_serializeOpCreateDBClusterParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateDBClusterParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateDBClusterParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateDBClusterParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateDBClusterParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateDBClusterSnapshot struct { } func (*awsAwsquery_serializeOpCreateDBClusterSnapshot) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateDBClusterSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateDBClusterSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateDBClusterSnapshot") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateDBClusterSnapshotInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateDBInstance struct { } func (*awsAwsquery_serializeOpCreateDBInstance) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateDBInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateDBInstanceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateDBInstance") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateDBInstanceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateDBParameterGroup struct { } func (*awsAwsquery_serializeOpCreateDBParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateDBParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateDBParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateDBParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateDBParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateDBSubnetGroup struct { } func (*awsAwsquery_serializeOpCreateDBSubnetGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateDBSubnetGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateDBSubnetGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateDBSubnetGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateDBSubnetGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateEventSubscription struct { } func (*awsAwsquery_serializeOpCreateEventSubscription) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateEventSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateEventSubscriptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateEventSubscription") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateEventSubscriptionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpCreateGlobalCluster struct { } func (*awsAwsquery_serializeOpCreateGlobalCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpCreateGlobalCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateGlobalClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("CreateGlobalCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentCreateGlobalClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteDBCluster struct { } func (*awsAwsquery_serializeOpDeleteDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteDBClusterEndpoint struct { } func (*awsAwsquery_serializeOpDeleteDBClusterEndpoint) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteDBClusterEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteDBClusterEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteDBClusterEndpoint") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteDBClusterEndpointInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteDBClusterParameterGroup struct { } func (*awsAwsquery_serializeOpDeleteDBClusterParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteDBClusterParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteDBClusterParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteDBClusterParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteDBClusterParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteDBClusterSnapshot struct { } func (*awsAwsquery_serializeOpDeleteDBClusterSnapshot) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteDBClusterSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteDBClusterSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteDBClusterSnapshot") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteDBClusterSnapshotInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteDBInstance struct { } func (*awsAwsquery_serializeOpDeleteDBInstance) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteDBInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteDBInstanceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteDBInstance") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteDBInstanceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteDBParameterGroup struct { } func (*awsAwsquery_serializeOpDeleteDBParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteDBParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteDBParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteDBParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteDBParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteDBSubnetGroup struct { } func (*awsAwsquery_serializeOpDeleteDBSubnetGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteDBSubnetGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteDBSubnetGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteDBSubnetGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteDBSubnetGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteEventSubscription struct { } func (*awsAwsquery_serializeOpDeleteEventSubscription) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteEventSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteEventSubscriptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteEventSubscription") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteEventSubscriptionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDeleteGlobalCluster struct { } func (*awsAwsquery_serializeOpDeleteGlobalCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDeleteGlobalCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteGlobalClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DeleteGlobalCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDeleteGlobalClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBClusterEndpoints struct { } func (*awsAwsquery_serializeOpDescribeDBClusterEndpoints) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBClusterEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBClusterEndpointsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBClusterEndpoints") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBClusterEndpointsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBClusterParameterGroups struct { } func (*awsAwsquery_serializeOpDescribeDBClusterParameterGroups) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBClusterParameterGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBClusterParameterGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBClusterParameterGroups") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBClusterParameterGroupsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBClusterParameters struct { } func (*awsAwsquery_serializeOpDescribeDBClusterParameters) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBClusterParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBClusterParametersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBClusterParameters") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBClusterParametersInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBClusters struct { } func (*awsAwsquery_serializeOpDescribeDBClusters) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBClusters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBClustersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBClusters") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBClustersInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes struct { } func (*awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBClusterSnapshotAttributesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBClusterSnapshotAttributes") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBClusterSnapshotAttributesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBClusterSnapshots struct { } func (*awsAwsquery_serializeOpDescribeDBClusterSnapshots) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBClusterSnapshotsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBClusterSnapshots") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBClusterSnapshotsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBEngineVersions struct { } func (*awsAwsquery_serializeOpDescribeDBEngineVersions) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBEngineVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBEngineVersionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBEngineVersions") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBEngineVersionsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBInstances struct { } func (*awsAwsquery_serializeOpDescribeDBInstances) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBInstancesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBInstances") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBInstancesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBParameterGroups struct { } func (*awsAwsquery_serializeOpDescribeDBParameterGroups) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBParameterGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBParameterGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBParameterGroups") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBParameterGroupsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBParameters struct { } func (*awsAwsquery_serializeOpDescribeDBParameters) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBParametersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBParameters") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBParametersInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeDBSubnetGroups struct { } func (*awsAwsquery_serializeOpDescribeDBSubnetGroups) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeDBSubnetGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeDBSubnetGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeDBSubnetGroups") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeDBSubnetGroupsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters struct { } func (*awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeEngineDefaultClusterParametersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeEngineDefaultClusterParameters") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeEngineDefaultClusterParametersInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeEngineDefaultParameters struct { } func (*awsAwsquery_serializeOpDescribeEngineDefaultParameters) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeEngineDefaultParameters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeEngineDefaultParametersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeEngineDefaultParameters") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeEngineDefaultParametersInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeEventCategories struct { } func (*awsAwsquery_serializeOpDescribeEventCategories) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeEventCategories) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeEventCategoriesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeEventCategories") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeEventCategoriesInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeEvents struct { } func (*awsAwsquery_serializeOpDescribeEvents) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeEvents) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeEventsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeEvents") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeEventsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeEventSubscriptions struct { } func (*awsAwsquery_serializeOpDescribeEventSubscriptions) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeEventSubscriptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeEventSubscriptionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeEventSubscriptions") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeEventSubscriptionsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeGlobalClusters struct { } func (*awsAwsquery_serializeOpDescribeGlobalClusters) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeGlobalClusters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeGlobalClustersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeGlobalClusters") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeGlobalClustersInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions struct { } func (*awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeOrderableDBInstanceOptionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeOrderableDBInstanceOptions") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeOrderableDBInstanceOptionsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribePendingMaintenanceActions struct { } func (*awsAwsquery_serializeOpDescribePendingMaintenanceActions) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribePendingMaintenanceActions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribePendingMaintenanceActionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribePendingMaintenanceActions") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribePendingMaintenanceActionsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpDescribeValidDBInstanceModifications struct { } func (*awsAwsquery_serializeOpDescribeValidDBInstanceModifications) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpDescribeValidDBInstanceModifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeValidDBInstanceModificationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("DescribeValidDBInstanceModifications") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentDescribeValidDBInstanceModificationsInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpFailoverDBCluster struct { } func (*awsAwsquery_serializeOpFailoverDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpFailoverDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*FailoverDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("FailoverDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentFailoverDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpFailoverGlobalCluster struct { } func (*awsAwsquery_serializeOpFailoverGlobalCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpFailoverGlobalCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*FailoverGlobalClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("FailoverGlobalCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentFailoverGlobalClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpListTagsForResource struct { } func (*awsAwsquery_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ListTagsForResource") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentListTagsForResourceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyDBCluster struct { } func (*awsAwsquery_serializeOpModifyDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyDBClusterEndpoint struct { } func (*awsAwsquery_serializeOpModifyDBClusterEndpoint) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyDBClusterEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyDBClusterEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyDBClusterEndpoint") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyDBClusterEndpointInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyDBClusterParameterGroup struct { } func (*awsAwsquery_serializeOpModifyDBClusterParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyDBClusterParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyDBClusterParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyDBClusterParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyDBClusterParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute struct { } func (*awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyDBClusterSnapshotAttributeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyDBClusterSnapshotAttribute") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyDBClusterSnapshotAttributeInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyDBInstance struct { } func (*awsAwsquery_serializeOpModifyDBInstance) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyDBInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyDBInstanceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyDBInstance") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyDBInstanceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyDBParameterGroup struct { } func (*awsAwsquery_serializeOpModifyDBParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyDBParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyDBParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyDBParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyDBParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyDBSubnetGroup struct { } func (*awsAwsquery_serializeOpModifyDBSubnetGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyDBSubnetGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyDBSubnetGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyDBSubnetGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyDBSubnetGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyEventSubscription struct { } func (*awsAwsquery_serializeOpModifyEventSubscription) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyEventSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyEventSubscriptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyEventSubscription") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyEventSubscriptionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpModifyGlobalCluster struct { } func (*awsAwsquery_serializeOpModifyGlobalCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpModifyGlobalCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ModifyGlobalClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ModifyGlobalCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentModifyGlobalClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpPromoteReadReplicaDBCluster struct { } func (*awsAwsquery_serializeOpPromoteReadReplicaDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpPromoteReadReplicaDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PromoteReadReplicaDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("PromoteReadReplicaDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentPromoteReadReplicaDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRebootDBInstance struct { } func (*awsAwsquery_serializeOpRebootDBInstance) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRebootDBInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RebootDBInstanceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RebootDBInstance") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentRebootDBInstanceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRemoveFromGlobalCluster struct { } func (*awsAwsquery_serializeOpRemoveFromGlobalCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRemoveFromGlobalCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveFromGlobalClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RemoveFromGlobalCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentRemoveFromGlobalClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRemoveRoleFromDBCluster struct { } func (*awsAwsquery_serializeOpRemoveRoleFromDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRemoveRoleFromDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveRoleFromDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RemoveRoleFromDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentRemoveRoleFromDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription struct { } func (*awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveSourceIdentifierFromSubscriptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RemoveSourceIdentifierFromSubscription") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentRemoveSourceIdentifierFromSubscriptionInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRemoveTagsFromResource struct { } func (*awsAwsquery_serializeOpRemoveTagsFromResource) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRemoveTagsFromResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RemoveTagsFromResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RemoveTagsFromResource") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentRemoveTagsFromResourceInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpResetDBClusterParameterGroup struct { } func (*awsAwsquery_serializeOpResetDBClusterParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpResetDBClusterParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ResetDBClusterParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ResetDBClusterParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentResetDBClusterParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpResetDBParameterGroup struct { } func (*awsAwsquery_serializeOpResetDBParameterGroup) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpResetDBParameterGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ResetDBParameterGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("ResetDBParameterGroup") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentResetDBParameterGroupInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRestoreDBClusterFromSnapshot struct { } func (*awsAwsquery_serializeOpRestoreDBClusterFromSnapshot) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRestoreDBClusterFromSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RestoreDBClusterFromSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RestoreDBClusterFromSnapshot") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpRestoreDBClusterToPointInTime struct { } func (*awsAwsquery_serializeOpRestoreDBClusterToPointInTime) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpRestoreDBClusterToPointInTime) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*RestoreDBClusterToPointInTimeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("RestoreDBClusterToPointInTime") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentRestoreDBClusterToPointInTimeInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpStartDBCluster struct { } func (*awsAwsquery_serializeOpStartDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpStartDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*StartDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("StartDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentStartDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsquery_serializeOpStopDBCluster struct { } func (*awsAwsquery_serializeOpStopDBCluster) ID() string { return "OperationSerializer" } func (m *awsAwsquery_serializeOpStopDBCluster) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*StopDBClusterInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") bodyWriter := bytes.NewBuffer(nil) bodyEncoder := query.NewEncoder(bodyWriter) body := bodyEncoder.Object() body.Key("Action").String("StopDBCluster") body.Key("Version").String("2014-10-31") if err := awsAwsquery_serializeOpDocumentStopDBClusterInput(input, bodyEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } err = bodyEncoder.Encode() if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsquery_serializeDocumentAttributeValueList(v []string, value query.Value) error { array := value.Array("AttributeValue") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentAvailabilityZones(v []string, value query.Value) error { array := value.Array("AvailabilityZone") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentCloudwatchLogsExportConfiguration(v *types.CloudwatchLogsExportConfiguration, value query.Value) error { object := value.Object() _ = object if v.DisableLogTypes != nil { objectKey := object.Key("DisableLogTypes") if err := awsAwsquery_serializeDocumentLogTypeList(v.DisableLogTypes, objectKey); err != nil { return err } } if v.EnableLogTypes != nil { objectKey := object.Key("EnableLogTypes") if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableLogTypes, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeDocumentDBSecurityGroupNameList(v []string, value query.Value) error { array := value.Array("DBSecurityGroupName") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentEventCategoriesList(v []string, value query.Value) error { array := value.Array("EventCategory") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentFilter(v *types.Filter, value query.Value) error { object := value.Object() _ = object if v.Name != nil { objectKey := object.Key("Name") objectKey.String(*v.Name) } if v.Values != nil { objectKey := object.Key("Values") if err := awsAwsquery_serializeDocumentFilterValueList(v.Values, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeDocumentFilterList(v []types.Filter, value query.Value) error { array := value.Array("Filter") for i := range v { av := array.Value() if err := awsAwsquery_serializeDocumentFilter(&v[i], av); err != nil { return err } } return nil } func awsAwsquery_serializeDocumentFilterValueList(v []string, value query.Value) error { array := value.Array("Value") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentKeyList(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentLogTypeList(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentParameter(v *types.Parameter, value query.Value) error { object := value.Object() _ = object if v.AllowedValues != nil { objectKey := object.Key("AllowedValues") objectKey.String(*v.AllowedValues) } if len(v.ApplyMethod) > 0 { objectKey := object.Key("ApplyMethod") objectKey.String(string(v.ApplyMethod)) } if v.ApplyType != nil { objectKey := object.Key("ApplyType") objectKey.String(*v.ApplyType) } if v.DataType != nil { objectKey := object.Key("DataType") objectKey.String(*v.DataType) } if v.Description != nil { objectKey := object.Key("Description") objectKey.String(*v.Description) } if v.IsModifiable { objectKey := object.Key("IsModifiable") objectKey.Boolean(v.IsModifiable) } if v.MinimumEngineVersion != nil { objectKey := object.Key("MinimumEngineVersion") objectKey.String(*v.MinimumEngineVersion) } if v.ParameterName != nil { objectKey := object.Key("ParameterName") objectKey.String(*v.ParameterName) } if v.ParameterValue != nil { objectKey := object.Key("ParameterValue") objectKey.String(*v.ParameterValue) } if v.Source != nil { objectKey := object.Key("Source") objectKey.String(*v.Source) } return nil } func awsAwsquery_serializeDocumentParametersList(v []types.Parameter, value query.Value) error { array := value.Array("Parameter") for i := range v { av := array.Value() if err := awsAwsquery_serializeDocumentParameter(&v[i], av); err != nil { return err } } return nil } func awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v *types.ServerlessV2ScalingConfiguration, value query.Value) error { object := value.Object() _ = object if v.MaxCapacity != nil { objectKey := object.Key("MaxCapacity") switch { case math.IsNaN(*v.MaxCapacity): objectKey.String("NaN") case math.IsInf(*v.MaxCapacity, 1): objectKey.String("Infinity") case math.IsInf(*v.MaxCapacity, -1): objectKey.String("-Infinity") default: objectKey.Double(*v.MaxCapacity) } } if v.MinCapacity != nil { objectKey := object.Key("MinCapacity") switch { case math.IsNaN(*v.MinCapacity): objectKey.String("NaN") case math.IsInf(*v.MinCapacity, 1): objectKey.String("Infinity") case math.IsInf(*v.MinCapacity, -1): objectKey.String("-Infinity") default: objectKey.Double(*v.MinCapacity) } } return nil } func awsAwsquery_serializeDocumentSourceIdsList(v []string, value query.Value) error { array := value.Array("SourceId") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentStringList(v []string, value query.Value) error { array := value.Array("member") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentSubnetIdentifierList(v []string, value query.Value) error { array := value.Array("SubnetIdentifier") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error { object := value.Object() _ = object if v.Key != nil { objectKey := object.Key("Key") objectKey.String(*v.Key) } if v.Value != nil { objectKey := object.Key("Value") objectKey.String(*v.Value) } return nil } func awsAwsquery_serializeDocumentTagList(v []types.Tag, value query.Value) error { array := value.Array("Tag") for i := range v { av := array.Value() if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v []string, value query.Value) error { array := value.Array("VpcSecurityGroupId") for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsquery_serializeOpDocumentAddRoleToDBClusterInput(v *AddRoleToDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.FeatureName != nil { objectKey := object.Key("FeatureName") objectKey.String(*v.FeatureName) } if v.RoleArn != nil { objectKey := object.Key("RoleArn") objectKey.String(*v.RoleArn) } return nil } func awsAwsquery_serializeOpDocumentAddSourceIdentifierToSubscriptionInput(v *AddSourceIdentifierToSubscriptionInput, value query.Value) error { object := value.Object() _ = object if v.SourceIdentifier != nil { objectKey := object.Key("SourceIdentifier") objectKey.String(*v.SourceIdentifier) } if v.SubscriptionName != nil { objectKey := object.Key("SubscriptionName") objectKey.String(*v.SubscriptionName) } return nil } func awsAwsquery_serializeOpDocumentAddTagsToResourceInput(v *AddTagsToResourceInput, value query.Value) error { object := value.Object() _ = object if v.ResourceName != nil { objectKey := object.Key("ResourceName") objectKey.String(*v.ResourceName) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentApplyPendingMaintenanceActionInput(v *ApplyPendingMaintenanceActionInput, value query.Value) error { object := value.Object() _ = object if v.ApplyAction != nil { objectKey := object.Key("ApplyAction") objectKey.String(*v.ApplyAction) } if v.OptInType != nil { objectKey := object.Key("OptInType") objectKey.String(*v.OptInType) } if v.ResourceIdentifier != nil { objectKey := object.Key("ResourceIdentifier") objectKey.String(*v.ResourceIdentifier) } return nil } func awsAwsquery_serializeOpDocumentCopyDBClusterParameterGroupInput(v *CopyDBClusterParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.SourceDBClusterParameterGroupIdentifier != nil { objectKey := object.Key("SourceDBClusterParameterGroupIdentifier") objectKey.String(*v.SourceDBClusterParameterGroupIdentifier) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } if v.TargetDBClusterParameterGroupDescription != nil { objectKey := object.Key("TargetDBClusterParameterGroupDescription") objectKey.String(*v.TargetDBClusterParameterGroupDescription) } if v.TargetDBClusterParameterGroupIdentifier != nil { objectKey := object.Key("TargetDBClusterParameterGroupIdentifier") objectKey.String(*v.TargetDBClusterParameterGroupIdentifier) } return nil } func awsAwsquery_serializeOpDocumentCopyDBClusterSnapshotInput(v *CopyDBClusterSnapshotInput, value query.Value) error { object := value.Object() _ = object if v.CopyTags != nil { objectKey := object.Key("CopyTags") objectKey.Boolean(*v.CopyTags) } if v.destinationRegion != nil { objectKey := object.Key("DestinationRegion") objectKey.String(*v.destinationRegion) } if v.KmsKeyId != nil { objectKey := object.Key("KmsKeyId") objectKey.String(*v.KmsKeyId) } if v.PreSignedUrl != nil { objectKey := object.Key("PreSignedUrl") objectKey.String(*v.PreSignedUrl) } if v.SourceDBClusterSnapshotIdentifier != nil { objectKey := object.Key("SourceDBClusterSnapshotIdentifier") objectKey.String(*v.SourceDBClusterSnapshotIdentifier) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } if v.TargetDBClusterSnapshotIdentifier != nil { objectKey := object.Key("TargetDBClusterSnapshotIdentifier") objectKey.String(*v.TargetDBClusterSnapshotIdentifier) } return nil } func awsAwsquery_serializeOpDocumentCopyDBParameterGroupInput(v *CopyDBParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.SourceDBParameterGroupIdentifier != nil { objectKey := object.Key("SourceDBParameterGroupIdentifier") objectKey.String(*v.SourceDBParameterGroupIdentifier) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } if v.TargetDBParameterGroupDescription != nil { objectKey := object.Key("TargetDBParameterGroupDescription") objectKey.String(*v.TargetDBParameterGroupDescription) } if v.TargetDBParameterGroupIdentifier != nil { objectKey := object.Key("TargetDBParameterGroupIdentifier") objectKey.String(*v.TargetDBParameterGroupIdentifier) } return nil } func awsAwsquery_serializeOpDocumentCreateDBClusterEndpointInput(v *CreateDBClusterEndpointInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterEndpointIdentifier != nil { objectKey := object.Key("DBClusterEndpointIdentifier") objectKey.String(*v.DBClusterEndpointIdentifier) } if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.EndpointType != nil { objectKey := object.Key("EndpointType") objectKey.String(*v.EndpointType) } if v.ExcludedMembers != nil { objectKey := object.Key("ExcludedMembers") if err := awsAwsquery_serializeDocumentStringList(v.ExcludedMembers, objectKey); err != nil { return err } } if v.StaticMembers != nil { objectKey := object.Key("StaticMembers") if err := awsAwsquery_serializeDocumentStringList(v.StaticMembers, objectKey); err != nil { return err } } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateDBClusterInput(v *CreateDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.AvailabilityZones != nil { objectKey := object.Key("AvailabilityZones") if err := awsAwsquery_serializeDocumentAvailabilityZones(v.AvailabilityZones, objectKey); err != nil { return err } } if v.BackupRetentionPeriod != nil { objectKey := object.Key("BackupRetentionPeriod") objectKey.Integer(*v.BackupRetentionPeriod) } if v.CharacterSetName != nil { objectKey := object.Key("CharacterSetName") objectKey.String(*v.CharacterSetName) } if v.CopyTagsToSnapshot != nil { objectKey := object.Key("CopyTagsToSnapshot") objectKey.Boolean(*v.CopyTagsToSnapshot) } if v.DatabaseName != nil { objectKey := object.Key("DatabaseName") objectKey.String(*v.DatabaseName) } if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) } if v.destinationRegion != nil { objectKey := object.Key("DestinationRegion") objectKey.String(*v.destinationRegion) } if v.EnableCloudwatchLogsExports != nil { objectKey := object.Key("EnableCloudwatchLogsExports") if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil { return err } } if v.EnableIAMDatabaseAuthentication != nil { objectKey := object.Key("EnableIAMDatabaseAuthentication") objectKey.Boolean(*v.EnableIAMDatabaseAuthentication) } if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.GlobalClusterIdentifier != nil { objectKey := object.Key("GlobalClusterIdentifier") objectKey.String(*v.GlobalClusterIdentifier) } if v.KmsKeyId != nil { objectKey := object.Key("KmsKeyId") objectKey.String(*v.KmsKeyId) } if v.MasterUsername != nil { objectKey := object.Key("MasterUsername") objectKey.String(*v.MasterUsername) } if v.MasterUserPassword != nil { objectKey := object.Key("MasterUserPassword") objectKey.String(*v.MasterUserPassword) } if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) } if v.Port != nil { objectKey := object.Key("Port") objectKey.Integer(*v.Port) } if v.PreferredBackupWindow != nil { objectKey := object.Key("PreferredBackupWindow") objectKey.String(*v.PreferredBackupWindow) } if v.PreferredMaintenanceWindow != nil { objectKey := object.Key("PreferredMaintenanceWindow") objectKey.String(*v.PreferredMaintenanceWindow) } if v.PreSignedUrl != nil { objectKey := object.Key("PreSignedUrl") objectKey.String(*v.PreSignedUrl) } if v.ReplicationSourceIdentifier != nil { objectKey := object.Key("ReplicationSourceIdentifier") objectKey.String(*v.ReplicationSourceIdentifier) } if v.ServerlessV2ScalingConfiguration != nil { objectKey := object.Key("ServerlessV2ScalingConfiguration") if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil { return err } } if v.StorageEncrypted != nil { objectKey := object.Key("StorageEncrypted") objectKey.Boolean(*v.StorageEncrypted) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } if v.VpcSecurityGroupIds != nil { objectKey := object.Key("VpcSecurityGroupIds") if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateDBClusterParameterGroupInput(v *CreateDBClusterParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.DBParameterGroupFamily != nil { objectKey := object.Key("DBParameterGroupFamily") objectKey.String(*v.DBParameterGroupFamily) } if v.Description != nil { objectKey := object.Key("Description") objectKey.String(*v.Description) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateDBClusterSnapshotInput(v *CreateDBClusterSnapshotInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.DBClusterSnapshotIdentifier != nil { objectKey := object.Key("DBClusterSnapshotIdentifier") objectKey.String(*v.DBClusterSnapshotIdentifier) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateDBInstanceInput(v *CreateDBInstanceInput, value query.Value) error { object := value.Object() _ = object if v.AllocatedStorage != nil { objectKey := object.Key("AllocatedStorage") objectKey.Integer(*v.AllocatedStorage) } if v.AutoMinorVersionUpgrade != nil { objectKey := object.Key("AutoMinorVersionUpgrade") objectKey.Boolean(*v.AutoMinorVersionUpgrade) } if v.AvailabilityZone != nil { objectKey := object.Key("AvailabilityZone") objectKey.String(*v.AvailabilityZone) } if v.BackupRetentionPeriod != nil { objectKey := object.Key("BackupRetentionPeriod") objectKey.Integer(*v.BackupRetentionPeriod) } if v.CharacterSetName != nil { objectKey := object.Key("CharacterSetName") objectKey.String(*v.CharacterSetName) } if v.CopyTagsToSnapshot != nil { objectKey := object.Key("CopyTagsToSnapshot") objectKey.Boolean(*v.CopyTagsToSnapshot) } if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.DBInstanceClass != nil { objectKey := object.Key("DBInstanceClass") objectKey.String(*v.DBInstanceClass) } if v.DBInstanceIdentifier != nil { objectKey := object.Key("DBInstanceIdentifier") objectKey.String(*v.DBInstanceIdentifier) } if v.DBName != nil { objectKey := object.Key("DBName") objectKey.String(*v.DBName) } if v.DBParameterGroupName != nil { objectKey := object.Key("DBParameterGroupName") objectKey.String(*v.DBParameterGroupName) } if v.DBSecurityGroups != nil { objectKey := object.Key("DBSecurityGroups") if err := awsAwsquery_serializeDocumentDBSecurityGroupNameList(v.DBSecurityGroups, objectKey); err != nil { return err } } if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) } if v.Domain != nil { objectKey := object.Key("Domain") objectKey.String(*v.Domain) } if v.DomainIAMRoleName != nil { objectKey := object.Key("DomainIAMRoleName") objectKey.String(*v.DomainIAMRoleName) } if v.EnableCloudwatchLogsExports != nil { objectKey := object.Key("EnableCloudwatchLogsExports") if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil { return err } } if v.EnableIAMDatabaseAuthentication != nil { objectKey := object.Key("EnableIAMDatabaseAuthentication") objectKey.Boolean(*v.EnableIAMDatabaseAuthentication) } if v.EnablePerformanceInsights != nil { objectKey := object.Key("EnablePerformanceInsights") objectKey.Boolean(*v.EnablePerformanceInsights) } if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.Iops != nil { objectKey := object.Key("Iops") objectKey.Integer(*v.Iops) } if v.KmsKeyId != nil { objectKey := object.Key("KmsKeyId") objectKey.String(*v.KmsKeyId) } if v.LicenseModel != nil { objectKey := object.Key("LicenseModel") objectKey.String(*v.LicenseModel) } if v.MasterUsername != nil { objectKey := object.Key("MasterUsername") objectKey.String(*v.MasterUsername) } if v.MasterUserPassword != nil { objectKey := object.Key("MasterUserPassword") objectKey.String(*v.MasterUserPassword) } if v.MonitoringInterval != nil { objectKey := object.Key("MonitoringInterval") objectKey.Integer(*v.MonitoringInterval) } if v.MonitoringRoleArn != nil { objectKey := object.Key("MonitoringRoleArn") objectKey.String(*v.MonitoringRoleArn) } if v.MultiAZ != nil { objectKey := object.Key("MultiAZ") objectKey.Boolean(*v.MultiAZ) } if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) } if v.PerformanceInsightsKMSKeyId != nil { objectKey := object.Key("PerformanceInsightsKMSKeyId") objectKey.String(*v.PerformanceInsightsKMSKeyId) } if v.Port != nil { objectKey := object.Key("Port") objectKey.Integer(*v.Port) } if v.PreferredBackupWindow != nil { objectKey := object.Key("PreferredBackupWindow") objectKey.String(*v.PreferredBackupWindow) } if v.PreferredMaintenanceWindow != nil { objectKey := object.Key("PreferredMaintenanceWindow") objectKey.String(*v.PreferredMaintenanceWindow) } if v.PromotionTier != nil { objectKey := object.Key("PromotionTier") objectKey.Integer(*v.PromotionTier) } if v.PubliclyAccessible != nil { objectKey := object.Key("PubliclyAccessible") objectKey.Boolean(*v.PubliclyAccessible) } if v.StorageEncrypted != nil { objectKey := object.Key("StorageEncrypted") objectKey.Boolean(*v.StorageEncrypted) } if v.StorageType != nil { objectKey := object.Key("StorageType") objectKey.String(*v.StorageType) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } if v.TdeCredentialArn != nil { objectKey := object.Key("TdeCredentialArn") objectKey.String(*v.TdeCredentialArn) } if v.TdeCredentialPassword != nil { objectKey := object.Key("TdeCredentialPassword") objectKey.String(*v.TdeCredentialPassword) } if v.Timezone != nil { objectKey := object.Key("Timezone") objectKey.String(*v.Timezone) } if v.VpcSecurityGroupIds != nil { objectKey := object.Key("VpcSecurityGroupIds") if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateDBParameterGroupInput(v *CreateDBParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupFamily != nil { objectKey := object.Key("DBParameterGroupFamily") objectKey.String(*v.DBParameterGroupFamily) } if v.DBParameterGroupName != nil { objectKey := object.Key("DBParameterGroupName") objectKey.String(*v.DBParameterGroupName) } if v.Description != nil { objectKey := object.Key("Description") objectKey.String(*v.Description) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateDBSubnetGroupInput(v *CreateDBSubnetGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBSubnetGroupDescription != nil { objectKey := object.Key("DBSubnetGroupDescription") objectKey.String(*v.DBSubnetGroupDescription) } if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } if v.SubnetIds != nil { objectKey := object.Key("SubnetIds") if err := awsAwsquery_serializeDocumentSubnetIdentifierList(v.SubnetIds, objectKey); err != nil { return err } } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateEventSubscriptionInput(v *CreateEventSubscriptionInput, value query.Value) error { object := value.Object() _ = object if v.Enabled != nil { objectKey := object.Key("Enabled") objectKey.Boolean(*v.Enabled) } if v.EventCategories != nil { objectKey := object.Key("EventCategories") if err := awsAwsquery_serializeDocumentEventCategoriesList(v.EventCategories, objectKey); err != nil { return err } } if v.SnsTopicArn != nil { objectKey := object.Key("SnsTopicArn") objectKey.String(*v.SnsTopicArn) } if v.SourceIds != nil { objectKey := object.Key("SourceIds") if err := awsAwsquery_serializeDocumentSourceIdsList(v.SourceIds, objectKey); err != nil { return err } } if v.SourceType != nil { objectKey := object.Key("SourceType") objectKey.String(*v.SourceType) } if v.SubscriptionName != nil { objectKey := object.Key("SubscriptionName") objectKey.String(*v.SubscriptionName) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentCreateGlobalClusterInput(v *CreateGlobalClusterInput, value query.Value) error { object := value.Object() _ = object if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) } if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.GlobalClusterIdentifier != nil { objectKey := object.Key("GlobalClusterIdentifier") objectKey.String(*v.GlobalClusterIdentifier) } if v.SourceDBClusterIdentifier != nil { objectKey := object.Key("SourceDBClusterIdentifier") objectKey.String(*v.SourceDBClusterIdentifier) } if v.StorageEncrypted != nil { objectKey := object.Key("StorageEncrypted") objectKey.Boolean(*v.StorageEncrypted) } return nil } func awsAwsquery_serializeOpDocumentDeleteDBClusterEndpointInput(v *DeleteDBClusterEndpointInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterEndpointIdentifier != nil { objectKey := object.Key("DBClusterEndpointIdentifier") objectKey.String(*v.DBClusterEndpointIdentifier) } return nil } func awsAwsquery_serializeOpDocumentDeleteDBClusterInput(v *DeleteDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.FinalDBSnapshotIdentifier != nil { objectKey := object.Key("FinalDBSnapshotIdentifier") objectKey.String(*v.FinalDBSnapshotIdentifier) } if v.SkipFinalSnapshot { objectKey := object.Key("SkipFinalSnapshot") objectKey.Boolean(v.SkipFinalSnapshot) } return nil } func awsAwsquery_serializeOpDocumentDeleteDBClusterParameterGroupInput(v *DeleteDBClusterParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } return nil } func awsAwsquery_serializeOpDocumentDeleteDBClusterSnapshotInput(v *DeleteDBClusterSnapshotInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterSnapshotIdentifier != nil { objectKey := object.Key("DBClusterSnapshotIdentifier") objectKey.String(*v.DBClusterSnapshotIdentifier) } return nil } func awsAwsquery_serializeOpDocumentDeleteDBInstanceInput(v *DeleteDBInstanceInput, value query.Value) error { object := value.Object() _ = object if v.DBInstanceIdentifier != nil { objectKey := object.Key("DBInstanceIdentifier") objectKey.String(*v.DBInstanceIdentifier) } if v.FinalDBSnapshotIdentifier != nil { objectKey := object.Key("FinalDBSnapshotIdentifier") objectKey.String(*v.FinalDBSnapshotIdentifier) } if v.SkipFinalSnapshot { objectKey := object.Key("SkipFinalSnapshot") objectKey.Boolean(v.SkipFinalSnapshot) } return nil } func awsAwsquery_serializeOpDocumentDeleteDBParameterGroupInput(v *DeleteDBParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupName != nil { objectKey := object.Key("DBParameterGroupName") objectKey.String(*v.DBParameterGroupName) } return nil } func awsAwsquery_serializeOpDocumentDeleteDBSubnetGroupInput(v *DeleteDBSubnetGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } return nil } func awsAwsquery_serializeOpDocumentDeleteEventSubscriptionInput(v *DeleteEventSubscriptionInput, value query.Value) error { object := value.Object() _ = object if v.SubscriptionName != nil { objectKey := object.Key("SubscriptionName") objectKey.String(*v.SubscriptionName) } return nil } func awsAwsquery_serializeOpDocumentDeleteGlobalClusterInput(v *DeleteGlobalClusterInput, value query.Value) error { object := value.Object() _ = object if v.GlobalClusterIdentifier != nil { objectKey := object.Key("GlobalClusterIdentifier") objectKey.String(*v.GlobalClusterIdentifier) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBClusterEndpointsInput(v *DescribeDBClusterEndpointsInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterEndpointIdentifier != nil { objectKey := object.Key("DBClusterEndpointIdentifier") objectKey.String(*v.DBClusterEndpointIdentifier) } if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBClusterParameterGroupsInput(v *DescribeDBClusterParameterGroupsInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBClusterParametersInput(v *DescribeDBClusterParametersInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } if v.Source != nil { objectKey := object.Key("Source") objectKey.String(*v.Source) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBClustersInput(v *DescribeDBClustersInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBClusterSnapshotAttributesInput(v *DescribeDBClusterSnapshotAttributesInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterSnapshotIdentifier != nil { objectKey := object.Key("DBClusterSnapshotIdentifier") objectKey.String(*v.DBClusterSnapshotIdentifier) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBClusterSnapshotsInput(v *DescribeDBClusterSnapshotsInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.DBClusterSnapshotIdentifier != nil { objectKey := object.Key("DBClusterSnapshotIdentifier") objectKey.String(*v.DBClusterSnapshotIdentifier) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.IncludePublic { objectKey := object.Key("IncludePublic") objectKey.Boolean(v.IncludePublic) } if v.IncludeShared { objectKey := object.Key("IncludeShared") objectKey.Boolean(v.IncludeShared) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } if v.SnapshotType != nil { objectKey := object.Key("SnapshotType") objectKey.String(*v.SnapshotType) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBEngineVersionsInput(v *DescribeDBEngineVersionsInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupFamily != nil { objectKey := object.Key("DBParameterGroupFamily") objectKey.String(*v.DBParameterGroupFamily) } if v.DefaultOnly { objectKey := object.Key("DefaultOnly") objectKey.Boolean(v.DefaultOnly) } if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.ListSupportedCharacterSets != nil { objectKey := object.Key("ListSupportedCharacterSets") objectKey.Boolean(*v.ListSupportedCharacterSets) } if v.ListSupportedTimezones != nil { objectKey := object.Key("ListSupportedTimezones") objectKey.Boolean(*v.ListSupportedTimezones) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBInstancesInput(v *DescribeDBInstancesInput, value query.Value) error { object := value.Object() _ = object if v.DBInstanceIdentifier != nil { objectKey := object.Key("DBInstanceIdentifier") objectKey.String(*v.DBInstanceIdentifier) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBParameterGroupsInput(v *DescribeDBParameterGroupsInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupName != nil { objectKey := object.Key("DBParameterGroupName") objectKey.String(*v.DBParameterGroupName) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBParametersInput(v *DescribeDBParametersInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupName != nil { objectKey := object.Key("DBParameterGroupName") objectKey.String(*v.DBParameterGroupName) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } if v.Source != nil { objectKey := object.Key("Source") objectKey.String(*v.Source) } return nil } func awsAwsquery_serializeOpDocumentDescribeDBSubnetGroupsInput(v *DescribeDBSubnetGroupsInput, value query.Value) error { object := value.Object() _ = object if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeEngineDefaultClusterParametersInput(v *DescribeEngineDefaultClusterParametersInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupFamily != nil { objectKey := object.Key("DBParameterGroupFamily") objectKey.String(*v.DBParameterGroupFamily) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeEngineDefaultParametersInput(v *DescribeEngineDefaultParametersInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupFamily != nil { objectKey := object.Key("DBParameterGroupFamily") objectKey.String(*v.DBParameterGroupFamily) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeEventCategoriesInput(v *DescribeEventCategoriesInput, value query.Value) error { object := value.Object() _ = object if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.SourceType != nil { objectKey := object.Key("SourceType") objectKey.String(*v.SourceType) } return nil } func awsAwsquery_serializeOpDocumentDescribeEventsInput(v *DescribeEventsInput, value query.Value) error { object := value.Object() _ = object if v.Duration != nil { objectKey := object.Key("Duration") objectKey.Integer(*v.Duration) } if v.EndTime != nil { objectKey := object.Key("EndTime") objectKey.String(smithytime.FormatDateTime(*v.EndTime)) } if v.EventCategories != nil { objectKey := object.Key("EventCategories") if err := awsAwsquery_serializeDocumentEventCategoriesList(v.EventCategories, objectKey); err != nil { return err } } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } if v.SourceIdentifier != nil { objectKey := object.Key("SourceIdentifier") objectKey.String(*v.SourceIdentifier) } if len(v.SourceType) > 0 { objectKey := object.Key("SourceType") objectKey.String(string(v.SourceType)) } if v.StartTime != nil { objectKey := object.Key("StartTime") objectKey.String(smithytime.FormatDateTime(*v.StartTime)) } return nil } func awsAwsquery_serializeOpDocumentDescribeEventSubscriptionsInput(v *DescribeEventSubscriptionsInput, value query.Value) error { object := value.Object() _ = object if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } if v.SubscriptionName != nil { objectKey := object.Key("SubscriptionName") objectKey.String(*v.SubscriptionName) } return nil } func awsAwsquery_serializeOpDocumentDescribeGlobalClustersInput(v *DescribeGlobalClustersInput, value query.Value) error { object := value.Object() _ = object if v.GlobalClusterIdentifier != nil { objectKey := object.Key("GlobalClusterIdentifier") objectKey.String(*v.GlobalClusterIdentifier) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } return nil } func awsAwsquery_serializeOpDocumentDescribeOrderableDBInstanceOptionsInput(v *DescribeOrderableDBInstanceOptionsInput, value query.Value) error { object := value.Object() _ = object if v.DBInstanceClass != nil { objectKey := object.Key("DBInstanceClass") objectKey.String(*v.DBInstanceClass) } if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.LicenseModel != nil { objectKey := object.Key("LicenseModel") objectKey.String(*v.LicenseModel) } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } if v.Vpc != nil { objectKey := object.Key("Vpc") objectKey.Boolean(*v.Vpc) } return nil } func awsAwsquery_serializeOpDocumentDescribePendingMaintenanceActionsInput(v *DescribePendingMaintenanceActionsInput, value query.Value) error { object := value.Object() _ = object if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.Marker != nil { objectKey := object.Key("Marker") objectKey.String(*v.Marker) } if v.MaxRecords != nil { objectKey := object.Key("MaxRecords") objectKey.Integer(*v.MaxRecords) } if v.ResourceIdentifier != nil { objectKey := object.Key("ResourceIdentifier") objectKey.String(*v.ResourceIdentifier) } return nil } func awsAwsquery_serializeOpDocumentDescribeValidDBInstanceModificationsInput(v *DescribeValidDBInstanceModificationsInput, value query.Value) error { object := value.Object() _ = object if v.DBInstanceIdentifier != nil { objectKey := object.Key("DBInstanceIdentifier") objectKey.String(*v.DBInstanceIdentifier) } return nil } func awsAwsquery_serializeOpDocumentFailoverDBClusterInput(v *FailoverDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.TargetDBInstanceIdentifier != nil { objectKey := object.Key("TargetDBInstanceIdentifier") objectKey.String(*v.TargetDBInstanceIdentifier) } return nil } func awsAwsquery_serializeOpDocumentFailoverGlobalClusterInput(v *FailoverGlobalClusterInput, value query.Value) error { object := value.Object() _ = object if v.GlobalClusterIdentifier != nil { objectKey := object.Key("GlobalClusterIdentifier") objectKey.String(*v.GlobalClusterIdentifier) } if v.TargetDbClusterIdentifier != nil { objectKey := object.Key("TargetDbClusterIdentifier") objectKey.String(*v.TargetDbClusterIdentifier) } return nil } func awsAwsquery_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value query.Value) error { object := value.Object() _ = object if v.Filters != nil { objectKey := object.Key("Filters") if err := awsAwsquery_serializeDocumentFilterList(v.Filters, objectKey); err != nil { return err } } if v.ResourceName != nil { objectKey := object.Key("ResourceName") objectKey.String(*v.ResourceName) } return nil } func awsAwsquery_serializeOpDocumentModifyDBClusterEndpointInput(v *ModifyDBClusterEndpointInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterEndpointIdentifier != nil { objectKey := object.Key("DBClusterEndpointIdentifier") objectKey.String(*v.DBClusterEndpointIdentifier) } if v.EndpointType != nil { objectKey := object.Key("EndpointType") objectKey.String(*v.EndpointType) } if v.ExcludedMembers != nil { objectKey := object.Key("ExcludedMembers") if err := awsAwsquery_serializeDocumentStringList(v.ExcludedMembers, objectKey); err != nil { return err } } if v.StaticMembers != nil { objectKey := object.Key("StaticMembers") if err := awsAwsquery_serializeDocumentStringList(v.StaticMembers, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentModifyDBClusterInput(v *ModifyDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.AllowMajorVersionUpgrade { objectKey := object.Key("AllowMajorVersionUpgrade") objectKey.Boolean(v.AllowMajorVersionUpgrade) } if v.ApplyImmediately { objectKey := object.Key("ApplyImmediately") objectKey.Boolean(v.ApplyImmediately) } if v.BackupRetentionPeriod != nil { objectKey := object.Key("BackupRetentionPeriod") objectKey.Integer(*v.BackupRetentionPeriod) } if v.CloudwatchLogsExportConfiguration != nil { objectKey := object.Key("CloudwatchLogsExportConfiguration") if err := awsAwsquery_serializeDocumentCloudwatchLogsExportConfiguration(v.CloudwatchLogsExportConfiguration, objectKey); err != nil { return err } } if v.CopyTagsToSnapshot != nil { objectKey := object.Key("CopyTagsToSnapshot") objectKey.Boolean(*v.CopyTagsToSnapshot) } if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.DBInstanceParameterGroupName != nil { objectKey := object.Key("DBInstanceParameterGroupName") objectKey.String(*v.DBInstanceParameterGroupName) } if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) } if v.EnableIAMDatabaseAuthentication != nil { objectKey := object.Key("EnableIAMDatabaseAuthentication") objectKey.Boolean(*v.EnableIAMDatabaseAuthentication) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.MasterUserPassword != nil { objectKey := object.Key("MasterUserPassword") objectKey.String(*v.MasterUserPassword) } if v.NewDBClusterIdentifier != nil { objectKey := object.Key("NewDBClusterIdentifier") objectKey.String(*v.NewDBClusterIdentifier) } if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) } if v.Port != nil { objectKey := object.Key("Port") objectKey.Integer(*v.Port) } if v.PreferredBackupWindow != nil { objectKey := object.Key("PreferredBackupWindow") objectKey.String(*v.PreferredBackupWindow) } if v.PreferredMaintenanceWindow != nil { objectKey := object.Key("PreferredMaintenanceWindow") objectKey.String(*v.PreferredMaintenanceWindow) } if v.ServerlessV2ScalingConfiguration != nil { objectKey := object.Key("ServerlessV2ScalingConfiguration") if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil { return err } } if v.VpcSecurityGroupIds != nil { objectKey := object.Key("VpcSecurityGroupIds") if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentModifyDBClusterParameterGroupInput(v *ModifyDBClusterParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.Parameters != nil { objectKey := object.Key("Parameters") if err := awsAwsquery_serializeDocumentParametersList(v.Parameters, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentModifyDBClusterSnapshotAttributeInput(v *ModifyDBClusterSnapshotAttributeInput, value query.Value) error { object := value.Object() _ = object if v.AttributeName != nil { objectKey := object.Key("AttributeName") objectKey.String(*v.AttributeName) } if v.DBClusterSnapshotIdentifier != nil { objectKey := object.Key("DBClusterSnapshotIdentifier") objectKey.String(*v.DBClusterSnapshotIdentifier) } if v.ValuesToAdd != nil { objectKey := object.Key("ValuesToAdd") if err := awsAwsquery_serializeDocumentAttributeValueList(v.ValuesToAdd, objectKey); err != nil { return err } } if v.ValuesToRemove != nil { objectKey := object.Key("ValuesToRemove") if err := awsAwsquery_serializeDocumentAttributeValueList(v.ValuesToRemove, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentModifyDBInstanceInput(v *ModifyDBInstanceInput, value query.Value) error { object := value.Object() _ = object if v.AllocatedStorage != nil { objectKey := object.Key("AllocatedStorage") objectKey.Integer(*v.AllocatedStorage) } if v.AllowMajorVersionUpgrade { objectKey := object.Key("AllowMajorVersionUpgrade") objectKey.Boolean(v.AllowMajorVersionUpgrade) } if v.ApplyImmediately { objectKey := object.Key("ApplyImmediately") objectKey.Boolean(v.ApplyImmediately) } if v.AutoMinorVersionUpgrade != nil { objectKey := object.Key("AutoMinorVersionUpgrade") objectKey.Boolean(*v.AutoMinorVersionUpgrade) } if v.BackupRetentionPeriod != nil { objectKey := object.Key("BackupRetentionPeriod") objectKey.Integer(*v.BackupRetentionPeriod) } if v.CACertificateIdentifier != nil { objectKey := object.Key("CACertificateIdentifier") objectKey.String(*v.CACertificateIdentifier) } if v.CloudwatchLogsExportConfiguration != nil { objectKey := object.Key("CloudwatchLogsExportConfiguration") if err := awsAwsquery_serializeDocumentCloudwatchLogsExportConfiguration(v.CloudwatchLogsExportConfiguration, objectKey); err != nil { return err } } if v.CopyTagsToSnapshot != nil { objectKey := object.Key("CopyTagsToSnapshot") objectKey.Boolean(*v.CopyTagsToSnapshot) } if v.DBInstanceClass != nil { objectKey := object.Key("DBInstanceClass") objectKey.String(*v.DBInstanceClass) } if v.DBInstanceIdentifier != nil { objectKey := object.Key("DBInstanceIdentifier") objectKey.String(*v.DBInstanceIdentifier) } if v.DBParameterGroupName != nil { objectKey := object.Key("DBParameterGroupName") objectKey.String(*v.DBParameterGroupName) } if v.DBPortNumber != nil { objectKey := object.Key("DBPortNumber") objectKey.Integer(*v.DBPortNumber) } if v.DBSecurityGroups != nil { objectKey := object.Key("DBSecurityGroups") if err := awsAwsquery_serializeDocumentDBSecurityGroupNameList(v.DBSecurityGroups, objectKey); err != nil { return err } } if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) } if v.Domain != nil { objectKey := object.Key("Domain") objectKey.String(*v.Domain) } if v.DomainIAMRoleName != nil { objectKey := object.Key("DomainIAMRoleName") objectKey.String(*v.DomainIAMRoleName) } if v.EnableIAMDatabaseAuthentication != nil { objectKey := object.Key("EnableIAMDatabaseAuthentication") objectKey.Boolean(*v.EnableIAMDatabaseAuthentication) } if v.EnablePerformanceInsights != nil { objectKey := object.Key("EnablePerformanceInsights") objectKey.Boolean(*v.EnablePerformanceInsights) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.Iops != nil { objectKey := object.Key("Iops") objectKey.Integer(*v.Iops) } if v.LicenseModel != nil { objectKey := object.Key("LicenseModel") objectKey.String(*v.LicenseModel) } if v.MasterUserPassword != nil { objectKey := object.Key("MasterUserPassword") objectKey.String(*v.MasterUserPassword) } if v.MonitoringInterval != nil { objectKey := object.Key("MonitoringInterval") objectKey.Integer(*v.MonitoringInterval) } if v.MonitoringRoleArn != nil { objectKey := object.Key("MonitoringRoleArn") objectKey.String(*v.MonitoringRoleArn) } if v.MultiAZ != nil { objectKey := object.Key("MultiAZ") objectKey.Boolean(*v.MultiAZ) } if v.NewDBInstanceIdentifier != nil { objectKey := object.Key("NewDBInstanceIdentifier") objectKey.String(*v.NewDBInstanceIdentifier) } if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) } if v.PerformanceInsightsKMSKeyId != nil { objectKey := object.Key("PerformanceInsightsKMSKeyId") objectKey.String(*v.PerformanceInsightsKMSKeyId) } if v.PreferredBackupWindow != nil { objectKey := object.Key("PreferredBackupWindow") objectKey.String(*v.PreferredBackupWindow) } if v.PreferredMaintenanceWindow != nil { objectKey := object.Key("PreferredMaintenanceWindow") objectKey.String(*v.PreferredMaintenanceWindow) } if v.PromotionTier != nil { objectKey := object.Key("PromotionTier") objectKey.Integer(*v.PromotionTier) } if v.PubliclyAccessible != nil { objectKey := object.Key("PubliclyAccessible") objectKey.Boolean(*v.PubliclyAccessible) } if v.StorageType != nil { objectKey := object.Key("StorageType") objectKey.String(*v.StorageType) } if v.TdeCredentialArn != nil { objectKey := object.Key("TdeCredentialArn") objectKey.String(*v.TdeCredentialArn) } if v.TdeCredentialPassword != nil { objectKey := object.Key("TdeCredentialPassword") objectKey.String(*v.TdeCredentialPassword) } if v.VpcSecurityGroupIds != nil { objectKey := object.Key("VpcSecurityGroupIds") if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentModifyDBParameterGroupInput(v *ModifyDBParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupName != nil { objectKey := object.Key("DBParameterGroupName") objectKey.String(*v.DBParameterGroupName) } if v.Parameters != nil { objectKey := object.Key("Parameters") if err := awsAwsquery_serializeDocumentParametersList(v.Parameters, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentModifyDBSubnetGroupInput(v *ModifyDBSubnetGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBSubnetGroupDescription != nil { objectKey := object.Key("DBSubnetGroupDescription") objectKey.String(*v.DBSubnetGroupDescription) } if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } if v.SubnetIds != nil { objectKey := object.Key("SubnetIds") if err := awsAwsquery_serializeDocumentSubnetIdentifierList(v.SubnetIds, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentModifyEventSubscriptionInput(v *ModifyEventSubscriptionInput, value query.Value) error { object := value.Object() _ = object if v.Enabled != nil { objectKey := object.Key("Enabled") objectKey.Boolean(*v.Enabled) } if v.EventCategories != nil { objectKey := object.Key("EventCategories") if err := awsAwsquery_serializeDocumentEventCategoriesList(v.EventCategories, objectKey); err != nil { return err } } if v.SnsTopicArn != nil { objectKey := object.Key("SnsTopicArn") objectKey.String(*v.SnsTopicArn) } if v.SourceType != nil { objectKey := object.Key("SourceType") objectKey.String(*v.SourceType) } if v.SubscriptionName != nil { objectKey := object.Key("SubscriptionName") objectKey.String(*v.SubscriptionName) } return nil } func awsAwsquery_serializeOpDocumentModifyGlobalClusterInput(v *ModifyGlobalClusterInput, value query.Value) error { object := value.Object() _ = object if v.AllowMajorVersionUpgrade != nil { objectKey := object.Key("AllowMajorVersionUpgrade") objectKey.Boolean(*v.AllowMajorVersionUpgrade) } if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.GlobalClusterIdentifier != nil { objectKey := object.Key("GlobalClusterIdentifier") objectKey.String(*v.GlobalClusterIdentifier) } if v.NewGlobalClusterIdentifier != nil { objectKey := object.Key("NewGlobalClusterIdentifier") objectKey.String(*v.NewGlobalClusterIdentifier) } return nil } func awsAwsquery_serializeOpDocumentPromoteReadReplicaDBClusterInput(v *PromoteReadReplicaDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } return nil } func awsAwsquery_serializeOpDocumentRebootDBInstanceInput(v *RebootDBInstanceInput, value query.Value) error { object := value.Object() _ = object if v.DBInstanceIdentifier != nil { objectKey := object.Key("DBInstanceIdentifier") objectKey.String(*v.DBInstanceIdentifier) } if v.ForceFailover != nil { objectKey := object.Key("ForceFailover") objectKey.Boolean(*v.ForceFailover) } return nil } func awsAwsquery_serializeOpDocumentRemoveFromGlobalClusterInput(v *RemoveFromGlobalClusterInput, value query.Value) error { object := value.Object() _ = object if v.DbClusterIdentifier != nil { objectKey := object.Key("DbClusterIdentifier") objectKey.String(*v.DbClusterIdentifier) } if v.GlobalClusterIdentifier != nil { objectKey := object.Key("GlobalClusterIdentifier") objectKey.String(*v.GlobalClusterIdentifier) } return nil } func awsAwsquery_serializeOpDocumentRemoveRoleFromDBClusterInput(v *RemoveRoleFromDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.FeatureName != nil { objectKey := object.Key("FeatureName") objectKey.String(*v.FeatureName) } if v.RoleArn != nil { objectKey := object.Key("RoleArn") objectKey.String(*v.RoleArn) } return nil } func awsAwsquery_serializeOpDocumentRemoveSourceIdentifierFromSubscriptionInput(v *RemoveSourceIdentifierFromSubscriptionInput, value query.Value) error { object := value.Object() _ = object if v.SourceIdentifier != nil { objectKey := object.Key("SourceIdentifier") objectKey.String(*v.SourceIdentifier) } if v.SubscriptionName != nil { objectKey := object.Key("SubscriptionName") objectKey.String(*v.SubscriptionName) } return nil } func awsAwsquery_serializeOpDocumentRemoveTagsFromResourceInput(v *RemoveTagsFromResourceInput, value query.Value) error { object := value.Object() _ = object if v.ResourceName != nil { objectKey := object.Key("ResourceName") objectKey.String(*v.ResourceName) } if v.TagKeys != nil { objectKey := object.Key("TagKeys") if err := awsAwsquery_serializeDocumentKeyList(v.TagKeys, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentResetDBClusterParameterGroupInput(v *ResetDBClusterParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.Parameters != nil { objectKey := object.Key("Parameters") if err := awsAwsquery_serializeDocumentParametersList(v.Parameters, objectKey); err != nil { return err } } if v.ResetAllParameters { objectKey := object.Key("ResetAllParameters") objectKey.Boolean(v.ResetAllParameters) } return nil } func awsAwsquery_serializeOpDocumentResetDBParameterGroupInput(v *ResetDBParameterGroupInput, value query.Value) error { object := value.Object() _ = object if v.DBParameterGroupName != nil { objectKey := object.Key("DBParameterGroupName") objectKey.String(*v.DBParameterGroupName) } if v.Parameters != nil { objectKey := object.Key("Parameters") if err := awsAwsquery_serializeDocumentParametersList(v.Parameters, objectKey); err != nil { return err } } if v.ResetAllParameters { objectKey := object.Key("ResetAllParameters") objectKey.Boolean(v.ResetAllParameters) } return nil } func awsAwsquery_serializeOpDocumentRestoreDBClusterFromSnapshotInput(v *RestoreDBClusterFromSnapshotInput, value query.Value) error { object := value.Object() _ = object if v.AvailabilityZones != nil { objectKey := object.Key("AvailabilityZones") if err := awsAwsquery_serializeDocumentAvailabilityZones(v.AvailabilityZones, objectKey); err != nil { return err } } if v.CopyTagsToSnapshot != nil { objectKey := object.Key("CopyTagsToSnapshot") objectKey.Boolean(*v.CopyTagsToSnapshot) } if v.DatabaseName != nil { objectKey := object.Key("DatabaseName") objectKey.String(*v.DatabaseName) } if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) } if v.EnableCloudwatchLogsExports != nil { objectKey := object.Key("EnableCloudwatchLogsExports") if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil { return err } } if v.EnableIAMDatabaseAuthentication != nil { objectKey := object.Key("EnableIAMDatabaseAuthentication") objectKey.Boolean(*v.EnableIAMDatabaseAuthentication) } if v.Engine != nil { objectKey := object.Key("Engine") objectKey.String(*v.Engine) } if v.EngineVersion != nil { objectKey := object.Key("EngineVersion") objectKey.String(*v.EngineVersion) } if v.KmsKeyId != nil { objectKey := object.Key("KmsKeyId") objectKey.String(*v.KmsKeyId) } if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) } if v.Port != nil { objectKey := object.Key("Port") objectKey.Integer(*v.Port) } if v.ServerlessV2ScalingConfiguration != nil { objectKey := object.Key("ServerlessV2ScalingConfiguration") if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil { return err } } if v.SnapshotIdentifier != nil { objectKey := object.Key("SnapshotIdentifier") objectKey.String(*v.SnapshotIdentifier) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } if v.VpcSecurityGroupIds != nil { objectKey := object.Key("VpcSecurityGroupIds") if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentRestoreDBClusterToPointInTimeInput(v *RestoreDBClusterToPointInTimeInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } if v.DBClusterParameterGroupName != nil { objectKey := object.Key("DBClusterParameterGroupName") objectKey.String(*v.DBClusterParameterGroupName) } if v.DBSubnetGroupName != nil { objectKey := object.Key("DBSubnetGroupName") objectKey.String(*v.DBSubnetGroupName) } if v.DeletionProtection != nil { objectKey := object.Key("DeletionProtection") objectKey.Boolean(*v.DeletionProtection) } if v.EnableCloudwatchLogsExports != nil { objectKey := object.Key("EnableCloudwatchLogsExports") if err := awsAwsquery_serializeDocumentLogTypeList(v.EnableCloudwatchLogsExports, objectKey); err != nil { return err } } if v.EnableIAMDatabaseAuthentication != nil { objectKey := object.Key("EnableIAMDatabaseAuthentication") objectKey.Boolean(*v.EnableIAMDatabaseAuthentication) } if v.KmsKeyId != nil { objectKey := object.Key("KmsKeyId") objectKey.String(*v.KmsKeyId) } if v.OptionGroupName != nil { objectKey := object.Key("OptionGroupName") objectKey.String(*v.OptionGroupName) } if v.Port != nil { objectKey := object.Key("Port") objectKey.Integer(*v.Port) } if v.RestoreToTime != nil { objectKey := object.Key("RestoreToTime") objectKey.String(smithytime.FormatDateTime(*v.RestoreToTime)) } if v.RestoreType != nil { objectKey := object.Key("RestoreType") objectKey.String(*v.RestoreType) } if v.ServerlessV2ScalingConfiguration != nil { objectKey := object.Key("ServerlessV2ScalingConfiguration") if err := awsAwsquery_serializeDocumentServerlessV2ScalingConfiguration(v.ServerlessV2ScalingConfiguration, objectKey); err != nil { return err } } if v.SourceDBClusterIdentifier != nil { objectKey := object.Key("SourceDBClusterIdentifier") objectKey.String(*v.SourceDBClusterIdentifier) } if v.Tags != nil { objectKey := object.Key("Tags") if err := awsAwsquery_serializeDocumentTagList(v.Tags, objectKey); err != nil { return err } } if v.UseLatestRestorableTime { objectKey := object.Key("UseLatestRestorableTime") objectKey.Boolean(v.UseLatestRestorableTime) } if v.VpcSecurityGroupIds != nil { objectKey := object.Key("VpcSecurityGroupIds") if err := awsAwsquery_serializeDocumentVpcSecurityGroupIdList(v.VpcSecurityGroupIds, objectKey); err != nil { return err } } return nil } func awsAwsquery_serializeOpDocumentStartDBClusterInput(v *StartDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } return nil } func awsAwsquery_serializeOpDocumentStopDBClusterInput(v *StopDBClusterInput, value query.Value) error { object := value.Object() _ = object if v.DBClusterIdentifier != nil { objectKey := object.Key("DBClusterIdentifier") objectKey.String(*v.DBClusterIdentifier) } return nil }
7,238
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package neptune import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/neptune/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAddRoleToDBCluster struct { } func (*validateOpAddRoleToDBCluster) ID() string { return "OperationInputValidation" } func (m *validateOpAddRoleToDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddRoleToDBClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddRoleToDBClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddSourceIdentifierToSubscription struct { } func (*validateOpAddSourceIdentifierToSubscription) ID() string { return "OperationInputValidation" } func (m *validateOpAddSourceIdentifierToSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddSourceIdentifierToSubscriptionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddSourceIdentifierToSubscriptionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddTagsToResource struct { } func (*validateOpAddTagsToResource) ID() string { return "OperationInputValidation" } func (m *validateOpAddTagsToResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddTagsToResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddTagsToResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpApplyPendingMaintenanceAction struct { } func (*validateOpApplyPendingMaintenanceAction) ID() string { return "OperationInputValidation" } func (m *validateOpApplyPendingMaintenanceAction) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ApplyPendingMaintenanceActionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpApplyPendingMaintenanceActionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCopyDBClusterParameterGroup struct { } func (*validateOpCopyDBClusterParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCopyDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CopyDBClusterParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCopyDBClusterParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCopyDBClusterSnapshot struct { } func (*validateOpCopyDBClusterSnapshot) ID() string { return "OperationInputValidation" } func (m *validateOpCopyDBClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CopyDBClusterSnapshotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCopyDBClusterSnapshotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCopyDBParameterGroup struct { } func (*validateOpCopyDBParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCopyDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CopyDBParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCopyDBParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateDBClusterEndpoint struct { } func (*validateOpCreateDBClusterEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpCreateDBClusterEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateDBClusterEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateDBClusterEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateDBCluster struct { } func (*validateOpCreateDBCluster) ID() string { return "OperationInputValidation" } func (m *validateOpCreateDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateDBClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateDBClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateDBClusterParameterGroup struct { } func (*validateOpCreateDBClusterParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateDBClusterParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateDBClusterParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateDBClusterSnapshot struct { } func (*validateOpCreateDBClusterSnapshot) ID() string { return "OperationInputValidation" } func (m *validateOpCreateDBClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateDBClusterSnapshotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateDBClusterSnapshotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateDBInstance struct { } func (*validateOpCreateDBInstance) ID() string { return "OperationInputValidation" } func (m *validateOpCreateDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateDBInstanceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateDBInstanceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateDBParameterGroup struct { } func (*validateOpCreateDBParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateDBParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateDBParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateDBSubnetGroup struct { } func (*validateOpCreateDBSubnetGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateDBSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateDBSubnetGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateDBSubnetGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateEventSubscription struct { } func (*validateOpCreateEventSubscription) ID() string { return "OperationInputValidation" } func (m *validateOpCreateEventSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateEventSubscriptionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateEventSubscriptionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateGlobalCluster struct { } func (*validateOpCreateGlobalCluster) ID() string { return "OperationInputValidation" } func (m *validateOpCreateGlobalCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateGlobalClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateGlobalClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteDBClusterEndpoint struct { } func (*validateOpDeleteDBClusterEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteDBClusterEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteDBClusterEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteDBClusterEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteDBCluster struct { } func (*validateOpDeleteDBCluster) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteDBClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteDBClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteDBClusterParameterGroup struct { } func (*validateOpDeleteDBClusterParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteDBClusterParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteDBClusterParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteDBClusterSnapshot struct { } func (*validateOpDeleteDBClusterSnapshot) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteDBClusterSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteDBClusterSnapshotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteDBClusterSnapshotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteDBInstance struct { } func (*validateOpDeleteDBInstance) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteDBInstanceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteDBInstanceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteDBParameterGroup struct { } func (*validateOpDeleteDBParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteDBParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteDBParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteDBSubnetGroup struct { } func (*validateOpDeleteDBSubnetGroup) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteDBSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteDBSubnetGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteDBSubnetGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteEventSubscription struct { } func (*validateOpDeleteEventSubscription) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteEventSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteEventSubscriptionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteEventSubscriptionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteGlobalCluster struct { } func (*validateOpDeleteGlobalCluster) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteGlobalCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteGlobalClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteGlobalClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBClusterEndpoints struct { } func (*validateOpDescribeDBClusterEndpoints) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBClusterEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBClusterEndpointsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBClusterEndpointsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBClusterParameterGroups struct { } func (*validateOpDescribeDBClusterParameterGroups) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBClusterParameterGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBClusterParameterGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBClusterParameterGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBClusterParameters struct { } func (*validateOpDescribeDBClusterParameters) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBClusterParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBClusterParametersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBClusterParametersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBClusters struct { } func (*validateOpDescribeDBClusters) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBClusters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBClustersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBClustersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBClusterSnapshotAttributes struct { } func (*validateOpDescribeDBClusterSnapshotAttributes) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBClusterSnapshotAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBClusterSnapshotAttributesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBClusterSnapshotAttributesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBClusterSnapshots struct { } func (*validateOpDescribeDBClusterSnapshots) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBClusterSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBClusterSnapshotsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBClusterSnapshotsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBEngineVersions struct { } func (*validateOpDescribeDBEngineVersions) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBEngineVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBEngineVersionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBEngineVersionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBInstances struct { } func (*validateOpDescribeDBInstances) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBInstancesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBInstancesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBParameterGroups struct { } func (*validateOpDescribeDBParameterGroups) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBParameterGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBParameterGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBParameterGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBParameters struct { } func (*validateOpDescribeDBParameters) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBParametersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBParametersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeDBSubnetGroups struct { } func (*validateOpDescribeDBSubnetGroups) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeDBSubnetGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeDBSubnetGroupsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeDBSubnetGroupsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeEngineDefaultClusterParameters struct { } func (*validateOpDescribeEngineDefaultClusterParameters) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeEngineDefaultClusterParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeEngineDefaultClusterParametersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeEngineDefaultClusterParametersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeEngineDefaultParameters struct { } func (*validateOpDescribeEngineDefaultParameters) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeEngineDefaultParameters) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeEngineDefaultParametersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeEngineDefaultParametersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeEventCategories struct { } func (*validateOpDescribeEventCategories) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeEventCategories) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeEventCategoriesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeEventCategoriesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeEvents struct { } func (*validateOpDescribeEvents) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeEvents) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeEventsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeEventsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeEventSubscriptions struct { } func (*validateOpDescribeEventSubscriptions) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeEventSubscriptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeEventSubscriptionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeEventSubscriptionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeOrderableDBInstanceOptions struct { } func (*validateOpDescribeOrderableDBInstanceOptions) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeOrderableDBInstanceOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeOrderableDBInstanceOptionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeOrderableDBInstanceOptionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribePendingMaintenanceActions struct { } func (*validateOpDescribePendingMaintenanceActions) ID() string { return "OperationInputValidation" } func (m *validateOpDescribePendingMaintenanceActions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribePendingMaintenanceActionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribePendingMaintenanceActionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeValidDBInstanceModifications struct { } func (*validateOpDescribeValidDBInstanceModifications) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeValidDBInstanceModifications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeValidDBInstanceModificationsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeValidDBInstanceModificationsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpFailoverGlobalCluster struct { } func (*validateOpFailoverGlobalCluster) ID() string { return "OperationInputValidation" } func (m *validateOpFailoverGlobalCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*FailoverGlobalClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpFailoverGlobalClusterInput(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 validateOpModifyDBClusterEndpoint struct { } func (*validateOpModifyDBClusterEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpModifyDBClusterEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyDBClusterEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyDBClusterEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyDBCluster struct { } func (*validateOpModifyDBCluster) ID() string { return "OperationInputValidation" } func (m *validateOpModifyDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyDBClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyDBClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyDBClusterParameterGroup struct { } func (*validateOpModifyDBClusterParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpModifyDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyDBClusterParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyDBClusterParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyDBClusterSnapshotAttribute struct { } func (*validateOpModifyDBClusterSnapshotAttribute) ID() string { return "OperationInputValidation" } func (m *validateOpModifyDBClusterSnapshotAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyDBClusterSnapshotAttributeInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyDBClusterSnapshotAttributeInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyDBInstance struct { } func (*validateOpModifyDBInstance) ID() string { return "OperationInputValidation" } func (m *validateOpModifyDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyDBInstanceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyDBInstanceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyDBParameterGroup struct { } func (*validateOpModifyDBParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpModifyDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyDBParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyDBParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyDBSubnetGroup struct { } func (*validateOpModifyDBSubnetGroup) ID() string { return "OperationInputValidation" } func (m *validateOpModifyDBSubnetGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyDBSubnetGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyDBSubnetGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyEventSubscription struct { } func (*validateOpModifyEventSubscription) ID() string { return "OperationInputValidation" } func (m *validateOpModifyEventSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyEventSubscriptionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyEventSubscriptionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpModifyGlobalCluster struct { } func (*validateOpModifyGlobalCluster) ID() string { return "OperationInputValidation" } func (m *validateOpModifyGlobalCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ModifyGlobalClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpModifyGlobalClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpPromoteReadReplicaDBCluster struct { } func (*validateOpPromoteReadReplicaDBCluster) ID() string { return "OperationInputValidation" } func (m *validateOpPromoteReadReplicaDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PromoteReadReplicaDBClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPromoteReadReplicaDBClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRebootDBInstance struct { } func (*validateOpRebootDBInstance) ID() string { return "OperationInputValidation" } func (m *validateOpRebootDBInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RebootDBInstanceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRebootDBInstanceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveFromGlobalCluster struct { } func (*validateOpRemoveFromGlobalCluster) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveFromGlobalCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveFromGlobalClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveFromGlobalClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveRoleFromDBCluster struct { } func (*validateOpRemoveRoleFromDBCluster) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveRoleFromDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveRoleFromDBClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveRoleFromDBClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveSourceIdentifierFromSubscription struct { } func (*validateOpRemoveSourceIdentifierFromSubscription) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveSourceIdentifierFromSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveSourceIdentifierFromSubscriptionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveSourceIdentifierFromSubscriptionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRemoveTagsFromResource struct { } func (*validateOpRemoveTagsFromResource) ID() string { return "OperationInputValidation" } func (m *validateOpRemoveTagsFromResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RemoveTagsFromResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRemoveTagsFromResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpResetDBClusterParameterGroup struct { } func (*validateOpResetDBClusterParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpResetDBClusterParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ResetDBClusterParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpResetDBClusterParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpResetDBParameterGroup struct { } func (*validateOpResetDBParameterGroup) ID() string { return "OperationInputValidation" } func (m *validateOpResetDBParameterGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ResetDBParameterGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpResetDBParameterGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRestoreDBClusterFromSnapshot struct { } func (*validateOpRestoreDBClusterFromSnapshot) ID() string { return "OperationInputValidation" } func (m *validateOpRestoreDBClusterFromSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RestoreDBClusterFromSnapshotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRestoreDBClusterFromSnapshotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRestoreDBClusterToPointInTime struct { } func (*validateOpRestoreDBClusterToPointInTime) ID() string { return "OperationInputValidation" } func (m *validateOpRestoreDBClusterToPointInTime) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RestoreDBClusterToPointInTimeInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRestoreDBClusterToPointInTimeInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartDBCluster struct { } func (*validateOpStartDBCluster) ID() string { return "OperationInputValidation" } func (m *validateOpStartDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartDBClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartDBClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStopDBCluster struct { } func (*validateOpStopDBCluster) ID() string { return "OperationInputValidation" } func (m *validateOpStopDBCluster) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StopDBClusterInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStopDBClusterInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAddRoleToDBClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddRoleToDBCluster{}, middleware.After) } func addOpAddSourceIdentifierToSubscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddSourceIdentifierToSubscription{}, middleware.After) } func addOpAddTagsToResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddTagsToResource{}, middleware.After) } func addOpApplyPendingMaintenanceActionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpApplyPendingMaintenanceAction{}, middleware.After) } func addOpCopyDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCopyDBClusterParameterGroup{}, middleware.After) } func addOpCopyDBClusterSnapshotValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCopyDBClusterSnapshot{}, middleware.After) } func addOpCopyDBParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCopyDBParameterGroup{}, middleware.After) } func addOpCreateDBClusterEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDBClusterEndpoint{}, middleware.After) } func addOpCreateDBClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDBCluster{}, middleware.After) } func addOpCreateDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDBClusterParameterGroup{}, middleware.After) } func addOpCreateDBClusterSnapshotValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDBClusterSnapshot{}, middleware.After) } func addOpCreateDBInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDBInstance{}, middleware.After) } func addOpCreateDBParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDBParameterGroup{}, middleware.After) } func addOpCreateDBSubnetGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateDBSubnetGroup{}, middleware.After) } func addOpCreateEventSubscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateEventSubscription{}, middleware.After) } func addOpCreateGlobalClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateGlobalCluster{}, middleware.After) } func addOpDeleteDBClusterEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDBClusterEndpoint{}, middleware.After) } func addOpDeleteDBClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDBCluster{}, middleware.After) } func addOpDeleteDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDBClusterParameterGroup{}, middleware.After) } func addOpDeleteDBClusterSnapshotValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDBClusterSnapshot{}, middleware.After) } func addOpDeleteDBInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDBInstance{}, middleware.After) } func addOpDeleteDBParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDBParameterGroup{}, middleware.After) } func addOpDeleteDBSubnetGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteDBSubnetGroup{}, middleware.After) } func addOpDeleteEventSubscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteEventSubscription{}, middleware.After) } func addOpDeleteGlobalClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteGlobalCluster{}, middleware.After) } func addOpDescribeDBClusterEndpointsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBClusterEndpoints{}, middleware.After) } func addOpDescribeDBClusterParameterGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBClusterParameterGroups{}, middleware.After) } func addOpDescribeDBClusterParametersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBClusterParameters{}, middleware.After) } func addOpDescribeDBClustersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBClusters{}, middleware.After) } func addOpDescribeDBClusterSnapshotAttributesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBClusterSnapshotAttributes{}, middleware.After) } func addOpDescribeDBClusterSnapshotsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBClusterSnapshots{}, middleware.After) } func addOpDescribeDBEngineVersionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBEngineVersions{}, middleware.After) } func addOpDescribeDBInstancesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBInstances{}, middleware.After) } func addOpDescribeDBParameterGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBParameterGroups{}, middleware.After) } func addOpDescribeDBParametersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBParameters{}, middleware.After) } func addOpDescribeDBSubnetGroupsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDBSubnetGroups{}, middleware.After) } func addOpDescribeEngineDefaultClusterParametersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeEngineDefaultClusterParameters{}, middleware.After) } func addOpDescribeEngineDefaultParametersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeEngineDefaultParameters{}, middleware.After) } func addOpDescribeEventCategoriesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeEventCategories{}, middleware.After) } func addOpDescribeEventsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeEvents{}, middleware.After) } func addOpDescribeEventSubscriptionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeEventSubscriptions{}, middleware.After) } func addOpDescribeOrderableDBInstanceOptionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeOrderableDBInstanceOptions{}, middleware.After) } func addOpDescribePendingMaintenanceActionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribePendingMaintenanceActions{}, middleware.After) } func addOpDescribeValidDBInstanceModificationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeValidDBInstanceModifications{}, middleware.After) } func addOpFailoverGlobalClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpFailoverGlobalCluster{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpModifyDBClusterEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyDBClusterEndpoint{}, middleware.After) } func addOpModifyDBClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyDBCluster{}, middleware.After) } func addOpModifyDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyDBClusterParameterGroup{}, middleware.After) } func addOpModifyDBClusterSnapshotAttributeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyDBClusterSnapshotAttribute{}, middleware.After) } func addOpModifyDBInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyDBInstance{}, middleware.After) } func addOpModifyDBParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyDBParameterGroup{}, middleware.After) } func addOpModifyDBSubnetGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyDBSubnetGroup{}, middleware.After) } func addOpModifyEventSubscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyEventSubscription{}, middleware.After) } func addOpModifyGlobalClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpModifyGlobalCluster{}, middleware.After) } func addOpPromoteReadReplicaDBClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPromoteReadReplicaDBCluster{}, middleware.After) } func addOpRebootDBInstanceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRebootDBInstance{}, middleware.After) } func addOpRemoveFromGlobalClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveFromGlobalCluster{}, middleware.After) } func addOpRemoveRoleFromDBClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveRoleFromDBCluster{}, middleware.After) } func addOpRemoveSourceIdentifierFromSubscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveSourceIdentifierFromSubscription{}, middleware.After) } func addOpRemoveTagsFromResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveTagsFromResource{}, middleware.After) } func addOpResetDBClusterParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpResetDBClusterParameterGroup{}, middleware.After) } func addOpResetDBParameterGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpResetDBParameterGroup{}, middleware.After) } func addOpRestoreDBClusterFromSnapshotValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRestoreDBClusterFromSnapshot{}, middleware.After) } func addOpRestoreDBClusterToPointInTimeValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRestoreDBClusterToPointInTime{}, middleware.After) } func addOpStartDBClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartDBCluster{}, middleware.After) } func addOpStopDBClusterValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopDBCluster{}, middleware.After) } func validateFilter(v *types.Filter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Filter"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.Values == nil { invalidParams.Add(smithy.NewErrParamRequired("Values")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFilterList(v []types.Filter) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FilterList"} for i := range v { if err := validateFilter(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddRoleToDBClusterInput(v *AddRoleToDBClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddRoleToDBClusterInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddSourceIdentifierToSubscriptionInput(v *AddSourceIdentifierToSubscriptionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddSourceIdentifierToSubscriptionInput"} if v.SubscriptionName == nil { invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName")) } if v.SourceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddTagsToResourceInput(v *AddTagsToResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddTagsToResourceInput"} if v.ResourceName == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceName")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpApplyPendingMaintenanceActionInput(v *ApplyPendingMaintenanceActionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ApplyPendingMaintenanceActionInput"} if v.ResourceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifier")) } if v.ApplyAction == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplyAction")) } if v.OptInType == nil { invalidParams.Add(smithy.NewErrParamRequired("OptInType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCopyDBClusterParameterGroupInput(v *CopyDBClusterParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CopyDBClusterParameterGroupInput"} if v.SourceDBClusterParameterGroupIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceDBClusterParameterGroupIdentifier")) } if v.TargetDBClusterParameterGroupIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetDBClusterParameterGroupIdentifier")) } if v.TargetDBClusterParameterGroupDescription == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetDBClusterParameterGroupDescription")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCopyDBClusterSnapshotInput(v *CopyDBClusterSnapshotInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CopyDBClusterSnapshotInput"} if v.SourceDBClusterSnapshotIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceDBClusterSnapshotIdentifier")) } if v.TargetDBClusterSnapshotIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetDBClusterSnapshotIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCopyDBParameterGroupInput(v *CopyDBParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CopyDBParameterGroupInput"} if v.SourceDBParameterGroupIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceDBParameterGroupIdentifier")) } if v.TargetDBParameterGroupIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetDBParameterGroupIdentifier")) } if v.TargetDBParameterGroupDescription == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetDBParameterGroupDescription")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateDBClusterEndpointInput(v *CreateDBClusterEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateDBClusterEndpointInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if v.DBClusterEndpointIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterEndpointIdentifier")) } if v.EndpointType == nil { invalidParams.Add(smithy.NewErrParamRequired("EndpointType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateDBClusterInput(v *CreateDBClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateDBClusterInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if v.Engine == nil { invalidParams.Add(smithy.NewErrParamRequired("Engine")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateDBClusterParameterGroupInput(v *CreateDBClusterParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateDBClusterParameterGroupInput"} if v.DBClusterParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName")) } if v.DBParameterGroupFamily == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupFamily")) } if v.Description == nil { invalidParams.Add(smithy.NewErrParamRequired("Description")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateDBClusterSnapshotInput(v *CreateDBClusterSnapshotInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateDBClusterSnapshotInput"} if v.DBClusterSnapshotIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterSnapshotIdentifier")) } if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateDBInstanceInput(v *CreateDBInstanceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateDBInstanceInput"} if v.DBInstanceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier")) } if v.DBInstanceClass == nil { invalidParams.Add(smithy.NewErrParamRequired("DBInstanceClass")) } if v.Engine == nil { invalidParams.Add(smithy.NewErrParamRequired("Engine")) } if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateDBParameterGroupInput(v *CreateDBParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateDBParameterGroupInput"} if v.DBParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName")) } if v.DBParameterGroupFamily == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupFamily")) } if v.Description == nil { invalidParams.Add(smithy.NewErrParamRequired("Description")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateDBSubnetGroupInput(v *CreateDBSubnetGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateDBSubnetGroupInput"} if v.DBSubnetGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBSubnetGroupName")) } if v.DBSubnetGroupDescription == nil { invalidParams.Add(smithy.NewErrParamRequired("DBSubnetGroupDescription")) } if v.SubnetIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateEventSubscriptionInput(v *CreateEventSubscriptionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateEventSubscriptionInput"} if v.SubscriptionName == nil { invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName")) } if v.SnsTopicArn == nil { invalidParams.Add(smithy.NewErrParamRequired("SnsTopicArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateGlobalClusterInput(v *CreateGlobalClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateGlobalClusterInput"} if v.GlobalClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteDBClusterEndpointInput(v *DeleteDBClusterEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteDBClusterEndpointInput"} if v.DBClusterEndpointIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterEndpointIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteDBClusterInput(v *DeleteDBClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteDBClusterInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteDBClusterParameterGroupInput(v *DeleteDBClusterParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteDBClusterParameterGroupInput"} if v.DBClusterParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteDBClusterSnapshotInput(v *DeleteDBClusterSnapshotInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteDBClusterSnapshotInput"} if v.DBClusterSnapshotIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterSnapshotIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteDBInstanceInput(v *DeleteDBInstanceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteDBInstanceInput"} if v.DBInstanceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteDBParameterGroupInput(v *DeleteDBParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteDBParameterGroupInput"} if v.DBParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteDBSubnetGroupInput(v *DeleteDBSubnetGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteDBSubnetGroupInput"} if v.DBSubnetGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBSubnetGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteEventSubscriptionInput(v *DeleteEventSubscriptionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteEventSubscriptionInput"} if v.SubscriptionName == nil { invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteGlobalClusterInput(v *DeleteGlobalClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteGlobalClusterInput"} if v.GlobalClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBClusterEndpointsInput(v *DescribeDBClusterEndpointsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterEndpointsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBClusterParameterGroupsInput(v *DescribeDBClusterParameterGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterParameterGroupsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBClusterParametersInput(v *DescribeDBClusterParametersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterParametersInput"} if v.DBClusterParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName")) } if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBClustersInput(v *DescribeDBClustersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClustersInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBClusterSnapshotAttributesInput(v *DescribeDBClusterSnapshotAttributesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterSnapshotAttributesInput"} if v.DBClusterSnapshotIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterSnapshotIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBClusterSnapshotsInput(v *DescribeDBClusterSnapshotsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBClusterSnapshotsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBEngineVersionsInput(v *DescribeDBEngineVersionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBEngineVersionsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBInstancesInput(v *DescribeDBInstancesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBInstancesInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBParameterGroupsInput(v *DescribeDBParameterGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBParameterGroupsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBParametersInput(v *DescribeDBParametersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBParametersInput"} if v.DBParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName")) } if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeDBSubnetGroupsInput(v *DescribeDBSubnetGroupsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeDBSubnetGroupsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeEngineDefaultClusterParametersInput(v *DescribeEngineDefaultClusterParametersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeEngineDefaultClusterParametersInput"} if v.DBParameterGroupFamily == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupFamily")) } if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeEngineDefaultParametersInput(v *DescribeEngineDefaultParametersInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeEngineDefaultParametersInput"} if v.DBParameterGroupFamily == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupFamily")) } if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeEventCategoriesInput(v *DescribeEventCategoriesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeEventCategoriesInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeEventsInput(v *DescribeEventsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeEventsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeEventSubscriptionsInput(v *DescribeEventSubscriptionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeEventSubscriptionsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeOrderableDBInstanceOptionsInput(v *DescribeOrderableDBInstanceOptionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeOrderableDBInstanceOptionsInput"} if v.Engine == nil { invalidParams.Add(smithy.NewErrParamRequired("Engine")) } if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribePendingMaintenanceActionsInput(v *DescribePendingMaintenanceActionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribePendingMaintenanceActionsInput"} if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeValidDBInstanceModificationsInput(v *DescribeValidDBInstanceModificationsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeValidDBInstanceModificationsInput"} if v.DBInstanceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpFailoverGlobalClusterInput(v *FailoverGlobalClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FailoverGlobalClusterInput"} if v.GlobalClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalClusterIdentifier")) } if v.TargetDbClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetDbClusterIdentifier")) } 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.ResourceName == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceName")) } if v.Filters != nil { if err := validateFilterList(v.Filters); err != nil { invalidParams.AddNested("Filters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyDBClusterEndpointInput(v *ModifyDBClusterEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyDBClusterEndpointInput"} if v.DBClusterEndpointIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterEndpointIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyDBClusterInput(v *ModifyDBClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyDBClusterInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyDBClusterParameterGroupInput(v *ModifyDBClusterParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyDBClusterParameterGroupInput"} if v.DBClusterParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName")) } if v.Parameters == nil { invalidParams.Add(smithy.NewErrParamRequired("Parameters")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyDBClusterSnapshotAttributeInput(v *ModifyDBClusterSnapshotAttributeInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyDBClusterSnapshotAttributeInput"} if v.DBClusterSnapshotIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterSnapshotIdentifier")) } if v.AttributeName == nil { invalidParams.Add(smithy.NewErrParamRequired("AttributeName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyDBInstanceInput(v *ModifyDBInstanceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyDBInstanceInput"} if v.DBInstanceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyDBParameterGroupInput(v *ModifyDBParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyDBParameterGroupInput"} if v.DBParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName")) } if v.Parameters == nil { invalidParams.Add(smithy.NewErrParamRequired("Parameters")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyDBSubnetGroupInput(v *ModifyDBSubnetGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyDBSubnetGroupInput"} if v.DBSubnetGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBSubnetGroupName")) } if v.SubnetIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyEventSubscriptionInput(v *ModifyEventSubscriptionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyEventSubscriptionInput"} if v.SubscriptionName == nil { invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpModifyGlobalClusterInput(v *ModifyGlobalClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ModifyGlobalClusterInput"} if v.GlobalClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpPromoteReadReplicaDBClusterInput(v *PromoteReadReplicaDBClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PromoteReadReplicaDBClusterInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRebootDBInstanceInput(v *RebootDBInstanceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RebootDBInstanceInput"} if v.DBInstanceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBInstanceIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveFromGlobalClusterInput(v *RemoveFromGlobalClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveFromGlobalClusterInput"} if v.GlobalClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("GlobalClusterIdentifier")) } if v.DbClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DbClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveRoleFromDBClusterInput(v *RemoveRoleFromDBClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveRoleFromDBClusterInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if v.RoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveSourceIdentifierFromSubscriptionInput(v *RemoveSourceIdentifierFromSubscriptionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveSourceIdentifierFromSubscriptionInput"} if v.SubscriptionName == nil { invalidParams.Add(smithy.NewErrParamRequired("SubscriptionName")) } if v.SourceIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRemoveTagsFromResourceInput(v *RemoveTagsFromResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RemoveTagsFromResourceInput"} if v.ResourceName == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceName")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpResetDBClusterParameterGroupInput(v *ResetDBClusterParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ResetDBClusterParameterGroupInput"} if v.DBClusterParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterParameterGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpResetDBParameterGroupInput(v *ResetDBParameterGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ResetDBParameterGroupInput"} if v.DBParameterGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("DBParameterGroupName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRestoreDBClusterFromSnapshotInput(v *RestoreDBClusterFromSnapshotInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RestoreDBClusterFromSnapshotInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if v.SnapshotIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("SnapshotIdentifier")) } if v.Engine == nil { invalidParams.Add(smithy.NewErrParamRequired("Engine")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRestoreDBClusterToPointInTimeInput(v *RestoreDBClusterToPointInTimeInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RestoreDBClusterToPointInTimeInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if v.SourceDBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("SourceDBClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartDBClusterInput(v *StartDBClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartDBClusterInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStopDBClusterInput(v *StopDBClusterInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StopDBClusterInput"} if v.DBClusterIdentifier == nil { invalidParams.Add(smithy.NewErrParamRequired("DBClusterIdentifier")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
2,822
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 Neptune 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: "rds.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "rds-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "rds.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, 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-northeast-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.ca-central-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "ca-central-1-fips", }: endpoints.Endpoint{ Hostname: "rds-fips.ca-central-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "ca-central-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-2", }: 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: "me-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "rds-fips.ca-central-1", }: endpoints.Endpoint{ Hostname: "rds-fips.ca-central-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "ca-central-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds-fips.us-east-1", }: endpoints.Endpoint{ Hostname: "rds-fips.us-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds-fips.us-east-2", }: endpoints.Endpoint{ Hostname: "rds-fips.us-east-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds-fips.us-west-1", }: endpoints.Endpoint{ Hostname: "rds-fips.us-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds-fips.us-west-2", }: endpoints.Endpoint{ Hostname: "rds-fips.us-west-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.ca-central-1", }: endpoints.Endpoint{ CredentialScope: endpoints.CredentialScope{ Region: "ca-central-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.ca-central-1", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.ca-central-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "ca-central-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-east-1", }: endpoints.Endpoint{ CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.us-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-east-2", }: endpoints.Endpoint{ CredentialScope: endpoints.CredentialScope{ Region: "us-east-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-east-2", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.us-east-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-west-1", }: endpoints.Endpoint{ CredentialScope: endpoints.CredentialScope{ Region: "us-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-west-1", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.us-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-west-2", }: endpoints.Endpoint{ CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-west-2", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.us-west-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, Deprecated: aws.TrueTernary, }, 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: "rds-fips.us-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-east-1-fips", }: endpoints.Endpoint{ Hostname: "rds-fips.us-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.us-east-2.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-east-2-fips", }: endpoints.Endpoint{ Hostname: "rds-fips.us-east-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-1", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.us-west-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-1-fips", }: endpoints.Endpoint{ Hostname: "rds-fips.us-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.us-west-2.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-2-fips", }: endpoints.Endpoint{ Hostname: "rds-fips.us-west-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, Deprecated: aws.TrueTernary, }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "rds.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "rds-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "rds.{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: "rds-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "rds.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-iso-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-iso-west-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "rds.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-isob-east-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "rds-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "rds.{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: "rds-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "rds.{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: "rds.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "rds.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "rds-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "rds.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "rds.us-gov-east-1", }: endpoints.Endpoint{ Hostname: "rds.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "rds.us-gov-west-1", }: endpoints.Endpoint{ Hostname: "rds.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "rds.us-gov-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-gov-east-1-fips", }: endpoints.Endpoint{ Hostname: "rds.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-west-1", Variant: endpoints.FIPSVariant, }: { Hostname: "rds.us-gov-west-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-gov-west-1-fips", }: endpoints.Endpoint{ Hostname: "rds.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, }, }, }
667
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 ApplyMethod string // Enum values for ApplyMethod const ( ApplyMethodImmediate ApplyMethod = "immediate" ApplyMethodPendingReboot ApplyMethod = "pending-reboot" ) // Values returns all known values for ApplyMethod. 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 (ApplyMethod) Values() []ApplyMethod { return []ApplyMethod{ "immediate", "pending-reboot", } } type SourceType string // Enum values for SourceType const ( SourceTypeDbInstance SourceType = "db-instance" SourceTypeDbParameterGroup SourceType = "db-parameter-group" SourceTypeDbSecurityGroup SourceType = "db-security-group" SourceTypeDbSnapshot SourceType = "db-snapshot" SourceTypeDbCluster SourceType = "db-cluster" SourceTypeDbClusterSnapshot SourceType = "db-cluster-snapshot" ) // Values returns all known values for SourceType. 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 (SourceType) Values() []SourceType { return []SourceType{ "db-instance", "db-parameter-group", "db-security-group", "db-snapshot", "db-cluster", "db-cluster-snapshot", } }
48
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" ) // Specified CIDRIP or EC2 security group is not authorized for the specified DB // security group. Neptune may not also be authorized via IAM to perform necessary // actions on your behalf. type AuthorizationNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AuthorizationNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AuthorizationNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AuthorizationNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AuthorizationNotFound" } return *e.ErrorCodeOverride } func (e *AuthorizationNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // CertificateIdentifier does not refer to an existing certificate. type CertificateNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *CertificateNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *CertificateNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *CertificateNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "CertificateNotFound" } return *e.ErrorCodeOverride } func (e *CertificateNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // User already has a DB cluster with the given identifier. type DBClusterAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterAlreadyExistsFault" } return *e.ErrorCodeOverride } func (e *DBClusterAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified custom endpoint cannot be created because it already exists. type DBClusterEndpointAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterEndpointAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterEndpointAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterEndpointAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterEndpointAlreadyExistsFault" } return *e.ErrorCodeOverride } func (e *DBClusterEndpointAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified custom endpoint doesn't exist. type DBClusterEndpointNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterEndpointNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterEndpointNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterEndpointNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterEndpointNotFoundFault" } return *e.ErrorCodeOverride } func (e *DBClusterEndpointNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The cluster already has the maximum number of custom endpoints. type DBClusterEndpointQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterEndpointQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterEndpointQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterEndpointQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterEndpointQuotaExceededFault" } return *e.ErrorCodeOverride } func (e *DBClusterEndpointQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBClusterIdentifier does not refer to an existing DB cluster. type DBClusterNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterNotFoundFault" } return *e.ErrorCodeOverride } func (e *DBClusterNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBClusterParameterGroupName does not refer to an existing DB Cluster parameter // group. type DBClusterParameterGroupNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterParameterGroupNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterParameterGroupNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterParameterGroupNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterParameterGroupNotFound" } return *e.ErrorCodeOverride } func (e *DBClusterParameterGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // User attempted to create a new DB cluster and the user has already reached the // maximum allowed DB cluster quota. type DBClusterQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterQuotaExceededFault" } return *e.ErrorCodeOverride } func (e *DBClusterQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified IAM role Amazon Resource Name (ARN) is already associated with // the specified DB cluster. type DBClusterRoleAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterRoleAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterRoleAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterRoleAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterRoleAlreadyExists" } return *e.ErrorCodeOverride } func (e *DBClusterRoleAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified IAM role Amazon Resource Name (ARN) is not associated with the // specified DB cluster. type DBClusterRoleNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterRoleNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterRoleNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterRoleNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterRoleNotFound" } return *e.ErrorCodeOverride } func (e *DBClusterRoleNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You have exceeded the maximum number of IAM roles that can be associated with // the specified DB cluster. type DBClusterRoleQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterRoleQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterRoleQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterRoleQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterRoleQuotaExceeded" } return *e.ErrorCodeOverride } func (e *DBClusterRoleQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // User already has a DB cluster snapshot with the given identifier. type DBClusterSnapshotAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterSnapshotAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterSnapshotAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterSnapshotAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterSnapshotAlreadyExistsFault" } return *e.ErrorCodeOverride } func (e *DBClusterSnapshotAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBClusterSnapshotIdentifier does not refer to an existing DB cluster snapshot. type DBClusterSnapshotNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBClusterSnapshotNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBClusterSnapshotNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBClusterSnapshotNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBClusterSnapshotNotFoundFault" } return *e.ErrorCodeOverride } func (e *DBClusterSnapshotNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // User already has a DB instance with the given identifier. type DBInstanceAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBInstanceAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBInstanceAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBInstanceAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBInstanceAlreadyExists" } return *e.ErrorCodeOverride } func (e *DBInstanceAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBInstanceIdentifier does not refer to an existing DB instance. type DBInstanceNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBInstanceNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBInstanceNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBInstanceNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBInstanceNotFound" } return *e.ErrorCodeOverride } func (e *DBInstanceNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // A DB parameter group with the same name exists. type DBParameterGroupAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBParameterGroupAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBParameterGroupAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBParameterGroupAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBParameterGroupAlreadyExists" } return *e.ErrorCodeOverride } func (e *DBParameterGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBParameterGroupName does not refer to an existing DB parameter group. type DBParameterGroupNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBParameterGroupNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBParameterGroupNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBParameterGroupNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBParameterGroupNotFound" } return *e.ErrorCodeOverride } func (e *DBParameterGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Request would result in user exceeding the allowed number of DB parameter // groups. type DBParameterGroupQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBParameterGroupQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBParameterGroupQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBParameterGroupQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBParameterGroupQuotaExceeded" } return *e.ErrorCodeOverride } func (e *DBParameterGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBSecurityGroupName does not refer to an existing DB security group. type DBSecurityGroupNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBSecurityGroupNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBSecurityGroupNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBSecurityGroupNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBSecurityGroupNotFound" } return *e.ErrorCodeOverride } func (e *DBSecurityGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBSnapshotIdentifier is already used by an existing snapshot. type DBSnapshotAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBSnapshotAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBSnapshotAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBSnapshotAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBSnapshotAlreadyExists" } return *e.ErrorCodeOverride } func (e *DBSnapshotAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBSnapshotIdentifier does not refer to an existing DB snapshot. type DBSnapshotNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBSnapshotNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBSnapshotNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBSnapshotNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBSnapshotNotFound" } return *e.ErrorCodeOverride } func (e *DBSnapshotNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBSubnetGroupName is already used by an existing DB subnet group. type DBSubnetGroupAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBSubnetGroupAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBSubnetGroupAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBSubnetGroupAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBSubnetGroupAlreadyExists" } return *e.ErrorCodeOverride } func (e *DBSubnetGroupAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Subnets in the DB subnet group should cover at least two Availability Zones // unless there is only one Availability Zone. type DBSubnetGroupDoesNotCoverEnoughAZs struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBSubnetGroupDoesNotCoverEnoughAZs) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBSubnetGroupDoesNotCoverEnoughAZs) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBSubnetGroupDoesNotCoverEnoughAZs) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBSubnetGroupDoesNotCoverEnoughAZs" } return *e.ErrorCodeOverride } func (e *DBSubnetGroupDoesNotCoverEnoughAZs) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DBSubnetGroupName does not refer to an existing DB subnet group. type DBSubnetGroupNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBSubnetGroupNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBSubnetGroupNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBSubnetGroupNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBSubnetGroupNotFoundFault" } return *e.ErrorCodeOverride } func (e *DBSubnetGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Request would result in user exceeding the allowed number of DB subnet groups. type DBSubnetGroupQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBSubnetGroupQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBSubnetGroupQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBSubnetGroupQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBSubnetGroupQuotaExceeded" } return *e.ErrorCodeOverride } func (e *DBSubnetGroupQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Request would result in user exceeding the allowed number of subnets in a DB // subnet groups. type DBSubnetQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBSubnetQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBSubnetQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBSubnetQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBSubnetQuotaExceededFault" } return *e.ErrorCodeOverride } func (e *DBSubnetQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The DB upgrade failed because a resource the DB depends on could not be // modified. type DBUpgradeDependencyFailureFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DBUpgradeDependencyFailureFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DBUpgradeDependencyFailureFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DBUpgradeDependencyFailureFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DBUpgradeDependencyFailure" } return *e.ErrorCodeOverride } func (e *DBUpgradeDependencyFailureFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Domain does not refer to an existing Active Directory Domain. type DomainNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DomainNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DomainNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DomainNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DomainNotFoundFault" } return *e.ErrorCodeOverride } func (e *DomainNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You have exceeded the number of events you can subscribe to. type EventSubscriptionQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *EventSubscriptionQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *EventSubscriptionQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *EventSubscriptionQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "EventSubscriptionQuotaExceeded" } return *e.ErrorCodeOverride } func (e *EventSubscriptionQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The GlobalClusterIdentifier already exists. Choose a new global database // identifier (unique name) to create a new global database cluster. type GlobalClusterAlreadyExistsFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *GlobalClusterAlreadyExistsFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *GlobalClusterAlreadyExistsFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *GlobalClusterAlreadyExistsFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "GlobalClusterAlreadyExistsFault" } return *e.ErrorCodeOverride } func (e *GlobalClusterAlreadyExistsFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The GlobalClusterIdentifier doesn't refer to an existing global database // cluster. type GlobalClusterNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *GlobalClusterNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *GlobalClusterNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *GlobalClusterNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "GlobalClusterNotFoundFault" } return *e.ErrorCodeOverride } func (e *GlobalClusterNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The number of global database clusters for this account is already at the // maximum allowed. type GlobalClusterQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *GlobalClusterQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *GlobalClusterQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *GlobalClusterQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "GlobalClusterQuotaExceededFault" } return *e.ErrorCodeOverride } func (e *GlobalClusterQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Request would result in user exceeding the allowed number of DB instances. type InstanceQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InstanceQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InstanceQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InstanceQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InstanceQuotaExceeded" } return *e.ErrorCodeOverride } func (e *InstanceQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The DB cluster does not have enough capacity for the current operation. type InsufficientDBClusterCapacityFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InsufficientDBClusterCapacityFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InsufficientDBClusterCapacityFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InsufficientDBClusterCapacityFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InsufficientDBClusterCapacityFault" } return *e.ErrorCodeOverride } func (e *InsufficientDBClusterCapacityFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Specified DB instance class is not available in the specified Availability Zone. type InsufficientDBInstanceCapacityFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InsufficientDBInstanceCapacityFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InsufficientDBInstanceCapacityFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InsufficientDBInstanceCapacityFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InsufficientDBInstanceCapacity" } return *e.ErrorCodeOverride } func (e *InsufficientDBInstanceCapacityFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // There is insufficient storage available for the current action. You may be able // to resolve this error by updating your subnet group to use different // Availability Zones that have more storage available. type InsufficientStorageClusterCapacityFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InsufficientStorageClusterCapacityFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InsufficientStorageClusterCapacityFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InsufficientStorageClusterCapacityFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InsufficientStorageClusterCapacity" } return *e.ErrorCodeOverride } func (e *InsufficientStorageClusterCapacityFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The requested operation cannot be performed on the endpoint while the endpoint // is in this state. type InvalidDBClusterEndpointStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBClusterEndpointStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBClusterEndpointStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBClusterEndpointStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBClusterEndpointStateFault" } return *e.ErrorCodeOverride } func (e *InvalidDBClusterEndpointStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The supplied value is not a valid DB cluster snapshot state. type InvalidDBClusterSnapshotStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBClusterSnapshotStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBClusterSnapshotStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBClusterSnapshotStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBClusterSnapshotStateFault" } return *e.ErrorCodeOverride } func (e *InvalidDBClusterSnapshotStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The DB cluster is not in a valid state. type InvalidDBClusterStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBClusterStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBClusterStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBClusterStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBClusterStateFault" } return *e.ErrorCodeOverride } func (e *InvalidDBClusterStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified DB instance is not in the available state. type InvalidDBInstanceStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBInstanceStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBInstanceStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBInstanceStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBInstanceState" } return *e.ErrorCodeOverride } func (e *InvalidDBInstanceStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The DB parameter group is in use or is in an invalid state. If you are // attempting to delete the parameter group, you cannot delete it when the // parameter group is in this state. type InvalidDBParameterGroupStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBParameterGroupStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBParameterGroupStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBParameterGroupStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBParameterGroupState" } return *e.ErrorCodeOverride } func (e *InvalidDBParameterGroupStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The state of the DB security group does not allow deletion. type InvalidDBSecurityGroupStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBSecurityGroupStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBSecurityGroupStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBSecurityGroupStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBSecurityGroupState" } return *e.ErrorCodeOverride } func (e *InvalidDBSecurityGroupStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The state of the DB snapshot does not allow deletion. type InvalidDBSnapshotStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBSnapshotStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBSnapshotStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBSnapshotStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBSnapshotState" } return *e.ErrorCodeOverride } func (e *InvalidDBSnapshotStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The DB subnet group cannot be deleted because it is in use. type InvalidDBSubnetGroupStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBSubnetGroupStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBSubnetGroupStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBSubnetGroupStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBSubnetGroupStateFault" } return *e.ErrorCodeOverride } func (e *InvalidDBSubnetGroupStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The DB subnet is not in the available state. type InvalidDBSubnetStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDBSubnetStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDBSubnetStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDBSubnetStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDBSubnetStateFault" } return *e.ErrorCodeOverride } func (e *InvalidDBSubnetStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The event subscription is in an invalid state. type InvalidEventSubscriptionStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidEventSubscriptionStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidEventSubscriptionStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidEventSubscriptionStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidEventSubscriptionState" } return *e.ErrorCodeOverride } func (e *InvalidEventSubscriptionStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The global cluster is in an invalid state and can't perform the requested // operation. type InvalidGlobalClusterStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidGlobalClusterStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidGlobalClusterStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidGlobalClusterStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidGlobalClusterStateFault" } return *e.ErrorCodeOverride } func (e *InvalidGlobalClusterStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Cannot restore from vpc backup to non-vpc DB instance. type InvalidRestoreFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidRestoreFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidRestoreFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidRestoreFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidRestoreFault" } return *e.ErrorCodeOverride } func (e *InvalidRestoreFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The requested subnet is invalid, or multiple subnets were requested that are // not all in a common VPC. type InvalidSubnet struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidSubnet) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidSubnet) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidSubnet) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidSubnet" } return *e.ErrorCodeOverride } func (e *InvalidSubnet) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // DB subnet group does not cover all Availability Zones after it is created // because users' change. type InvalidVPCNetworkStateFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidVPCNetworkStateFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidVPCNetworkStateFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidVPCNetworkStateFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidVPCNetworkStateFault" } return *e.ErrorCodeOverride } func (e *InvalidVPCNetworkStateFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Error accessing KMS key. type KMSKeyNotAccessibleFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *KMSKeyNotAccessibleFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *KMSKeyNotAccessibleFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *KMSKeyNotAccessibleFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "KMSKeyNotAccessibleFault" } return *e.ErrorCodeOverride } func (e *KMSKeyNotAccessibleFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The designated option group could not be found. type OptionGroupNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *OptionGroupNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *OptionGroupNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *OptionGroupNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "OptionGroupNotFoundFault" } return *e.ErrorCodeOverride } func (e *OptionGroupNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Provisioned IOPS not available in the specified Availability Zone. type ProvisionedIopsNotAvailableInAZFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ProvisionedIopsNotAvailableInAZFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ProvisionedIopsNotAvailableInAZFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ProvisionedIopsNotAvailableInAZFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ProvisionedIopsNotAvailableInAZFault" } return *e.ErrorCodeOverride } func (e *ProvisionedIopsNotAvailableInAZFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified resource ID was not found. type ResourceNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundFault" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You have exceeded the maximum number of accounts that you can share a manual DB // snapshot with. type SharedSnapshotQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SharedSnapshotQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SharedSnapshotQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SharedSnapshotQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SharedSnapshotQuotaExceeded" } return *e.ErrorCodeOverride } func (e *SharedSnapshotQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Request would result in user exceeding the allowed number of DB snapshots. type SnapshotQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SnapshotQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SnapshotQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SnapshotQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SnapshotQuotaExceeded" } return *e.ErrorCodeOverride } func (e *SnapshotQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The SNS topic is invalid. type SNSInvalidTopicFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SNSInvalidTopicFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SNSInvalidTopicFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SNSInvalidTopicFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SNSInvalidTopic" } return *e.ErrorCodeOverride } func (e *SNSInvalidTopicFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // There is no SNS authorization. type SNSNoAuthorizationFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SNSNoAuthorizationFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SNSNoAuthorizationFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SNSNoAuthorizationFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SNSNoAuthorization" } return *e.ErrorCodeOverride } func (e *SNSNoAuthorizationFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The ARN of the SNS topic could not be found. type SNSTopicArnNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SNSTopicArnNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SNSTopicArnNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SNSTopicArnNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SNSTopicArnNotFound" } return *e.ErrorCodeOverride } func (e *SNSTopicArnNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The source could not be found. type SourceNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SourceNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SourceNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SourceNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SourceNotFound" } return *e.ErrorCodeOverride } func (e *SourceNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Request would result in user exceeding the allowed amount of storage available // across all DB instances. type StorageQuotaExceededFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *StorageQuotaExceededFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *StorageQuotaExceededFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *StorageQuotaExceededFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "StorageQuotaExceeded" } return *e.ErrorCodeOverride } func (e *StorageQuotaExceededFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // StorageType specified cannot be associated with the DB Instance. type StorageTypeNotSupportedFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *StorageTypeNotSupportedFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *StorageTypeNotSupportedFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *StorageTypeNotSupportedFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "StorageTypeNotSupported" } return *e.ErrorCodeOverride } func (e *StorageTypeNotSupportedFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The DB subnet is already in use in the Availability Zone. type SubnetAlreadyInUse struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SubnetAlreadyInUse) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SubnetAlreadyInUse) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SubnetAlreadyInUse) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SubnetAlreadyInUse" } return *e.ErrorCodeOverride } func (e *SubnetAlreadyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // This subscription already exists. type SubscriptionAlreadyExistFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SubscriptionAlreadyExistFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SubscriptionAlreadyExistFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SubscriptionAlreadyExistFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SubscriptionAlreadyExist" } return *e.ErrorCodeOverride } func (e *SubscriptionAlreadyExistFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The designated subscription category could not be found. type SubscriptionCategoryNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SubscriptionCategoryNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SubscriptionCategoryNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SubscriptionCategoryNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SubscriptionCategoryNotFound" } return *e.ErrorCodeOverride } func (e *SubscriptionCategoryNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The designated subscription could not be found. type SubscriptionNotFoundFault struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *SubscriptionNotFoundFault) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *SubscriptionNotFoundFault) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *SubscriptionNotFoundFault) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "SubscriptionNotFound" } return *e.ErrorCodeOverride } func (e *SubscriptionNotFoundFault) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
1,805
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" ) // Specifies an Availability Zone. type AvailabilityZone struct { // The name of the availability zone. Name *string noSmithyDocumentSerde } // Specifies a character set. type CharacterSet struct { // The description of the character set. CharacterSetDescription *string // The name of the character set. CharacterSetName *string noSmithyDocumentSerde } // The configuration setting for the log types to be enabled for export to // CloudWatch Logs for a specific DB instance or DB cluster. The EnableLogTypes // and DisableLogTypes arrays determine which logs will be exported (or not // exported) to CloudWatch Logs. type CloudwatchLogsExportConfiguration struct { // The list of log types to disable. DisableLogTypes []string // The list of log types to enable. EnableLogTypes []string noSmithyDocumentSerde } // This data type is used as a response element in the ModifyDBCluster operation // and contains changes that will be applied during the next maintenance window. type ClusterPendingModifiedValues struct { // The allocated storage size in gibibytes (GiB) for database engines. For // Neptune, AllocatedStorage always returns 1, because Neptune DB cluster storage // size isn't fixed, but instead automatically adjusts as needed. AllocatedStorage *int32 // The number of days for which automatic DB snapshots are retained. BackupRetentionPeriod *int32 // The DBClusterIdentifier value for the DB cluster. DBClusterIdentifier *string // The database engine version. EngineVersion *string // A value that indicates whether mapping of Amazon Web Services Identity and // Access Management (IAM) accounts to database accounts is enabled. IAMDatabaseAuthenticationEnabled *bool // The Provisioned IOPS (I/O operations per second) value. This setting is only // for non-Aurora Multi-AZ DB clusters. Iops *int32 // This PendingCloudwatchLogsExports structure specifies pending changes to which // CloudWatch logs are enabled and which are disabled. PendingCloudwatchLogsExports *PendingCloudwatchLogsExports noSmithyDocumentSerde } // Contains the details of an Amazon Neptune DB cluster. This data type is used as // a response element in the DescribeDBClusters action. type DBCluster struct { // AllocatedStorage always returns 1, because Neptune DB cluster storage size is // not fixed, but instead automatically adjusts as needed. AllocatedStorage *int32 // Provides a list of the Amazon Identity and Access Management (IAM) roles that // are associated with the DB cluster. IAM roles that are associated with a DB // cluster grant permission for the DB cluster to access other Amazon services on // your behalf. AssociatedRoles []DBClusterRole // Time at which the DB cluster will be automatically restarted. AutomaticRestartTime *time.Time // Provides the list of EC2 Availability Zones that instances in the DB cluster // can be created in. AvailabilityZones []string // Specifies the number of days for which automatic DB snapshots are retained. BackupRetentionPeriod *int32 // Not supported by Neptune. CharacterSetName *string // Identifies the clone group to which the DB cluster is associated. CloneGroupId *string // Specifies the time when the DB cluster was created, in Universal Coordinated // Time (UTC). ClusterCreateTime *time.Time // If set to true , tags are copied to any snapshot of the DB cluster that is // created. CopyTagsToSnapshot *bool // If set to true , the DB cluster can be cloned across accounts. CrossAccountClone *bool // The Amazon Resource Name (ARN) for the DB cluster. DBClusterArn *string // Contains a user-supplied DB cluster identifier. This identifier is the unique // key that identifies a DB cluster. DBClusterIdentifier *string // Provides the list of instances that make up the DB cluster. DBClusterMembers []DBClusterMember // Not supported by Neptune. DBClusterOptionGroupMemberships []DBClusterOptionGroupStatus // Specifies the name of the DB cluster parameter group for the DB cluster. DBClusterParameterGroup *string // Specifies information on the subnet group associated with the DB cluster, // including the name, description, and subnets in the subnet group. DBSubnetGroup *string // Contains the name of the initial database of this DB cluster that was provided // at create time, if one was specified when the DB cluster was created. This same // name is returned for the life of the DB cluster. DatabaseName *string // The Amazon Region-unique, immutable identifier for the DB cluster. This // identifier is found in Amazon CloudTrail log entries whenever the Amazon KMS key // for the DB cluster is accessed. DbClusterResourceId *string // Indicates whether or not the DB cluster has deletion protection enabled. The // database can't be deleted when deletion protection is enabled. DeletionProtection *bool // Specifies the earliest time to which a database can be restored with // point-in-time restore. EarliestRestorableTime *time.Time // A list of log types that this DB cluster is configured to export to CloudWatch // Logs. EnabledCloudwatchLogsExports []string // Specifies the connection endpoint for the primary instance of the DB cluster. Endpoint *string // Provides the name of the database engine to be used for this DB cluster. Engine *string // Indicates the database engine version. EngineVersion *string // Contains a user-supplied global database cluster identifier. This identifier is // the unique key that identifies a global database. GlobalClusterIdentifier *string // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. HostedZoneId *string // True if mapping of Amazon Identity and Access Management (IAM) accounts to // database accounts is enabled, and otherwise false. IAMDatabaseAuthenticationEnabled bool // If StorageEncrypted is true, the Amazon KMS key identifier for the encrypted DB // cluster. KmsKeyId *string // Specifies the latest time to which a database can be restored with // point-in-time restore. LatestRestorableTime *time.Time // Not supported by Neptune. MasterUsername *string // Specifies whether the DB cluster has instances in multiple Availability Zones. MultiAZ bool // This data type is used as a response element in the ModifyDBCluster operation // and contains changes that will be applied during the next maintenance window. PendingModifiedValues *ClusterPendingModifiedValues // Specifies the progress of the operation as a percentage. PercentProgress *string // Specifies the port that the database engine is listening on. Port *int32 // Specifies the daily time range during which automated backups are created if // automated backups are enabled, as determined by the BackupRetentionPeriod . PreferredBackupWindow *string // Specifies the weekly time range during which system maintenance can occur, in // Universal Coordinated Time (UTC). PreferredMaintenanceWindow *string // Contains one or more identifiers of the Read Replicas associated with this DB // cluster. ReadReplicaIdentifiers []string // The reader endpoint for the DB cluster. The reader endpoint for a DB cluster // load-balances connections across the Read Replicas that are available in a DB // cluster. As clients request new connections to the reader endpoint, Neptune // distributes the connection requests among the Read Replicas in the DB cluster. // This functionality can help balance your read workload across multiple Read // Replicas in your DB cluster. If a failover occurs, and the Read Replica that you // are connected to is promoted to be the primary instance, your connection is // dropped. To continue sending your read workload to other Read Replicas in the // cluster, you can then reconnect to the reader endpoint. ReaderEndpoint *string // Not supported by Neptune. ReplicationSourceIdentifier *string // Shows the scaling configuration for a Neptune Serverless DB cluster. For more // information, see Using Amazon Neptune Serverless (https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) // in the Amazon Neptune User Guide. ServerlessV2ScalingConfiguration *ServerlessV2ScalingConfigurationInfo // Specifies the current state of this DB cluster. Status *string // Specifies whether the DB cluster is encrypted. StorageEncrypted bool // Provides a list of VPC security groups that the DB cluster belongs to. VpcSecurityGroups []VpcSecurityGroupMembership noSmithyDocumentSerde } // This data type represents the information you need to connect to an Amazon // Neptune DB cluster. This data type is used as a response element in the // following actions: // - CreateDBClusterEndpoint // - DescribeDBClusterEndpoints // - ModifyDBClusterEndpoint // - DeleteDBClusterEndpoint // // For the data structure that represents Amazon Neptune DB instance endpoints, // see Endpoint . type DBClusterEndpoint struct { // The type associated with a custom endpoint. One of: READER , WRITER , ANY . CustomEndpointType *string // The Amazon Resource Name (ARN) for the endpoint. DBClusterEndpointArn *string // The identifier associated with the endpoint. This parameter is stored as a // lowercase string. DBClusterEndpointIdentifier *string // A unique system-generated identifier for an endpoint. It remains the same for // the whole life of the endpoint. DBClusterEndpointResourceIdentifier *string // The DB cluster identifier of the DB cluster associated with the endpoint. This // parameter is stored as a lowercase string. DBClusterIdentifier *string // The DNS address of the endpoint. Endpoint *string // The type of the endpoint. One of: READER , WRITER , CUSTOM . EndpointType *string // List of DB instance identifiers that aren't part of the custom endpoint group. // All other eligible instances are reachable through the custom endpoint. Only // relevant if the list of static members is empty. ExcludedMembers []string // List of DB instance identifiers that are part of the custom endpoint group. StaticMembers []string // The current status of the endpoint. One of: creating , available , deleting , // inactive , modifying . The inactive state applies to an endpoint that cannot be // used for a certain kind of cluster, such as a writer endpoint for a read-only // secondary cluster in a global database. Status *string noSmithyDocumentSerde } // Contains information about an instance that is part of a DB cluster. type DBClusterMember struct { // Specifies the status of the DB cluster parameter group for this member of the // DB cluster. DBClusterParameterGroupStatus *string // Specifies the instance identifier for this member of the DB cluster. DBInstanceIdentifier *string // Value that is true if the cluster member is the primary instance for the DB // cluster and false otherwise. IsClusterWriter bool // A value that specifies the order in which a Read Replica is promoted to the // primary instance after a failure of the existing primary instance. PromotionTier *int32 noSmithyDocumentSerde } // Not supported by Neptune. type DBClusterOptionGroupStatus struct { // Not supported by Neptune. DBClusterOptionGroupName *string // Not supported by Neptune. Status *string noSmithyDocumentSerde } // Contains the details of an Amazon Neptune DB cluster parameter group. This data // type is used as a response element in the DescribeDBClusterParameterGroups // action. type DBClusterParameterGroup struct { // The Amazon Resource Name (ARN) for the DB cluster parameter group. DBClusterParameterGroupArn *string // Provides the name of the DB cluster parameter group. DBClusterParameterGroupName *string // Provides the name of the DB parameter group family that this DB cluster // parameter group is compatible with. DBParameterGroupFamily *string // Provides the customer-specified description for this DB cluster parameter group. Description *string noSmithyDocumentSerde } // Describes an Amazon Identity and Access Management (IAM) role that is // associated with a DB cluster. type DBClusterRole struct { // The name of the feature associated with the Amazon Identity and Access // Management (IAM) role. For the list of supported feature names, see // DescribeDBEngineVersions (https://docs.aws.amazon.com/neptune/latest/userguide/api-other-apis.html#DescribeDBEngineVersions) // . FeatureName *string // The Amazon Resource Name (ARN) of the IAM role that is associated with the DB // cluster. RoleArn *string // Describes the state of association between the IAM role and the DB cluster. The // Status property returns one of the following values: // - ACTIVE - the IAM role ARN is associated with the DB cluster and can be used // to access other Amazon services on your behalf. // - PENDING - the IAM role ARN is being associated with the DB cluster. // - INVALID - the IAM role ARN is associated with the DB cluster, but the DB // cluster is unable to assume the IAM role in order to access other Amazon // services on your behalf. Status *string noSmithyDocumentSerde } // Contains the details for an Amazon Neptune DB cluster snapshot This data type // is used as a response element in the DescribeDBClusterSnapshots action. type DBClusterSnapshot struct { // Specifies the allocated storage size in gibibytes (GiB). AllocatedStorage int32 // Provides the list of EC2 Availability Zones that instances in the DB cluster // snapshot can be restored in. AvailabilityZones []string // Specifies the time when the DB cluster was created, in Universal Coordinated // Time (UTC). ClusterCreateTime *time.Time // Specifies the DB cluster identifier of the DB cluster that this DB cluster // snapshot was created from. DBClusterIdentifier *string // The Amazon Resource Name (ARN) for the DB cluster snapshot. DBClusterSnapshotArn *string // Specifies the identifier for a DB cluster snapshot. Must match the identifier // of an existing snapshot. After you restore a DB cluster using a // DBClusterSnapshotIdentifier , you must specify the same // DBClusterSnapshotIdentifier for any future updates to the DB cluster. When you // specify this property for an update, the DB cluster is not restored from the // snapshot again, and the data in the database is not changed. However, if you // don't specify the DBClusterSnapshotIdentifier , an empty DB cluster is created, // and the original DB cluster is deleted. If you specify a property that is // different from the previous snapshot restore property, the DB cluster is // restored from the snapshot specified by the DBClusterSnapshotIdentifier , and // the original DB cluster is deleted. DBClusterSnapshotIdentifier *string // Specifies the name of the database engine. Engine *string // Provides the version of the database engine for this DB cluster snapshot. EngineVersion *string // True if mapping of Amazon Identity and Access Management (IAM) accounts to // database accounts is enabled, and otherwise false. IAMDatabaseAuthenticationEnabled bool // If StorageEncrypted is true, the Amazon KMS key identifier for the encrypted DB // cluster snapshot. KmsKeyId *string // Provides the license model information for this DB cluster snapshot. LicenseModel *string // Not supported by Neptune. MasterUsername *string // Specifies the percentage of the estimated data that has been transferred. PercentProgress int32 // Specifies the port that the DB cluster was listening on at the time of the // snapshot. Port int32 // Provides the time when the snapshot was taken, in Universal Coordinated Time // (UTC). SnapshotCreateTime *time.Time // Provides the type of the DB cluster snapshot. SnapshotType *string // If the DB cluster snapshot was copied from a source DB cluster snapshot, the // Amazon Resource Name (ARN) for the source DB cluster snapshot, otherwise, a null // value. SourceDBClusterSnapshotArn *string // Specifies the status of this DB cluster snapshot. Status *string // Specifies whether the DB cluster snapshot is encrypted. StorageEncrypted bool // Provides the VPC ID associated with the DB cluster snapshot. VpcId *string noSmithyDocumentSerde } // Contains the name and values of a manual DB cluster snapshot attribute. Manual // DB cluster snapshot attributes are used to authorize other Amazon accounts to // restore a manual DB cluster snapshot. For more information, see the // ModifyDBClusterSnapshotAttribute API action. type DBClusterSnapshotAttribute struct { // The name of the manual DB cluster snapshot attribute. The attribute named // restore refers to the list of Amazon accounts that have permission to copy or // restore the manual DB cluster snapshot. For more information, see the // ModifyDBClusterSnapshotAttribute API action. AttributeName *string // The value(s) for the manual DB cluster snapshot attribute. If the AttributeName // field is set to restore , then this element returns a list of IDs of the Amazon // accounts that are authorized to copy or restore the manual DB cluster snapshot. // If a value of all is in the list, then the manual DB cluster snapshot is public // and available for any Amazon account to copy or restore. AttributeValues []string noSmithyDocumentSerde } // Contains the results of a successful call to the // DescribeDBClusterSnapshotAttributes API action. Manual DB cluster snapshot // attributes are used to authorize other Amazon accounts to copy or restore a // manual DB cluster snapshot. For more information, see the // ModifyDBClusterSnapshotAttribute API action. type DBClusterSnapshotAttributesResult struct { // The list of attributes and values for the manual DB cluster snapshot. DBClusterSnapshotAttributes []DBClusterSnapshotAttribute // The identifier of the manual DB cluster snapshot that the attributes apply to. DBClusterSnapshotIdentifier *string noSmithyDocumentSerde } // This data type is used as a response element in the action // DescribeDBEngineVersions . type DBEngineVersion struct { // The description of the database engine. DBEngineDescription *string // The description of the database engine version. DBEngineVersionDescription *string // The name of the DB parameter group family for the database engine. DBParameterGroupFamily *string // (Not supported by Neptune) DefaultCharacterSet *CharacterSet // The name of the database engine. Engine *string // The version number of the database engine. EngineVersion *string // The types of logs that the database engine has available for export to // CloudWatch Logs. ExportableLogTypes []string // (Not supported by Neptune) SupportedCharacterSets []CharacterSet // A list of the time zones supported by this engine for the Timezone parameter of // the CreateDBInstance action. SupportedTimezones []Timezone // A value that indicates whether you can use Aurora global databases with a // specific DB engine version. SupportsGlobalDatabases bool // A value that indicates whether the engine version supports exporting the log // types specified by ExportableLogTypes to CloudWatch Logs. SupportsLogExportsToCloudwatchLogs bool // Indicates whether the database engine version supports read replicas. SupportsReadReplica bool // A list of engine versions that this database engine version can be upgraded to. ValidUpgradeTarget []UpgradeTarget noSmithyDocumentSerde } // Contains the details of an Amazon Neptune DB instance. This data type is used // as a response element in the DescribeDBInstances action. type DBInstance struct { // Not supported by Neptune. AllocatedStorage int32 // Indicates that minor version patches are applied automatically. AutoMinorVersionUpgrade bool // Specifies the name of the Availability Zone the DB instance is located in. AvailabilityZone *string // Specifies the number of days for which automatic DB snapshots are retained. BackupRetentionPeriod int32 // The identifier of the CA certificate for this DB instance. CACertificateIdentifier *string // (Not supported by Neptune) CharacterSetName *string // Specifies whether tags are copied from the DB instance to snapshots of the DB // instance. CopyTagsToSnapshot bool // If the DB instance is a member of a DB cluster, contains the name of the DB // cluster that the DB instance is a member of. DBClusterIdentifier *string // The Amazon Resource Name (ARN) for the DB instance. DBInstanceArn *string // Contains the name of the compute and memory capacity class of the DB instance. DBInstanceClass *string // Contains a user-supplied database identifier. This identifier is the unique key // that identifies a DB instance. DBInstanceIdentifier *string // Specifies the current state of this database. DBInstanceStatus *string // The database name. DBName *string // Provides the list of DB parameter groups applied to this DB instance. DBParameterGroups []DBParameterGroupStatus // Provides List of DB security group elements containing only DBSecurityGroup.Name // and DBSecurityGroup.Status subelements. DBSecurityGroups []DBSecurityGroupMembership // Specifies information on the subnet group associated with the DB instance, // including the name, description, and subnets in the subnet group. DBSubnetGroup *DBSubnetGroup // Specifies the port that the DB instance listens on. If the DB instance is part // of a DB cluster, this can be a different port than the DB cluster port. DbInstancePort int32 // The Amazon Region-unique, immutable identifier for the DB instance. This // identifier is found in Amazon CloudTrail log entries whenever the Amazon KMS key // for the DB instance is accessed. DbiResourceId *string // Indicates whether or not the DB instance has deletion protection enabled. The // instance can't be deleted when deletion protection is enabled. See Deleting a // DB Instance (https://docs.aws.amazon.com/neptune/latest/userguide/manage-console-instances-delete.html) // . DeletionProtection *bool // Not supported DomainMemberships []DomainMembership // A list of log types that this DB instance is configured to export to CloudWatch // Logs. EnabledCloudwatchLogsExports []string // Specifies the connection endpoint. Endpoint *Endpoint // Provides the name of the database engine to be used for this DB instance. Engine *string // Indicates the database engine version. EngineVersion *string // The Amazon Resource Name (ARN) of the Amazon CloudWatch Logs log stream that // receives the Enhanced Monitoring metrics data for the DB instance. EnhancedMonitoringResourceArn *string // True if Amazon Identity and Access Management (IAM) authentication is enabled, // and otherwise false. IAMDatabaseAuthenticationEnabled bool // Provides the date and time the DB instance was created. InstanceCreateTime *time.Time // Specifies the Provisioned IOPS (I/O operations per second) value. Iops *int32 // Not supported: The encryption for DB instances is managed by the DB cluster. KmsKeyId *string // Specifies the latest time to which a database can be restored with // point-in-time restore. LatestRestorableTime *time.Time // License model information for this DB instance. LicenseModel *string // Not supported by Neptune. MasterUsername *string // The interval, in seconds, between points when Enhanced Monitoring metrics are // collected for the DB instance. MonitoringInterval *int32 // The ARN for the IAM role that permits Neptune to send Enhanced Monitoring // metrics to Amazon CloudWatch Logs. MonitoringRoleArn *string // Specifies if the DB instance is a Multi-AZ deployment. MultiAZ bool // (Not supported by Neptune) OptionGroupMemberships []OptionGroupMembership // Specifies that changes to the DB instance are pending. This element is only // included when changes are pending. Specific changes are identified by // subelements. PendingModifiedValues *PendingModifiedValues // (Not supported by Neptune) PerformanceInsightsEnabled *bool // (Not supported by Neptune) PerformanceInsightsKMSKeyId *string // Specifies the daily time range during which automated backups are created if // automated backups are enabled, as determined by the BackupRetentionPeriod . PreferredBackupWindow *string // Specifies the weekly time range during which system maintenance can occur, in // Universal Coordinated Time (UTC). PreferredMaintenanceWindow *string // A value that specifies the order in which a Read Replica is promoted to the // primary instance after a failure of the existing primary instance. PromotionTier *int32 // This flag should no longer be used. // // Deprecated: This member has been deprecated. PubliclyAccessible bool // Contains one or more identifiers of DB clusters that are Read Replicas of this // DB instance. ReadReplicaDBClusterIdentifiers []string // Contains one or more identifiers of the Read Replicas associated with this DB // instance. ReadReplicaDBInstanceIdentifiers []string // Contains the identifier of the source DB instance if this DB instance is a Read // Replica. ReadReplicaSourceDBInstanceIdentifier *string // If present, specifies the name of the secondary Availability Zone for a DB // instance with multi-AZ support. SecondaryAvailabilityZone *string // The status of a Read Replica. If the instance is not a Read Replica, this is // blank. StatusInfos []DBInstanceStatusInfo // Not supported: The encryption for DB instances is managed by the DB cluster. StorageEncrypted bool // Specifies the storage type associated with DB instance. StorageType *string // The ARN from the key store with which the instance is associated for TDE // encryption. TdeCredentialArn *string // Not supported. Timezone *string // Provides a list of VPC security group elements that the DB instance belongs to. VpcSecurityGroups []VpcSecurityGroupMembership noSmithyDocumentSerde } // Provides a list of status information for a DB instance. type DBInstanceStatusInfo struct { // Details of the error if there is an error for the instance. If the instance is // not in an error state, this value is blank. Message *string // Boolean value that is true if the instance is operating normally, or false if // the instance is in an error state. Normal bool // Status of the DB instance. For a StatusType of read replica, the values can be // replicating, error, stopped, or terminated. Status *string // This value is currently "read replication." StatusType *string noSmithyDocumentSerde } // Contains the details of an Amazon Neptune DB parameter group. This data type is // used as a response element in the DescribeDBParameterGroups action. type DBParameterGroup struct { // The Amazon Resource Name (ARN) for the DB parameter group. DBParameterGroupArn *string // Provides the name of the DB parameter group family that this DB parameter group // is compatible with. DBParameterGroupFamily *string // Provides the name of the DB parameter group. DBParameterGroupName *string // Provides the customer-specified description for this DB parameter group. Description *string noSmithyDocumentSerde } // The status of the DB parameter group. This data type is used as a response // element in the following actions: // - CreateDBInstance // - DeleteDBInstance // - ModifyDBInstance // - RebootDBInstance type DBParameterGroupStatus struct { // The name of the DP parameter group. DBParameterGroupName *string // The status of parameter updates. ParameterApplyStatus *string noSmithyDocumentSerde } // Specifies membership in a designated DB security group. type DBSecurityGroupMembership struct { // The name of the DB security group. DBSecurityGroupName *string // The status of the DB security group. Status *string noSmithyDocumentSerde } // Contains the details of an Amazon Neptune DB subnet group. This data type is // used as a response element in the DescribeDBSubnetGroups action. type DBSubnetGroup struct { // The Amazon Resource Name (ARN) for the DB subnet group. DBSubnetGroupArn *string // Provides the description of the DB subnet group. DBSubnetGroupDescription *string // The name of the DB subnet group. DBSubnetGroupName *string // Provides the status of the DB subnet group. SubnetGroupStatus *string // Contains a list of Subnet elements. Subnets []Subnet // Provides the VpcId of the DB subnet group. VpcId *string noSmithyDocumentSerde } // An Active Directory Domain membership record associated with a DB instance. type DomainMembership struct { // The identifier of the Active Directory Domain. Domain *string // The fully qualified domain name of the Active Directory Domain. FQDN *string // The name of the IAM role to be used when making API calls to the Directory // Service. IAMRoleName *string // The status of the DB instance's Active Directory Domain membership, such as // joined, pending-join, failed etc). Status *string noSmithyDocumentSerde } // A range of double values. type DoubleRange struct { // The minimum value in the range. From float64 // The maximum value in the range. To float64 noSmithyDocumentSerde } // Specifies a connection endpoint. For the data structure that represents Amazon // Neptune DB cluster endpoints, see DBClusterEndpoint . type Endpoint struct { // Specifies the DNS address of the DB instance. Address *string // Specifies the ID that Amazon Route 53 assigns when you create a hosted zone. HostedZoneId *string // Specifies the port that the database engine is listening on. Port int32 noSmithyDocumentSerde } // Contains the result of a successful invocation of the // DescribeEngineDefaultParameters action. type EngineDefaults struct { // Specifies the name of the DB parameter group family that the engine default // parameters apply to. DBParameterGroupFamily *string // An optional pagination token provided by a previous EngineDefaults request. If // this parameter is specified, the response includes only records beyond the // marker, up to the value specified by MaxRecords . Marker *string // Contains a list of engine default parameters. Parameters []Parameter noSmithyDocumentSerde } // This data type is used as a response element in the DescribeEvents action. type Event struct { // Specifies the date and time of the event. Date *time.Time // Specifies the category for the event. EventCategories []string // Provides the text of this event. Message *string // The Amazon Resource Name (ARN) for the event. SourceArn *string // Provides the identifier for the source of the event. SourceIdentifier *string // Specifies the source type for this event. SourceType SourceType noSmithyDocumentSerde } // Contains the results of a successful invocation of the DescribeEventCategories // action. type EventCategoriesMap struct { // The event categories for the specified source type EventCategories []string // The source type that the returned categories belong to SourceType *string noSmithyDocumentSerde } // Contains the results of a successful invocation of the // DescribeEventSubscriptions action. type EventSubscription struct { // The event notification subscription Id. CustSubscriptionId *string // The Amazon customer account associated with the event notification subscription. CustomerAwsId *string // A Boolean value indicating if the subscription is enabled. True indicates the // subscription is enabled. Enabled bool // A list of event categories for the event notification subscription. EventCategoriesList []string // The Amazon Resource Name (ARN) for the event subscription. EventSubscriptionArn *string // The topic ARN of the event notification subscription. SnsTopicArn *string // A list of source IDs for the event notification subscription. SourceIdsList []string // The source type for the event notification subscription. SourceType *string // The status of the event notification subscription. Constraints: Can be one of // the following: creating | modifying | deleting | active | no-permission | // topic-not-exist The status "no-permission" indicates that Neptune no longer has // permission to post to the SNS topic. The status "topic-not-exist" indicates that // the topic was deleted after the subscription was created. Status *string // The time the event notification subscription was created. SubscriptionCreationTime *string noSmithyDocumentSerde } // This type is not currently supported. type Filter struct { // This parameter is not currently supported. // // This member is required. Name *string // This parameter is not currently supported. // // This member is required. Values []string noSmithyDocumentSerde } // Contains the details of an Amazon Neptune global database. This data type is // used as a response element for the CreateGlobalCluster , DescribeGlobalClusters // , ModifyGlobalCluster , DeleteGlobalCluster , FailoverGlobalCluster , and // RemoveFromGlobalCluster actions. type GlobalCluster struct { // The deletion protection setting for the global database. DeletionProtection *bool // The Neptune database engine used by the global database ( "neptune" ). Engine *string // The Neptune engine version used by the global database. EngineVersion *string // The Amazon Resource Name (ARN) for the global database. GlobalClusterArn *string // Contains a user-supplied global database cluster identifier. This identifier is // the unique key that identifies a global database. GlobalClusterIdentifier *string // A list of cluster ARNs and instance ARNs for all the DB clusters that are part // of the global database. GlobalClusterMembers []GlobalClusterMember // An immutable identifier for the global database that is unique within in all // regions. This identifier is found in CloudTrail log entries whenever the KMS key // for the DB cluster is accessed. GlobalClusterResourceId *string // Specifies the current state of this global database. Status *string // The storage encryption setting for the global database. StorageEncrypted *bool noSmithyDocumentSerde } // A data structure with information about any primary and secondary clusters // associated with an Neptune global database. type GlobalClusterMember struct { // The Amazon Resource Name (ARN) for each Neptune cluster. DBClusterArn *string // Specifies whether the Neptune cluster is the primary cluster (that is, has // read-write capability) for the Neptune global database with which it is // associated. IsWriter bool // The Amazon Resource Name (ARN) for each read-only secondary cluster associated // with the Neptune global database. Readers []string noSmithyDocumentSerde } // Not supported by Neptune. type OptionGroupMembership struct { // Not supported by Neptune. OptionGroupName *string // Not supported by Neptune. Status *string noSmithyDocumentSerde } // Contains a list of available options for a DB instance. This data type is used // as a response element in the DescribeOrderableDBInstanceOptions action. type OrderableDBInstanceOption struct { // A list of Availability Zones for a DB instance. AvailabilityZones []AvailabilityZone // The DB instance class for a DB instance. DBInstanceClass *string // The engine type of a DB instance. Engine *string // The engine version of a DB instance. EngineVersion *string // The license model for a DB instance. LicenseModel *string // Maximum total provisioned IOPS for a DB instance. MaxIopsPerDbInstance *int32 // Maximum provisioned IOPS per GiB for a DB instance. MaxIopsPerGib *float64 // Maximum storage size for a DB instance. MaxStorageSize *int32 // Minimum total provisioned IOPS for a DB instance. MinIopsPerDbInstance *int32 // Minimum provisioned IOPS per GiB for a DB instance. MinIopsPerGib *float64 // Minimum storage size for a DB instance. MinStorageSize *int32 // Indicates whether a DB instance is Multi-AZ capable. MultiAZCapable bool // Indicates whether a DB instance can have a Read Replica. ReadReplicaCapable bool // Indicates the storage type for a DB instance. StorageType *string // Indicates whether a DB instance supports Enhanced Monitoring at intervals from // 1 to 60 seconds. SupportsEnhancedMonitoring bool // A value that indicates whether you can use Neptune global databases with a // specific combination of other DB engine attributes. SupportsGlobalDatabases bool // Indicates whether a DB instance supports IAM database authentication. SupportsIAMDatabaseAuthentication bool // Indicates whether a DB instance supports provisioned IOPS. SupportsIops bool // (Not supported by Neptune) SupportsPerformanceInsights bool // Indicates whether a DB instance supports encrypted storage. SupportsStorageEncryption bool // Indicates whether a DB instance is in a VPC. Vpc bool noSmithyDocumentSerde } // Specifies a parameter. type Parameter struct { // Specifies the valid range of values for the parameter. AllowedValues *string // Indicates when to apply parameter updates. ApplyMethod ApplyMethod // Specifies the engine specific parameters type. ApplyType *string // Specifies the valid data type for the parameter. DataType *string // Provides a description of the parameter. Description *string // Indicates whether ( true ) or not ( false ) the parameter can be modified. Some // parameters have security or operational implications that prevent them from // being changed. IsModifiable bool // The earliest engine version to which the parameter can apply. MinimumEngineVersion *string // Specifies the name of the parameter. ParameterName *string // Specifies the value of the parameter. ParameterValue *string // Indicates the source of the parameter value. Source *string noSmithyDocumentSerde } // A list of the log types whose configuration is still pending. In other words, // these log types are in the process of being activated or deactivated. type PendingCloudwatchLogsExports struct { // Log types that are in the process of being enabled. After they are enabled, // these log types are exported to CloudWatch Logs. LogTypesToDisable []string // Log types that are in the process of being deactivated. After they are // deactivated, these log types aren't exported to CloudWatch Logs. LogTypesToEnable []string noSmithyDocumentSerde } // Provides information about a pending maintenance action for a resource. type PendingMaintenanceAction struct { // The type of pending maintenance action that is available for the resource. Action *string // The date of the maintenance window when the action is applied. The maintenance // action is applied to the resource during its first maintenance window after this // date. If this date is specified, any next-maintenance opt-in requests are // ignored. AutoAppliedAfterDate *time.Time // The effective date when the pending maintenance action is applied to the // resource. This date takes into account opt-in requests received from the // ApplyPendingMaintenanceAction API, the AutoAppliedAfterDate , and the // ForcedApplyDate . This value is blank if an opt-in request has not been received // and nothing has been specified as AutoAppliedAfterDate or ForcedApplyDate . CurrentApplyDate *time.Time // A description providing more detail about the maintenance action. Description *string // The date when the maintenance action is automatically applied. The maintenance // action is applied to the resource on this date regardless of the maintenance // window for the resource. If this date is specified, any immediate opt-in // requests are ignored. ForcedApplyDate *time.Time // Indicates the type of opt-in request that has been received for the resource. OptInStatus *string noSmithyDocumentSerde } // This data type is used as a response element in the ModifyDBInstance action. type PendingModifiedValues struct { // Contains the new AllocatedStorage size for the DB instance that will be applied // or is currently being applied. AllocatedStorage *int32 // Specifies the pending number of days for which automated backups are retained. BackupRetentionPeriod *int32 // Specifies the identifier of the CA certificate for the DB instance. CACertificateIdentifier *string // Contains the new DBInstanceClass for the DB instance that will be applied or is // currently being applied. DBInstanceClass *string // Contains the new DBInstanceIdentifier for the DB instance that will be applied // or is currently being applied. DBInstanceIdentifier *string // The new DB subnet group for the DB instance. DBSubnetGroupName *string // Indicates the database engine version. EngineVersion *string // Specifies the new Provisioned IOPS value for the DB instance that will be // applied or is currently being applied. Iops *int32 // Not supported by Neptune. LicenseModel *string // Not supported by Neptune. MasterUserPassword *string // Indicates that the Single-AZ DB instance is to change to a Multi-AZ deployment. MultiAZ *bool // This PendingCloudwatchLogsExports structure specifies pending changes to which // CloudWatch logs are enabled and which are disabled. PendingCloudwatchLogsExports *PendingCloudwatchLogsExports // Specifies the pending port for the DB instance. Port *int32 // Specifies the storage type to be associated with the DB instance. StorageType *string noSmithyDocumentSerde } // A range of integer values. type Range struct { // The minimum value in the range. From int32 // The step value for the range. For example, if you have a range of 5,000 to // 10,000, with a step value of 1,000, the valid values start at 5,000 and step up // by 1,000. Even though 7,500 is within the range, it isn't a valid value for the // range. The valid values are 5,000, 6,000, 7,000, 8,000... Step *int32 // The maximum value in the range. To int32 noSmithyDocumentSerde } // Describes the pending maintenance actions for a resource. type ResourcePendingMaintenanceActions struct { // A list that provides details about the pending maintenance actions for the // resource. PendingMaintenanceActionDetails []PendingMaintenanceAction // The ARN of the resource that has pending maintenance actions. ResourceIdentifier *string noSmithyDocumentSerde } // Contains the scaling configuration of a Neptune Serverless DB cluster. For more // information, see Using Amazon Neptune Serverless (https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) // in the Amazon Neptune User Guide. type ServerlessV2ScalingConfiguration struct { // The maximum number of Neptune capacity units (NCUs) for a DB instance in a // Neptune Serverless cluster. You can specify NCU values in half-step increments, // such as 40, 40.5, 41, and so on. MaxCapacity *float64 // The minimum number of Neptune capacity units (NCUs) for a DB instance in a // Neptune Serverless cluster. You can specify NCU values in half-step increments, // such as 8, 8.5, 9, and so on. MinCapacity *float64 noSmithyDocumentSerde } // Shows the scaling configuration for a Neptune Serverless DB cluster. For more // information, see Using Amazon Neptune Serverless (https://docs.aws.amazon.com/neptune/latest/userguide/neptune-serverless-using.html) // in the Amazon Neptune User Guide. type ServerlessV2ScalingConfigurationInfo struct { // The maximum number of Neptune capacity units (NCUs) for a DB instance in a // Neptune Serverless cluster. You can specify NCU values in half-step increments, // such as 40, 40.5, 41, and so on. MaxCapacity *float64 // The minimum number of Neptune capacity units (NCUs) for a DB instance in a // Neptune Serverless cluster. You can specify NCU values in half-step increments, // such as 8, 8.5, 9, and so on. MinCapacity *float64 noSmithyDocumentSerde } // Specifies a subnet. This data type is used as a response element in the // DescribeDBSubnetGroups action. type Subnet struct { // Specifies the EC2 Availability Zone that the subnet is in. SubnetAvailabilityZone *AvailabilityZone // Specifies the identifier of the subnet. SubnetIdentifier *string // Specifies the status of the subnet. SubnetStatus *string noSmithyDocumentSerde } // Metadata assigned to an Amazon Neptune resource consisting of a key-value pair. type Tag struct { // A key is the required name of the tag. The string value can be from 1 to 128 // Unicode characters in length and can't be prefixed with aws: or rds: . The // string can only contain the set of Unicode letters, digits, white-space, '_', // '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). Key *string // A value is the optional value of the tag. The string value can be from 1 to 256 // Unicode characters in length and can't be prefixed with aws: or rds: . The // string can only contain the set of Unicode letters, digits, white-space, '_', // '.', '/', '=', '+', '-' (Java regex: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$"). Value *string noSmithyDocumentSerde } // A time zone associated with a DBInstance . type Timezone struct { // The name of the time zone. TimezoneName *string noSmithyDocumentSerde } // The version of the database engine that a DB instance can be upgraded to. type UpgradeTarget struct { // A value that indicates whether the target version is applied to any source DB // instances that have AutoMinorVersionUpgrade set to true. AutoUpgrade bool // The version of the database engine that a DB instance can be upgraded to. Description *string // The name of the upgrade target database engine. Engine *string // The version number of the upgrade target database engine. EngineVersion *string // A value that indicates whether a database engine is upgraded to a major version. IsMajorVersionUpgrade bool // A value that indicates whether you can use Neptune global databases with the // target engine version. SupportsGlobalDatabases *bool noSmithyDocumentSerde } // Information about valid modifications that you can make to your DB instance. // Contains the result of a successful call to the // DescribeValidDBInstanceModifications action. You can use this information when // you call ModifyDBInstance . type ValidDBInstanceModificationsMessage struct { // Valid storage options for your DB instance. Storage []ValidStorageOptions noSmithyDocumentSerde } // Information about valid modifications that you can make to your DB instance. // Contains the result of a successful call to the // DescribeValidDBInstanceModifications action. type ValidStorageOptions struct { // The valid range of Provisioned IOPS to gibibytes of storage multiplier. For // example, 3-10, which means that provisioned IOPS can be between 3 and 10 times // storage. IopsToStorageRatio []DoubleRange // The valid range of provisioned IOPS. For example, 1000-20000. ProvisionedIops []Range // The valid range of storage in gibibytes. For example, 100 to 16384. StorageSize []Range // The valid storage types for your DB instance. For example, gp2, io1. StorageType *string noSmithyDocumentSerde } // This data type is used as a response element for queries on VPC security group // membership. type VpcSecurityGroupMembership struct { // The status of the VPC security group. Status *string // The name of the VPC security group. VpcSecurityGroupId *string noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
1,477
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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 = "Network Firewall" const ServiceAPIVersion = "2020-11-12" // Client provides the API client to make operations call for AWS Network Firewall. 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, "networkfirewall", 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) }
434
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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 networkfirewall 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" ) // Associates a FirewallPolicy to a Firewall . A firewall policy defines how to // monitor and manage your VPC network traffic, using a collection of inspection // rule groups and other settings. Each firewall requires one firewall policy // association, and you can use the same firewall policy for multiple firewalls. func (c *Client) AssociateFirewallPolicy(ctx context.Context, params *AssociateFirewallPolicyInput, optFns ...func(*Options)) (*AssociateFirewallPolicyOutput, error) { if params == nil { params = &AssociateFirewallPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateFirewallPolicy", params, optFns, c.addOperationAssociateFirewallPolicyMiddlewares) if err != nil { return nil, err } out := result.(*AssociateFirewallPolicyOutput) out.ResultMetadata = metadata return out, nil } type AssociateFirewallPolicyInput struct { // The Amazon Resource Name (ARN) of the firewall policy. // // This member is required. FirewallPolicyArn *string // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string noSmithyDocumentSerde } type AssociateFirewallPolicyOutput struct { // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // The Amazon Resource Name (ARN) of the firewall policy. FirewallPolicyArn *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateFirewallPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpAssociateFirewallPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpAssociateFirewallPolicy{}, 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 = addOpAssociateFirewallPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateFirewallPolicy(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_opAssociateFirewallPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "AssociateFirewallPolicy", } }
171
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Associates the specified subnets in the Amazon VPC to the firewall. You can // specify one subnet for each of the Availability Zones that the VPC spans. This // request creates an Network Firewall firewall endpoint in each of the subnets. To // enable the firewall's protections, you must also modify the VPC's route tables // for each subnet's Availability Zone, to redirect the traffic that's coming into // and going out of the zone through the firewall endpoint. func (c *Client) AssociateSubnets(ctx context.Context, params *AssociateSubnetsInput, optFns ...func(*Options)) (*AssociateSubnetsOutput, error) { if params == nil { params = &AssociateSubnetsInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateSubnets", params, optFns, c.addOperationAssociateSubnetsMiddlewares) if err != nil { return nil, err } out := result.(*AssociateSubnetsOutput) out.ResultMetadata = metadata return out, nil } type AssociateSubnetsInput struct { // The IDs of the subnets that you want to associate with the firewall. // // This member is required. SubnetMappings []types.SubnetMapping // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string noSmithyDocumentSerde } type AssociateSubnetsOutput struct { // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // The IDs of the subnets that are associated with the firewall. SubnetMappings []types.SubnetMapping // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateSubnetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpAssociateSubnets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpAssociateSubnets{}, 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 = addOpAssociateSubnetsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateSubnets(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_opAssociateSubnets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "AssociateSubnets", } }
174
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an Network Firewall Firewall and accompanying FirewallStatus for a VPC. // The firewall defines the configuration settings for an Network Firewall // firewall. The settings that you can define at creation include the firewall // policy, the subnets in your VPC to use for the firewall endpoints, and any tags // that are attached to the firewall Amazon Web Services resource. After you create // a firewall, you can provide additional settings, like the logging configuration. // To update the settings for a firewall, you use the operations that apply to the // settings themselves, for example UpdateLoggingConfiguration , AssociateSubnets , // and UpdateFirewallDeleteProtection . To manage a firewall's tags, use the // standard Amazon Web Services resource tagging operations, ListTagsForResource , // TagResource , and UntagResource . To retrieve information about firewalls, use // ListFirewalls and DescribeFirewall . func (c *Client) CreateFirewall(ctx context.Context, params *CreateFirewallInput, optFns ...func(*Options)) (*CreateFirewallOutput, error) { if params == nil { params = &CreateFirewallInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateFirewall", params, optFns, c.addOperationCreateFirewallMiddlewares) if err != nil { return nil, err } out := result.(*CreateFirewallOutput) out.ResultMetadata = metadata return out, nil } type CreateFirewallInput struct { // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. // // This member is required. FirewallName *string // The Amazon Resource Name (ARN) of the FirewallPolicy that you want to use for // the firewall. // // This member is required. FirewallPolicyArn *string // The public subnets to use for your Network Firewall firewalls. Each subnet must // belong to a different Availability Zone in the VPC. Network Firewall creates a // firewall endpoint in each subnet. // // This member is required. SubnetMappings []types.SubnetMapping // The unique identifier of the VPC where Network Firewall should create the // firewall. You can't change this setting after you create the firewall. // // This member is required. VpcId *string // A flag indicating whether it is possible to delete the firewall. A setting of // TRUE indicates that the firewall is protected against deletion. Use this setting // to protect against accidentally deleting a firewall that is in use. When you // create a firewall, the operation initializes this flag to TRUE . DeleteProtection bool // A description of the firewall. Description *string // A complex type that contains settings for encryption of your firewall resources. EncryptionConfiguration *types.EncryptionConfiguration // A setting indicating whether the firewall is protected against a change to the // firewall policy association. Use this setting to protect against accidentally // modifying the firewall policy for a firewall that is in use. When you create a // firewall, the operation initializes this setting to TRUE . FirewallPolicyChangeProtection bool // A setting indicating whether the firewall is protected against changes to the // subnet associations. Use this setting to protect against accidentally modifying // the subnet associations for a firewall that is in use. When you create a // firewall, the operation initializes this setting to TRUE . SubnetChangeProtection bool // The key:value pairs to associate with the resource. Tags []types.Tag noSmithyDocumentSerde } type CreateFirewallOutput struct { // The configuration settings for the firewall. These settings include the // firewall policy and the subnets in your VPC to use for the firewall endpoints. Firewall *types.Firewall // Detailed information about the current status of a Firewall . You can retrieve // this for a firewall by calling DescribeFirewall and providing the firewall name // and ARN. FirewallStatus *types.FirewallStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateFirewallMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateFirewall{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateFirewall{}, 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 = addOpCreateFirewallValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFirewall(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_opCreateFirewall(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "CreateFirewall", } }
189
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates the firewall policy for the firewall according to the specifications. // An Network Firewall firewall policy defines the behavior of a firewall, in a // collection of stateless and stateful rule groups and other settings. You can use // one firewall policy for multiple firewalls. func (c *Client) CreateFirewallPolicy(ctx context.Context, params *CreateFirewallPolicyInput, optFns ...func(*Options)) (*CreateFirewallPolicyOutput, error) { if params == nil { params = &CreateFirewallPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateFirewallPolicy", params, optFns, c.addOperationCreateFirewallPolicyMiddlewares) if err != nil { return nil, err } out := result.(*CreateFirewallPolicyOutput) out.ResultMetadata = metadata return out, nil } type CreateFirewallPolicyInput struct { // The rule groups and policy actions to use in the firewall policy. // // This member is required. FirewallPolicy *types.FirewallPolicy // The descriptive name of the firewall policy. You can't change the name of a // firewall policy after you create it. // // This member is required. FirewallPolicyName *string // A description of the firewall policy. Description *string // Indicates whether you want Network Firewall to just check the validity of the // request, rather than run the request. If set to TRUE , Network Firewall checks // whether the request can run successfully, but doesn't actually make the // requested changes. The call returns the value that the request would return if // you ran it with dry run set to FALSE , but doesn't make additions or changes to // your resources. This option allows you to make sure that you have the required // permissions to run the request and that your request parameters are valid. If // set to FALSE , Network Firewall makes the requested changes to your resources. DryRun bool // A complex type that contains settings for encryption of your firewall policy // resources. EncryptionConfiguration *types.EncryptionConfiguration // The key:value pairs to associate with the resource. Tags []types.Tag noSmithyDocumentSerde } type CreateFirewallPolicyOutput struct { // The high-level properties of a firewall policy. This, along with the // FirewallPolicy , define the policy. You can retrieve all objects for a firewall // policy by calling DescribeFirewallPolicy . // // This member is required. FirewallPolicyResponse *types.FirewallPolicyResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the firewall policy. The token marks the state of the // policy resource at the time of the request. To make changes to the policy, you // provide the token in your request. Network Firewall uses the token to ensure // that the policy hasn't changed since you last retrieved it. If it has changed, // the operation fails with an InvalidTokenException . If this happens, retrieve // the firewall policy again to get a current copy of it with current token. // Reapply your changes as needed, then try the operation again using the new // token. // // This member is required. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateFirewallPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateFirewallPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateFirewallPolicy{}, 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 = addOpCreateFirewallPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFirewallPolicy(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_opCreateFirewallPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "CreateFirewallPolicy", } }
171
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates the specified stateless or stateful rule group, which includes the // rules for network traffic inspection, a capacity setting, and tags. You provide // your rule group specification in your request using either RuleGroup or Rules . func (c *Client) CreateRuleGroup(ctx context.Context, params *CreateRuleGroupInput, optFns ...func(*Options)) (*CreateRuleGroupOutput, error) { if params == nil { params = &CreateRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateRuleGroup", params, optFns, c.addOperationCreateRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*CreateRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type CreateRuleGroupInput struct { // The maximum operating resources that this rule group can use. Rule group // capacity is fixed at creation. When you update a rule group, you are limited to // this capacity. When you reference a rule group from a firewall policy, Network // Firewall reserves this capacity for the rule group. You can retrieve the // capacity that would be required for a rule group before you create the rule // group by calling CreateRuleGroup with DryRun set to TRUE . You can't change or // exceed this capacity when you update the rule group, so leave room for your rule // group to grow. Capacity for a stateless rule group For a stateless rule group, // the capacity required is the sum of the capacity requirements of the individual // rules that you expect to have in the rule group. To calculate the capacity // requirement of a single rule, multiply the capacity requirement values of each // of the rule's match settings: // - A match setting with no criteria specified has a value of 1. // - A match setting with Any specified has a value of 1. // - All other match settings have a value equal to the number of elements // provided in the setting. For example, a protocol setting ["UDP"] and a source // setting ["10.0.0.0/24"] each have a value of 1. A protocol setting ["UDP","TCP"] // has a value of 2. A source setting ["10.0.0.0/24","10.0.0.1/24","10.0.0.2/24"] // has a value of 3. // A rule with no criteria specified in any of its match settings has a capacity // requirement of 1. A rule with protocol setting ["UDP","TCP"], source setting // ["10.0.0.0/24","10.0.0.1/24","10.0.0.2/24"], and a single specification or no // specification for each of the other match settings has a capacity requirement of // 6. Capacity for a stateful rule group For a stateful rule group, the minimum // capacity required is the number of individual rules that you expect to have in // the rule group. // // This member is required. Capacity *int32 // The descriptive name of the rule group. You can't change the name of a rule // group after you create it. // // This member is required. RuleGroupName *string // Indicates whether the rule group is stateless or stateful. If the rule group is // stateless, it contains stateless rules. If it is stateful, it contains stateful // rules. // // This member is required. Type types.RuleGroupType // A description of the rule group. Description *string // Indicates whether you want Network Firewall to just check the validity of the // request, rather than run the request. If set to TRUE , Network Firewall checks // whether the request can run successfully, but doesn't actually make the // requested changes. The call returns the value that the request would return if // you ran it with dry run set to FALSE , but doesn't make additions or changes to // your resources. This option allows you to make sure that you have the required // permissions to run the request and that your request parameters are valid. If // set to FALSE , Network Firewall makes the requested changes to your resources. DryRun bool // A complex type that contains settings for encryption of your rule group // resources. EncryptionConfiguration *types.EncryptionConfiguration // An object that defines the rule group rules. You must provide either this rule // group setting or a Rules setting, but not both. RuleGroup *types.RuleGroup // A string containing stateful rule group rules specifications in Suricata flat // format, with one rule per line. Use this to import your existing Suricata // compatible rule groups. You must provide either this rules setting or a // populated RuleGroup setting, but not both. You can provide your rule group // specification in Suricata flat format through this setting when you create or // update your rule group. The call response returns a RuleGroup object that // Network Firewall has populated from your string. Rules *string // A complex type that contains metadata about the rule group that your own rule // group is copied from. You can use the metadata to keep track of updates made to // the originating rule group. SourceMetadata *types.SourceMetadata // The key:value pairs to associate with the resource. Tags []types.Tag noSmithyDocumentSerde } type CreateRuleGroupOutput struct { // The high-level properties of a rule group. This, along with the RuleGroup , // define the rule group. You can retrieve all objects for a rule group by calling // DescribeRuleGroup . // // This member is required. RuleGroupResponse *types.RuleGroupResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the rule group. The token marks the state of the rule group // resource at the time of the request. To make changes to the rule group, you // provide the token in your request. Network Firewall uses the token to ensure // that the rule group hasn't changed since you last retrieved it. If it has // changed, the operation fails with an InvalidTokenException . If this happens, // retrieve the rule group again to get a current copy of it with a current token. // Reapply your changes as needed, then try the operation again using the new // token. // // This member is required. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateRuleGroup{}, 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 = addOpCreateRuleGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRuleGroup(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_opCreateRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "CreateRuleGroup", } }
220
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an Network Firewall TLS inspection configuration. A TLS inspection // configuration contains the Certificate Manager certificate references that // Network Firewall uses to decrypt and re-encrypt inbound traffic. After you // create a TLS inspection configuration, you associate it with a firewall policy. // To update the settings for a TLS inspection configuration, use // UpdateTLSInspectionConfiguration . To manage a TLS inspection configuration's // tags, use the standard Amazon Web Services resource tagging operations, // ListTagsForResource , TagResource , and UntagResource . To retrieve information // about TLS inspection configurations, use ListTLSInspectionConfigurations and // DescribeTLSInspectionConfiguration . For more information about TLS inspection // configurations, see Decrypting SSL/TLS traffic with TLS inspection // configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. func (c *Client) CreateTLSInspectionConfiguration(ctx context.Context, params *CreateTLSInspectionConfigurationInput, optFns ...func(*Options)) (*CreateTLSInspectionConfigurationOutput, error) { if params == nil { params = &CreateTLSInspectionConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateTLSInspectionConfiguration", params, optFns, c.addOperationCreateTLSInspectionConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*CreateTLSInspectionConfigurationOutput) out.ResultMetadata = metadata return out, nil } type CreateTLSInspectionConfigurationInput struct { // The object that defines a TLS inspection configuration. This, along with // TLSInspectionConfigurationResponse , define the TLS inspection configuration. // You can retrieve all objects for a TLS inspection configuration by calling // DescribeTLSInspectionConfiguration . Network Firewall uses a TLS inspection // configuration to decrypt traffic. Network Firewall re-encrypts the traffic // before sending it to its destination. To use a TLS inspection configuration, you // add it to a Network Firewall firewall policy, then you apply the firewall policy // to a firewall. Network Firewall acts as a proxy service to decrypt and inspect // inbound traffic. You can reference a TLS inspection configuration from more than // one firewall policy, and you can use a firewall policy in more than one // firewall. For more information about using TLS inspection configurations, see // Decrypting SSL/TLS traffic with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. // // This member is required. TLSInspectionConfiguration *types.TLSInspectionConfiguration // The descriptive name of the TLS inspection configuration. You can't change the // name of a TLS inspection configuration after you create it. // // This member is required. TLSInspectionConfigurationName *string // A description of the TLS inspection configuration. Description *string // A complex type that contains optional Amazon Web Services Key Management // Service (KMS) encryption settings for your Network Firewall resources. Your data // is encrypted by default with an Amazon Web Services owned key that Amazon Web // Services owns and manages for you. You can use either the Amazon Web Services // owned key, or provide your own customer managed key. To learn more about KMS // encryption of your Network Firewall resources, see Encryption at rest with // Amazon Web Services Key Managment Service (https://docs.aws.amazon.com/kms/latest/developerguide/kms-encryption-at-rest.html) // in the Network Firewall Developer Guide. EncryptionConfiguration *types.EncryptionConfiguration // The key:value pairs to associate with the resource. Tags []types.Tag noSmithyDocumentSerde } type CreateTLSInspectionConfigurationOutput struct { // The high-level properties of a TLS inspection configuration. This, along with // the TLSInspectionConfiguration , define the TLS inspection configuration. You // can retrieve all objects for a TLS inspection configuration by calling // DescribeTLSInspectionConfiguration . // // This member is required. TLSInspectionConfigurationResponse *types.TLSInspectionConfigurationResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the TLS inspection configuration. The token marks the state // of the TLS inspection configuration resource at the time of the request. To make // changes to the TLS inspection configuration, you provide the token in your // request. Network Firewall uses the token to ensure that the TLS inspection // configuration hasn't changed since you last retrieved it. If it has changed, the // operation fails with an InvalidTokenException . If this happens, retrieve the // TLS inspection configuration again to get a current copy of it with a current // token. Reapply your changes as needed, then try the operation again using the // new token. // // This member is required. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateTLSInspectionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateTLSInspectionConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateTLSInspectionConfiguration{}, 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 = addOpCreateTLSInspectionConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTLSInspectionConfiguration(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_opCreateTLSInspectionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "CreateTLSInspectionConfiguration", } }
190
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified Firewall and its FirewallStatus . This operation requires // the firewall's DeleteProtection flag to be FALSE . You can't revert this // operation. You can check whether a firewall is in use by reviewing the route // tables for the Availability Zones where you have firewall subnet mappings. // Retrieve the subnet mappings by calling DescribeFirewall . You define and update // the route tables through Amazon VPC. As needed, update the route tables for the // zones to remove the firewall endpoints. When the route tables no longer use the // firewall endpoints, you can remove the firewall safely. To delete a firewall, // remove the delete protection if you need to using UpdateFirewallDeleteProtection // , then delete the firewall by calling DeleteFirewall . func (c *Client) DeleteFirewall(ctx context.Context, params *DeleteFirewallInput, optFns ...func(*Options)) (*DeleteFirewallOutput, error) { if params == nil { params = &DeleteFirewallInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteFirewall", params, optFns, c.addOperationDeleteFirewallMiddlewares) if err != nil { return nil, err } out := result.(*DeleteFirewallOutput) out.ResultMetadata = metadata return out, nil } type DeleteFirewallInput struct { // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string noSmithyDocumentSerde } type DeleteFirewallOutput struct { // The firewall defines the configuration settings for an Network Firewall // firewall. These settings include the firewall policy, the subnets in your VPC to // use for the firewall endpoints, and any tags that are attached to the firewall // Amazon Web Services resource. The status of the firewall, for example whether // it's ready to filter network traffic, is provided in the corresponding // FirewallStatus . You can retrieve both objects by calling DescribeFirewall . Firewall *types.Firewall // Detailed information about the current status of a Firewall . You can retrieve // this for a firewall by calling DescribeFirewall and providing the firewall name // and ARN. FirewallStatus *types.FirewallStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteFirewallMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteFirewall{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteFirewall{}, 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_opDeleteFirewall(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_opDeleteFirewall(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DeleteFirewall", } }
145
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified FirewallPolicy . func (c *Client) DeleteFirewallPolicy(ctx context.Context, params *DeleteFirewallPolicyInput, optFns ...func(*Options)) (*DeleteFirewallPolicyOutput, error) { if params == nil { params = &DeleteFirewallPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteFirewallPolicy", params, optFns, c.addOperationDeleteFirewallPolicyMiddlewares) if err != nil { return nil, err } out := result.(*DeleteFirewallPolicyOutput) out.ResultMetadata = metadata return out, nil } type DeleteFirewallPolicyInput struct { // The Amazon Resource Name (ARN) of the firewall policy. You must specify the ARN // or the name, and you can specify both. FirewallPolicyArn *string // The descriptive name of the firewall policy. You can't change the name of a // firewall policy after you create it. You must specify the ARN or the name, and // you can specify both. FirewallPolicyName *string noSmithyDocumentSerde } type DeleteFirewallPolicyOutput struct { // The object containing the definition of the FirewallPolicyResponse that you // asked to delete. // // This member is required. FirewallPolicyResponse *types.FirewallPolicyResponse // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteFirewallPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteFirewallPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteFirewallPolicy{}, 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_opDeleteFirewallPolicy(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_opDeleteFirewallPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DeleteFirewallPolicy", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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" ) // Deletes a resource policy that you created in a PutResourcePolicy request. func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { if params == nil { params = &DeleteResourcePolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) if err != nil { return nil, err } out := result.(*DeleteResourcePolicyOutput) out.ResultMetadata = metadata return out, nil } type DeleteResourcePolicyInput struct { // The Amazon Resource Name (ARN) of the rule group or firewall policy whose // resource policy you want to delete. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type DeleteResourcePolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteResourcePolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteResourcePolicy{}, 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 = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(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_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DeleteResourcePolicy", } }
121
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified RuleGroup . func (c *Client) DeleteRuleGroup(ctx context.Context, params *DeleteRuleGroupInput, optFns ...func(*Options)) (*DeleteRuleGroupOutput, error) { if params == nil { params = &DeleteRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteRuleGroup", params, optFns, c.addOperationDeleteRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*DeleteRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type DeleteRuleGroupInput struct { // The Amazon Resource Name (ARN) of the rule group. You must specify the ARN or // the name, and you can specify both. RuleGroupArn *string // The descriptive name of the rule group. You can't change the name of a rule // group after you create it. You must specify the ARN or the name, and you can // specify both. RuleGroupName *string // Indicates whether the rule group is stateless or stateful. If the rule group is // stateless, it contains stateless rules. If it is stateful, it contains stateful // rules. This setting is required for requests that do not include the // RuleGroupARN . Type types.RuleGroupType noSmithyDocumentSerde } type DeleteRuleGroupOutput struct { // The high-level properties of a rule group. This, along with the RuleGroup , // define the rule group. You can retrieve all objects for a rule group by calling // DescribeRuleGroup . // // This member is required. RuleGroupResponse *types.RuleGroupResponse // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteRuleGroup{}, 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_opDeleteRuleGroup(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_opDeleteRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DeleteRuleGroup", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes the specified TLSInspectionConfiguration . func (c *Client) DeleteTLSInspectionConfiguration(ctx context.Context, params *DeleteTLSInspectionConfigurationInput, optFns ...func(*Options)) (*DeleteTLSInspectionConfigurationOutput, error) { if params == nil { params = &DeleteTLSInspectionConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteTLSInspectionConfiguration", params, optFns, c.addOperationDeleteTLSInspectionConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DeleteTLSInspectionConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DeleteTLSInspectionConfigurationInput struct { // The Amazon Resource Name (ARN) of the TLS inspection configuration. You must // specify the ARN or the name, and you can specify both. TLSInspectionConfigurationArn *string // The descriptive name of the TLS inspection configuration. You can't change the // name of a TLS inspection configuration after you create it. You must specify the // ARN or the name, and you can specify both. TLSInspectionConfigurationName *string noSmithyDocumentSerde } type DeleteTLSInspectionConfigurationOutput struct { // The high-level properties of a TLS inspection configuration. This, along with // the TLSInspectionConfiguration , define the TLS inspection configuration. You // can retrieve all objects for a TLS inspection configuration by calling // DescribeTLSInspectionConfiguration . // // This member is required. TLSInspectionConfigurationResponse *types.TLSInspectionConfigurationResponse // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteTLSInspectionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteTLSInspectionConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteTLSInspectionConfiguration{}, 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_opDeleteTLSInspectionConfiguration(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_opDeleteTLSInspectionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DeleteTLSInspectionConfiguration", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the data objects for the specified firewall. func (c *Client) DescribeFirewall(ctx context.Context, params *DescribeFirewallInput, optFns ...func(*Options)) (*DescribeFirewallOutput, error) { if params == nil { params = &DescribeFirewallInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeFirewall", params, optFns, c.addOperationDescribeFirewallMiddlewares) if err != nil { return nil, err } out := result.(*DescribeFirewallOutput) out.ResultMetadata = metadata return out, nil } type DescribeFirewallInput struct { // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string noSmithyDocumentSerde } type DescribeFirewallOutput struct { // The configuration settings for the firewall. These settings include the // firewall policy and the subnets in your VPC to use for the firewall endpoints. Firewall *types.Firewall // Detailed information about the current status of a Firewall . You can retrieve // this for a firewall by calling DescribeFirewall and providing the firewall name // and ARN. FirewallStatus *types.FirewallStatus // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeFirewallMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeFirewall{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeFirewall{}, 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_opDescribeFirewall(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_opDescribeFirewall(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DescribeFirewall", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the data objects for the specified firewall policy. func (c *Client) DescribeFirewallPolicy(ctx context.Context, params *DescribeFirewallPolicyInput, optFns ...func(*Options)) (*DescribeFirewallPolicyOutput, error) { if params == nil { params = &DescribeFirewallPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeFirewallPolicy", params, optFns, c.addOperationDescribeFirewallPolicyMiddlewares) if err != nil { return nil, err } out := result.(*DescribeFirewallPolicyOutput) out.ResultMetadata = metadata return out, nil } type DescribeFirewallPolicyInput struct { // The Amazon Resource Name (ARN) of the firewall policy. You must specify the ARN // or the name, and you can specify both. FirewallPolicyArn *string // The descriptive name of the firewall policy. You can't change the name of a // firewall policy after you create it. You must specify the ARN or the name, and // you can specify both. FirewallPolicyName *string noSmithyDocumentSerde } type DescribeFirewallPolicyOutput struct { // The high-level properties of a firewall policy. This, along with the // FirewallPolicy , define the policy. You can retrieve all objects for a firewall // policy by calling DescribeFirewallPolicy . // // This member is required. FirewallPolicyResponse *types.FirewallPolicyResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the firewall policy. The token marks the state of the // policy resource at the time of the request. To make changes to the policy, you // provide the token in your request. Network Firewall uses the token to ensure // that the policy hasn't changed since you last retrieved it. If it has changed, // the operation fails with an InvalidTokenException . If this happens, retrieve // the firewall policy again to get a current copy of it with current token. // Reapply your changes as needed, then try the operation again using the new // token. // // This member is required. UpdateToken *string // The policy for the specified firewall policy. FirewallPolicy *types.FirewallPolicy // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeFirewallPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeFirewallPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeFirewallPolicy{}, 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_opDescribeFirewallPolicy(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_opDescribeFirewallPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DescribeFirewallPolicy", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the logging configuration for the specified firewall. func (c *Client) DescribeLoggingConfiguration(ctx context.Context, params *DescribeLoggingConfigurationInput, optFns ...func(*Options)) (*DescribeLoggingConfigurationOutput, error) { if params == nil { params = &DescribeLoggingConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeLoggingConfiguration", params, optFns, c.addOperationDescribeLoggingConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeLoggingConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribeLoggingConfigurationInput struct { // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string noSmithyDocumentSerde } type DescribeLoggingConfigurationOutput struct { // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // Defines how Network Firewall performs logging for a Firewall . LoggingConfiguration *types.LoggingConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeLoggingConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeLoggingConfiguration{}, 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_opDescribeLoggingConfiguration(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_opDescribeLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DescribeLoggingConfiguration", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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" ) // Retrieves a resource policy that you created in a PutResourcePolicy request. func (c *Client) DescribeResourcePolicy(ctx context.Context, params *DescribeResourcePolicyInput, optFns ...func(*Options)) (*DescribeResourcePolicyOutput, error) { if params == nil { params = &DescribeResourcePolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeResourcePolicy", params, optFns, c.addOperationDescribeResourcePolicyMiddlewares) if err != nil { return nil, err } out := result.(*DescribeResourcePolicyOutput) out.ResultMetadata = metadata return out, nil } type DescribeResourcePolicyInput struct { // The Amazon Resource Name (ARN) of the rule group or firewall policy whose // resource policy you want to retrieve. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type DescribeResourcePolicyOutput struct { // The IAM policy for the resource. Policy *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeResourcePolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeResourcePolicy{}, 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 = addOpDescribeResourcePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResourcePolicy(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_opDescribeResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DescribeResourcePolicy", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the data objects for the specified rule group. func (c *Client) DescribeRuleGroup(ctx context.Context, params *DescribeRuleGroupInput, optFns ...func(*Options)) (*DescribeRuleGroupOutput, error) { if params == nil { params = &DescribeRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeRuleGroup", params, optFns, c.addOperationDescribeRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*DescribeRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type DescribeRuleGroupInput struct { // The Amazon Resource Name (ARN) of the rule group. You must specify the ARN or // the name, and you can specify both. RuleGroupArn *string // The descriptive name of the rule group. You can't change the name of a rule // group after you create it. You must specify the ARN or the name, and you can // specify both. RuleGroupName *string // Indicates whether the rule group is stateless or stateful. If the rule group is // stateless, it contains stateless rules. If it is stateful, it contains stateful // rules. This setting is required for requests that do not include the // RuleGroupARN . Type types.RuleGroupType noSmithyDocumentSerde } type DescribeRuleGroupOutput struct { // The high-level properties of a rule group. This, along with the RuleGroup , // define the rule group. You can retrieve all objects for a rule group by calling // DescribeRuleGroup . // // This member is required. RuleGroupResponse *types.RuleGroupResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the rule group. The token marks the state of the rule group // resource at the time of the request. To make changes to the rule group, you // provide the token in your request. Network Firewall uses the token to ensure // that the rule group hasn't changed since you last retrieved it. If it has // changed, the operation fails with an InvalidTokenException . If this happens, // retrieve the rule group again to get a current copy of it with a current token. // Reapply your changes as needed, then try the operation again using the new // token. // // This member is required. UpdateToken *string // The object that defines the rules in a rule group. This, along with // RuleGroupResponse , define the rule group. You can retrieve all objects for a // rule group by calling DescribeRuleGroup . Network Firewall uses a rule group to // inspect and control network traffic. You define stateless rule groups to inspect // individual packets and you define stateful rule groups to inspect packets in the // context of their traffic flow. To use a rule group, you include it by reference // in an Network Firewall firewall policy, then you use the policy in a firewall. // You can reference a rule group from more than one firewall policy, and you can // use a firewall policy in more than one firewall. RuleGroup *types.RuleGroup // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeRuleGroup{}, 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_opDescribeRuleGroup(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_opDescribeRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DescribeRuleGroup", } }
160
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // High-level information about a rule group, returned by operations like create // and describe. You can use the information provided in the metadata to retrieve // and manage a rule group. You can retrieve all objects for a rule group by // calling DescribeRuleGroup . func (c *Client) DescribeRuleGroupMetadata(ctx context.Context, params *DescribeRuleGroupMetadataInput, optFns ...func(*Options)) (*DescribeRuleGroupMetadataOutput, error) { if params == nil { params = &DescribeRuleGroupMetadataInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeRuleGroupMetadata", params, optFns, c.addOperationDescribeRuleGroupMetadataMiddlewares) if err != nil { return nil, err } out := result.(*DescribeRuleGroupMetadataOutput) out.ResultMetadata = metadata return out, nil } type DescribeRuleGroupMetadataInput struct { // The descriptive name of the rule group. You can't change the name of a rule // group after you create it. You must specify the ARN or the name, and you can // specify both. RuleGroupArn *string // The descriptive name of the rule group. You can't change the name of a rule // group after you create it. You must specify the ARN or the name, and you can // specify both. RuleGroupName *string // Indicates whether the rule group is stateless or stateful. If the rule group is // stateless, it contains stateless rules. If it is stateful, it contains stateful // rules. This setting is required for requests that do not include the // RuleGroupARN . Type types.RuleGroupType noSmithyDocumentSerde } type DescribeRuleGroupMetadataOutput struct { // The descriptive name of the rule group. You can't change the name of a rule // group after you create it. You must specify the ARN or the name, and you can // specify both. // // This member is required. RuleGroupArn *string // The descriptive name of the rule group. You can't change the name of a rule // group after you create it. You must specify the ARN or the name, and you can // specify both. // // This member is required. RuleGroupName *string // The maximum operating resources that this rule group can use. Rule group // capacity is fixed at creation. When you update a rule group, you are limited to // this capacity. When you reference a rule group from a firewall policy, Network // Firewall reserves this capacity for the rule group. You can retrieve the // capacity that would be required for a rule group before you create the rule // group by calling CreateRuleGroup with DryRun set to TRUE . Capacity *int32 // Returns the metadata objects for the specified rule group. Description *string // The last time that the rule group was changed. LastModifiedTime *time.Time // Additional options governing how Network Firewall handles the rule group. You // can only use these for stateful rule groups. StatefulRuleOptions *types.StatefulRuleOptions // Indicates whether the rule group is stateless or stateful. If the rule group is // stateless, it contains stateless rules. If it is stateful, it contains stateful // rules. This setting is required for requests that do not include the // RuleGroupARN . Type types.RuleGroupType // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeRuleGroupMetadataMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeRuleGroupMetadata{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeRuleGroupMetadata{}, 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_opDescribeRuleGroupMetadata(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_opDescribeRuleGroupMetadata(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DescribeRuleGroupMetadata", } }
172
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the data objects for the specified TLS inspection configuration. func (c *Client) DescribeTLSInspectionConfiguration(ctx context.Context, params *DescribeTLSInspectionConfigurationInput, optFns ...func(*Options)) (*DescribeTLSInspectionConfigurationOutput, error) { if params == nil { params = &DescribeTLSInspectionConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeTLSInspectionConfiguration", params, optFns, c.addOperationDescribeTLSInspectionConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeTLSInspectionConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribeTLSInspectionConfigurationInput struct { // The Amazon Resource Name (ARN) of the TLS inspection configuration. You must // specify the ARN or the name, and you can specify both. TLSInspectionConfigurationArn *string // The descriptive name of the TLS inspection configuration. You can't change the // name of a TLS inspection configuration after you create it. You must specify the // ARN or the name, and you can specify both. TLSInspectionConfigurationName *string noSmithyDocumentSerde } type DescribeTLSInspectionConfigurationOutput struct { // The high-level properties of a TLS inspection configuration. This, along with // the TLSInspectionConfiguration , define the TLS inspection configuration. You // can retrieve all objects for a TLS inspection configuration by calling // DescribeTLSInspectionConfiguration . // // This member is required. TLSInspectionConfigurationResponse *types.TLSInspectionConfigurationResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the TLS inspection configuration. The token marks the state // of the TLS inspection configuration resource at the time of the request. To make // changes to the TLS inspection configuration, you provide the token in your // request. Network Firewall uses the token to ensure that the TLS inspection // configuration hasn't changed since you last retrieved it. If it has changed, the // operation fails with an InvalidTokenException . If this happens, retrieve the // TLS inspection configuration again to get a current copy of it with a current // token. Reapply your changes as needed, then try the operation again using the // new token. // // This member is required. UpdateToken *string // The object that defines a TLS inspection configuration. This, along with // TLSInspectionConfigurationResponse , define the TLS inspection configuration. // You can retrieve all objects for a TLS inspection configuration by calling // DescribeTLSInspectionConfiguration . Network Firewall uses a TLS inspection // configuration to decrypt traffic. Network Firewall re-encrypts the traffic // before sending it to its destination. To use a TLS inspection configuration, you // add it to a Network Firewall firewall policy, then you apply the firewall policy // to a firewall. Network Firewall acts as a proxy service to decrypt and inspect // inbound traffic. You can reference a TLS inspection configuration from more than // one firewall policy, and you can use a firewall policy in more than one // firewall. For more information about using TLS inspection configurations, see // Decrypting SSL/TLS traffic with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. TLSInspectionConfiguration *types.TLSInspectionConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeTLSInspectionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDescribeTLSInspectionConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDescribeTLSInspectionConfiguration{}, 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_opDescribeTLSInspectionConfiguration(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_opDescribeTLSInspectionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DescribeTLSInspectionConfiguration", } }
160
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes the specified subnet associations from the firewall. This removes the // firewall endpoints from the subnets and removes any network filtering // protections that the endpoints were providing. func (c *Client) DisassociateSubnets(ctx context.Context, params *DisassociateSubnetsInput, optFns ...func(*Options)) (*DisassociateSubnetsOutput, error) { if params == nil { params = &DisassociateSubnetsInput{} } result, metadata, err := c.invokeOperation(ctx, "DisassociateSubnets", params, optFns, c.addOperationDisassociateSubnetsMiddlewares) if err != nil { return nil, err } out := result.(*DisassociateSubnetsOutput) out.ResultMetadata = metadata return out, nil } type DisassociateSubnetsInput struct { // The unique identifiers for the subnets that you want to disassociate. // // This member is required. SubnetIds []string // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string noSmithyDocumentSerde } type DisassociateSubnetsOutput struct { // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // The IDs of the subnets that are associated with the firewall. SubnetMappings []types.SubnetMapping // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDisassociateSubnetsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpDisassociateSubnets{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDisassociateSubnets{}, 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 = addOpDisassociateSubnetsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateSubnets(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_opDisassociateSubnets(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "DisassociateSubnets", } }
171
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the metadata for the firewall policies that you have defined. // Depending on your setting for max results and the number of firewall policies, a // single call might not return the full list. func (c *Client) ListFirewallPolicies(ctx context.Context, params *ListFirewallPoliciesInput, optFns ...func(*Options)) (*ListFirewallPoliciesOutput, error) { if params == nil { params = &ListFirewallPoliciesInput{} } result, metadata, err := c.invokeOperation(ctx, "ListFirewallPolicies", params, optFns, c.addOperationListFirewallPoliciesMiddlewares) if err != nil { return nil, err } out := result.(*ListFirewallPoliciesOutput) out.ResultMetadata = metadata return out, nil } type ListFirewallPoliciesInput struct { // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. MaxResults *int32 // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string noSmithyDocumentSerde } type ListFirewallPoliciesOutput struct { // The metadata for the firewall policies. Depending on your setting for max // results and the number of firewall policies that you have, this might not be the // full list. FirewallPolicies []types.FirewallPolicyMetadata // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListFirewallPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListFirewallPolicies{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListFirewallPolicies{}, 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_opListFirewallPolicies(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 } // ListFirewallPoliciesAPIClient is a client that implements the // ListFirewallPolicies operation. type ListFirewallPoliciesAPIClient interface { ListFirewallPolicies(context.Context, *ListFirewallPoliciesInput, ...func(*Options)) (*ListFirewallPoliciesOutput, error) } var _ ListFirewallPoliciesAPIClient = (*Client)(nil) // ListFirewallPoliciesPaginatorOptions is the paginator options for // ListFirewallPolicies type ListFirewallPoliciesPaginatorOptions struct { // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. 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 } // ListFirewallPoliciesPaginator is a paginator for ListFirewallPolicies type ListFirewallPoliciesPaginator struct { options ListFirewallPoliciesPaginatorOptions client ListFirewallPoliciesAPIClient params *ListFirewallPoliciesInput nextToken *string firstPage bool } // NewListFirewallPoliciesPaginator returns a new ListFirewallPoliciesPaginator func NewListFirewallPoliciesPaginator(client ListFirewallPoliciesAPIClient, params *ListFirewallPoliciesInput, optFns ...func(*ListFirewallPoliciesPaginatorOptions)) *ListFirewallPoliciesPaginator { if params == nil { params = &ListFirewallPoliciesInput{} } options := ListFirewallPoliciesPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListFirewallPoliciesPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallPoliciesPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewallPolicies page. func (p *ListFirewallPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFirewallPoliciesOutput, 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.ListFirewallPolicies(ctx, &params, 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_opListFirewallPolicies(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "ListFirewallPolicies", } }
236
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the metadata for the firewalls that you have defined. If you provide // VPC identifiers in your request, this returns only the firewalls for those VPCs. // Depending on your setting for max results and the number of firewalls, a single // call might not return the full list. func (c *Client) ListFirewalls(ctx context.Context, params *ListFirewallsInput, optFns ...func(*Options)) (*ListFirewallsOutput, error) { if params == nil { params = &ListFirewallsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListFirewalls", params, optFns, c.addOperationListFirewallsMiddlewares) if err != nil { return nil, err } out := result.(*ListFirewallsOutput) out.ResultMetadata = metadata return out, nil } type ListFirewallsInput struct { // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. MaxResults *int32 // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string // The unique identifiers of the VPCs that you want Network Firewall to retrieve // the firewalls for. Leave this blank to retrieve all firewalls that you have // defined. VpcIds []string noSmithyDocumentSerde } type ListFirewallsOutput struct { // The firewall metadata objects for the VPCs that you specified. Depending on // your setting for max results and the number of firewalls you have, a single call // might not be the full list. Firewalls []types.FirewallMetadata // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListFirewallsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListFirewalls{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListFirewalls{}, 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_opListFirewalls(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 } // ListFirewallsAPIClient is a client that implements the ListFirewalls operation. type ListFirewallsAPIClient interface { ListFirewalls(context.Context, *ListFirewallsInput, ...func(*Options)) (*ListFirewallsOutput, error) } var _ ListFirewallsAPIClient = (*Client)(nil) // ListFirewallsPaginatorOptions is the paginator options for ListFirewalls type ListFirewallsPaginatorOptions struct { // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. 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 } // ListFirewallsPaginator is a paginator for ListFirewalls type ListFirewallsPaginator struct { options ListFirewallsPaginatorOptions client ListFirewallsAPIClient params *ListFirewallsInput nextToken *string firstPage bool } // NewListFirewallsPaginator returns a new ListFirewallsPaginator func NewListFirewallsPaginator(client ListFirewallsAPIClient, params *ListFirewallsInput, optFns ...func(*ListFirewallsPaginatorOptions)) *ListFirewallsPaginator { if params == nil { params = &ListFirewallsInput{} } options := ListFirewallsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListFirewallsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListFirewallsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListFirewalls page. func (p *ListFirewallsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListFirewallsOutput, 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.ListFirewalls(ctx, &params, 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_opListFirewalls(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "ListFirewalls", } }
240
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the metadata for the rule groups that you have defined. Depending on // your setting for max results and the number of rule groups, a single call might // not return the full list. func (c *Client) ListRuleGroups(ctx context.Context, params *ListRuleGroupsInput, optFns ...func(*Options)) (*ListRuleGroupsOutput, error) { if params == nil { params = &ListRuleGroupsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListRuleGroups", params, optFns, c.addOperationListRuleGroupsMiddlewares) if err != nil { return nil, err } out := result.(*ListRuleGroupsOutput) out.ResultMetadata = metadata return out, nil } type ListRuleGroupsInput struct { // Indicates the general category of the Amazon Web Services managed rule group. ManagedType types.ResourceManagedType // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. MaxResults *int32 // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string // The scope of the request. The default setting of ACCOUNT or a setting of NULL // returns all of the rule groups in your account. A setting of MANAGED returns // all available managed rule groups. Scope types.ResourceManagedStatus // Indicates whether the rule group is stateless or stateful. If the rule group is // stateless, it contains stateless rules. If it is stateful, it contains stateful // rules. Type types.RuleGroupType noSmithyDocumentSerde } type ListRuleGroupsOutput struct { // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string // The rule group metadata objects that you've defined. Depending on your setting // for max results and the number of rule groups, this might not be the full list. RuleGroups []types.RuleGroupMetadata // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListRuleGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListRuleGroups{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListRuleGroups{}, 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_opListRuleGroups(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 } // ListRuleGroupsAPIClient is a client that implements the ListRuleGroups // operation. type ListRuleGroupsAPIClient interface { ListRuleGroups(context.Context, *ListRuleGroupsInput, ...func(*Options)) (*ListRuleGroupsOutput, error) } var _ ListRuleGroupsAPIClient = (*Client)(nil) // ListRuleGroupsPaginatorOptions is the paginator options for ListRuleGroups type ListRuleGroupsPaginatorOptions struct { // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. 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 } // ListRuleGroupsPaginator is a paginator for ListRuleGroups type ListRuleGroupsPaginator struct { options ListRuleGroupsPaginatorOptions client ListRuleGroupsAPIClient params *ListRuleGroupsInput nextToken *string firstPage bool } // NewListRuleGroupsPaginator returns a new ListRuleGroupsPaginator func NewListRuleGroupsPaginator(client ListRuleGroupsAPIClient, params *ListRuleGroupsInput, optFns ...func(*ListRuleGroupsPaginatorOptions)) *ListRuleGroupsPaginator { if params == nil { params = &ListRuleGroupsInput{} } options := ListRuleGroupsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListRuleGroupsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListRuleGroupsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListRuleGroups page. func (p *ListRuleGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRuleGroupsOutput, 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.ListRuleGroups(ctx, &params, 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_opListRuleGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "ListRuleGroups", } }
247
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the tags associated with the specified resource. Tags are key:value // pairs that you can use to categorize and manage your resources, for purposes // like billing. For example, you might set the tag key to "customer" and the value // to the customer name or ID. You can specify one or more tags to add to each // Amazon Web Services resource, up to 50 tags for a resource. You can tag the // Amazon Web Services resources that you manage through Network Firewall: // firewalls, firewall policies, and rule groups. 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 Amazon Resource Name (ARN) of the resource. // // This member is required. ResourceArn *string // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. MaxResults *int32 // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string // The tags that are associated with 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(&awsAwsjson10_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_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 { // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. 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 } // 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{} if params.MaxResults != nil { options.Limit = *params.MaxResults } 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 var limit *int32 if p.options.Limit > 0 { limit = &p.options.Limit } params.MaxResults = limit result, err := p.client.ListTagsForResource(ctx, &params, 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: "network-firewall", OperationName: "ListTagsForResource", } }
246
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the metadata for the TLS inspection configurations that you have // defined. Depending on your setting for max results and the number of TLS // inspection configurations, a single call might not return the full list. func (c *Client) ListTLSInspectionConfigurations(ctx context.Context, params *ListTLSInspectionConfigurationsInput, optFns ...func(*Options)) (*ListTLSInspectionConfigurationsOutput, error) { if params == nil { params = &ListTLSInspectionConfigurationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTLSInspectionConfigurations", params, optFns, c.addOperationListTLSInspectionConfigurationsMiddlewares) if err != nil { return nil, err } out := result.(*ListTLSInspectionConfigurationsOutput) out.ResultMetadata = metadata return out, nil } type ListTLSInspectionConfigurationsInput struct { // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. MaxResults *int32 // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string noSmithyDocumentSerde } type ListTLSInspectionConfigurationsOutput struct { // When you request a list of objects with a MaxResults setting, if the number of // objects that are still available for retrieval exceeds the maximum you // requested, Network Firewall returns a NextToken value in the response. To // retrieve the next batch of objects, use the token returned from the prior // request in your next request. NextToken *string // The TLS inspection configuration metadata objects that you've defined. // Depending on your setting for max results and the number of TLS inspection // configurations, this might not be the full list. TLSInspectionConfigurations []types.TLSInspectionConfigurationMetadata // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTLSInspectionConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpListTLSInspectionConfigurations{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListTLSInspectionConfigurations{}, 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_opListTLSInspectionConfigurations(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 } // ListTLSInspectionConfigurationsAPIClient is a client that implements the // ListTLSInspectionConfigurations operation. type ListTLSInspectionConfigurationsAPIClient interface { ListTLSInspectionConfigurations(context.Context, *ListTLSInspectionConfigurationsInput, ...func(*Options)) (*ListTLSInspectionConfigurationsOutput, error) } var _ ListTLSInspectionConfigurationsAPIClient = (*Client)(nil) // ListTLSInspectionConfigurationsPaginatorOptions is the paginator options for // ListTLSInspectionConfigurations type ListTLSInspectionConfigurationsPaginatorOptions struct { // The maximum number of objects that you want Network Firewall to return for this // request. If more objects are available, in the response, Network Firewall // provides a NextToken value that you can use in a subsequent call to get the // next batch of objects. 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 } // ListTLSInspectionConfigurationsPaginator is a paginator for // ListTLSInspectionConfigurations type ListTLSInspectionConfigurationsPaginator struct { options ListTLSInspectionConfigurationsPaginatorOptions client ListTLSInspectionConfigurationsAPIClient params *ListTLSInspectionConfigurationsInput nextToken *string firstPage bool } // NewListTLSInspectionConfigurationsPaginator returns a new // ListTLSInspectionConfigurationsPaginator func NewListTLSInspectionConfigurationsPaginator(client ListTLSInspectionConfigurationsAPIClient, params *ListTLSInspectionConfigurationsInput, optFns ...func(*ListTLSInspectionConfigurationsPaginatorOptions)) *ListTLSInspectionConfigurationsPaginator { if params == nil { params = &ListTLSInspectionConfigurationsInput{} } options := ListTLSInspectionConfigurationsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListTLSInspectionConfigurationsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListTLSInspectionConfigurationsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListTLSInspectionConfigurations page. func (p *ListTLSInspectionConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTLSInspectionConfigurationsOutput, 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.ListTLSInspectionConfigurations(ctx, &params, 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_opListTLSInspectionConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "ListTLSInspectionConfigurations", } }
238
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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 or updates an IAM policy for your rule group or firewall policy. Use // this to share rule groups and firewall policies between accounts. This operation // works in conjunction with the Amazon Web Services Resource Access Manager (RAM) // service to manage resource sharing for Network Firewall. Use this operation to // create or update a resource policy for your rule group or firewall policy. In // the policy, you specify the accounts that you want to share the resource with // and the operations that you want the accounts to be able to perform. When you // add an account in the resource policy, you then run the following Resource // Access Manager (RAM) operations to access and accept the shared rule group or // firewall policy. // - GetResourceShareInvitations (https://docs.aws.amazon.com/ram/latest/APIReference/API_GetResourceShareInvitations.html) // - Returns the Amazon Resource Names (ARNs) of the resource share invitations. // - AcceptResourceShareInvitation (https://docs.aws.amazon.com/ram/latest/APIReference/API_AcceptResourceShareInvitation.html) // - Accepts the share invitation for a specified resource share. // // For additional information about resource sharing using RAM, see Resource // Access Manager User Guide (https://docs.aws.amazon.com/ram/latest/userguide/what-is.html) // . func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { if params == nil { params = &PutResourcePolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) if err != nil { return nil, err } out := result.(*PutResourcePolicyOutput) out.ResultMetadata = metadata return out, nil } type PutResourcePolicyInput struct { // The IAM policy statement that lists the accounts that you want to share your // rule group or firewall policy with and the operations that you want the accounts // to be able to perform. For a rule group resource, you can specify the following // operations in the Actions section of the statement: // - network-firewall:CreateFirewallPolicy // - network-firewall:UpdateFirewallPolicy // - network-firewall:ListRuleGroups // For a firewall policy resource, you can specify the following operations in the // Actions section of the statement: // - network-firewall:AssociateFirewallPolicy // - network-firewall:ListFirewallPolicies // In the Resource section of the statement, you specify the ARNs for the rule // groups and firewall policies that you want to share with the account that you // specified in Arn . // // This member is required. Policy *string // The Amazon Resource Name (ARN) of the account that you want to share rule // groups and firewall policies with. // // This member is required. ResourceArn *string noSmithyDocumentSerde } type PutResourcePolicyOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpPutResourcePolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpPutResourcePolicy{}, 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 = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(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_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "PutResourcePolicy", } }
156
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds the specified tags to the specified resource. Tags are key:value pairs // that you can use to categorize and manage your resources, for purposes like // billing. For example, you might set the tag key to "customer" and the value to // the customer name or ID. You can specify one or more tags to add to each Amazon // Web Services resource, up to 50 tags for a resource. You can tag the Amazon Web // Services resources that you manage through Network Firewall: firewalls, firewall // policies, and rule groups. 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 Amazon Resource Name (ARN) of the resource. // // This member is required. ResourceArn *string // // // 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(&awsAwsjson10_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_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: "network-firewall", OperationName: "TagResource", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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 tags with the specified keys from the specified resource. Tags are // key:value pairs that you can use to categorize and manage your resources, for // purposes like billing. For example, you might set the tag key to "customer" and // the value to the customer name or ID. You can specify one or more tags to add to // each Amazon Web Services resource, up to 50 tags for a resource. You can manage // tags for the Amazon Web Services resources that you manage through Network // Firewall: firewalls, firewall policies, and rule groups. 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 Amazon Resource Name (ARN) of the resource. // // This member is required. ResourceArn *string // // // 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(&awsAwsjson10_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_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: "network-firewall", OperationName: "UntagResource", } }
131
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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" ) // Modifies the flag, DeleteProtection , which indicates whether it is possible to // delete the firewall. If the flag is set to TRUE , the firewall is protected // against deletion. This setting helps protect against accidentally deleting a // firewall that's in use. func (c *Client) UpdateFirewallDeleteProtection(ctx context.Context, params *UpdateFirewallDeleteProtectionInput, optFns ...func(*Options)) (*UpdateFirewallDeleteProtectionOutput, error) { if params == nil { params = &UpdateFirewallDeleteProtectionInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateFirewallDeleteProtection", params, optFns, c.addOperationUpdateFirewallDeleteProtectionMiddlewares) if err != nil { return nil, err } out := result.(*UpdateFirewallDeleteProtectionOutput) out.ResultMetadata = metadata return out, nil } type UpdateFirewallDeleteProtectionInput struct { // A flag indicating whether it is possible to delete the firewall. A setting of // TRUE indicates that the firewall is protected against deletion. Use this setting // to protect against accidentally deleting a firewall that is in use. When you // create a firewall, the operation initializes this flag to TRUE . // // This member is required. DeleteProtection bool // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string noSmithyDocumentSerde } type UpdateFirewallDeleteProtectionOutput struct { // A flag indicating whether it is possible to delete the firewall. A setting of // TRUE indicates that the firewall is protected against deletion. Use this setting // to protect against accidentally deleting a firewall that is in use. When you // create a firewall, the operation initializes this flag to TRUE . DeleteProtection bool // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateFirewallDeleteProtectionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateFirewallDeleteProtection{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateFirewallDeleteProtection{}, 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 = addOpUpdateFirewallDeleteProtectionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFirewallDeleteProtection(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_opUpdateFirewallDeleteProtection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateFirewallDeleteProtection", } }
177
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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" ) // Modifies the description for the specified firewall. Use the description to // help you identify the firewall when you're working with it. func (c *Client) UpdateFirewallDescription(ctx context.Context, params *UpdateFirewallDescriptionInput, optFns ...func(*Options)) (*UpdateFirewallDescriptionOutput, error) { if params == nil { params = &UpdateFirewallDescriptionInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateFirewallDescription", params, optFns, c.addOperationUpdateFirewallDescriptionMiddlewares) if err != nil { return nil, err } out := result.(*UpdateFirewallDescriptionOutput) out.ResultMetadata = metadata return out, nil } type UpdateFirewallDescriptionInput struct { // The new description for the firewall. If you omit this setting, Network // Firewall removes the description for the firewall. Description *string // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string noSmithyDocumentSerde } type UpdateFirewallDescriptionOutput struct { // A description of the firewall. Description *string // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateFirewallDescriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateFirewallDescription{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateFirewallDescription{}, 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_opUpdateFirewallDescription(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_opUpdateFirewallDescription(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateFirewallDescription", } }
165
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // A complex type that contains settings for encryption of your firewall resources. func (c *Client) UpdateFirewallEncryptionConfiguration(ctx context.Context, params *UpdateFirewallEncryptionConfigurationInput, optFns ...func(*Options)) (*UpdateFirewallEncryptionConfigurationOutput, error) { if params == nil { params = &UpdateFirewallEncryptionConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateFirewallEncryptionConfiguration", params, optFns, c.addOperationUpdateFirewallEncryptionConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateFirewallEncryptionConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateFirewallEncryptionConfigurationInput struct { // A complex type that contains optional Amazon Web Services Key Management // Service (KMS) encryption settings for your Network Firewall resources. Your data // is encrypted by default with an Amazon Web Services owned key that Amazon Web // Services owns and manages for you. You can use either the Amazon Web Services // owned key, or provide your own customer managed key. To learn more about KMS // encryption of your Network Firewall resources, see Encryption at rest with // Amazon Web Services Key Managment Service (https://docs.aws.amazon.com/kms/latest/developerguide/kms-encryption-at-rest.html) // in the Network Firewall Developer Guide. EncryptionConfiguration *types.EncryptionConfiguration // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string noSmithyDocumentSerde } type UpdateFirewallEncryptionConfigurationOutput struct { // A complex type that contains optional Amazon Web Services Key Management // Service (KMS) encryption settings for your Network Firewall resources. Your data // is encrypted by default with an Amazon Web Services owned key that Amazon Web // Services owns and manages for you. You can use either the Amazon Web Services // owned key, or provide your own customer managed key. To learn more about KMS // encryption of your Network Firewall resources, see Encryption at rest with // Amazon Web Services Key Managment Service (https://docs.aws.amazon.com/kms/latest/developerguide/kms-encryption-at-rest.html) // in the Network Firewall Developer Guide. EncryptionConfiguration *types.EncryptionConfiguration // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateFirewallEncryptionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateFirewallEncryptionConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateFirewallEncryptionConfiguration{}, 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 = addOpUpdateFirewallEncryptionConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFirewallEncryptionConfiguration(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_opUpdateFirewallEncryptionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateFirewallEncryptionConfiguration", } }
179
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the properties of the specified firewall policy. func (c *Client) UpdateFirewallPolicy(ctx context.Context, params *UpdateFirewallPolicyInput, optFns ...func(*Options)) (*UpdateFirewallPolicyOutput, error) { if params == nil { params = &UpdateFirewallPolicyInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateFirewallPolicy", params, optFns, c.addOperationUpdateFirewallPolicyMiddlewares) if err != nil { return nil, err } out := result.(*UpdateFirewallPolicyOutput) out.ResultMetadata = metadata return out, nil } type UpdateFirewallPolicyInput struct { // The updated firewall policy to use for the firewall. // // This member is required. FirewallPolicy *types.FirewallPolicy // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the firewall policy. The token marks the state of the // policy resource at the time of the request. To make changes to the policy, you // provide the token in your request. Network Firewall uses the token to ensure // that the policy hasn't changed since you last retrieved it. If it has changed, // the operation fails with an InvalidTokenException . If this happens, retrieve // the firewall policy again to get a current copy of it with current token. // Reapply your changes as needed, then try the operation again using the new // token. // // This member is required. UpdateToken *string // A description of the firewall policy. Description *string // Indicates whether you want Network Firewall to just check the validity of the // request, rather than run the request. If set to TRUE , Network Firewall checks // whether the request can run successfully, but doesn't actually make the // requested changes. The call returns the value that the request would return if // you ran it with dry run set to FALSE , but doesn't make additions or changes to // your resources. This option allows you to make sure that you have the required // permissions to run the request and that your request parameters are valid. If // set to FALSE , Network Firewall makes the requested changes to your resources. DryRun bool // A complex type that contains settings for encryption of your firewall policy // resources. EncryptionConfiguration *types.EncryptionConfiguration // The Amazon Resource Name (ARN) of the firewall policy. You must specify the ARN // or the name, and you can specify both. FirewallPolicyArn *string // The descriptive name of the firewall policy. You can't change the name of a // firewall policy after you create it. You must specify the ARN or the name, and // you can specify both. FirewallPolicyName *string noSmithyDocumentSerde } type UpdateFirewallPolicyOutput struct { // The high-level properties of a firewall policy. This, along with the // FirewallPolicy , define the policy. You can retrieve all objects for a firewall // policy by calling DescribeFirewallPolicy . // // This member is required. FirewallPolicyResponse *types.FirewallPolicyResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the firewall policy. The token marks the state of the // policy resource at the time of the request. To make changes to the policy, you // provide the token in your request. Network Firewall uses the token to ensure // that the policy hasn't changed since you last retrieved it. If it has changed, // the operation fails with an InvalidTokenException . If this happens, retrieve // the firewall policy again to get a current copy of it with current token. // Reapply your changes as needed, then try the operation again using the new // token. // // This member is required. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateFirewallPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateFirewallPolicy{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateFirewallPolicy{}, 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 = addOpUpdateFirewallPolicyValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFirewallPolicy(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_opUpdateFirewallPolicy(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateFirewallPolicy", } }
181
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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" ) // Modifies the flag, ChangeProtection , which indicates whether it is possible to // change the firewall. If the flag is set to TRUE , the firewall is protected from // changes. This setting helps protect against accidentally changing a firewall // that's in use. func (c *Client) UpdateFirewallPolicyChangeProtection(ctx context.Context, params *UpdateFirewallPolicyChangeProtectionInput, optFns ...func(*Options)) (*UpdateFirewallPolicyChangeProtectionOutput, error) { if params == nil { params = &UpdateFirewallPolicyChangeProtectionInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateFirewallPolicyChangeProtection", params, optFns, c.addOperationUpdateFirewallPolicyChangeProtectionMiddlewares) if err != nil { return nil, err } out := result.(*UpdateFirewallPolicyChangeProtectionOutput) out.ResultMetadata = metadata return out, nil } type UpdateFirewallPolicyChangeProtectionInput struct { // A setting indicating whether the firewall is protected against a change to the // firewall policy association. Use this setting to protect against accidentally // modifying the firewall policy for a firewall that is in use. When you create a // firewall, the operation initializes this setting to TRUE . // // This member is required. FirewallPolicyChangeProtection bool // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string noSmithyDocumentSerde } type UpdateFirewallPolicyChangeProtectionOutput struct { // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // A setting indicating whether the firewall is protected against a change to the // firewall policy association. Use this setting to protect against accidentally // modifying the firewall policy for a firewall that is in use. When you create a // firewall, the operation initializes this setting to TRUE . FirewallPolicyChangeProtection bool // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateFirewallPolicyChangeProtectionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateFirewallPolicyChangeProtection{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateFirewallPolicyChangeProtection{}, 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 = addOpUpdateFirewallPolicyChangeProtectionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFirewallPolicyChangeProtection(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_opUpdateFirewallPolicyChangeProtection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateFirewallPolicyChangeProtection", } }
177
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Sets the logging configuration for the specified firewall. To change the // logging configuration, retrieve the LoggingConfiguration by calling // DescribeLoggingConfiguration , then change it and provide the modified object to // this update call. You must change the logging configuration one // LogDestinationConfig at a time inside the retrieved LoggingConfiguration // object. You can perform only one of the following actions in any call to // UpdateLoggingConfiguration : // - Create a new log destination object by adding a single LogDestinationConfig // array element to LogDestinationConfigs . // - Delete a log destination object by removing a single LogDestinationConfig // array element from LogDestinationConfigs . // - Change the LogDestination setting in a single LogDestinationConfig array // element. // // You can't change the LogDestinationType or LogType in a LogDestinationConfig . // To change these settings, delete the existing LogDestinationConfig object and // create a new one, using two separate calls to this update operation. func (c *Client) UpdateLoggingConfiguration(ctx context.Context, params *UpdateLoggingConfigurationInput, optFns ...func(*Options)) (*UpdateLoggingConfigurationOutput, error) { if params == nil { params = &UpdateLoggingConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateLoggingConfiguration", params, optFns, c.addOperationUpdateLoggingConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateLoggingConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateLoggingConfigurationInput struct { // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string // Defines how Network Firewall performs logging for a firewall. If you omit this // setting, Network Firewall disables logging for the firewall. LoggingConfiguration *types.LoggingConfiguration noSmithyDocumentSerde } type UpdateLoggingConfigurationOutput struct { // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // Defines how Network Firewall performs logging for a Firewall . LoggingConfiguration *types.LoggingConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateLoggingConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateLoggingConfiguration{}, 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 = addOpUpdateLoggingConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLoggingConfiguration(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_opUpdateLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateLoggingConfiguration", } }
156
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the rule settings for the specified rule group. You use a rule group by // reference in one or more firewall policies. When you modify a rule group, you // modify all firewall policies that use the rule group. To update a rule group, // first call DescribeRuleGroup to retrieve the current RuleGroup object, update // the object as needed, and then provide the updated object to this call. func (c *Client) UpdateRuleGroup(ctx context.Context, params *UpdateRuleGroupInput, optFns ...func(*Options)) (*UpdateRuleGroupOutput, error) { if params == nil { params = &UpdateRuleGroupInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateRuleGroup", params, optFns, c.addOperationUpdateRuleGroupMiddlewares) if err != nil { return nil, err } out := result.(*UpdateRuleGroupOutput) out.ResultMetadata = metadata return out, nil } type UpdateRuleGroupInput struct { // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the rule group. The token marks the state of the rule group // resource at the time of the request. To make changes to the rule group, you // provide the token in your request. Network Firewall uses the token to ensure // that the rule group hasn't changed since you last retrieved it. If it has // changed, the operation fails with an InvalidTokenException . If this happens, // retrieve the rule group again to get a current copy of it with a current token. // Reapply your changes as needed, then try the operation again using the new // token. // // This member is required. UpdateToken *string // A description of the rule group. Description *string // Indicates whether you want Network Firewall to just check the validity of the // request, rather than run the request. If set to TRUE , Network Firewall checks // whether the request can run successfully, but doesn't actually make the // requested changes. The call returns the value that the request would return if // you ran it with dry run set to FALSE , but doesn't make additions or changes to // your resources. This option allows you to make sure that you have the required // permissions to run the request and that your request parameters are valid. If // set to FALSE , Network Firewall makes the requested changes to your resources. DryRun bool // A complex type that contains settings for encryption of your rule group // resources. EncryptionConfiguration *types.EncryptionConfiguration // An object that defines the rule group rules. You must provide either this rule // group setting or a Rules setting, but not both. RuleGroup *types.RuleGroup // The Amazon Resource Name (ARN) of the rule group. You must specify the ARN or // the name, and you can specify both. RuleGroupArn *string // The descriptive name of the rule group. You can't change the name of a rule // group after you create it. You must specify the ARN or the name, and you can // specify both. RuleGroupName *string // A string containing stateful rule group rules specifications in Suricata flat // format, with one rule per line. Use this to import your existing Suricata // compatible rule groups. You must provide either this rules setting or a // populated RuleGroup setting, but not both. You can provide your rule group // specification in Suricata flat format through this setting when you create or // update your rule group. The call response returns a RuleGroup object that // Network Firewall has populated from your string. Rules *string // A complex type that contains metadata about the rule group that your own rule // group is copied from. You can use the metadata to keep track of updates made to // the originating rule group. SourceMetadata *types.SourceMetadata // Indicates whether the rule group is stateless or stateful. If the rule group is // stateless, it contains stateless rules. If it is stateful, it contains stateful // rules. This setting is required for requests that do not include the // RuleGroupARN . Type types.RuleGroupType noSmithyDocumentSerde } type UpdateRuleGroupOutput struct { // The high-level properties of a rule group. This, along with the RuleGroup , // define the rule group. You can retrieve all objects for a rule group by calling // DescribeRuleGroup . // // This member is required. RuleGroupResponse *types.RuleGroupResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the rule group. The token marks the state of the rule group // resource at the time of the request. To make changes to the rule group, you // provide the token in your request. Network Firewall uses the token to ensure // that the rule group hasn't changed since you last retrieved it. If it has // changed, the operation fails with an InvalidTokenException . If this happens, // retrieve the rule group again to get a current copy of it with a current token. // Reapply your changes as needed, then try the operation again using the new // token. // // This member is required. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateRuleGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateRuleGroup{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateRuleGroup{}, 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 = addOpUpdateRuleGroupValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateRuleGroup(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_opUpdateRuleGroup(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateRuleGroup", } }
204
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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" ) func (c *Client) UpdateSubnetChangeProtection(ctx context.Context, params *UpdateSubnetChangeProtectionInput, optFns ...func(*Options)) (*UpdateSubnetChangeProtectionOutput, error) { if params == nil { params = &UpdateSubnetChangeProtectionInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateSubnetChangeProtection", params, optFns, c.addOperationUpdateSubnetChangeProtectionMiddlewares) if err != nil { return nil, err } out := result.(*UpdateSubnetChangeProtectionOutput) out.ResultMetadata = metadata return out, nil } type UpdateSubnetChangeProtectionInput struct { // A setting indicating whether the firewall is protected against changes to the // subnet associations. Use this setting to protect against accidentally modifying // the subnet associations for a firewall that is in use. When you create a // firewall, the operation initializes this setting to TRUE . // // This member is required. SubnetChangeProtection bool // The Amazon Resource Name (ARN) of the firewall. You must specify the ARN or the // name, and you can specify both. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. You must specify the ARN or the name, and you can specify // both. FirewallName *string // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string noSmithyDocumentSerde } type UpdateSubnetChangeProtectionOutput struct { // The Amazon Resource Name (ARN) of the firewall. FirewallArn *string // The descriptive name of the firewall. You can't change the name of a firewall // after you create it. FirewallName *string // A setting indicating whether the firewall is protected against changes to the // subnet associations. Use this setting to protect against accidentally modifying // the subnet associations for a firewall that is in use. When you create a // firewall, the operation initializes this setting to TRUE . SubnetChangeProtection bool // An optional token that you can use for optimistic locking. Network Firewall // returns a token to your requests that access the firewall. The token marks the // state of the firewall resource at the time of the request. To make an // unconditional change to the firewall, omit the token in your update request. // Without the token, Network Firewall performs your updates regardless of whether // the firewall has changed since you last retrieved it. To make a conditional // change to the firewall, provide the token in your update request. Network // Firewall uses the token to ensure that the firewall hasn't changed since you // last retrieved it. If it has changed, the operation fails with an // InvalidTokenException . If this happens, retrieve the firewall again to get a // current copy of it with a new token. Reapply your changes as needed, then try // the operation again using the new token. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateSubnetChangeProtectionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateSubnetChangeProtection{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateSubnetChangeProtection{}, 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 = addOpUpdateSubnetChangeProtectionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSubnetChangeProtection(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_opUpdateSubnetChangeProtection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateSubnetChangeProtection", } }
173
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the TLS inspection configuration settings for the specified TLS // inspection configuration. You use a TLS inspection configuration by reference in // one or more firewall policies. When you modify a TLS inspection configuration, // you modify all firewall policies that use the TLS inspection configuration. To // update a TLS inspection configuration, first call // DescribeTLSInspectionConfiguration to retrieve the current // TLSInspectionConfiguration object, update the object as needed, and then provide // the updated object to this call. func (c *Client) UpdateTLSInspectionConfiguration(ctx context.Context, params *UpdateTLSInspectionConfigurationInput, optFns ...func(*Options)) (*UpdateTLSInspectionConfigurationOutput, error) { if params == nil { params = &UpdateTLSInspectionConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateTLSInspectionConfiguration", params, optFns, c.addOperationUpdateTLSInspectionConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateTLSInspectionConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateTLSInspectionConfigurationInput struct { // The object that defines a TLS inspection configuration. This, along with // TLSInspectionConfigurationResponse , define the TLS inspection configuration. // You can retrieve all objects for a TLS inspection configuration by calling // DescribeTLSInspectionConfiguration . Network Firewall uses a TLS inspection // configuration to decrypt traffic. Network Firewall re-encrypts the traffic // before sending it to its destination. To use a TLS inspection configuration, you // add it to a Network Firewall firewall policy, then you apply the firewall policy // to a firewall. Network Firewall acts as a proxy service to decrypt and inspect // inbound traffic. You can reference a TLS inspection configuration from more than // one firewall policy, and you can use a firewall policy in more than one // firewall. For more information about using TLS inspection configurations, see // Decrypting SSL/TLS traffic with TLS inspection configurations (https://docs.aws.amazon.com/network-firewall/latest/developerguide/tls-inspection.html) // in the Network Firewall Developer Guide. // // This member is required. TLSInspectionConfiguration *types.TLSInspectionConfiguration // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the TLS inspection configuration. The token marks the state // of the TLS inspection configuration resource at the time of the request. To make // changes to the TLS inspection configuration, you provide the token in your // request. Network Firewall uses the token to ensure that the TLS inspection // configuration hasn't changed since you last retrieved it. If it has changed, the // operation fails with an InvalidTokenException . If this happens, retrieve the // TLS inspection configuration again to get a current copy of it with a current // token. Reapply your changes as needed, then try the operation again using the // new token. // // This member is required. UpdateToken *string // A description of the TLS inspection configuration. Description *string // A complex type that contains the Amazon Web Services KMS encryption // configuration settings for your TLS inspection configuration. EncryptionConfiguration *types.EncryptionConfiguration // The Amazon Resource Name (ARN) of the TLS inspection configuration. TLSInspectionConfigurationArn *string // The descriptive name of the TLS inspection configuration. You can't change the // name of a TLS inspection configuration after you create it. TLSInspectionConfigurationName *string noSmithyDocumentSerde } type UpdateTLSInspectionConfigurationOutput struct { // The high-level properties of a TLS inspection configuration. This, along with // the TLSInspectionConfiguration , define the TLS inspection configuration. You // can retrieve all objects for a TLS inspection configuration by calling // DescribeTLSInspectionConfiguration . // // This member is required. TLSInspectionConfigurationResponse *types.TLSInspectionConfigurationResponse // A token used for optimistic locking. Network Firewall returns a token to your // requests that access the TLS inspection configuration. The token marks the state // of the TLS inspection configuration resource at the time of the request. To make // changes to the TLS inspection configuration, you provide the token in your // request. Network Firewall uses the token to ensure that the TLS inspection // configuration hasn't changed since you last retrieved it. If it has changed, the // operation fails with an InvalidTokenException . If this happens, retrieve the // TLS inspection configuration again to get a current copy of it with a current // token. Reapply your changes as needed, then try the operation again using the // new token. // // This member is required. UpdateToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateTLSInspectionConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateTLSInspectionConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateTLSInspectionConfiguration{}, 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 = addOpUpdateTLSInspectionConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTLSInspectionConfiguration(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_opUpdateTLSInspectionConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "network-firewall", OperationName: "UpdateTLSInspectionConfiguration", } }
191
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/networkfirewall/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsAwsjson10_deserializeOpAssociateFirewallPolicy struct { } func (*awsAwsjson10_deserializeOpAssociateFirewallPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpAssociateFirewallPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorAssociateFirewallPolicy(response, &metadata) } output := &AssociateFirewallPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentAssociateFirewallPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorAssociateFirewallPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson10_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpAssociateSubnets struct { } func (*awsAwsjson10_deserializeOpAssociateSubnets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpAssociateSubnets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorAssociateSubnets(response, &metadata) } output := &AssociateSubnetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentAssociateSubnetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorAssociateSubnets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InsufficientCapacityException", errorCode): return awsAwsjson10_deserializeErrorInsufficientCapacityException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson10_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpCreateFirewall struct { } func (*awsAwsjson10_deserializeOpCreateFirewall) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpCreateFirewall) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorCreateFirewall(response, &metadata) } output := &CreateFirewallOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentCreateFirewallOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorCreateFirewall(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InsufficientCapacityException", errorCode): return awsAwsjson10_deserializeErrorInsufficientCapacityException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson10_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpCreateFirewallPolicy struct { } func (*awsAwsjson10_deserializeOpCreateFirewallPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpCreateFirewallPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorCreateFirewallPolicy(response, &metadata) } output := &CreateFirewallPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentCreateFirewallPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorCreateFirewallPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InsufficientCapacityException", errorCode): return awsAwsjson10_deserializeErrorInsufficientCapacityException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpCreateRuleGroup struct { } func (*awsAwsjson10_deserializeOpCreateRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpCreateRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorCreateRuleGroup(response, &metadata) } output := &CreateRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentCreateRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorCreateRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InsufficientCapacityException", errorCode): return awsAwsjson10_deserializeErrorInsufficientCapacityException(response, errorBody) case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson10_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpCreateTLSInspectionConfiguration struct { } func (*awsAwsjson10_deserializeOpCreateTLSInspectionConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpCreateTLSInspectionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorCreateTLSInspectionConfiguration(response, &metadata) } output := &CreateTLSInspectionConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentCreateTLSInspectionConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorCreateTLSInspectionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDeleteFirewall struct { } func (*awsAwsjson10_deserializeOpDeleteFirewall) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDeleteFirewall) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDeleteFirewall(response, &metadata) } output := &DeleteFirewallOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDeleteFirewallOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDeleteFirewall(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson10_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson10_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDeleteFirewallPolicy struct { } func (*awsAwsjson10_deserializeOpDeleteFirewallPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDeleteFirewallPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDeleteFirewallPolicy(response, &metadata) } output := &DeleteFirewallPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDeleteFirewallPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDeleteFirewallPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson10_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson10_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDeleteResourcePolicy struct { } func (*awsAwsjson10_deserializeOpDeleteResourcePolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDeleteResourcePolicy(response, &metadata) } output := &DeleteResourcePolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDeleteResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidResourcePolicyException", errorCode): return awsAwsjson10_deserializeErrorInvalidResourcePolicyException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDeleteRuleGroup struct { } func (*awsAwsjson10_deserializeOpDeleteRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDeleteRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDeleteRuleGroup(response, &metadata) } output := &DeleteRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDeleteRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDeleteRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson10_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson10_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDeleteTLSInspectionConfiguration struct { } func (*awsAwsjson10_deserializeOpDeleteTLSInspectionConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDeleteTLSInspectionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDeleteTLSInspectionConfiguration(response, &metadata) } output := &DeleteTLSInspectionConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDeleteTLSInspectionConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDeleteTLSInspectionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson10_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDescribeFirewall struct { } func (*awsAwsjson10_deserializeOpDescribeFirewall) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDescribeFirewall) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDescribeFirewall(response, &metadata) } output := &DescribeFirewallOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDescribeFirewallOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDescribeFirewall(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDescribeFirewallPolicy struct { } func (*awsAwsjson10_deserializeOpDescribeFirewallPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDescribeFirewallPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDescribeFirewallPolicy(response, &metadata) } output := &DescribeFirewallPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDescribeFirewallPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDescribeFirewallPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDescribeLoggingConfiguration struct { } func (*awsAwsjson10_deserializeOpDescribeLoggingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDescribeLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDescribeLoggingConfiguration(response, &metadata) } output := &DescribeLoggingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDescribeLoggingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDescribeLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDescribeResourcePolicy struct { } func (*awsAwsjson10_deserializeOpDescribeResourcePolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDescribeResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDescribeResourcePolicy(response, &metadata) } output := &DescribeResourcePolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDescribeResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDescribeResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDescribeRuleGroup struct { } func (*awsAwsjson10_deserializeOpDescribeRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDescribeRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRuleGroup(response, &metadata) } output := &DescribeRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDescribeRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDescribeRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDescribeRuleGroupMetadata struct { } func (*awsAwsjson10_deserializeOpDescribeRuleGroupMetadata) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDescribeRuleGroupMetadata) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDescribeRuleGroupMetadata(response, &metadata) } output := &DescribeRuleGroupMetadataOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDescribeRuleGroupMetadataOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDescribeRuleGroupMetadata(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDescribeTLSInspectionConfiguration struct { } func (*awsAwsjson10_deserializeOpDescribeTLSInspectionConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDescribeTLSInspectionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDescribeTLSInspectionConfiguration(response, &metadata) } output := &DescribeTLSInspectionConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDescribeTLSInspectionConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDescribeTLSInspectionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpDisassociateSubnets struct { } func (*awsAwsjson10_deserializeOpDisassociateSubnets) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpDisassociateSubnets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorDisassociateSubnets(response, &metadata) } output := &DisassociateSubnetsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentDisassociateSubnetsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorDisassociateSubnets(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidOperationException", errorCode): return awsAwsjson10_deserializeErrorInvalidOperationException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpListFirewallPolicies struct { } func (*awsAwsjson10_deserializeOpListFirewallPolicies) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListFirewallPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListFirewallPolicies(response, &metadata) } output := &ListFirewallPoliciesOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentListFirewallPoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorListFirewallPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpListFirewalls struct { } func (*awsAwsjson10_deserializeOpListFirewalls) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListFirewalls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListFirewalls(response, &metadata) } output := &ListFirewallsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentListFirewallsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorListFirewalls(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpListRuleGroups struct { } func (*awsAwsjson10_deserializeOpListRuleGroups) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListRuleGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListRuleGroups(response, &metadata) } output := &ListRuleGroupsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentListRuleGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorListRuleGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpListTagsForResource struct { } func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpListTLSInspectionConfigurations struct { } func (*awsAwsjson10_deserializeOpListTLSInspectionConfigurations) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpListTLSInspectionConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorListTLSInspectionConfigurations(response, &metadata) } output := &ListTLSInspectionConfigurationsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentListTLSInspectionConfigurationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorListTLSInspectionConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpPutResourcePolicy struct { } func (*awsAwsjson10_deserializeOpPutResourcePolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorPutResourcePolicy(response, &metadata) } output := &PutResourcePolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidResourcePolicyException", errorCode): return awsAwsjson10_deserializeErrorInvalidResourcePolicyException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpTagResource struct { } func (*awsAwsjson10_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUntagResource struct { } func (*awsAwsjson10_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateFirewallDeleteProtection struct { } func (*awsAwsjson10_deserializeOpUpdateFirewallDeleteProtection) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateFirewallDeleteProtection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateFirewallDeleteProtection(response, &metadata) } output := &UpdateFirewallDeleteProtectionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateFirewallDeleteProtectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateFirewallDeleteProtection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceOwnerCheckException", errorCode): return awsAwsjson10_deserializeErrorResourceOwnerCheckException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateFirewallDescription struct { } func (*awsAwsjson10_deserializeOpUpdateFirewallDescription) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateFirewallDescription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateFirewallDescription(response, &metadata) } output := &UpdateFirewallDescriptionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateFirewallDescriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateFirewallDescription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateFirewallEncryptionConfiguration struct { } func (*awsAwsjson10_deserializeOpUpdateFirewallEncryptionConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateFirewallEncryptionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateFirewallEncryptionConfiguration(response, &metadata) } output := &UpdateFirewallEncryptionConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateFirewallEncryptionConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateFirewallEncryptionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceOwnerCheckException", errorCode): return awsAwsjson10_deserializeErrorResourceOwnerCheckException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateFirewallPolicy struct { } func (*awsAwsjson10_deserializeOpUpdateFirewallPolicy) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateFirewallPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateFirewallPolicy(response, &metadata) } output := &UpdateFirewallPolicyOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateFirewallPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateFirewallPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateFirewallPolicyChangeProtection struct { } func (*awsAwsjson10_deserializeOpUpdateFirewallPolicyChangeProtection) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateFirewallPolicyChangeProtection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateFirewallPolicyChangeProtection(response, &metadata) } output := &UpdateFirewallPolicyChangeProtectionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateFirewallPolicyChangeProtectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateFirewallPolicyChangeProtection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceOwnerCheckException", errorCode): return awsAwsjson10_deserializeErrorResourceOwnerCheckException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateLoggingConfiguration struct { } func (*awsAwsjson10_deserializeOpUpdateLoggingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateLoggingConfiguration(response, &metadata) } output := &UpdateLoggingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateLoggingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("LogDestinationPermissionException", errorCode): return awsAwsjson10_deserializeErrorLogDestinationPermissionException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateRuleGroup struct { } func (*awsAwsjson10_deserializeOpUpdateRuleGroup) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateRuleGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateRuleGroup(response, &metadata) } output := &UpdateRuleGroupOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateRuleGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateRuleGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateSubnetChangeProtection struct { } func (*awsAwsjson10_deserializeOpUpdateSubnetChangeProtection) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateSubnetChangeProtection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateSubnetChangeProtection(response, &metadata) } output := &UpdateSubnetChangeProtectionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateSubnetChangeProtectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateSubnetChangeProtection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ResourceOwnerCheckException", errorCode): return awsAwsjson10_deserializeErrorResourceOwnerCheckException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson10_deserializeOpUpdateTLSInspectionConfiguration struct { } func (*awsAwsjson10_deserializeOpUpdateTLSInspectionConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson10_deserializeOpUpdateTLSInspectionConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson10_deserializeOpErrorUpdateTLSInspectionConfiguration(response, &metadata) } output := &UpdateTLSInspectionConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson10_deserializeOpDocumentUpdateTLSInspectionConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson10_deserializeOpErrorUpdateTLSInspectionConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("InternalServerError", errorCode): return awsAwsjson10_deserializeErrorInternalServerError(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson10_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("InvalidTokenException", errorCode): return awsAwsjson10_deserializeErrorInvalidTokenException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson10_deserializeErrorInsufficientCapacityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InsufficientCapacityException{} err := awsAwsjson10_deserializeDocumentInsufficientCapacityException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorInternalServerError(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InternalServerError{} err := awsAwsjson10_deserializeDocumentInternalServerError(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorInvalidOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidOperationException{} err := awsAwsjson10_deserializeDocumentInvalidOperationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidRequestException{} err := awsAwsjson10_deserializeDocumentInvalidRequestException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorInvalidResourcePolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidResourcePolicyException{} err := awsAwsjson10_deserializeDocumentInvalidResourcePolicyException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorInvalidTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidTokenException{} err := awsAwsjson10_deserializeDocumentInvalidTokenException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.LimitExceededException{} err := awsAwsjson10_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorLogDestinationPermissionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.LogDestinationPermissionException{} err := awsAwsjson10_deserializeDocumentLogDestinationPermissionException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ResourceNotFoundException{} err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorResourceOwnerCheckException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ResourceOwnerCheckException{} err := awsAwsjson10_deserializeDocumentResourceOwnerCheckException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ThrottlingException{} err := awsAwsjson10_deserializeDocumentThrottlingException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.UnsupportedOperationException{} err := awsAwsjson10_deserializeDocumentUnsupportedOperationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson10_deserializeDocumentActionDefinition(v **types.ActionDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ActionDefinition if *v == nil { sv = &types.ActionDefinition{} } else { sv = *v } for key, value := range shape { switch key { case "PublishMetricAction": if err := awsAwsjson10_deserializeDocumentPublishMetricAction(&sv.PublishMetricAction, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentAddress(v **types.Address, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Address if *v == nil { sv = &types.Address{} } else { sv = *v } for key, value := range shape { switch key { case "AddressDefinition": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AddressDefinition to be of type string, got %T instead", value) } sv.AddressDefinition = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentAddresses(v *[]types.Address, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Address if *v == nil { cv = []types.Address{} } else { cv = *v } for _, value := range shape { var col types.Address destAddr := &col if err := awsAwsjson10_deserializeDocumentAddress(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentAttachment(v **types.Attachment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Attachment if *v == nil { sv = &types.Attachment{} } else { sv = *v } for key, value := range shape { switch key { case "EndpointId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EndpointId to be of type string, got %T instead", value) } sv.EndpointId = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AttachmentStatus to be of type string, got %T instead", value) } sv.Status = types.AttachmentStatus(jtv) } case "StatusMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) } sv.StatusMessage = ptr.String(jtv) } case "SubnetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AzSubnet to be of type string, got %T instead", value) } sv.SubnetId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentCapacityUsageSummary(v **types.CapacityUsageSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CapacityUsageSummary if *v == nil { sv = &types.CapacityUsageSummary{} } else { sv = *v } for key, value := range shape { switch key { case "CIDRs": if err := awsAwsjson10_deserializeDocumentCIDRSummary(&sv.CIDRs, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentCertificates(v *[]types.TlsCertificateData, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.TlsCertificateData if *v == nil { cv = []types.TlsCertificateData{} } else { cv = *v } for _, value := range shape { var col types.TlsCertificateData destAddr := &col if err := awsAwsjson10_deserializeDocumentTlsCertificateData(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentCIDRSummary(v **types.CIDRSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CIDRSummary if *v == nil { sv = &types.CIDRSummary{} } else { sv = *v } for key, value := range shape { switch key { case "AvailableCIDRCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected CIDRCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.AvailableCIDRCount = ptr.Int32(int32(i64)) } case "IPSetReferences": if err := awsAwsjson10_deserializeDocumentIPSetMetadataMap(&sv.IPSetReferences, value); err != nil { return err } case "UtilizedCIDRCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected CIDRCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.UtilizedCIDRCount = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentCustomAction(v **types.CustomAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.CustomAction if *v == nil { sv = &types.CustomAction{} } else { sv = *v } for key, value := range shape { switch key { case "ActionDefinition": if err := awsAwsjson10_deserializeDocumentActionDefinition(&sv.ActionDefinition, value); err != nil { return err } case "ActionName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) } sv.ActionName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentCustomActions(v *[]types.CustomAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.CustomAction if *v == nil { cv = []types.CustomAction{} } else { cv = *v } for _, value := range shape { var col types.CustomAction destAddr := &col if err := awsAwsjson10_deserializeDocumentCustomAction(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentDimension(v **types.Dimension, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Dimension if *v == nil { sv = &types.Dimension{} } else { sv = *v } for key, value := range shape { switch key { case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DimensionValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentDimensions(v *[]types.Dimension, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Dimension if *v == nil { cv = []types.Dimension{} } else { cv = *v } for _, value := range shape { var col types.Dimension destAddr := &col if err := awsAwsjson10_deserializeDocumentDimension(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentEncryptionConfiguration(v **types.EncryptionConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.EncryptionConfiguration if *v == nil { sv = &types.EncryptionConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "KeyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected KeyId to be of type string, got %T instead", value) } sv.KeyId = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected EncryptionType to be of type string, got %T instead", value) } sv.Type = types.EncryptionType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentFirewall(v **types.Firewall, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Firewall if *v == nil { sv = &types.Firewall{} } else { sv = *v } for key, value := range shape { switch key { case "DeleteProtection": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.DeleteProtection = jtv } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EncryptionConfiguration": if err := awsAwsjson10_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { return err } case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.FirewallId = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "FirewallPolicyArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallPolicyArn = ptr.String(jtv) } case "FirewallPolicyChangeProtection": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.FirewallPolicyChangeProtection = jtv } case "SubnetChangeProtection": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.SubnetChangeProtection = jtv } case "SubnetMappings": if err := awsAwsjson10_deserializeDocumentSubnetMappings(&sv.SubnetMappings, value); err != nil { return err } case "Tags": if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } case "VpcId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) } sv.VpcId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentFirewallMetadata(v **types.FirewallMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.FirewallMetadata if *v == nil { sv = &types.FirewallMetadata{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentFirewallPolicies(v *[]types.FirewallPolicyMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.FirewallPolicyMetadata if *v == nil { cv = []types.FirewallPolicyMetadata{} } else { cv = *v } for _, value := range shape { var col types.FirewallPolicyMetadata destAddr := &col if err := awsAwsjson10_deserializeDocumentFirewallPolicyMetadata(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentFirewallPolicy(v **types.FirewallPolicy, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.FirewallPolicy if *v == nil { sv = &types.FirewallPolicy{} } else { sv = *v } for key, value := range shape { switch key { case "PolicyVariables": if err := awsAwsjson10_deserializeDocumentPolicyVariables(&sv.PolicyVariables, value); err != nil { return err } case "StatefulDefaultActions": if err := awsAwsjson10_deserializeDocumentStatefulActions(&sv.StatefulDefaultActions, value); err != nil { return err } case "StatefulEngineOptions": if err := awsAwsjson10_deserializeDocumentStatefulEngineOptions(&sv.StatefulEngineOptions, value); err != nil { return err } case "StatefulRuleGroupReferences": if err := awsAwsjson10_deserializeDocumentStatefulRuleGroupReferences(&sv.StatefulRuleGroupReferences, value); err != nil { return err } case "StatelessCustomActions": if err := awsAwsjson10_deserializeDocumentCustomActions(&sv.StatelessCustomActions, value); err != nil { return err } case "StatelessDefaultActions": if err := awsAwsjson10_deserializeDocumentStatelessActions(&sv.StatelessDefaultActions, value); err != nil { return err } case "StatelessFragmentDefaultActions": if err := awsAwsjson10_deserializeDocumentStatelessActions(&sv.StatelessFragmentDefaultActions, value); err != nil { return err } case "StatelessRuleGroupReferences": if err := awsAwsjson10_deserializeDocumentStatelessRuleGroupReferences(&sv.StatelessRuleGroupReferences, value); err != nil { return err } case "TLSInspectionConfigurationArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.TLSInspectionConfigurationArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentFirewallPolicyMetadata(v **types.FirewallPolicyMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.FirewallPolicyMetadata if *v == nil { sv = &types.FirewallPolicyMetadata{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentFirewallPolicyResponse(v **types.FirewallPolicyResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.FirewallPolicyResponse if *v == nil { sv = &types.FirewallPolicyResponse{} } else { sv = *v } for key, value := range shape { switch key { case "ConsumedStatefulRuleCapacity": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RuleCapacity to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ConsumedStatefulRuleCapacity = ptr.Int32(int32(i64)) } case "ConsumedStatelessRuleCapacity": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RuleCapacity to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ConsumedStatelessRuleCapacity = ptr.Int32(int32(i64)) } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EncryptionConfiguration": if err := awsAwsjson10_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { return err } case "FirewallPolicyArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallPolicyArn = ptr.String(jtv) } case "FirewallPolicyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.FirewallPolicyId = ptr.String(jtv) } case "FirewallPolicyName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallPolicyName = ptr.String(jtv) } case "FirewallPolicyStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) } sv.FirewallPolicyStatus = types.ResourceStatus(jtv) } case "LastModifiedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected LastUpdateTime to be a JSON Number, got %T instead", value) } } case "NumberOfAssociations": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected NumberOfAssociations to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.NumberOfAssociations = ptr.Int32(int32(i64)) } case "Tags": if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentFirewalls(v *[]types.FirewallMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.FirewallMetadata if *v == nil { cv = []types.FirewallMetadata{} } else { cv = *v } for _, value := range shape { var col types.FirewallMetadata destAddr := &col if err := awsAwsjson10_deserializeDocumentFirewallMetadata(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentFirewallStatus(v **types.FirewallStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.FirewallStatus if *v == nil { sv = &types.FirewallStatus{} } else { sv = *v } for key, value := range shape { switch key { case "CapacityUsageSummary": if err := awsAwsjson10_deserializeDocumentCapacityUsageSummary(&sv.CapacityUsageSummary, value); err != nil { return err } case "ConfigurationSyncStateSummary": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConfigurationSyncState to be of type string, got %T instead", value) } sv.ConfigurationSyncStateSummary = types.ConfigurationSyncState(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FirewallStatusValue to be of type string, got %T instead", value) } sv.Status = types.FirewallStatusValue(jtv) } case "SyncStates": if err := awsAwsjson10_deserializeDocumentSyncStates(&sv.SyncStates, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentFlags(v *[]types.TCPFlag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.TCPFlag if *v == nil { cv = []types.TCPFlag{} } else { cv = *v } for _, value := range shape { var col types.TCPFlag if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TCPFlag to be of type string, got %T instead", value) } col = types.TCPFlag(jtv) } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentHeader(v **types.Header, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Header if *v == nil { sv = &types.Header{} } else { sv = *v } for key, value := range shape { switch key { case "Destination": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Destination to be of type string, got %T instead", value) } sv.Destination = ptr.String(jtv) } case "DestinationPort": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Port to be of type string, got %T instead", value) } sv.DestinationPort = ptr.String(jtv) } case "Direction": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StatefulRuleDirection to be of type string, got %T instead", value) } sv.Direction = types.StatefulRuleDirection(jtv) } case "Protocol": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StatefulRuleProtocol to be of type string, got %T instead", value) } sv.Protocol = types.StatefulRuleProtocol(jtv) } case "Source": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Source to be of type string, got %T instead", value) } sv.Source = ptr.String(jtv) } case "SourcePort": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Port to be of type string, got %T instead", value) } sv.SourcePort = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentInsufficientCapacityException(v **types.InsufficientCapacityException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InsufficientCapacityException if *v == nil { sv = &types.InsufficientCapacityException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentInternalServerError(v **types.InternalServerError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InternalServerError if *v == nil { sv = &types.InternalServerError{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentInvalidOperationException(v **types.InvalidOperationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidOperationException if *v == nil { sv = &types.InvalidOperationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidRequestException if *v == nil { sv = &types.InvalidRequestException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentInvalidResourcePolicyException(v **types.InvalidResourcePolicyException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidResourcePolicyException if *v == nil { sv = &types.InvalidResourcePolicyException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentInvalidTokenException(v **types.InvalidTokenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.InvalidTokenException if *v == nil { sv = &types.InvalidTokenException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentIPSet(v **types.IPSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IPSet if *v == nil { sv = &types.IPSet{} } else { sv = *v } for key, value := range shape { switch key { case "Definition": if err := awsAwsjson10_deserializeDocumentVariableDefinitionList(&sv.Definition, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentIPSetMetadata(v **types.IPSetMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IPSetMetadata if *v == nil { sv = &types.IPSetMetadata{} } else { sv = *v } for key, value := range shape { switch key { case "ResolvedCIDRCount": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected CIDRCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ResolvedCIDRCount = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentIPSetMetadataMap(v *map[string]types.IPSetMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]types.IPSetMetadata if *v == nil { mv = map[string]types.IPSetMetadata{} } else { mv = *v } for key, value := range shape { var parsedVal types.IPSetMetadata mapVar := parsedVal destAddr := &mapVar if err := awsAwsjson10_deserializeDocumentIPSetMetadata(&destAddr, value); err != nil { return err } parsedVal = *destAddr mv[key] = parsedVal } *v = mv return nil } func awsAwsjson10_deserializeDocumentIPSetReference(v **types.IPSetReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.IPSetReference if *v == nil { sv = &types.IPSetReference{} } else { sv = *v } for key, value := range shape { switch key { case "ReferenceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ReferenceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentIPSetReferenceMap(v *map[string]types.IPSetReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]types.IPSetReference if *v == nil { mv = map[string]types.IPSetReference{} } else { mv = *v } for key, value := range shape { var parsedVal types.IPSetReference mapVar := parsedVal destAddr := &mapVar if err := awsAwsjson10_deserializeDocumentIPSetReference(&destAddr, value); err != nil { return err } parsedVal = *destAddr mv[key] = parsedVal } *v = mv return nil } func awsAwsjson10_deserializeDocumentIPSets(v *map[string]types.IPSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]types.IPSet if *v == nil { mv = map[string]types.IPSet{} } else { mv = *v } for key, value := range shape { var parsedVal types.IPSet mapVar := parsedVal destAddr := &mapVar if err := awsAwsjson10_deserializeDocumentIPSet(&destAddr, value); err != nil { return err } parsedVal = *destAddr mv[key] = parsedVal } *v = mv return nil } func awsAwsjson10_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LimitExceededException if *v == nil { sv = &types.LimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentLogDestinationConfig(v **types.LogDestinationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LogDestinationConfig if *v == nil { sv = &types.LogDestinationConfig{} } else { sv = *v } for key, value := range shape { switch key { case "LogDestination": if err := awsAwsjson10_deserializeDocumentLogDestinationMap(&sv.LogDestination, value); err != nil { return err } case "LogDestinationType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LogDestinationType to be of type string, got %T instead", value) } sv.LogDestinationType = types.LogDestinationType(jtv) } case "LogType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LogType to be of type string, got %T instead", value) } sv.LogType = types.LogType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentLogDestinationConfigs(v *[]types.LogDestinationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.LogDestinationConfig if *v == nil { cv = []types.LogDestinationConfig{} } else { cv = *v } for _, value := range shape { var col types.LogDestinationConfig destAddr := &col if err := awsAwsjson10_deserializeDocumentLogDestinationConfig(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentLogDestinationMap(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]string if *v == nil { mv = map[string]string{} } else { mv = *v } for key, value := range shape { var parsedVal string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HashMapValue to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsAwsjson10_deserializeDocumentLogDestinationPermissionException(v **types.LogDestinationPermissionException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LogDestinationPermissionException if *v == nil { sv = &types.LogDestinationPermissionException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentLoggingConfiguration(v **types.LoggingConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.LoggingConfiguration if *v == nil { sv = &types.LoggingConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "LogDestinationConfigs": if err := awsAwsjson10_deserializeDocumentLogDestinationConfigs(&sv.LogDestinationConfigs, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentMatchAttributes(v **types.MatchAttributes, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.MatchAttributes if *v == nil { sv = &types.MatchAttributes{} } else { sv = *v } for key, value := range shape { switch key { case "DestinationPorts": if err := awsAwsjson10_deserializeDocumentPortRanges(&sv.DestinationPorts, value); err != nil { return err } case "Destinations": if err := awsAwsjson10_deserializeDocumentAddresses(&sv.Destinations, value); err != nil { return err } case "Protocols": if err := awsAwsjson10_deserializeDocumentProtocolNumbers(&sv.Protocols, value); err != nil { return err } case "SourcePorts": if err := awsAwsjson10_deserializeDocumentPortRanges(&sv.SourcePorts, value); err != nil { return err } case "Sources": if err := awsAwsjson10_deserializeDocumentAddresses(&sv.Sources, value); err != nil { return err } case "TCPFlags": if err := awsAwsjson10_deserializeDocumentTCPFlags(&sv.TCPFlags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentPerObjectStatus(v **types.PerObjectStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PerObjectStatus if *v == nil { sv = &types.PerObjectStatus{} } else { sv = *v } for key, value := range shape { switch key { case "SyncStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PerObjectSyncStatus to be of type string, got %T instead", value) } sv.SyncStatus = types.PerObjectSyncStatus(jtv) } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentPolicyVariables(v **types.PolicyVariables, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PolicyVariables if *v == nil { sv = &types.PolicyVariables{} } else { sv = *v } for key, value := range shape { switch key { case "RuleVariables": if err := awsAwsjson10_deserializeDocumentIPSets(&sv.RuleVariables, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentPortRange(v **types.PortRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PortRange if *v == nil { sv = &types.PortRange{} } else { sv = *v } for key, value := range shape { switch key { case "FromPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortRangeBound to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.FromPort = int32(i64) } case "ToPort": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected PortRangeBound to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ToPort = int32(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentPortRanges(v *[]types.PortRange, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.PortRange if *v == nil { cv = []types.PortRange{} } else { cv = *v } for _, value := range shape { var col types.PortRange destAddr := &col if err := awsAwsjson10_deserializeDocumentPortRange(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentPortSet(v **types.PortSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PortSet if *v == nil { sv = &types.PortSet{} } else { sv = *v } for key, value := range shape { switch key { case "Definition": if err := awsAwsjson10_deserializeDocumentVariableDefinitionList(&sv.Definition, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentPortSets(v *map[string]types.PortSet, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]types.PortSet if *v == nil { mv = map[string]types.PortSet{} } else { mv = *v } for key, value := range shape { var parsedVal types.PortSet mapVar := parsedVal destAddr := &mapVar if err := awsAwsjson10_deserializeDocumentPortSet(&destAddr, value); err != nil { return err } parsedVal = *destAddr mv[key] = parsedVal } *v = mv return nil } func awsAwsjson10_deserializeDocumentProtocolNumbers(v *[]int32, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []int32 if *v == nil { cv = []int32{} } else { cv = *v } for _, value := range shape { var col int32 if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ProtocolNumber to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } col = int32(i64) } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentPublishMetricAction(v **types.PublishMetricAction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.PublishMetricAction if *v == nil { sv = &types.PublishMetricAction{} } else { sv = *v } for key, value := range shape { switch key { case "Dimensions": if err := awsAwsjson10_deserializeDocumentDimensions(&sv.Dimensions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentReferenceSets(v **types.ReferenceSets, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ReferenceSets if *v == nil { sv = &types.ReferenceSets{} } else { sv = *v } for key, value := range shape { switch key { case "IPSetReferences": if err := awsAwsjson10_deserializeDocumentIPSetReferenceMap(&sv.IPSetReferences, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentResourceOwnerCheckException(v **types.ResourceOwnerCheckException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceOwnerCheckException if *v == nil { sv = &types.ResourceOwnerCheckException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRuleDefinition(v **types.RuleDefinition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleDefinition if *v == nil { sv = &types.RuleDefinition{} } else { sv = *v } for key, value := range shape { switch key { case "Actions": if err := awsAwsjson10_deserializeDocumentStatelessActions(&sv.Actions, value); err != nil { return err } case "MatchAttributes": if err := awsAwsjson10_deserializeDocumentMatchAttributes(&sv.MatchAttributes, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRuleGroup(v **types.RuleGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleGroup if *v == nil { sv = &types.RuleGroup{} } else { sv = *v } for key, value := range shape { switch key { case "ReferenceSets": if err := awsAwsjson10_deserializeDocumentReferenceSets(&sv.ReferenceSets, value); err != nil { return err } case "RulesSource": if err := awsAwsjson10_deserializeDocumentRulesSource(&sv.RulesSource, value); err != nil { return err } case "RuleVariables": if err := awsAwsjson10_deserializeDocumentRuleVariables(&sv.RuleVariables, value); err != nil { return err } case "StatefulRuleOptions": if err := awsAwsjson10_deserializeDocumentStatefulRuleOptions(&sv.StatefulRuleOptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRuleGroupMetadata(v **types.RuleGroupMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleGroupMetadata if *v == nil { sv = &types.RuleGroupMetadata{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRuleGroupResponse(v **types.RuleGroupResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleGroupResponse if *v == nil { sv = &types.RuleGroupResponse{} } else { sv = *v } for key, value := range shape { switch key { case "Capacity": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RuleCapacity to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Capacity = ptr.Int32(int32(i64)) } case "ConsumedCapacity": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RuleCapacity to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ConsumedCapacity = ptr.Int32(int32(i64)) } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EncryptionConfiguration": if err := awsAwsjson10_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { return err } case "LastModifiedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected LastUpdateTime to be a JSON Number, got %T instead", value) } } case "NumberOfAssociations": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected NumberOfAssociations to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.NumberOfAssociations = ptr.Int32(int32(i64)) } case "RuleGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.RuleGroupArn = ptr.String(jtv) } case "RuleGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.RuleGroupId = ptr.String(jtv) } case "RuleGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.RuleGroupName = ptr.String(jtv) } case "RuleGroupStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) } sv.RuleGroupStatus = types.ResourceStatus(jtv) } case "SnsTopic": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.SnsTopic = ptr.String(jtv) } case "SourceMetadata": if err := awsAwsjson10_deserializeDocumentSourceMetadata(&sv.SourceMetadata, value); err != nil { return err } case "Tags": if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RuleGroupType to be of type string, got %T instead", value) } sv.Type = types.RuleGroupType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRuleGroups(v *[]types.RuleGroupMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.RuleGroupMetadata if *v == nil { cv = []types.RuleGroupMetadata{} } else { cv = *v } for _, value := range shape { var col types.RuleGroupMetadata destAddr := &col if err := awsAwsjson10_deserializeDocumentRuleGroupMetadata(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentRuleOption(v **types.RuleOption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleOption if *v == nil { sv = &types.RuleOption{} } else { sv = *v } for key, value := range shape { switch key { case "Keyword": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Keyword to be of type string, got %T instead", value) } sv.Keyword = ptr.String(jtv) } case "Settings": if err := awsAwsjson10_deserializeDocumentSettings(&sv.Settings, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRuleOptions(v *[]types.RuleOption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.RuleOption if *v == nil { cv = []types.RuleOption{} } else { cv = *v } for _, value := range shape { var col types.RuleOption destAddr := &col if err := awsAwsjson10_deserializeDocumentRuleOption(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentRulesSource(v **types.RulesSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RulesSource if *v == nil { sv = &types.RulesSource{} } else { sv = *v } for key, value := range shape { switch key { case "RulesSourceList": if err := awsAwsjson10_deserializeDocumentRulesSourceList(&sv.RulesSourceList, value); err != nil { return err } case "RulesString": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RulesString to be of type string, got %T instead", value) } sv.RulesString = ptr.String(jtv) } case "StatefulRules": if err := awsAwsjson10_deserializeDocumentStatefulRules(&sv.StatefulRules, value); err != nil { return err } case "StatelessRulesAndCustomActions": if err := awsAwsjson10_deserializeDocumentStatelessRulesAndCustomActions(&sv.StatelessRulesAndCustomActions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRulesSourceList(v **types.RulesSourceList, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RulesSourceList if *v == nil { sv = &types.RulesSourceList{} } else { sv = *v } for key, value := range shape { switch key { case "GeneratedRulesType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GeneratedRulesType to be of type string, got %T instead", value) } sv.GeneratedRulesType = types.GeneratedRulesType(jtv) } case "Targets": if err := awsAwsjson10_deserializeDocumentRuleTargets(&sv.Targets, value); err != nil { return err } case "TargetTypes": if err := awsAwsjson10_deserializeDocumentTargetTypes(&sv.TargetTypes, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentRuleTargets(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CollectionMember_String to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentRuleVariables(v **types.RuleVariables, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.RuleVariables if *v == nil { sv = &types.RuleVariables{} } else { sv = *v } for key, value := range shape { switch key { case "IPSets": if err := awsAwsjson10_deserializeDocumentIPSets(&sv.IPSets, value); err != nil { return err } case "PortSets": if err := awsAwsjson10_deserializeDocumentPortSets(&sv.PortSets, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentServerCertificate(v **types.ServerCertificate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ServerCertificate if *v == nil { sv = &types.ServerCertificate{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentServerCertificateConfiguration(v **types.ServerCertificateConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ServerCertificateConfiguration if *v == nil { sv = &types.ServerCertificateConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "Scopes": if err := awsAwsjson10_deserializeDocumentServerCertificateScopes(&sv.Scopes, value); err != nil { return err } case "ServerCertificates": if err := awsAwsjson10_deserializeDocumentServerCertificates(&sv.ServerCertificates, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentServerCertificateConfigurations(v *[]types.ServerCertificateConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ServerCertificateConfiguration if *v == nil { cv = []types.ServerCertificateConfiguration{} } else { cv = *v } for _, value := range shape { var col types.ServerCertificateConfiguration destAddr := &col if err := awsAwsjson10_deserializeDocumentServerCertificateConfiguration(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentServerCertificates(v *[]types.ServerCertificate, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ServerCertificate if *v == nil { cv = []types.ServerCertificate{} } else { cv = *v } for _, value := range shape { var col types.ServerCertificate destAddr := &col if err := awsAwsjson10_deserializeDocumentServerCertificate(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentServerCertificateScope(v **types.ServerCertificateScope, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ServerCertificateScope if *v == nil { sv = &types.ServerCertificateScope{} } else { sv = *v } for key, value := range shape { switch key { case "DestinationPorts": if err := awsAwsjson10_deserializeDocumentPortRanges(&sv.DestinationPorts, value); err != nil { return err } case "Destinations": if err := awsAwsjson10_deserializeDocumentAddresses(&sv.Destinations, value); err != nil { return err } case "Protocols": if err := awsAwsjson10_deserializeDocumentProtocolNumbers(&sv.Protocols, value); err != nil { return err } case "SourcePorts": if err := awsAwsjson10_deserializeDocumentPortRanges(&sv.SourcePorts, value); err != nil { return err } case "Sources": if err := awsAwsjson10_deserializeDocumentAddresses(&sv.Sources, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentServerCertificateScopes(v *[]types.ServerCertificateScope, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.ServerCertificateScope if *v == nil { cv = []types.ServerCertificateScope{} } else { cv = *v } for _, value := range shape { var col types.ServerCertificateScope destAddr := &col if err := awsAwsjson10_deserializeDocumentServerCertificateScope(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentSettings(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Setting to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentSourceMetadata(v **types.SourceMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SourceMetadata if *v == nil { sv = &types.SourceMetadata{} } else { sv = *v } for key, value := range shape { switch key { case "SourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.SourceArn = ptr.String(jtv) } case "SourceUpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.SourceUpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStatefulActions(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CollectionMember_String to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentStatefulEngineOptions(v **types.StatefulEngineOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StatefulEngineOptions if *v == nil { sv = &types.StatefulEngineOptions{} } else { sv = *v } for key, value := range shape { switch key { case "RuleOrder": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RuleOrder to be of type string, got %T instead", value) } sv.RuleOrder = types.RuleOrder(jtv) } case "StreamExceptionPolicy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StreamExceptionPolicy to be of type string, got %T instead", value) } sv.StreamExceptionPolicy = types.StreamExceptionPolicy(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStatefulRule(v **types.StatefulRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StatefulRule if *v == nil { sv = &types.StatefulRule{} } else { sv = *v } for key, value := range shape { switch key { case "Action": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StatefulAction to be of type string, got %T instead", value) } sv.Action = types.StatefulAction(jtv) } case "Header": if err := awsAwsjson10_deserializeDocumentHeader(&sv.Header, value); err != nil { return err } case "RuleOptions": if err := awsAwsjson10_deserializeDocumentRuleOptions(&sv.RuleOptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStatefulRuleGroupOverride(v **types.StatefulRuleGroupOverride, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StatefulRuleGroupOverride if *v == nil { sv = &types.StatefulRuleGroupOverride{} } else { sv = *v } for key, value := range shape { switch key { case "Action": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected OverrideAction to be of type string, got %T instead", value) } sv.Action = types.OverrideAction(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStatefulRuleGroupReference(v **types.StatefulRuleGroupReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StatefulRuleGroupReference if *v == nil { sv = &types.StatefulRuleGroupReference{} } else { sv = *v } for key, value := range shape { switch key { case "Override": if err := awsAwsjson10_deserializeDocumentStatefulRuleGroupOverride(&sv.Override, value); err != nil { return err } case "Priority": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Priority to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Priority = ptr.Int32(int32(i64)) } case "ResourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStatefulRuleGroupReferences(v *[]types.StatefulRuleGroupReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.StatefulRuleGroupReference if *v == nil { cv = []types.StatefulRuleGroupReference{} } else { cv = *v } for _, value := range shape { var col types.StatefulRuleGroupReference destAddr := &col if err := awsAwsjson10_deserializeDocumentStatefulRuleGroupReference(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentStatefulRuleOptions(v **types.StatefulRuleOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StatefulRuleOptions if *v == nil { sv = &types.StatefulRuleOptions{} } else { sv = *v } for key, value := range shape { switch key { case "RuleOrder": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RuleOrder to be of type string, got %T instead", value) } sv.RuleOrder = types.RuleOrder(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStatefulRules(v *[]types.StatefulRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.StatefulRule if *v == nil { cv = []types.StatefulRule{} } else { cv = *v } for _, value := range shape { var col types.StatefulRule destAddr := &col if err := awsAwsjson10_deserializeDocumentStatefulRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentStatelessActions(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CollectionMember_String to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentStatelessRule(v **types.StatelessRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StatelessRule if *v == nil { sv = &types.StatelessRule{} } else { sv = *v } for key, value := range shape { switch key { case "Priority": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Priority to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Priority = int32(i64) } case "RuleDefinition": if err := awsAwsjson10_deserializeDocumentRuleDefinition(&sv.RuleDefinition, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStatelessRuleGroupReference(v **types.StatelessRuleGroupReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StatelessRuleGroupReference if *v == nil { sv = &types.StatelessRuleGroupReference{} } else { sv = *v } for key, value := range shape { switch key { case "Priority": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Priority to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Priority = int32(i64) } case "ResourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.ResourceArn = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentStatelessRuleGroupReferences(v *[]types.StatelessRuleGroupReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.StatelessRuleGroupReference if *v == nil { cv = []types.StatelessRuleGroupReference{} } else { cv = *v } for _, value := range shape { var col types.StatelessRuleGroupReference destAddr := &col if err := awsAwsjson10_deserializeDocumentStatelessRuleGroupReference(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentStatelessRules(v *[]types.StatelessRule, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.StatelessRule if *v == nil { cv = []types.StatelessRule{} } else { cv = *v } for _, value := range shape { var col types.StatelessRule destAddr := &col if err := awsAwsjson10_deserializeDocumentStatelessRule(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentStatelessRulesAndCustomActions(v **types.StatelessRulesAndCustomActions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.StatelessRulesAndCustomActions if *v == nil { sv = &types.StatelessRulesAndCustomActions{} } else { sv = *v } for key, value := range shape { switch key { case "CustomActions": if err := awsAwsjson10_deserializeDocumentCustomActions(&sv.CustomActions, value); err != nil { return err } case "StatelessRules": if err := awsAwsjson10_deserializeDocumentStatelessRules(&sv.StatelessRules, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentSubnetMapping(v **types.SubnetMapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SubnetMapping if *v == nil { sv = &types.SubnetMapping{} } else { sv = *v } for key, value := range shape { switch key { case "IPAddressType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected IPAddressType to be of type string, got %T instead", value) } sv.IPAddressType = types.IPAddressType(jtv) } case "SubnetId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CollectionMember_String to be of type string, got %T instead", value) } sv.SubnetId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentSubnetMappings(v *[]types.SubnetMapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.SubnetMapping if *v == nil { cv = []types.SubnetMapping{} } else { cv = *v } for _, value := range shape { var col types.SubnetMapping destAddr := &col if err := awsAwsjson10_deserializeDocumentSubnetMapping(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentSyncState(v **types.SyncState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.SyncState if *v == nil { sv = &types.SyncState{} } else { sv = *v } for key, value := range shape { switch key { case "Attachment": if err := awsAwsjson10_deserializeDocumentAttachment(&sv.Attachment, value); err != nil { return err } case "Config": if err := awsAwsjson10_deserializeDocumentSyncStateConfig(&sv.Config, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentSyncStateConfig(v *map[string]types.PerObjectStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]types.PerObjectStatus if *v == nil { mv = map[string]types.PerObjectStatus{} } else { mv = *v } for key, value := range shape { var parsedVal types.PerObjectStatus mapVar := parsedVal destAddr := &mapVar if err := awsAwsjson10_deserializeDocumentPerObjectStatus(&destAddr, value); err != nil { return err } parsedVal = *destAddr mv[key] = parsedVal } *v = mv return nil } func awsAwsjson10_deserializeDocumentSyncStates(v *map[string]types.SyncState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var mv map[string]types.SyncState if *v == nil { mv = map[string]types.SyncState{} } else { mv = *v } for key, value := range shape { var parsedVal types.SyncState mapVar := parsedVal destAddr := &mapVar if err := awsAwsjson10_deserializeDocumentSyncState(&destAddr, value); err != nil { return err } parsedVal = *destAddr mv[key] = parsedVal } *v = mv return nil } func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Tag if *v == nil { sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { case "Key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Tag if *v == nil { cv = []types.Tag{} } else { cv = *v } for _, value := range shape { var col types.Tag destAddr := &col if err := awsAwsjson10_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentTargetTypes(v *[]types.TargetType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.TargetType if *v == nil { cv = []types.TargetType{} } else { cv = *v } for _, value := range shape { var col types.TargetType if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TargetType to be of type string, got %T instead", value) } col = types.TargetType(jtv) } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentTCPFlagField(v **types.TCPFlagField, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TCPFlagField if *v == nil { sv = &types.TCPFlagField{} } else { sv = *v } for key, value := range shape { switch key { case "Flags": if err := awsAwsjson10_deserializeDocumentFlags(&sv.Flags, value); err != nil { return err } case "Masks": if err := awsAwsjson10_deserializeDocumentFlags(&sv.Masks, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTCPFlags(v *[]types.TCPFlagField, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.TCPFlagField if *v == nil { cv = []types.TCPFlagField{} } else { cv = *v } for _, value := range shape { var col types.TCPFlagField destAddr := &col if err := awsAwsjson10_deserializeDocumentTCPFlagField(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ThrottlingException if *v == nil { sv = &types.ThrottlingException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTlsCertificateData(v **types.TlsCertificateData, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TlsCertificateData if *v == nil { sv = &types.TlsCertificateData{} } else { sv = *v } for key, value := range shape { switch key { case "CertificateArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.CertificateArn = ptr.String(jtv) } case "CertificateSerial": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CollectionMember_String to be of type string, got %T instead", value) } sv.CertificateSerial = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CollectionMember_String to be of type string, got %T instead", value) } sv.Status = ptr.String(jtv) } case "StatusMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StatusReason to be of type string, got %T instead", value) } sv.StatusMessage = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTLSInspectionConfiguration(v **types.TLSInspectionConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TLSInspectionConfiguration if *v == nil { sv = &types.TLSInspectionConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "ServerCertificateConfigurations": if err := awsAwsjson10_deserializeDocumentServerCertificateConfigurations(&sv.ServerCertificateConfigurations, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTLSInspectionConfigurationMetadata(v **types.TLSInspectionConfigurationMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TLSInspectionConfigurationMetadata if *v == nil { sv = &types.TLSInspectionConfigurationMetadata{} } else { sv = *v } for key, value := range shape { switch key { case "Arn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTLSInspectionConfigurationResponse(v **types.TLSInspectionConfigurationResponse, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.TLSInspectionConfigurationResponse if *v == nil { sv = &types.TLSInspectionConfigurationResponse{} } else { sv = *v } for key, value := range shape { switch key { case "Certificates": if err := awsAwsjson10_deserializeDocumentCertificates(&sv.Certificates, value); err != nil { return err } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "EncryptionConfiguration": if err := awsAwsjson10_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { return err } case "LastModifiedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected LastUpdateTime to be a JSON Number, got %T instead", value) } } case "NumberOfAssociations": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected NumberOfAssociations to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.NumberOfAssociations = ptr.Int32(int32(i64)) } case "Tags": if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } case "TLSInspectionConfigurationArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.TLSInspectionConfigurationArn = ptr.String(jtv) } case "TLSInspectionConfigurationId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } sv.TLSInspectionConfigurationId = ptr.String(jtv) } case "TLSInspectionConfigurationName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.TLSInspectionConfigurationName = ptr.String(jtv) } case "TLSInspectionConfigurationStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceStatus to be of type string, got %T instead", value) } sv.TLSInspectionConfigurationStatus = types.ResourceStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentTLSInspectionConfigurations(v *[]types.TLSInspectionConfigurationMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.TLSInspectionConfigurationMetadata if *v == nil { cv = []types.TLSInspectionConfigurationMetadata{} } else { cv = *v } for _, value := range shape { var col types.TLSInspectionConfigurationMetadata destAddr := &col if err := awsAwsjson10_deserializeDocumentTLSInspectionConfigurationMetadata(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeDocumentUnsupportedOperationException(v **types.UnsupportedOperationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.UnsupportedOperationException if *v == nil { sv = &types.UnsupportedOperationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeDocumentVariableDefinitionList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []string if *v == nil { cv = []string{} } else { cv = *v } for _, value := range shape { var col string if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected VariableDefinition to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson10_deserializeOpDocumentAssociateFirewallPolicyOutput(v **AssociateFirewallPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AssociateFirewallPolicyOutput if *v == nil { sv = &AssociateFirewallPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "FirewallPolicyArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallPolicyArn = ptr.String(jtv) } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentAssociateSubnetsOutput(v **AssociateSubnetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *AssociateSubnetsOutput if *v == nil { sv = &AssociateSubnetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "SubnetMappings": if err := awsAwsjson10_deserializeDocumentSubnetMappings(&sv.SubnetMappings, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentCreateFirewallOutput(v **CreateFirewallOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateFirewallOutput if *v == nil { sv = &CreateFirewallOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Firewall": if err := awsAwsjson10_deserializeDocumentFirewall(&sv.Firewall, value); err != nil { return err } case "FirewallStatus": if err := awsAwsjson10_deserializeDocumentFirewallStatus(&sv.FirewallStatus, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentCreateFirewallPolicyOutput(v **CreateFirewallPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateFirewallPolicyOutput if *v == nil { sv = &CreateFirewallPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallPolicyResponse": if err := awsAwsjson10_deserializeDocumentFirewallPolicyResponse(&sv.FirewallPolicyResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentCreateRuleGroupOutput(v **CreateRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateRuleGroupOutput if *v == nil { sv = &CreateRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RuleGroupResponse": if err := awsAwsjson10_deserializeDocumentRuleGroupResponse(&sv.RuleGroupResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentCreateTLSInspectionConfigurationOutput(v **CreateTLSInspectionConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *CreateTLSInspectionConfigurationOutput if *v == nil { sv = &CreateTLSInspectionConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "TLSInspectionConfigurationResponse": if err := awsAwsjson10_deserializeDocumentTLSInspectionConfigurationResponse(&sv.TLSInspectionConfigurationResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDeleteFirewallOutput(v **DeleteFirewallOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteFirewallOutput if *v == nil { sv = &DeleteFirewallOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Firewall": if err := awsAwsjson10_deserializeDocumentFirewall(&sv.Firewall, value); err != nil { return err } case "FirewallStatus": if err := awsAwsjson10_deserializeDocumentFirewallStatus(&sv.FirewallStatus, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDeleteFirewallPolicyOutput(v **DeleteFirewallPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteFirewallPolicyOutput if *v == nil { sv = &DeleteFirewallPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallPolicyResponse": if err := awsAwsjson10_deserializeDocumentFirewallPolicyResponse(&sv.FirewallPolicyResponse, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDeleteResourcePolicyOutput(v **DeleteResourcePolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteResourcePolicyOutput if *v == nil { sv = &DeleteResourcePolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDeleteRuleGroupOutput(v **DeleteRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteRuleGroupOutput if *v == nil { sv = &DeleteRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RuleGroupResponse": if err := awsAwsjson10_deserializeDocumentRuleGroupResponse(&sv.RuleGroupResponse, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDeleteTLSInspectionConfigurationOutput(v **DeleteTLSInspectionConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DeleteTLSInspectionConfigurationOutput if *v == nil { sv = &DeleteTLSInspectionConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "TLSInspectionConfigurationResponse": if err := awsAwsjson10_deserializeDocumentTLSInspectionConfigurationResponse(&sv.TLSInspectionConfigurationResponse, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDescribeFirewallOutput(v **DescribeFirewallOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeFirewallOutput if *v == nil { sv = &DescribeFirewallOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Firewall": if err := awsAwsjson10_deserializeDocumentFirewall(&sv.Firewall, value); err != nil { return err } case "FirewallStatus": if err := awsAwsjson10_deserializeDocumentFirewallStatus(&sv.FirewallStatus, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDescribeFirewallPolicyOutput(v **DescribeFirewallPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeFirewallPolicyOutput if *v == nil { sv = &DescribeFirewallPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallPolicy": if err := awsAwsjson10_deserializeDocumentFirewallPolicy(&sv.FirewallPolicy, value); err != nil { return err } case "FirewallPolicyResponse": if err := awsAwsjson10_deserializeDocumentFirewallPolicyResponse(&sv.FirewallPolicyResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDescribeLoggingConfigurationOutput(v **DescribeLoggingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeLoggingConfigurationOutput if *v == nil { sv = &DescribeLoggingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "LoggingConfiguration": if err := awsAwsjson10_deserializeDocumentLoggingConfiguration(&sv.LoggingConfiguration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDescribeResourcePolicyOutput(v **DescribeResourcePolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeResourcePolicyOutput if *v == nil { sv = &DescribeResourcePolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Policy": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PolicyString to be of type string, got %T instead", value) } sv.Policy = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDescribeRuleGroupMetadataOutput(v **DescribeRuleGroupMetadataOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeRuleGroupMetadataOutput if *v == nil { sv = &DescribeRuleGroupMetadataOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Capacity": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected RuleCapacity to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Capacity = ptr.Int32(int32(i64)) } case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "LastModifiedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastModifiedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected LastUpdateTime to be a JSON Number, got %T instead", value) } } case "RuleGroupArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.RuleGroupArn = ptr.String(jtv) } case "RuleGroupName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.RuleGroupName = ptr.String(jtv) } case "StatefulRuleOptions": if err := awsAwsjson10_deserializeDocumentStatefulRuleOptions(&sv.StatefulRuleOptions, value); err != nil { return err } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RuleGroupType to be of type string, got %T instead", value) } sv.Type = types.RuleGroupType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDescribeRuleGroupOutput(v **DescribeRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeRuleGroupOutput if *v == nil { sv = &DescribeRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RuleGroup": if err := awsAwsjson10_deserializeDocumentRuleGroup(&sv.RuleGroup, value); err != nil { return err } case "RuleGroupResponse": if err := awsAwsjson10_deserializeDocumentRuleGroupResponse(&sv.RuleGroupResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDescribeTLSInspectionConfigurationOutput(v **DescribeTLSInspectionConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DescribeTLSInspectionConfigurationOutput if *v == nil { sv = &DescribeTLSInspectionConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "TLSInspectionConfiguration": if err := awsAwsjson10_deserializeDocumentTLSInspectionConfiguration(&sv.TLSInspectionConfiguration, value); err != nil { return err } case "TLSInspectionConfigurationResponse": if err := awsAwsjson10_deserializeDocumentTLSInspectionConfigurationResponse(&sv.TLSInspectionConfigurationResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentDisassociateSubnetsOutput(v **DisassociateSubnetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *DisassociateSubnetsOutput if *v == nil { sv = &DisassociateSubnetsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "SubnetMappings": if err := awsAwsjson10_deserializeDocumentSubnetMappings(&sv.SubnetMappings, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListFirewallPoliciesOutput(v **ListFirewallPoliciesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListFirewallPoliciesOutput if *v == nil { sv = &ListFirewallPoliciesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallPolicies": if err := awsAwsjson10_deserializeDocumentFirewallPolicies(&sv.FirewallPolicies, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListFirewallsOutput(v **ListFirewallsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListFirewallsOutput if *v == nil { sv = &ListFirewallsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Firewalls": if err := awsAwsjson10_deserializeDocumentFirewalls(&sv.Firewalls, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListRuleGroupsOutput(v **ListRuleGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListRuleGroupsOutput if *v == nil { sv = &ListRuleGroupsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "RuleGroups": if err := awsAwsjson10_deserializeDocumentRuleGroups(&sv.RuleGroups, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Tags": if err := awsAwsjson10_deserializeDocumentTagList(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentListTLSInspectionConfigurationsOutput(v **ListTLSInspectionConfigurationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTLSInspectionConfigurationsOutput if *v == nil { sv = &ListTLSInspectionConfigurationsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "TLSInspectionConfigurations": if err := awsAwsjson10_deserializeDocumentTLSInspectionConfigurations(&sv.TLSInspectionConfigurations, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *PutResourcePolicyOutput if *v == nil { sv = &PutResourcePolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *TagResourceOutput if *v == nil { sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UntagResourceOutput if *v == nil { sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateFirewallDeleteProtectionOutput(v **UpdateFirewallDeleteProtectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateFirewallDeleteProtectionOutput if *v == nil { sv = &UpdateFirewallDeleteProtectionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DeleteProtection": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.DeleteProtection = jtv } case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateFirewallDescriptionOutput(v **UpdateFirewallDescriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateFirewallDescriptionOutput if *v == nil { sv = &UpdateFirewallDescriptionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateFirewallEncryptionConfigurationOutput(v **UpdateFirewallEncryptionConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateFirewallEncryptionConfigurationOutput if *v == nil { sv = &UpdateFirewallEncryptionConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EncryptionConfiguration": if err := awsAwsjson10_deserializeDocumentEncryptionConfiguration(&sv.EncryptionConfiguration, value); err != nil { return err } case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateFirewallPolicyChangeProtectionOutput(v **UpdateFirewallPolicyChangeProtectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateFirewallPolicyChangeProtectionOutput if *v == nil { sv = &UpdateFirewallPolicyChangeProtectionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "FirewallPolicyChangeProtection": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.FirewallPolicyChangeProtection = jtv } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateFirewallPolicyOutput(v **UpdateFirewallPolicyOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateFirewallPolicyOutput if *v == nil { sv = &UpdateFirewallPolicyOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallPolicyResponse": if err := awsAwsjson10_deserializeDocumentFirewallPolicyResponse(&sv.FirewallPolicyResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateLoggingConfigurationOutput(v **UpdateLoggingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateLoggingConfigurationOutput if *v == nil { sv = &UpdateLoggingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "LoggingConfiguration": if err := awsAwsjson10_deserializeDocumentLoggingConfiguration(&sv.LoggingConfiguration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateRuleGroupOutput(v **UpdateRuleGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateRuleGroupOutput if *v == nil { sv = &UpdateRuleGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { case "RuleGroupResponse": if err := awsAwsjson10_deserializeDocumentRuleGroupResponse(&sv.RuleGroupResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateSubnetChangeProtectionOutput(v **UpdateSubnetChangeProtectionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateSubnetChangeProtectionOutput if *v == nil { sv = &UpdateSubnetChangeProtectionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "FirewallArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceArn to be of type string, got %T instead", value) } sv.FirewallArn = ptr.String(jtv) } case "FirewallName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) } sv.FirewallName = ptr.String(jtv) } case "SubnetChangeProtection": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } sv.SubnetChangeProtection = jtv } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson10_deserializeOpDocumentUpdateTLSInspectionConfigurationOutput(v **UpdateTLSInspectionConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UpdateTLSInspectionConfigurationOutput if *v == nil { sv = &UpdateTLSInspectionConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "TLSInspectionConfigurationResponse": if err := awsAwsjson10_deserializeDocumentTLSInspectionConfigurationResponse(&sv.TLSInspectionConfigurationResponse, value); err != nil { return err } case "UpdateToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UpdateToken to be of type string, got %T instead", value) } sv.UpdateToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
11,353
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package networkfirewall provides the API client, operations, and parameter // types for AWS Network Firewall. // // This is the API Reference for Network Firewall. This guide is for developers // who need detailed information about the Network Firewall API actions, data // types, and errors. // - The REST API requires you to handle connection details, such as calculating // signatures, handling request retries, and error handling. For general // information about using the Amazon Web Services REST APIs, see Amazon Web // Services APIs (https://docs.aws.amazon.com/general/latest/gr/aws-apis.html) . // To access Network Firewall using the REST API endpoint: // https://network-firewall..amazonaws.com // - Alternatively, you can use one of the Amazon Web Services SDKs to access an // API that's tailored to the programming language or platform that you're using. // For more information, see Amazon Web Services SDKs (http://aws.amazon.com/tools/#SDKs) // . // - For descriptions of Network Firewall features, including and step-by-step // instructions on how to use them through the Network Firewall console, see the // Network Firewall Developer Guide (https://docs.aws.amazon.com/network-firewall/latest/developerguide/) // . // // Network Firewall is a stateful, managed, network firewall and intrusion // detection and prevention service for Amazon Virtual Private Cloud (Amazon VPC). // With Network Firewall, you can filter traffic at the perimeter of your VPC. This // includes filtering traffic going to and coming from an internet gateway, NAT // gateway, or over VPN or Direct Connect. Network Firewall uses rules that are // compatible with Suricata, a free, open source network analysis and threat // detection engine. Network Firewall supports Suricata version 6.0.9. For // information about Suricata, see the Suricata website (https://suricata.io/) . // You can use Network Firewall to monitor and protect your VPC traffic in a number // of ways. The following are just a few examples: // - Allow domains or IP addresses for known Amazon Web Services service // endpoints, such as Amazon S3, and block all other forms of traffic. // - Use custom lists of known bad domains to limit the types of domain names // that your applications can access. // - Perform deep packet inspection on traffic entering or leaving your VPC. // - Use stateful protocol detection to filter protocols like HTTPS, regardless // of the port used. // // To enable Network Firewall for your VPCs, you perform steps in both Amazon VPC // and in Network Firewall. For information about using Amazon VPC, see Amazon VPC // User Guide (https://docs.aws.amazon.com/vpc/latest/userguide/) . To start using // Network Firewall, do the following: // - (Optional) If you don't already have a VPC that you want to protect, create // it in Amazon VPC. // - In Amazon VPC, in each Availability Zone where you want to have a firewall // endpoint, create a subnet for the sole use of Network Firewall. // - In Network Firewall, create stateless and stateful rule groups, to define // the components of the network traffic filtering behavior that you want your // firewall to have. // - In Network Firewall, create a firewall policy that uses your rule groups // and specifies additional default traffic filtering behavior. // - In Network Firewall, create a firewall and specify your new firewall policy // and VPC subnets. Network Firewall creates a firewall endpoint in each subnet // that you specify, with the behavior that's defined in the firewall policy. // - In Amazon VPC, use ingress routing enhancements to route traffic through // the new firewall endpoints. package networkfirewall
61
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall 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/networkfirewall/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 = "network-firewall" } 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 networkfirewall // goModuleVersion is the tagged release for this module const goModuleVersion = "1.28.2"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/networkfirewall/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) type awsAwsjson10_serializeOpAssociateFirewallPolicy struct { } func (*awsAwsjson10_serializeOpAssociateFirewallPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpAssociateFirewallPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AssociateFirewallPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.AssociateFirewallPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentAssociateFirewallPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpAssociateSubnets struct { } func (*awsAwsjson10_serializeOpAssociateSubnets) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpAssociateSubnets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*AssociateSubnetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.AssociateSubnets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentAssociateSubnetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpCreateFirewall struct { } func (*awsAwsjson10_serializeOpCreateFirewall) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpCreateFirewall) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateFirewallInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.CreateFirewall") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentCreateFirewallInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpCreateFirewallPolicy struct { } func (*awsAwsjson10_serializeOpCreateFirewallPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpCreateFirewallPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateFirewallPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.CreateFirewallPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentCreateFirewallPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpCreateRuleGroup struct { } func (*awsAwsjson10_serializeOpCreateRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpCreateRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.CreateRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentCreateRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpCreateTLSInspectionConfiguration struct { } func (*awsAwsjson10_serializeOpCreateTLSInspectionConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpCreateTLSInspectionConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*CreateTLSInspectionConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.CreateTLSInspectionConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentCreateTLSInspectionConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDeleteFirewall struct { } func (*awsAwsjson10_serializeOpDeleteFirewall) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDeleteFirewall) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteFirewallInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DeleteFirewall") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDeleteFirewallInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDeleteFirewallPolicy struct { } func (*awsAwsjson10_serializeOpDeleteFirewallPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDeleteFirewallPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteFirewallPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DeleteFirewallPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDeleteFirewallPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDeleteResourcePolicy struct { } func (*awsAwsjson10_serializeOpDeleteResourcePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteResourcePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DeleteResourcePolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDeleteResourcePolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDeleteRuleGroup struct { } func (*awsAwsjson10_serializeOpDeleteRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDeleteRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DeleteRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDeleteRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDeleteTLSInspectionConfiguration struct { } func (*awsAwsjson10_serializeOpDeleteTLSInspectionConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDeleteTLSInspectionConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DeleteTLSInspectionConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DeleteTLSInspectionConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDeleteTLSInspectionConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDescribeFirewall struct { } func (*awsAwsjson10_serializeOpDescribeFirewall) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDescribeFirewall) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeFirewallInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DescribeFirewall") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDescribeFirewallInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDescribeFirewallPolicy struct { } func (*awsAwsjson10_serializeOpDescribeFirewallPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDescribeFirewallPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeFirewallPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DescribeFirewallPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDescribeFirewallPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDescribeLoggingConfiguration struct { } func (*awsAwsjson10_serializeOpDescribeLoggingConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDescribeLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeLoggingConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DescribeLoggingConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDescribeLoggingConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDescribeResourcePolicy struct { } func (*awsAwsjson10_serializeOpDescribeResourcePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDescribeResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeResourcePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DescribeResourcePolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDescribeResourcePolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDescribeRuleGroup struct { } func (*awsAwsjson10_serializeOpDescribeRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDescribeRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DescribeRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDescribeRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDescribeRuleGroupMetadata struct { } func (*awsAwsjson10_serializeOpDescribeRuleGroupMetadata) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDescribeRuleGroupMetadata) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeRuleGroupMetadataInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DescribeRuleGroupMetadata") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDescribeRuleGroupMetadataInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDescribeTLSInspectionConfiguration struct { } func (*awsAwsjson10_serializeOpDescribeTLSInspectionConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDescribeTLSInspectionConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DescribeTLSInspectionConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DescribeTLSInspectionConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDescribeTLSInspectionConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpDisassociateSubnets struct { } func (*awsAwsjson10_serializeOpDisassociateSubnets) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpDisassociateSubnets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*DisassociateSubnetsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.DisassociateSubnets") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentDisassociateSubnetsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListFirewallPolicies struct { } func (*awsAwsjson10_serializeOpListFirewallPolicies) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListFirewallPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListFirewallPoliciesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.ListFirewallPolicies") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListFirewallPoliciesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListFirewalls struct { } func (*awsAwsjson10_serializeOpListFirewalls) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListFirewalls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListFirewallsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.ListFirewalls") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListFirewallsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListRuleGroups struct { } func (*awsAwsjson10_serializeOpListRuleGroups) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListRuleGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListRuleGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.ListRuleGroups") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListRuleGroupsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListTagsForResource struct { } func (*awsAwsjson10_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpListTLSInspectionConfigurations struct { } func (*awsAwsjson10_serializeOpListTLSInspectionConfigurations) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpListTLSInspectionConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTLSInspectionConfigurationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.ListTLSInspectionConfigurations") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentListTLSInspectionConfigurationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpPutResourcePolicy struct { } func (*awsAwsjson10_serializeOpPutResourcePolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*PutResourcePolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.PutResourcePolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpTagResource struct { } func (*awsAwsjson10_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.TagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUntagResource struct { } func (*awsAwsjson10_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UntagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateFirewallDeleteProtection struct { } func (*awsAwsjson10_serializeOpUpdateFirewallDeleteProtection) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateFirewallDeleteProtection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateFirewallDeleteProtectionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateFirewallDeleteProtection") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateFirewallDeleteProtectionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateFirewallDescription struct { } func (*awsAwsjson10_serializeOpUpdateFirewallDescription) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateFirewallDescription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateFirewallDescriptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateFirewallDescription") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateFirewallDescriptionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateFirewallEncryptionConfiguration struct { } func (*awsAwsjson10_serializeOpUpdateFirewallEncryptionConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateFirewallEncryptionConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateFirewallEncryptionConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateFirewallEncryptionConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateFirewallEncryptionConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateFirewallPolicy struct { } func (*awsAwsjson10_serializeOpUpdateFirewallPolicy) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateFirewallPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateFirewallPolicyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateFirewallPolicy") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateFirewallPolicyInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateFirewallPolicyChangeProtection struct { } func (*awsAwsjson10_serializeOpUpdateFirewallPolicyChangeProtection) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateFirewallPolicyChangeProtection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateFirewallPolicyChangeProtectionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateFirewallPolicyChangeProtection") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateFirewallPolicyChangeProtectionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateLoggingConfiguration struct { } func (*awsAwsjson10_serializeOpUpdateLoggingConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateLoggingConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateLoggingConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateLoggingConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateRuleGroup struct { } func (*awsAwsjson10_serializeOpUpdateRuleGroup) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateRuleGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateRuleGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateRuleGroup") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateRuleGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateSubnetChangeProtection struct { } func (*awsAwsjson10_serializeOpUpdateSubnetChangeProtection) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateSubnetChangeProtection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateSubnetChangeProtectionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateSubnetChangeProtection") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateSubnetChangeProtectionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson10_serializeOpUpdateTLSInspectionConfiguration struct { } func (*awsAwsjson10_serializeOpUpdateTLSInspectionConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson10_serializeOpUpdateTLSInspectionConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UpdateTLSInspectionConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") httpBindingEncoder.SetHeader("X-Amz-Target").String("NetworkFirewall_20201112.UpdateTLSInspectionConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson10_serializeOpDocumentUpdateTLSInspectionConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson10_serializeDocumentActionDefinition(v *types.ActionDefinition, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PublishMetricAction != nil { ok := object.Key("PublishMetricAction") if err := awsAwsjson10_serializeDocumentPublishMetricAction(v.PublishMetricAction, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentAddress(v *types.Address, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AddressDefinition != nil { ok := object.Key("AddressDefinition") ok.String(*v.AddressDefinition) } return nil } func awsAwsjson10_serializeDocumentAddresses(v []types.Address, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentAddress(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentAzSubnets(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeDocumentCustomAction(v *types.CustomAction, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ActionDefinition != nil { ok := object.Key("ActionDefinition") if err := awsAwsjson10_serializeDocumentActionDefinition(v.ActionDefinition, ok); err != nil { return err } } if v.ActionName != nil { ok := object.Key("ActionName") ok.String(*v.ActionName) } return nil } func awsAwsjson10_serializeDocumentCustomActions(v []types.CustomAction, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentCustomAction(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentDimension(v *types.Dimension, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson10_serializeDocumentDimensions(v []types.Dimension, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentDimension(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentEncryptionConfiguration(v *types.EncryptionConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyId != nil { ok := object.Key("KeyId") ok.String(*v.KeyId) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson10_serializeDocumentFirewallPolicy(v *types.FirewallPolicy, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PolicyVariables != nil { ok := object.Key("PolicyVariables") if err := awsAwsjson10_serializeDocumentPolicyVariables(v.PolicyVariables, ok); err != nil { return err } } if v.StatefulDefaultActions != nil { ok := object.Key("StatefulDefaultActions") if err := awsAwsjson10_serializeDocumentStatefulActions(v.StatefulDefaultActions, ok); err != nil { return err } } if v.StatefulEngineOptions != nil { ok := object.Key("StatefulEngineOptions") if err := awsAwsjson10_serializeDocumentStatefulEngineOptions(v.StatefulEngineOptions, ok); err != nil { return err } } if v.StatefulRuleGroupReferences != nil { ok := object.Key("StatefulRuleGroupReferences") if err := awsAwsjson10_serializeDocumentStatefulRuleGroupReferences(v.StatefulRuleGroupReferences, ok); err != nil { return err } } if v.StatelessCustomActions != nil { ok := object.Key("StatelessCustomActions") if err := awsAwsjson10_serializeDocumentCustomActions(v.StatelessCustomActions, ok); err != nil { return err } } if v.StatelessDefaultActions != nil { ok := object.Key("StatelessDefaultActions") if err := awsAwsjson10_serializeDocumentStatelessActions(v.StatelessDefaultActions, ok); err != nil { return err } } if v.StatelessFragmentDefaultActions != nil { ok := object.Key("StatelessFragmentDefaultActions") if err := awsAwsjson10_serializeDocumentStatelessActions(v.StatelessFragmentDefaultActions, ok); err != nil { return err } } if v.StatelessRuleGroupReferences != nil { ok := object.Key("StatelessRuleGroupReferences") if err := awsAwsjson10_serializeDocumentStatelessRuleGroupReferences(v.StatelessRuleGroupReferences, ok); err != nil { return err } } if v.TLSInspectionConfigurationArn != nil { ok := object.Key("TLSInspectionConfigurationArn") ok.String(*v.TLSInspectionConfigurationArn) } return nil } func awsAwsjson10_serializeDocumentFlags(v []types.TCPFlag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsAwsjson10_serializeDocumentHeader(v *types.Header, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Destination != nil { ok := object.Key("Destination") ok.String(*v.Destination) } if v.DestinationPort != nil { ok := object.Key("DestinationPort") ok.String(*v.DestinationPort) } if len(v.Direction) > 0 { ok := object.Key("Direction") ok.String(string(v.Direction)) } if len(v.Protocol) > 0 { ok := object.Key("Protocol") ok.String(string(v.Protocol)) } if v.Source != nil { ok := object.Key("Source") ok.String(*v.Source) } if v.SourcePort != nil { ok := object.Key("SourcePort") ok.String(*v.SourcePort) } return nil } func awsAwsjson10_serializeDocumentIPSet(v *types.IPSet, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Definition != nil { ok := object.Key("Definition") if err := awsAwsjson10_serializeDocumentVariableDefinitionList(v.Definition, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentIPSetReference(v *types.IPSetReference, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ReferenceArn != nil { ok := object.Key("ReferenceArn") ok.String(*v.ReferenceArn) } return nil } func awsAwsjson10_serializeDocumentIPSetReferenceMap(v map[string]types.IPSetReference, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) mapVar := v[key] if err := awsAwsjson10_serializeDocumentIPSetReference(&mapVar, om); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentIPSets(v map[string]types.IPSet, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) mapVar := v[key] if err := awsAwsjson10_serializeDocumentIPSet(&mapVar, om); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentLogDestinationConfig(v *types.LogDestinationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LogDestination != nil { ok := object.Key("LogDestination") if err := awsAwsjson10_serializeDocumentLogDestinationMap(v.LogDestination, ok); err != nil { return err } } if len(v.LogDestinationType) > 0 { ok := object.Key("LogDestinationType") ok.String(string(v.LogDestinationType)) } if len(v.LogType) > 0 { ok := object.Key("LogType") ok.String(string(v.LogType)) } return nil } func awsAwsjson10_serializeDocumentLogDestinationConfigs(v []types.LogDestinationConfig, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentLogDestinationConfig(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentLogDestinationMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) om.String(v[key]) } return nil } func awsAwsjson10_serializeDocumentLoggingConfiguration(v *types.LoggingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LogDestinationConfigs != nil { ok := object.Key("LogDestinationConfigs") if err := awsAwsjson10_serializeDocumentLogDestinationConfigs(v.LogDestinationConfigs, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentMatchAttributes(v *types.MatchAttributes, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationPorts != nil { ok := object.Key("DestinationPorts") if err := awsAwsjson10_serializeDocumentPortRanges(v.DestinationPorts, ok); err != nil { return err } } if v.Destinations != nil { ok := object.Key("Destinations") if err := awsAwsjson10_serializeDocumentAddresses(v.Destinations, ok); err != nil { return err } } if v.Protocols != nil { ok := object.Key("Protocols") if err := awsAwsjson10_serializeDocumentProtocolNumbers(v.Protocols, ok); err != nil { return err } } if v.SourcePorts != nil { ok := object.Key("SourcePorts") if err := awsAwsjson10_serializeDocumentPortRanges(v.SourcePorts, ok); err != nil { return err } } if v.Sources != nil { ok := object.Key("Sources") if err := awsAwsjson10_serializeDocumentAddresses(v.Sources, ok); err != nil { return err } } if v.TCPFlags != nil { ok := object.Key("TCPFlags") if err := awsAwsjson10_serializeDocumentTCPFlags(v.TCPFlags, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentPolicyVariables(v *types.PolicyVariables, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RuleVariables != nil { ok := object.Key("RuleVariables") if err := awsAwsjson10_serializeDocumentIPSets(v.RuleVariables, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentPortRange(v *types.PortRange, value smithyjson.Value) error { object := value.Object() defer object.Close() { ok := object.Key("FromPort") ok.Integer(v.FromPort) } { ok := object.Key("ToPort") ok.Integer(v.ToPort) } return nil } func awsAwsjson10_serializeDocumentPortRanges(v []types.PortRange, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentPortRange(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentPortSet(v *types.PortSet, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Definition != nil { ok := object.Key("Definition") if err := awsAwsjson10_serializeDocumentVariableDefinitionList(v.Definition, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentPortSets(v map[string]types.PortSet, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) mapVar := v[key] if err := awsAwsjson10_serializeDocumentPortSet(&mapVar, om); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentProtocolNumbers(v []int32, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.Integer(v[i]) } return nil } func awsAwsjson10_serializeDocumentPublishMetricAction(v *types.PublishMetricAction, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Dimensions != nil { ok := object.Key("Dimensions") if err := awsAwsjson10_serializeDocumentDimensions(v.Dimensions, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentReferenceSets(v *types.ReferenceSets, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IPSetReferences != nil { ok := object.Key("IPSetReferences") if err := awsAwsjson10_serializeDocumentIPSetReferenceMap(v.IPSetReferences, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentRuleDefinition(v *types.RuleDefinition, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Actions != nil { ok := object.Key("Actions") if err := awsAwsjson10_serializeDocumentStatelessActions(v.Actions, ok); err != nil { return err } } if v.MatchAttributes != nil { ok := object.Key("MatchAttributes") if err := awsAwsjson10_serializeDocumentMatchAttributes(v.MatchAttributes, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentRuleGroup(v *types.RuleGroup, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ReferenceSets != nil { ok := object.Key("ReferenceSets") if err := awsAwsjson10_serializeDocumentReferenceSets(v.ReferenceSets, ok); err != nil { return err } } if v.RulesSource != nil { ok := object.Key("RulesSource") if err := awsAwsjson10_serializeDocumentRulesSource(v.RulesSource, ok); err != nil { return err } } if v.RuleVariables != nil { ok := object.Key("RuleVariables") if err := awsAwsjson10_serializeDocumentRuleVariables(v.RuleVariables, ok); err != nil { return err } } if v.StatefulRuleOptions != nil { ok := object.Key("StatefulRuleOptions") if err := awsAwsjson10_serializeDocumentStatefulRuleOptions(v.StatefulRuleOptions, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentRuleOption(v *types.RuleOption, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Keyword != nil { ok := object.Key("Keyword") ok.String(*v.Keyword) } if v.Settings != nil { ok := object.Key("Settings") if err := awsAwsjson10_serializeDocumentSettings(v.Settings, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentRuleOptions(v []types.RuleOption, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentRuleOption(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentRulesSource(v *types.RulesSource, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RulesSourceList != nil { ok := object.Key("RulesSourceList") if err := awsAwsjson10_serializeDocumentRulesSourceList(v.RulesSourceList, ok); err != nil { return err } } if v.RulesString != nil { ok := object.Key("RulesString") ok.String(*v.RulesString) } if v.StatefulRules != nil { ok := object.Key("StatefulRules") if err := awsAwsjson10_serializeDocumentStatefulRules(v.StatefulRules, ok); err != nil { return err } } if v.StatelessRulesAndCustomActions != nil { ok := object.Key("StatelessRulesAndCustomActions") if err := awsAwsjson10_serializeDocumentStatelessRulesAndCustomActions(v.StatelessRulesAndCustomActions, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentRulesSourceList(v *types.RulesSourceList, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.GeneratedRulesType) > 0 { ok := object.Key("GeneratedRulesType") ok.String(string(v.GeneratedRulesType)) } if v.Targets != nil { ok := object.Key("Targets") if err := awsAwsjson10_serializeDocumentRuleTargets(v.Targets, ok); err != nil { return err } } if v.TargetTypes != nil { ok := object.Key("TargetTypes") if err := awsAwsjson10_serializeDocumentTargetTypes(v.TargetTypes, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentRuleTargets(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeDocumentRuleVariables(v *types.RuleVariables, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.IPSets != nil { ok := object.Key("IPSets") if err := awsAwsjson10_serializeDocumentIPSets(v.IPSets, ok); err != nil { return err } } if v.PortSets != nil { ok := object.Key("PortSets") if err := awsAwsjson10_serializeDocumentPortSets(v.PortSets, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentServerCertificate(v *types.ServerCertificate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson10_serializeDocumentServerCertificateConfiguration(v *types.ServerCertificateConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Scopes != nil { ok := object.Key("Scopes") if err := awsAwsjson10_serializeDocumentServerCertificateScopes(v.Scopes, ok); err != nil { return err } } if v.ServerCertificates != nil { ok := object.Key("ServerCertificates") if err := awsAwsjson10_serializeDocumentServerCertificates(v.ServerCertificates, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentServerCertificateConfigurations(v []types.ServerCertificateConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentServerCertificateConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentServerCertificates(v []types.ServerCertificate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentServerCertificate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentServerCertificateScope(v *types.ServerCertificateScope, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationPorts != nil { ok := object.Key("DestinationPorts") if err := awsAwsjson10_serializeDocumentPortRanges(v.DestinationPorts, ok); err != nil { return err } } if v.Destinations != nil { ok := object.Key("Destinations") if err := awsAwsjson10_serializeDocumentAddresses(v.Destinations, ok); err != nil { return err } } if v.Protocols != nil { ok := object.Key("Protocols") if err := awsAwsjson10_serializeDocumentProtocolNumbers(v.Protocols, ok); err != nil { return err } } if v.SourcePorts != nil { ok := object.Key("SourcePorts") if err := awsAwsjson10_serializeDocumentPortRanges(v.SourcePorts, ok); err != nil { return err } } if v.Sources != nil { ok := object.Key("Sources") if err := awsAwsjson10_serializeDocumentAddresses(v.Sources, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentServerCertificateScopes(v []types.ServerCertificateScope, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentServerCertificateScope(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentSettings(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeDocumentSourceMetadata(v *types.SourceMetadata, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SourceArn != nil { ok := object.Key("SourceArn") ok.String(*v.SourceArn) } if v.SourceUpdateToken != nil { ok := object.Key("SourceUpdateToken") ok.String(*v.SourceUpdateToken) } return nil } func awsAwsjson10_serializeDocumentStatefulActions(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeDocumentStatefulEngineOptions(v *types.StatefulEngineOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.RuleOrder) > 0 { ok := object.Key("RuleOrder") ok.String(string(v.RuleOrder)) } if len(v.StreamExceptionPolicy) > 0 { ok := object.Key("StreamExceptionPolicy") ok.String(string(v.StreamExceptionPolicy)) } return nil } func awsAwsjson10_serializeDocumentStatefulRule(v *types.StatefulRule, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } if v.Header != nil { ok := object.Key("Header") if err := awsAwsjson10_serializeDocumentHeader(v.Header, ok); err != nil { return err } } if v.RuleOptions != nil { ok := object.Key("RuleOptions") if err := awsAwsjson10_serializeDocumentRuleOptions(v.RuleOptions, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentStatefulRuleGroupOverride(v *types.StatefulRuleGroupOverride, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Action) > 0 { ok := object.Key("Action") ok.String(string(v.Action)) } return nil } func awsAwsjson10_serializeDocumentStatefulRuleGroupReference(v *types.StatefulRuleGroupReference, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Override != nil { ok := object.Key("Override") if err := awsAwsjson10_serializeDocumentStatefulRuleGroupOverride(v.Override, ok); err != nil { return err } } if v.Priority != nil { ok := object.Key("Priority") ok.Integer(*v.Priority) } if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson10_serializeDocumentStatefulRuleGroupReferences(v []types.StatefulRuleGroupReference, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentStatefulRuleGroupReference(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentStatefulRuleOptions(v *types.StatefulRuleOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.RuleOrder) > 0 { ok := object.Key("RuleOrder") ok.String(string(v.RuleOrder)) } return nil } func awsAwsjson10_serializeDocumentStatefulRules(v []types.StatefulRule, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentStatefulRule(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentStatelessActions(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeDocumentStatelessRule(v *types.StatelessRule, value smithyjson.Value) error { object := value.Object() defer object.Close() { ok := object.Key("Priority") ok.Integer(v.Priority) } if v.RuleDefinition != nil { ok := object.Key("RuleDefinition") if err := awsAwsjson10_serializeDocumentRuleDefinition(v.RuleDefinition, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentStatelessRuleGroupReference(v *types.StatelessRuleGroupReference, value smithyjson.Value) error { object := value.Object() defer object.Close() { ok := object.Key("Priority") ok.Integer(v.Priority) } if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson10_serializeDocumentStatelessRuleGroupReferences(v []types.StatelessRuleGroupReference, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentStatelessRuleGroupReference(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentStatelessRules(v []types.StatelessRule, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentStatelessRule(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentStatelessRulesAndCustomActions(v *types.StatelessRulesAndCustomActions, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CustomActions != nil { ok := object.Key("CustomActions") if err := awsAwsjson10_serializeDocumentCustomActions(v.CustomActions, ok); err != nil { return err } } if v.StatelessRules != nil { ok := object.Key("StatelessRules") if err := awsAwsjson10_serializeDocumentStatelessRules(v.StatelessRules, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentSubnetMapping(v *types.SubnetMapping, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.IPAddressType) > 0 { ok := object.Key("IPAddressType") ok.String(string(v.IPAddressType)) } if v.SubnetId != nil { ok := object.Key("SubnetId") ok.String(*v.SubnetId) } return nil } func awsAwsjson10_serializeDocumentSubnetMappings(v []types.SubnetMapping, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentSubnetMapping(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson10_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentTargetTypes(v []types.TargetType, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsAwsjson10_serializeDocumentTCPFlagField(v *types.TCPFlagField, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Flags != nil { ok := object.Key("Flags") if err := awsAwsjson10_serializeDocumentFlags(v.Flags, ok); err != nil { return err } } if v.Masks != nil { ok := object.Key("Masks") if err := awsAwsjson10_serializeDocumentFlags(v.Masks, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentTCPFlags(v []types.TCPFlagField, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson10_serializeDocumentTCPFlagField(&v[i], av); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentTLSInspectionConfiguration(v *types.TLSInspectionConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ServerCertificateConfigurations != nil { ok := object.Key("ServerCertificateConfigurations") if err := awsAwsjson10_serializeDocumentServerCertificateConfigurations(v.ServerCertificateConfigurations, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeDocumentVariableDefinitionList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeDocumentVpcIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson10_serializeOpDocumentAssociateFirewallPolicyInput(v *AssociateFirewallPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } if v.FirewallPolicyArn != nil { ok := object.Key("FirewallPolicyArn") ok.String(*v.FirewallPolicyArn) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentAssociateSubnetsInput(v *AssociateSubnetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } if v.SubnetMappings != nil { ok := object.Key("SubnetMappings") if err := awsAwsjson10_serializeDocumentSubnetMappings(v.SubnetMappings, ok); err != nil { return err } } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentCreateFirewallInput(v *CreateFirewallInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeleteProtection { ok := object.Key("DeleteProtection") ok.Boolean(v.DeleteProtection) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.EncryptionConfiguration != nil { ok := object.Key("EncryptionConfiguration") if err := awsAwsjson10_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { return err } } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } if v.FirewallPolicyArn != nil { ok := object.Key("FirewallPolicyArn") ok.String(*v.FirewallPolicyArn) } if v.FirewallPolicyChangeProtection { ok := object.Key("FirewallPolicyChangeProtection") ok.Boolean(v.FirewallPolicyChangeProtection) } if v.SubnetChangeProtection { ok := object.Key("SubnetChangeProtection") ok.Boolean(v.SubnetChangeProtection) } if v.SubnetMappings != nil { ok := object.Key("SubnetMappings") if err := awsAwsjson10_serializeDocumentSubnetMappings(v.SubnetMappings, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if v.VpcId != nil { ok := object.Key("VpcId") ok.String(*v.VpcId) } return nil } func awsAwsjson10_serializeOpDocumentCreateFirewallPolicyInput(v *CreateFirewallPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DryRun { ok := object.Key("DryRun") ok.Boolean(v.DryRun) } if v.EncryptionConfiguration != nil { ok := object.Key("EncryptionConfiguration") if err := awsAwsjson10_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { return err } } if v.FirewallPolicy != nil { ok := object.Key("FirewallPolicy") if err := awsAwsjson10_serializeDocumentFirewallPolicy(v.FirewallPolicy, ok); err != nil { return err } } if v.FirewallPolicyName != nil { ok := object.Key("FirewallPolicyName") ok.String(*v.FirewallPolicyName) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentCreateRuleGroupInput(v *CreateRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Capacity != nil { ok := object.Key("Capacity") ok.Integer(*v.Capacity) } if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DryRun { ok := object.Key("DryRun") ok.Boolean(v.DryRun) } if v.EncryptionConfiguration != nil { ok := object.Key("EncryptionConfiguration") if err := awsAwsjson10_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { return err } } if v.RuleGroup != nil { ok := object.Key("RuleGroup") if err := awsAwsjson10_serializeDocumentRuleGroup(v.RuleGroup, ok); err != nil { return err } } if v.RuleGroupName != nil { ok := object.Key("RuleGroupName") ok.String(*v.RuleGroupName) } if v.Rules != nil { ok := object.Key("Rules") ok.String(*v.Rules) } if v.SourceMetadata != nil { ok := object.Key("SourceMetadata") if err := awsAwsjson10_serializeDocumentSourceMetadata(v.SourceMetadata, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson10_serializeOpDocumentCreateTLSInspectionConfigurationInput(v *CreateTLSInspectionConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.EncryptionConfiguration != nil { ok := object.Key("EncryptionConfiguration") if err := awsAwsjson10_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } if v.TLSInspectionConfiguration != nil { ok := object.Key("TLSInspectionConfiguration") if err := awsAwsjson10_serializeDocumentTLSInspectionConfiguration(v.TLSInspectionConfiguration, ok); err != nil { return err } } if v.TLSInspectionConfigurationName != nil { ok := object.Key("TLSInspectionConfigurationName") ok.String(*v.TLSInspectionConfigurationName) } return nil } func awsAwsjson10_serializeOpDocumentDeleteFirewallInput(v *DeleteFirewallInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } return nil } func awsAwsjson10_serializeOpDocumentDeleteFirewallPolicyInput(v *DeleteFirewallPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallPolicyArn != nil { ok := object.Key("FirewallPolicyArn") ok.String(*v.FirewallPolicyArn) } if v.FirewallPolicyName != nil { ok := object.Key("FirewallPolicyName") ok.String(*v.FirewallPolicyName) } return nil } func awsAwsjson10_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson10_serializeOpDocumentDeleteRuleGroupInput(v *DeleteRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RuleGroupArn != nil { ok := object.Key("RuleGroupArn") ok.String(*v.RuleGroupArn) } if v.RuleGroupName != nil { ok := object.Key("RuleGroupName") ok.String(*v.RuleGroupName) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson10_serializeOpDocumentDeleteTLSInspectionConfigurationInput(v *DeleteTLSInspectionConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.TLSInspectionConfigurationArn != nil { ok := object.Key("TLSInspectionConfigurationArn") ok.String(*v.TLSInspectionConfigurationArn) } if v.TLSInspectionConfigurationName != nil { ok := object.Key("TLSInspectionConfigurationName") ok.String(*v.TLSInspectionConfigurationName) } return nil } func awsAwsjson10_serializeOpDocumentDescribeFirewallInput(v *DescribeFirewallInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } return nil } func awsAwsjson10_serializeOpDocumentDescribeFirewallPolicyInput(v *DescribeFirewallPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallPolicyArn != nil { ok := object.Key("FirewallPolicyArn") ok.String(*v.FirewallPolicyArn) } if v.FirewallPolicyName != nil { ok := object.Key("FirewallPolicyName") ok.String(*v.FirewallPolicyName) } return nil } func awsAwsjson10_serializeOpDocumentDescribeLoggingConfigurationInput(v *DescribeLoggingConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } return nil } func awsAwsjson10_serializeOpDocumentDescribeResourcePolicyInput(v *DescribeResourcePolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson10_serializeOpDocumentDescribeRuleGroupInput(v *DescribeRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RuleGroupArn != nil { ok := object.Key("RuleGroupArn") ok.String(*v.RuleGroupArn) } if v.RuleGroupName != nil { ok := object.Key("RuleGroupName") ok.String(*v.RuleGroupName) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson10_serializeOpDocumentDescribeRuleGroupMetadataInput(v *DescribeRuleGroupMetadataInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RuleGroupArn != nil { ok := object.Key("RuleGroupArn") ok.String(*v.RuleGroupArn) } if v.RuleGroupName != nil { ok := object.Key("RuleGroupName") ok.String(*v.RuleGroupName) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson10_serializeOpDocumentDescribeTLSInspectionConfigurationInput(v *DescribeTLSInspectionConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.TLSInspectionConfigurationArn != nil { ok := object.Key("TLSInspectionConfigurationArn") ok.String(*v.TLSInspectionConfigurationArn) } if v.TLSInspectionConfigurationName != nil { ok := object.Key("TLSInspectionConfigurationName") ok.String(*v.TLSInspectionConfigurationName) } return nil } func awsAwsjson10_serializeOpDocumentDisassociateSubnetsInput(v *DisassociateSubnetsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } if v.SubnetIds != nil { ok := object.Key("SubnetIds") if err := awsAwsjson10_serializeDocumentAzSubnets(v.SubnetIds, ok); err != nil { return err } } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentListFirewallPoliciesInput(v *ListFirewallPoliciesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson10_serializeOpDocumentListFirewallsInput(v *ListFirewallsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.VpcIds != nil { ok := object.Key("VpcIds") if err := awsAwsjson10_serializeDocumentVpcIds(v.VpcIds, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentListRuleGroupsInput(v *ListRuleGroupsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ManagedType) > 0 { ok := object.Key("ManagedType") ok.String(string(v.ManagedType)) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if len(v.Scope) > 0 { ok := object.Key("Scope") ok.String(string(v.Scope)) } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } return nil } func awsAwsjson10_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson10_serializeOpDocumentListTLSInspectionConfigurationsInput(v *ListTLSInspectionConfigurationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson10_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Policy != nil { ok := object.Key("Policy") ok.String(*v.Policy) } if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } return nil } func awsAwsjson10_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceArn != nil { ok := object.Key("ResourceArn") ok.String(*v.ResourceArn) } if v.TagKeys != nil { ok := object.Key("TagKeys") if err := awsAwsjson10_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentUpdateFirewallDeleteProtectionInput(v *UpdateFirewallDeleteProtectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() { ok := object.Key("DeleteProtection") ok.Boolean(v.DeleteProtection) } if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentUpdateFirewallDescriptionInput(v *UpdateFirewallDescriptionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentUpdateFirewallEncryptionConfigurationInput(v *UpdateFirewallEncryptionConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EncryptionConfiguration != nil { ok := object.Key("EncryptionConfiguration") if err := awsAwsjson10_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { return err } } if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentUpdateFirewallPolicyChangeProtectionInput(v *UpdateFirewallPolicyChangeProtectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } { ok := object.Key("FirewallPolicyChangeProtection") ok.Boolean(v.FirewallPolicyChangeProtection) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentUpdateFirewallPolicyInput(v *UpdateFirewallPolicyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DryRun { ok := object.Key("DryRun") ok.Boolean(v.DryRun) } if v.EncryptionConfiguration != nil { ok := object.Key("EncryptionConfiguration") if err := awsAwsjson10_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { return err } } if v.FirewallPolicy != nil { ok := object.Key("FirewallPolicy") if err := awsAwsjson10_serializeDocumentFirewallPolicy(v.FirewallPolicy, ok); err != nil { return err } } if v.FirewallPolicyArn != nil { ok := object.Key("FirewallPolicyArn") ok.String(*v.FirewallPolicyArn) } if v.FirewallPolicyName != nil { ok := object.Key("FirewallPolicyName") ok.String(*v.FirewallPolicyName) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentUpdateLoggingConfigurationInput(v *UpdateLoggingConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } if v.LoggingConfiguration != nil { ok := object.Key("LoggingConfiguration") if err := awsAwsjson10_serializeDocumentLoggingConfiguration(v.LoggingConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson10_serializeOpDocumentUpdateRuleGroupInput(v *UpdateRuleGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.DryRun { ok := object.Key("DryRun") ok.Boolean(v.DryRun) } if v.EncryptionConfiguration != nil { ok := object.Key("EncryptionConfiguration") if err := awsAwsjson10_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { return err } } if v.RuleGroup != nil { ok := object.Key("RuleGroup") if err := awsAwsjson10_serializeDocumentRuleGroup(v.RuleGroup, ok); err != nil { return err } } if v.RuleGroupArn != nil { ok := object.Key("RuleGroupArn") ok.String(*v.RuleGroupArn) } if v.RuleGroupName != nil { ok := object.Key("RuleGroupName") ok.String(*v.RuleGroupName) } if v.Rules != nil { ok := object.Key("Rules") ok.String(*v.Rules) } if v.SourceMetadata != nil { ok := object.Key("SourceMetadata") if err := awsAwsjson10_serializeDocumentSourceMetadata(v.SourceMetadata, ok); err != nil { return err } } if len(v.Type) > 0 { ok := object.Key("Type") ok.String(string(v.Type)) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentUpdateSubnetChangeProtectionInput(v *UpdateSubnetChangeProtectionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FirewallArn != nil { ok := object.Key("FirewallArn") ok.String(*v.FirewallArn) } if v.FirewallName != nil { ok := object.Key("FirewallName") ok.String(*v.FirewallName) } { ok := object.Key("SubnetChangeProtection") ok.Boolean(v.SubnetChangeProtection) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil } func awsAwsjson10_serializeOpDocumentUpdateTLSInspectionConfigurationInput(v *UpdateTLSInspectionConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("Description") ok.String(*v.Description) } if v.EncryptionConfiguration != nil { ok := object.Key("EncryptionConfiguration") if err := awsAwsjson10_serializeDocumentEncryptionConfiguration(v.EncryptionConfiguration, ok); err != nil { return err } } if v.TLSInspectionConfiguration != nil { ok := object.Key("TLSInspectionConfiguration") if err := awsAwsjson10_serializeDocumentTLSInspectionConfiguration(v.TLSInspectionConfiguration, ok); err != nil { return err } } if v.TLSInspectionConfigurationArn != nil { ok := object.Key("TLSInspectionConfigurationArn") ok.String(*v.TLSInspectionConfigurationArn) } if v.TLSInspectionConfigurationName != nil { ok := object.Key("TLSInspectionConfigurationName") ok.String(*v.TLSInspectionConfigurationName) } if v.UpdateToken != nil { ok := object.Key("UpdateToken") ok.String(*v.UpdateToken) } return nil }
4,188
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkfirewall import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/networkfirewall/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAssociateFirewallPolicy struct { } func (*validateOpAssociateFirewallPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpAssociateFirewallPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssociateFirewallPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssociateFirewallPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAssociateSubnets struct { } func (*validateOpAssociateSubnets) ID() string { return "OperationInputValidation" } func (m *validateOpAssociateSubnets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AssociateSubnetsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAssociateSubnetsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateFirewall struct { } func (*validateOpCreateFirewall) ID() string { return "OperationInputValidation" } func (m *validateOpCreateFirewall) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateFirewallInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateFirewallInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateFirewallPolicy struct { } func (*validateOpCreateFirewallPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpCreateFirewallPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateFirewallPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateFirewallPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateRuleGroup struct { } func (*validateOpCreateRuleGroup) ID() string { return "OperationInputValidation" } func (m *validateOpCreateRuleGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateRuleGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateRuleGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateTLSInspectionConfiguration struct { } func (*validateOpCreateTLSInspectionConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpCreateTLSInspectionConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateTLSInspectionConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateTLSInspectionConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteResourcePolicy struct { } func (*validateOpDeleteResourcePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteResourcePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteResourcePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeResourcePolicy struct { } func (*validateOpDescribeResourcePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeResourcePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeResourcePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDisassociateSubnets struct { } func (*validateOpDisassociateSubnets) ID() string { return "OperationInputValidation" } func (m *validateOpDisassociateSubnets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DisassociateSubnetsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDisassociateSubnetsInput(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 validateOpPutResourcePolicy struct { } func (*validateOpPutResourcePolicy) ID() string { return "OperationInputValidation" } func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*PutResourcePolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpPutResourcePolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type 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 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 validateOpUpdateFirewallDeleteProtection struct { } func (*validateOpUpdateFirewallDeleteProtection) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateFirewallDeleteProtection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateFirewallDeleteProtectionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateFirewallDeleteProtectionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateFirewallEncryptionConfiguration struct { } func (*validateOpUpdateFirewallEncryptionConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateFirewallEncryptionConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateFirewallEncryptionConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateFirewallEncryptionConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateFirewallPolicyChangeProtection struct { } func (*validateOpUpdateFirewallPolicyChangeProtection) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateFirewallPolicyChangeProtection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateFirewallPolicyChangeProtectionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateFirewallPolicyChangeProtectionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateFirewallPolicy struct { } func (*validateOpUpdateFirewallPolicy) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateFirewallPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateFirewallPolicyInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateFirewallPolicyInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateLoggingConfiguration struct { } func (*validateOpUpdateLoggingConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateLoggingConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateLoggingConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateRuleGroup struct { } func (*validateOpUpdateRuleGroup) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateRuleGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateRuleGroupInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateRuleGroupInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateSubnetChangeProtection struct { } func (*validateOpUpdateSubnetChangeProtection) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateSubnetChangeProtection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateSubnetChangeProtectionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateSubnetChangeProtectionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateTLSInspectionConfiguration struct { } func (*validateOpUpdateTLSInspectionConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateTLSInspectionConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateTLSInspectionConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateTLSInspectionConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAssociateFirewallPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateFirewallPolicy{}, middleware.After) } func addOpAssociateSubnetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAssociateSubnets{}, middleware.After) } func addOpCreateFirewallValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFirewall{}, middleware.After) } func addOpCreateFirewallPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFirewallPolicy{}, middleware.After) } func addOpCreateRuleGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateRuleGroup{}, middleware.After) } func addOpCreateTLSInspectionConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTLSInspectionConfiguration{}, middleware.After) } func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) } func addOpDescribeResourcePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeResourcePolicy{}, middleware.After) } func addOpDisassociateSubnetsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDisassociateSubnets{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateFirewallDeleteProtectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateFirewallDeleteProtection{}, middleware.After) } func addOpUpdateFirewallEncryptionConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateFirewallEncryptionConfiguration{}, middleware.After) } func addOpUpdateFirewallPolicyChangeProtectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateFirewallPolicyChangeProtection{}, middleware.After) } func addOpUpdateFirewallPolicyValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateFirewallPolicy{}, middleware.After) } func addOpUpdateLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateLoggingConfiguration{}, middleware.After) } func addOpUpdateRuleGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRuleGroup{}, middleware.After) } func addOpUpdateSubnetChangeProtectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSubnetChangeProtection{}, middleware.After) } func addOpUpdateTLSInspectionConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateTLSInspectionConfiguration{}, middleware.After) } func validateActionDefinition(v *types.ActionDefinition) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ActionDefinition"} if v.PublishMetricAction != nil { if err := validatePublishMetricAction(v.PublishMetricAction); err != nil { invalidParams.AddNested("PublishMetricAction", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAddress(v *types.Address) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Address"} if v.AddressDefinition == nil { invalidParams.Add(smithy.NewErrParamRequired("AddressDefinition")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateAddresses(v []types.Address) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Addresses"} for i := range v { if err := validateAddress(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCustomAction(v *types.CustomAction) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CustomAction"} if v.ActionName == nil { invalidParams.Add(smithy.NewErrParamRequired("ActionName")) } if v.ActionDefinition == nil { invalidParams.Add(smithy.NewErrParamRequired("ActionDefinition")) } else if v.ActionDefinition != nil { if err := validateActionDefinition(v.ActionDefinition); err != nil { invalidParams.AddNested("ActionDefinition", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCustomActions(v []types.CustomAction) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CustomActions"} for i := range v { if err := validateCustomAction(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDimension(v *types.Dimension) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Dimension"} if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDimensions(v []types.Dimension) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Dimensions"} for i := range v { if err := validateDimension(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEncryptionConfiguration(v *types.EncryptionConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EncryptionConfiguration"} if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFirewallPolicy(v *types.FirewallPolicy) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FirewallPolicy"} if v.StatelessRuleGroupReferences != nil { if err := validateStatelessRuleGroupReferences(v.StatelessRuleGroupReferences); err != nil { invalidParams.AddNested("StatelessRuleGroupReferences", err.(smithy.InvalidParamsError)) } } if v.StatelessDefaultActions == nil { invalidParams.Add(smithy.NewErrParamRequired("StatelessDefaultActions")) } if v.StatelessFragmentDefaultActions == nil { invalidParams.Add(smithy.NewErrParamRequired("StatelessFragmentDefaultActions")) } if v.StatelessCustomActions != nil { if err := validateCustomActions(v.StatelessCustomActions); err != nil { invalidParams.AddNested("StatelessCustomActions", err.(smithy.InvalidParamsError)) } } if v.StatefulRuleGroupReferences != nil { if err := validateStatefulRuleGroupReferences(v.StatefulRuleGroupReferences); err != nil { invalidParams.AddNested("StatefulRuleGroupReferences", err.(smithy.InvalidParamsError)) } } if v.PolicyVariables != nil { if err := validatePolicyVariables(v.PolicyVariables); err != nil { invalidParams.AddNested("PolicyVariables", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateHeader(v *types.Header) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Header"} if len(v.Protocol) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Protocol")) } if v.Source == nil { invalidParams.Add(smithy.NewErrParamRequired("Source")) } if v.SourcePort == nil { invalidParams.Add(smithy.NewErrParamRequired("SourcePort")) } if len(v.Direction) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Direction")) } if v.Destination == nil { invalidParams.Add(smithy.NewErrParamRequired("Destination")) } if v.DestinationPort == nil { invalidParams.Add(smithy.NewErrParamRequired("DestinationPort")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateIPSet(v *types.IPSet) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "IPSet"} if v.Definition == nil { invalidParams.Add(smithy.NewErrParamRequired("Definition")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateIPSets(v map[string]types.IPSet) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "IPSets"} for key := range v { value := v[key] if err := validateIPSet(&value); err != nil { invalidParams.AddNested(fmt.Sprintf("[%q]", key), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateLogDestinationConfig(v *types.LogDestinationConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LogDestinationConfig"} if len(v.LogType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("LogType")) } if len(v.LogDestinationType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("LogDestinationType")) } if v.LogDestination == nil { invalidParams.Add(smithy.NewErrParamRequired("LogDestination")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateLogDestinationConfigs(v []types.LogDestinationConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LogDestinationConfigs"} for i := range v { if err := validateLogDestinationConfig(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateLoggingConfiguration(v *types.LoggingConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LoggingConfiguration"} if v.LogDestinationConfigs == nil { invalidParams.Add(smithy.NewErrParamRequired("LogDestinationConfigs")) } else if v.LogDestinationConfigs != nil { if err := validateLogDestinationConfigs(v.LogDestinationConfigs); err != nil { invalidParams.AddNested("LogDestinationConfigs", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMatchAttributes(v *types.MatchAttributes) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MatchAttributes"} if v.Sources != nil { if err := validateAddresses(v.Sources); err != nil { invalidParams.AddNested("Sources", err.(smithy.InvalidParamsError)) } } if v.Destinations != nil { if err := validateAddresses(v.Destinations); err != nil { invalidParams.AddNested("Destinations", err.(smithy.InvalidParamsError)) } } if v.SourcePorts != nil { if err := validatePortRanges(v.SourcePorts); err != nil { invalidParams.AddNested("SourcePorts", err.(smithy.InvalidParamsError)) } } if v.DestinationPorts != nil { if err := validatePortRanges(v.DestinationPorts); err != nil { invalidParams.AddNested("DestinationPorts", err.(smithy.InvalidParamsError)) } } if v.TCPFlags != nil { if err := validateTCPFlags(v.TCPFlags); err != nil { invalidParams.AddNested("TCPFlags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePolicyVariables(v *types.PolicyVariables) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PolicyVariables"} if v.RuleVariables != nil { if err := validateIPSets(v.RuleVariables); err != nil { invalidParams.AddNested("RuleVariables", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePortRange(v *types.PortRange) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PortRange"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePortRanges(v []types.PortRange) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PortRanges"} for i := range v { if err := validatePortRange(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePublishMetricAction(v *types.PublishMetricAction) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PublishMetricAction"} if v.Dimensions == nil { invalidParams.Add(smithy.NewErrParamRequired("Dimensions")) } else if v.Dimensions != nil { if err := validateDimensions(v.Dimensions); err != nil { invalidParams.AddNested("Dimensions", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleDefinition(v *types.RuleDefinition) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleDefinition"} if v.MatchAttributes == nil { invalidParams.Add(smithy.NewErrParamRequired("MatchAttributes")) } else if v.MatchAttributes != nil { if err := validateMatchAttributes(v.MatchAttributes); err != nil { invalidParams.AddNested("MatchAttributes", err.(smithy.InvalidParamsError)) } } if v.Actions == nil { invalidParams.Add(smithy.NewErrParamRequired("Actions")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleGroup(v *types.RuleGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleGroup"} if v.RuleVariables != nil { if err := validateRuleVariables(v.RuleVariables); err != nil { invalidParams.AddNested("RuleVariables", err.(smithy.InvalidParamsError)) } } if v.RulesSource == nil { invalidParams.Add(smithy.NewErrParamRequired("RulesSource")) } else if v.RulesSource != nil { if err := validateRulesSource(v.RulesSource); err != nil { invalidParams.AddNested("RulesSource", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleOption(v *types.RuleOption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleOption"} if v.Keyword == nil { invalidParams.Add(smithy.NewErrParamRequired("Keyword")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleOptions(v []types.RuleOption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleOptions"} for i := range v { if err := validateRuleOption(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRulesSource(v *types.RulesSource) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RulesSource"} if v.RulesSourceList != nil { if err := validateRulesSourceList(v.RulesSourceList); err != nil { invalidParams.AddNested("RulesSourceList", err.(smithy.InvalidParamsError)) } } if v.StatefulRules != nil { if err := validateStatefulRules(v.StatefulRules); err != nil { invalidParams.AddNested("StatefulRules", err.(smithy.InvalidParamsError)) } } if v.StatelessRulesAndCustomActions != nil { if err := validateStatelessRulesAndCustomActions(v.StatelessRulesAndCustomActions); err != nil { invalidParams.AddNested("StatelessRulesAndCustomActions", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRulesSourceList(v *types.RulesSourceList) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RulesSourceList"} if v.Targets == nil { invalidParams.Add(smithy.NewErrParamRequired("Targets")) } if v.TargetTypes == nil { invalidParams.Add(smithy.NewErrParamRequired("TargetTypes")) } if len(v.GeneratedRulesType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("GeneratedRulesType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRuleVariables(v *types.RuleVariables) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RuleVariables"} if v.IPSets != nil { if err := validateIPSets(v.IPSets); err != nil { invalidParams.AddNested("IPSets", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateServerCertificateConfiguration(v *types.ServerCertificateConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ServerCertificateConfiguration"} if v.Scopes != nil { if err := validateServerCertificateScopes(v.Scopes); err != nil { invalidParams.AddNested("Scopes", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateServerCertificateConfigurations(v []types.ServerCertificateConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ServerCertificateConfigurations"} for i := range v { if err := validateServerCertificateConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateServerCertificateScope(v *types.ServerCertificateScope) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ServerCertificateScope"} if v.Sources != nil { if err := validateAddresses(v.Sources); err != nil { invalidParams.AddNested("Sources", err.(smithy.InvalidParamsError)) } } if v.Destinations != nil { if err := validateAddresses(v.Destinations); err != nil { invalidParams.AddNested("Destinations", err.(smithy.InvalidParamsError)) } } if v.SourcePorts != nil { if err := validatePortRanges(v.SourcePorts); err != nil { invalidParams.AddNested("SourcePorts", err.(smithy.InvalidParamsError)) } } if v.DestinationPorts != nil { if err := validatePortRanges(v.DestinationPorts); err != nil { invalidParams.AddNested("DestinationPorts", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateServerCertificateScopes(v []types.ServerCertificateScope) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ServerCertificateScopes"} for i := range v { if err := validateServerCertificateScope(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatefulRule(v *types.StatefulRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatefulRule"} if len(v.Action) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Action")) } if v.Header == nil { invalidParams.Add(smithy.NewErrParamRequired("Header")) } else if v.Header != nil { if err := validateHeader(v.Header); err != nil { invalidParams.AddNested("Header", err.(smithy.InvalidParamsError)) } } if v.RuleOptions == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleOptions")) } else if v.RuleOptions != nil { if err := validateRuleOptions(v.RuleOptions); err != nil { invalidParams.AddNested("RuleOptions", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatefulRuleGroupReference(v *types.StatefulRuleGroupReference) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatefulRuleGroupReference"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatefulRuleGroupReferences(v []types.StatefulRuleGroupReference) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatefulRuleGroupReferences"} for i := range v { if err := validateStatefulRuleGroupReference(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatefulRules(v []types.StatefulRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatefulRules"} for i := range v { if err := validateStatefulRule(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatelessRule(v *types.StatelessRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatelessRule"} if v.RuleDefinition == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleDefinition")) } else if v.RuleDefinition != nil { if err := validateRuleDefinition(v.RuleDefinition); err != nil { invalidParams.AddNested("RuleDefinition", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatelessRuleGroupReference(v *types.StatelessRuleGroupReference) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatelessRuleGroupReference"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatelessRuleGroupReferences(v []types.StatelessRuleGroupReference) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatelessRuleGroupReferences"} for i := range v { if err := validateStatelessRuleGroupReference(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatelessRules(v []types.StatelessRule) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatelessRules"} for i := range v { if err := validateStatelessRule(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateStatelessRulesAndCustomActions(v *types.StatelessRulesAndCustomActions) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StatelessRulesAndCustomActions"} if v.StatelessRules == nil { invalidParams.Add(smithy.NewErrParamRequired("StatelessRules")) } else if v.StatelessRules != nil { if err := validateStatelessRules(v.StatelessRules); err != nil { invalidParams.AddNested("StatelessRules", err.(smithy.InvalidParamsError)) } } if v.CustomActions != nil { if err := validateCustomActions(v.CustomActions); err != nil { invalidParams.AddNested("CustomActions", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSubnetMapping(v *types.SubnetMapping) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SubnetMapping"} if v.SubnetId == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSubnetMappings(v []types.SubnetMapping) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SubnetMappings"} for i := range v { if err := validateSubnetMapping(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func 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 validateTCPFlagField(v *types.TCPFlagField) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TCPFlagField"} if v.Flags == nil { invalidParams.Add(smithy.NewErrParamRequired("Flags")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTCPFlags(v []types.TCPFlagField) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TCPFlags"} for i := range v { if err := validateTCPFlagField(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTLSInspectionConfiguration(v *types.TLSInspectionConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TLSInspectionConfiguration"} if v.ServerCertificateConfigurations != nil { if err := validateServerCertificateConfigurations(v.ServerCertificateConfigurations); err != nil { invalidParams.AddNested("ServerCertificateConfigurations", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssociateFirewallPolicyInput(v *AssociateFirewallPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociateFirewallPolicyInput"} if v.FirewallPolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("FirewallPolicyArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAssociateSubnetsInput(v *AssociateSubnetsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AssociateSubnetsInput"} if v.SubnetMappings == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetMappings")) } else if v.SubnetMappings != nil { if err := validateSubnetMappings(v.SubnetMappings); err != nil { invalidParams.AddNested("SubnetMappings", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateFirewallInput(v *CreateFirewallInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateFirewallInput"} if v.FirewallName == nil { invalidParams.Add(smithy.NewErrParamRequired("FirewallName")) } if v.FirewallPolicyArn == nil { invalidParams.Add(smithy.NewErrParamRequired("FirewallPolicyArn")) } if v.VpcId == nil { invalidParams.Add(smithy.NewErrParamRequired("VpcId")) } if v.SubnetMappings == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetMappings")) } else if v.SubnetMappings != nil { if err := validateSubnetMappings(v.SubnetMappings); err != nil { invalidParams.AddNested("SubnetMappings", err.(smithy.InvalidParamsError)) } } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.EncryptionConfiguration != nil { if err := validateEncryptionConfiguration(v.EncryptionConfiguration); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateFirewallPolicyInput(v *CreateFirewallPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateFirewallPolicyInput"} if v.FirewallPolicyName == nil { invalidParams.Add(smithy.NewErrParamRequired("FirewallPolicyName")) } if v.FirewallPolicy == nil { invalidParams.Add(smithy.NewErrParamRequired("FirewallPolicy")) } else if v.FirewallPolicy != nil { if err := validateFirewallPolicy(v.FirewallPolicy); err != nil { invalidParams.AddNested("FirewallPolicy", err.(smithy.InvalidParamsError)) } } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.EncryptionConfiguration != nil { if err := validateEncryptionConfiguration(v.EncryptionConfiguration); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateRuleGroupInput(v *CreateRuleGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateRuleGroupInput"} if v.RuleGroupName == nil { invalidParams.Add(smithy.NewErrParamRequired("RuleGroupName")) } if v.RuleGroup != nil { if err := validateRuleGroup(v.RuleGroup); err != nil { invalidParams.AddNested("RuleGroup", err.(smithy.InvalidParamsError)) } } if len(v.Type) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Type")) } if v.Capacity == nil { invalidParams.Add(smithy.NewErrParamRequired("Capacity")) } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.EncryptionConfiguration != nil { if err := validateEncryptionConfiguration(v.EncryptionConfiguration); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateTLSInspectionConfigurationInput(v *CreateTLSInspectionConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateTLSInspectionConfigurationInput"} if v.TLSInspectionConfigurationName == nil { invalidParams.Add(smithy.NewErrParamRequired("TLSInspectionConfigurationName")) } if v.TLSInspectionConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("TLSInspectionConfiguration")) } else if v.TLSInspectionConfiguration != nil { if err := validateTLSInspectionConfiguration(v.TLSInspectionConfiguration); err != nil { invalidParams.AddNested("TLSInspectionConfiguration", err.(smithy.InvalidParamsError)) } } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if v.EncryptionConfiguration != nil { if err := validateEncryptionConfiguration(v.EncryptionConfiguration); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeResourcePolicyInput(v *DescribeResourcePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeResourcePolicyInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDisassociateSubnetsInput(v *DisassociateSubnetsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DisassociateSubnetsInput"} if v.SubnetIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) } 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 validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} if v.ResourceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) } if v.Policy == nil { invalidParams.Add(smithy.NewErrParamRequired("Policy")) } 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 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 validateOpUpdateFirewallDeleteProtectionInput(v *UpdateFirewallDeleteProtectionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateFirewallDeleteProtectionInput"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateFirewallEncryptionConfigurationInput(v *UpdateFirewallEncryptionConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateFirewallEncryptionConfigurationInput"} if v.EncryptionConfiguration != nil { if err := validateEncryptionConfiguration(v.EncryptionConfiguration); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateFirewallPolicyChangeProtectionInput(v *UpdateFirewallPolicyChangeProtectionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateFirewallPolicyChangeProtectionInput"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateFirewallPolicyInput(v *UpdateFirewallPolicyInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateFirewallPolicyInput"} if v.UpdateToken == nil { invalidParams.Add(smithy.NewErrParamRequired("UpdateToken")) } if v.FirewallPolicy == nil { invalidParams.Add(smithy.NewErrParamRequired("FirewallPolicy")) } else if v.FirewallPolicy != nil { if err := validateFirewallPolicy(v.FirewallPolicy); err != nil { invalidParams.AddNested("FirewallPolicy", err.(smithy.InvalidParamsError)) } } if v.EncryptionConfiguration != nil { if err := validateEncryptionConfiguration(v.EncryptionConfiguration); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateLoggingConfigurationInput(v *UpdateLoggingConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateLoggingConfigurationInput"} if v.LoggingConfiguration != nil { if err := validateLoggingConfiguration(v.LoggingConfiguration); err != nil { invalidParams.AddNested("LoggingConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateRuleGroupInput(v *UpdateRuleGroupInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateRuleGroupInput"} if v.UpdateToken == nil { invalidParams.Add(smithy.NewErrParamRequired("UpdateToken")) } if v.RuleGroup != nil { if err := validateRuleGroup(v.RuleGroup); err != nil { invalidParams.AddNested("RuleGroup", err.(smithy.InvalidParamsError)) } } if v.EncryptionConfiguration != nil { if err := validateEncryptionConfiguration(v.EncryptionConfiguration); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateSubnetChangeProtectionInput(v *UpdateSubnetChangeProtectionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateSubnetChangeProtectionInput"} if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateTLSInspectionConfigurationInput(v *UpdateTLSInspectionConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateTLSInspectionConfigurationInput"} if v.TLSInspectionConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("TLSInspectionConfiguration")) } else if v.TLSInspectionConfiguration != nil { if err := validateTLSInspectionConfiguration(v.TLSInspectionConfiguration); err != nil { invalidParams.AddNested("TLSInspectionConfiguration", err.(smithy.InvalidParamsError)) } } if v.EncryptionConfiguration != nil { if err := validateEncryptionConfiguration(v.EncryptionConfiguration); err != nil { invalidParams.AddNested("EncryptionConfiguration", err.(smithy.InvalidParamsError)) } } if v.UpdateToken == nil { invalidParams.Add(smithy.NewErrParamRequired("UpdateToken")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
1,862
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 Network Firewall 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: "network-firewall.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "network-firewall-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "network-firewall.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, 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-northeast-3", }: 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: "ap-southeast-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-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-south-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: "network-firewall-fips.ca-central-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "ca-central-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ Hostname: "network-firewall-fips.us-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-east-2", }: endpoints.Endpoint{ Hostname: "network-firewall-fips.us-east-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-east-2", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-west-1", }: endpoints.Endpoint{ Hostname: "network-firewall-fips.us-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-west-2", }: endpoints.Endpoint{ Hostname: "network-firewall-fips.us-west-2.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-west-2", }, 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: "network-firewall-fips.us-east-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-fips.us-east-2.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-1", Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-fips.us-west-1.amazonaws.com", }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-fips.us-west-2.amazonaws.com", }, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "network-firewall.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "network-firewall-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "network-firewall.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "network-firewall.{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: "network-firewall-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "network-firewall.{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: "network-firewall-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "network-firewall.{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: "network-firewall-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "network-firewall.{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: "network-firewall.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "network-firewall-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "network-firewall.{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: "network-firewall-fips.us-gov-east-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-east-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "fips-us-gov-west-1", }: endpoints.Endpoint{ Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com", CredentialScope: endpoints.CredentialScope{ Region: "us-gov-west-1", }, Deprecated: aws.TrueTernary, }, endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-east-1", Variant: endpoints.FIPSVariant, }: { Hostname: "network-firewall-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: "network-firewall-fips.us-gov-west-1.amazonaws.com", }, }, }, }
481
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 AttachmentStatus string // Enum values for AttachmentStatus const ( AttachmentStatusCreating AttachmentStatus = "CREATING" AttachmentStatusDeleting AttachmentStatus = "DELETING" AttachmentStatusFailed AttachmentStatus = "FAILED" AttachmentStatusError AttachmentStatus = "ERROR" AttachmentStatusScaling AttachmentStatus = "SCALING" AttachmentStatusReady AttachmentStatus = "READY" ) // Values returns all known values for AttachmentStatus. 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 (AttachmentStatus) Values() []AttachmentStatus { return []AttachmentStatus{ "CREATING", "DELETING", "FAILED", "ERROR", "SCALING", "READY", } } type ConfigurationSyncState string // Enum values for ConfigurationSyncState const ( ConfigurationSyncStatePending ConfigurationSyncState = "PENDING" ConfigurationSyncStateInSync ConfigurationSyncState = "IN_SYNC" ConfigurationSyncStateCapacityConstrained ConfigurationSyncState = "CAPACITY_CONSTRAINED" ) // Values returns all known values for ConfigurationSyncState. 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 (ConfigurationSyncState) Values() []ConfigurationSyncState { return []ConfigurationSyncState{ "PENDING", "IN_SYNC", "CAPACITY_CONSTRAINED", } } type EncryptionType string // Enum values for EncryptionType const ( EncryptionTypeCustomerKms EncryptionType = "CUSTOMER_KMS" EncryptionTypeAwsOwnedKmsKey EncryptionType = "AWS_OWNED_KMS_KEY" ) // Values returns all known values for EncryptionType. 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 (EncryptionType) Values() []EncryptionType { return []EncryptionType{ "CUSTOMER_KMS", "AWS_OWNED_KMS_KEY", } } type FirewallStatusValue string // Enum values for FirewallStatusValue const ( FirewallStatusValueProvisioning FirewallStatusValue = "PROVISIONING" FirewallStatusValueDeleting FirewallStatusValue = "DELETING" FirewallStatusValueReady FirewallStatusValue = "READY" ) // Values returns all known values for FirewallStatusValue. 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 (FirewallStatusValue) Values() []FirewallStatusValue { return []FirewallStatusValue{ "PROVISIONING", "DELETING", "READY", } } type GeneratedRulesType string // Enum values for GeneratedRulesType const ( GeneratedRulesTypeAllowlist GeneratedRulesType = "ALLOWLIST" GeneratedRulesTypeDenylist GeneratedRulesType = "DENYLIST" ) // Values returns all known values for GeneratedRulesType. 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 (GeneratedRulesType) Values() []GeneratedRulesType { return []GeneratedRulesType{ "ALLOWLIST", "DENYLIST", } } type IPAddressType string // Enum values for IPAddressType const ( IPAddressTypeDualstack IPAddressType = "DUALSTACK" IPAddressTypeIpv4 IPAddressType = "IPV4" IPAddressTypeIpv6 IPAddressType = "IPV6" ) // Values returns all known values for IPAddressType. 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 (IPAddressType) Values() []IPAddressType { return []IPAddressType{ "DUALSTACK", "IPV4", "IPV6", } } type LogDestinationType string // Enum values for LogDestinationType const ( LogDestinationTypeS3 LogDestinationType = "S3" LogDestinationTypeCloudwatchLogs LogDestinationType = "CloudWatchLogs" LogDestinationTypeKinesisDataFirehose LogDestinationType = "KinesisDataFirehose" ) // Values returns all known values for LogDestinationType. 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 (LogDestinationType) Values() []LogDestinationType { return []LogDestinationType{ "S3", "CloudWatchLogs", "KinesisDataFirehose", } } type LogType string // Enum values for LogType const ( LogTypeAlert LogType = "ALERT" LogTypeFlow LogType = "FLOW" ) // Values returns all known values for LogType. 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 (LogType) Values() []LogType { return []LogType{ "ALERT", "FLOW", } } type OverrideAction string // Enum values for OverrideAction const ( OverrideActionDropToAlert OverrideAction = "DROP_TO_ALERT" ) // Values returns all known values for OverrideAction. 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 (OverrideAction) Values() []OverrideAction { return []OverrideAction{ "DROP_TO_ALERT", } } type PerObjectSyncStatus string // Enum values for PerObjectSyncStatus const ( PerObjectSyncStatusPending PerObjectSyncStatus = "PENDING" PerObjectSyncStatusInSync PerObjectSyncStatus = "IN_SYNC" PerObjectSyncStatusCapacityConstrained PerObjectSyncStatus = "CAPACITY_CONSTRAINED" ) // Values returns all known values for PerObjectSyncStatus. 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 (PerObjectSyncStatus) Values() []PerObjectSyncStatus { return []PerObjectSyncStatus{ "PENDING", "IN_SYNC", "CAPACITY_CONSTRAINED", } } type ResourceManagedStatus string // Enum values for ResourceManagedStatus const ( ResourceManagedStatusManaged ResourceManagedStatus = "MANAGED" ResourceManagedStatusAccount ResourceManagedStatus = "ACCOUNT" ) // Values returns all known values for ResourceManagedStatus. 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 (ResourceManagedStatus) Values() []ResourceManagedStatus { return []ResourceManagedStatus{ "MANAGED", "ACCOUNT", } } type ResourceManagedType string // Enum values for ResourceManagedType const ( ResourceManagedTypeAwsManagedThreatSignatures ResourceManagedType = "AWS_MANAGED_THREAT_SIGNATURES" ResourceManagedTypeAwsManagedDomainLists ResourceManagedType = "AWS_MANAGED_DOMAIN_LISTS" ) // Values returns all known values for ResourceManagedType. 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 (ResourceManagedType) Values() []ResourceManagedType { return []ResourceManagedType{ "AWS_MANAGED_THREAT_SIGNATURES", "AWS_MANAGED_DOMAIN_LISTS", } } type ResourceStatus string // Enum values for ResourceStatus const ( ResourceStatusActive ResourceStatus = "ACTIVE" ResourceStatusDeleting ResourceStatus = "DELETING" ) // Values returns all known values for ResourceStatus. 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 (ResourceStatus) Values() []ResourceStatus { return []ResourceStatus{ "ACTIVE", "DELETING", } } type RuleGroupType string // Enum values for RuleGroupType const ( RuleGroupTypeStateless RuleGroupType = "STATELESS" RuleGroupTypeStateful RuleGroupType = "STATEFUL" ) // Values returns all known values for RuleGroupType. 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 (RuleGroupType) Values() []RuleGroupType { return []RuleGroupType{ "STATELESS", "STATEFUL", } } type RuleOrder string // Enum values for RuleOrder const ( RuleOrderDefaultActionOrder RuleOrder = "DEFAULT_ACTION_ORDER" RuleOrderStrictOrder RuleOrder = "STRICT_ORDER" ) // Values returns all known values for RuleOrder. 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 (RuleOrder) Values() []RuleOrder { return []RuleOrder{ "DEFAULT_ACTION_ORDER", "STRICT_ORDER", } } type StatefulAction string // Enum values for StatefulAction const ( StatefulActionPass StatefulAction = "PASS" StatefulActionDrop StatefulAction = "DROP" StatefulActionAlert StatefulAction = "ALERT" StatefulActionReject StatefulAction = "REJECT" ) // Values returns all known values for StatefulAction. 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 (StatefulAction) Values() []StatefulAction { return []StatefulAction{ "PASS", "DROP", "ALERT", "REJECT", } } type StatefulRuleDirection string // Enum values for StatefulRuleDirection const ( StatefulRuleDirectionForward StatefulRuleDirection = "FORWARD" StatefulRuleDirectionAny StatefulRuleDirection = "ANY" ) // Values returns all known values for StatefulRuleDirection. 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 (StatefulRuleDirection) Values() []StatefulRuleDirection { return []StatefulRuleDirection{ "FORWARD", "ANY", } } type StatefulRuleProtocol string // Enum values for StatefulRuleProtocol const ( StatefulRuleProtocolAny StatefulRuleProtocol = "IP" StatefulRuleProtocolTcp StatefulRuleProtocol = "TCP" StatefulRuleProtocolUdp StatefulRuleProtocol = "UDP" StatefulRuleProtocolIcmp StatefulRuleProtocol = "ICMP" StatefulRuleProtocolHttp StatefulRuleProtocol = "HTTP" StatefulRuleProtocolFtp StatefulRuleProtocol = "FTP" StatefulRuleProtocolTls StatefulRuleProtocol = "TLS" StatefulRuleProtocolSmb StatefulRuleProtocol = "SMB" StatefulRuleProtocolDns StatefulRuleProtocol = "DNS" StatefulRuleProtocolDcerpc StatefulRuleProtocol = "DCERPC" StatefulRuleProtocolSsh StatefulRuleProtocol = "SSH" StatefulRuleProtocolSmtp StatefulRuleProtocol = "SMTP" StatefulRuleProtocolImap StatefulRuleProtocol = "IMAP" StatefulRuleProtocolMsn StatefulRuleProtocol = "MSN" StatefulRuleProtocolKrb5 StatefulRuleProtocol = "KRB5" StatefulRuleProtocolIkev2 StatefulRuleProtocol = "IKEV2" StatefulRuleProtocolTftp StatefulRuleProtocol = "TFTP" StatefulRuleProtocolNtp StatefulRuleProtocol = "NTP" StatefulRuleProtocolDhcp StatefulRuleProtocol = "DHCP" ) // Values returns all known values for StatefulRuleProtocol. 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 (StatefulRuleProtocol) Values() []StatefulRuleProtocol { return []StatefulRuleProtocol{ "IP", "TCP", "UDP", "ICMP", "HTTP", "FTP", "TLS", "SMB", "DNS", "DCERPC", "SSH", "SMTP", "IMAP", "MSN", "KRB5", "IKEV2", "TFTP", "NTP", "DHCP", } } type StreamExceptionPolicy string // Enum values for StreamExceptionPolicy const ( StreamExceptionPolicyDrop StreamExceptionPolicy = "DROP" StreamExceptionPolicyContinue StreamExceptionPolicy = "CONTINUE" StreamExceptionPolicyReject StreamExceptionPolicy = "REJECT" ) // Values returns all known values for StreamExceptionPolicy. 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 (StreamExceptionPolicy) Values() []StreamExceptionPolicy { return []StreamExceptionPolicy{ "DROP", "CONTINUE", "REJECT", } } type TargetType string // Enum values for TargetType const ( TargetTypeTlsSni TargetType = "TLS_SNI" TargetTypeHttpHost TargetType = "HTTP_HOST" ) // Values returns all known values for TargetType. Note that this can be expanded // in the future, and so it is only as up to date as the client. The ordering of // this slice is not guaranteed to be stable across updates. func (TargetType) Values() []TargetType { return []TargetType{ "TLS_SNI", "HTTP_HOST", } } type TCPFlag string // Enum values for TCPFlag const ( TCPFlagFin TCPFlag = "FIN" TCPFlagSyn TCPFlag = "SYN" TCPFlagRst TCPFlag = "RST" TCPFlagPsh TCPFlag = "PSH" TCPFlagAck TCPFlag = "ACK" TCPFlagUrg TCPFlag = "URG" TCPFlagEce TCPFlag = "ECE" TCPFlagCwr TCPFlag = "CWR" ) // Values returns all known values for TCPFlag. 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 (TCPFlag) Values() []TCPFlag { return []TCPFlag{ "FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECE", "CWR", } }
450
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" ) // Amazon Web Services doesn't currently have enough available capacity to fulfill // your request. Try your request later. type InsufficientCapacityException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InsufficientCapacityException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InsufficientCapacityException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InsufficientCapacityException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InsufficientCapacityException" } return *e.ErrorCodeOverride } func (e *InsufficientCapacityException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // Your request is valid, but Network Firewall couldn’t perform the operation // because of a system problem. Retry your request. type InternalServerError struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InternalServerError) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InternalServerError) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InternalServerError) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InternalServerError" } return *e.ErrorCodeOverride } func (e *InternalServerError) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // The operation failed because it's not valid. For example, you might have tried // to delete a rule group or firewall policy that's in use. type InvalidOperationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidOperationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidOperationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidOperationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidOperationException" } return *e.ErrorCodeOverride } func (e *InvalidOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The operation failed because of a problem with your request. Examples include: // - You specified an unsupported parameter name or value. // - You tried to update a property with a value that isn't among the available // types. // - Your request references an ARN that is malformed, or corresponds to a // resource that isn't valid in the context of the request. 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 policy statement failed validation. type InvalidResourcePolicyException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidResourcePolicyException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidResourcePolicyException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidResourcePolicyException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidResourcePolicyException" } return *e.ErrorCodeOverride } func (e *InvalidResourcePolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The token you provided is stale or isn't valid for the operation. type InvalidTokenException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidTokenException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidTokenException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidTokenException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidTokenException" } return *e.ErrorCodeOverride } func (e *InvalidTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Unable to perform the operation because doing so would violate a limit setting. 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 } // Unable to send logs to a configured logging destination. type LogDestinationPermissionException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *LogDestinationPermissionException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *LogDestinationPermissionException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *LogDestinationPermissionException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "LogDestinationPermissionException" } return *e.ErrorCodeOverride } func (e *LogDestinationPermissionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Unable to locate a resource using the parameters that you provided. 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 } // Unable to change the resource because your account doesn't own it. type ResourceOwnerCheckException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceOwnerCheckException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceOwnerCheckException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceOwnerCheckException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceOwnerCheckException" } return *e.ErrorCodeOverride } func (e *ResourceOwnerCheckException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Unable to process the request due to throttling limitations. 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 } // The operation you requested isn't supported by Network Firewall. type UnsupportedOperationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnsupportedOperationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnsupportedOperationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnsupportedOperationException" } return *e.ErrorCodeOverride } func (e *UnsupportedOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
329
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager import ( "context" cryptorand "crypto/rand" "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" smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "NetworkManager" const ServiceAPIVersion = "2019-07-05" // Client provides the API client to make operations call for AWS Network Manager. 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) resolveIdempotencyTokenProvider(&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 // Provides idempotency tokens values that will be automatically populated into // idempotent API operations. IdempotencyTokenProvider IdempotencyTokenProvider // 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, "networkmanager", 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 resolveIdempotencyTokenProvider(o *Options) { if o.IdempotencyTokenProvider != nil { return } o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) } 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 } // IdempotencyTokenProvider interface for providing idempotency token type IdempotencyTokenProvider interface { GetIdempotencyToken() (string, error) } 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) }
454
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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 networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Accepts a core network attachment request. Once the attachment request is // accepted by a core network owner, the attachment is created and connected to a // core network. func (c *Client) AcceptAttachment(ctx context.Context, params *AcceptAttachmentInput, optFns ...func(*Options)) (*AcceptAttachmentOutput, error) { if params == nil { params = &AcceptAttachmentInput{} } result, metadata, err := c.invokeOperation(ctx, "AcceptAttachment", params, optFns, c.addOperationAcceptAttachmentMiddlewares) if err != nil { return nil, err } out := result.(*AcceptAttachmentOutput) out.ResultMetadata = metadata return out, nil } type AcceptAttachmentInput struct { // The ID of the attachment. // // This member is required. AttachmentId *string noSmithyDocumentSerde } type AcceptAttachmentOutput struct { // The response to the attachment request. Attachment *types.Attachment // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAcceptAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAcceptAttachment{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAcceptAttachment{}, 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 = addOpAcceptAttachmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptAttachment(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_opAcceptAttachment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "AcceptAttachment", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Associates a core network Connect peer with a device and optionally, with a // link. If you specify a link, it must be associated with the specified device. // You can only associate core network Connect peers that have been created on a // core network Connect attachment on a core network. func (c *Client) AssociateConnectPeer(ctx context.Context, params *AssociateConnectPeerInput, optFns ...func(*Options)) (*AssociateConnectPeerOutput, error) { if params == nil { params = &AssociateConnectPeerInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateConnectPeer", params, optFns, c.addOperationAssociateConnectPeerMiddlewares) if err != nil { return nil, err } out := result.(*AssociateConnectPeerOutput) out.ResultMetadata = metadata return out, nil } type AssociateConnectPeerInput struct { // The ID of the Connect peer. // // This member is required. ConnectPeerId *string // The ID of the device. // // This member is required. DeviceId *string // The ID of your global network. // // This member is required. GlobalNetworkId *string // The ID of the link. LinkId *string noSmithyDocumentSerde } type AssociateConnectPeerOutput struct { // The response to the Connect peer request. ConnectPeerAssociation *types.ConnectPeerAssociation // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateConnectPeer{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateConnectPeer{}, 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 = addOpAssociateConnectPeerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateConnectPeer(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_opAssociateConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "AssociateConnectPeer", } }
141
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Associates a customer gateway with a device and optionally, with a link. If you // specify a link, it must be associated with the specified device. You can only // associate customer gateways that are connected to a VPN attachment on a transit // gateway or core network registered in your global network. When you register a // transit gateway or core network, customer gateways that are connected to the // transit gateway are automatically included in the global network. To list // customer gateways that are connected to a transit gateway, use the // DescribeVpnConnections (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpnConnections.html) // EC2 API and filter by transit-gateway-id . You cannot associate a customer // gateway with more than one device and link. func (c *Client) AssociateCustomerGateway(ctx context.Context, params *AssociateCustomerGatewayInput, optFns ...func(*Options)) (*AssociateCustomerGatewayOutput, error) { if params == nil { params = &AssociateCustomerGatewayInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateCustomerGateway", params, optFns, c.addOperationAssociateCustomerGatewayMiddlewares) if err != nil { return nil, err } out := result.(*AssociateCustomerGatewayOutput) out.ResultMetadata = metadata return out, nil } type AssociateCustomerGatewayInput struct { // The Amazon Resource Name (ARN) of the customer gateway. // // This member is required. CustomerGatewayArn *string // The ID of the device. // // This member is required. DeviceId *string // The ID of the global network. // // This member is required. GlobalNetworkId *string // The ID of the link. LinkId *string noSmithyDocumentSerde } type AssociateCustomerGatewayOutput struct { // The customer gateway association. CustomerGatewayAssociation *types.CustomerGatewayAssociation // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateCustomerGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateCustomerGateway{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateCustomerGateway{}, 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 = addOpAssociateCustomerGatewayValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateCustomerGateway(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_opAssociateCustomerGateway(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "AssociateCustomerGateway", } }
147
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Associates a link to a device. A device can be associated to multiple links and // a link can be associated to multiple devices. The device and link must be in the // same global network and the same site. func (c *Client) AssociateLink(ctx context.Context, params *AssociateLinkInput, optFns ...func(*Options)) (*AssociateLinkOutput, error) { if params == nil { params = &AssociateLinkInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateLink", params, optFns, c.addOperationAssociateLinkMiddlewares) if err != nil { return nil, err } out := result.(*AssociateLinkOutput) out.ResultMetadata = metadata return out, nil } type AssociateLinkInput struct { // The ID of the device. // // This member is required. DeviceId *string // The ID of the global network. // // This member is required. GlobalNetworkId *string // The ID of the link. // // This member is required. LinkId *string noSmithyDocumentSerde } type AssociateLinkOutput struct { // The link association. LinkAssociation *types.LinkAssociation // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateLinkMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateLink{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateLink{}, 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 = addOpAssociateLinkValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateLink(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_opAssociateLink(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "AssociateLink", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Associates a transit gateway Connect peer with a device, and optionally, with a // link. If you specify a link, it must be associated with the specified device. // You can only associate transit gateway Connect peers that have been created on a // transit gateway that's registered in your global network. You cannot associate a // transit gateway Connect peer with more than one device and link. func (c *Client) AssociateTransitGatewayConnectPeer(ctx context.Context, params *AssociateTransitGatewayConnectPeerInput, optFns ...func(*Options)) (*AssociateTransitGatewayConnectPeerOutput, error) { if params == nil { params = &AssociateTransitGatewayConnectPeerInput{} } result, metadata, err := c.invokeOperation(ctx, "AssociateTransitGatewayConnectPeer", params, optFns, c.addOperationAssociateTransitGatewayConnectPeerMiddlewares) if err != nil { return nil, err } out := result.(*AssociateTransitGatewayConnectPeerOutput) out.ResultMetadata = metadata return out, nil } type AssociateTransitGatewayConnectPeerInput struct { // The ID of the device. // // This member is required. DeviceId *string // The ID of the global network. // // This member is required. GlobalNetworkId *string // The Amazon Resource Name (ARN) of the Connect peer. // // This member is required. TransitGatewayConnectPeerArn *string // The ID of the link. LinkId *string noSmithyDocumentSerde } type AssociateTransitGatewayConnectPeerOutput struct { // The transit gateway Connect peer association. TransitGatewayConnectPeerAssociation *types.TransitGatewayConnectPeerAssociation // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationAssociateTransitGatewayConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociateTransitGatewayConnectPeer{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociateTransitGatewayConnectPeer{}, 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 = addOpAssociateTransitGatewayConnectPeerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTransitGatewayConnectPeer(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_opAssociateTransitGatewayConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "AssociateTransitGatewayConnectPeer", } }
142
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a core network Connect attachment from a specified core network // attachment. A core network Connect attachment is a GRE-based tunnel attachment // that you can use to establish a connection between a core network and an // appliance. A core network Connect attachment uses an existing VPC attachment as // the underlying transport mechanism. func (c *Client) CreateConnectAttachment(ctx context.Context, params *CreateConnectAttachmentInput, optFns ...func(*Options)) (*CreateConnectAttachmentOutput, error) { if params == nil { params = &CreateConnectAttachmentInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateConnectAttachment", params, optFns, c.addOperationCreateConnectAttachmentMiddlewares) if err != nil { return nil, err } out := result.(*CreateConnectAttachmentOutput) out.ResultMetadata = metadata return out, nil } type CreateConnectAttachmentInput struct { // The ID of a core network where you want to create the attachment. // // This member is required. CoreNetworkId *string // The Region where the edge is located. // // This member is required. EdgeLocation *string // Options for creating an attachment. // // This member is required. Options *types.ConnectAttachmentOptions // The ID of the attachment between the two connections. // // This member is required. TransportAttachmentId *string // The client token associated with the request. ClientToken *string // The list of key-value tags associated with the request. Tags []types.Tag noSmithyDocumentSerde } type CreateConnectAttachmentOutput struct { // The response to a Connect attachment request. ConnectAttachment *types.ConnectAttachment // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateConnectAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateConnectAttachment{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateConnectAttachment{}, 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_opCreateConnectAttachmentMiddleware(stack, options); err != nil { return err } if err = addOpCreateConnectAttachmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConnectAttachment(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_initializeOpCreateConnectAttachment struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateConnectAttachment) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateConnectAttachment) 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.(*CreateConnectAttachmentInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateConnectAttachmentInput ") } 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_opCreateConnectAttachmentMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateConnectAttachment{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateConnectAttachment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateConnectAttachment", } }
187
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a connection between two devices. The devices can be a physical or // virtual appliance that connects to a third-party appliance in a VPC, or a // physical appliance that connects to another physical appliance in an on-premises // network. func (c *Client) CreateConnection(ctx context.Context, params *CreateConnectionInput, optFns ...func(*Options)) (*CreateConnectionOutput, error) { if params == nil { params = &CreateConnectionInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateConnection", params, optFns, c.addOperationCreateConnectionMiddlewares) if err != nil { return nil, err } out := result.(*CreateConnectionOutput) out.ResultMetadata = metadata return out, nil } type CreateConnectionInput struct { // The ID of the second device in the connection. // // This member is required. ConnectedDeviceId *string // The ID of the first device in the connection. // // This member is required. DeviceId *string // The ID of the global network. // // This member is required. GlobalNetworkId *string // The ID of the link for the second device. ConnectedLinkId *string // A description of the connection. Length Constraints: Maximum length of 256 // characters. Description *string // The ID of the link for the first device. LinkId *string // The tags to apply to the resource during creation. Tags []types.Tag noSmithyDocumentSerde } type CreateConnectionOutput struct { // Information about the connection. Connection *types.Connection // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateConnection{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateConnection{}, 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 = addOpCreateConnectionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConnection(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_opCreateConnection(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateConnection", } }
151
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a core network Connect peer for a specified core network connect // attachment between a core network and an appliance. The peer address and transit // gateway address must be the same IP address family (IPv4 or IPv6). func (c *Client) CreateConnectPeer(ctx context.Context, params *CreateConnectPeerInput, optFns ...func(*Options)) (*CreateConnectPeerOutput, error) { if params == nil { params = &CreateConnectPeerInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateConnectPeer", params, optFns, c.addOperationCreateConnectPeerMiddlewares) if err != nil { return nil, err } out := result.(*CreateConnectPeerOutput) out.ResultMetadata = metadata return out, nil } type CreateConnectPeerInput struct { // The ID of the connection attachment. // // This member is required. ConnectAttachmentId *string // The inside IP addresses used for BGP peering. // // This member is required. InsideCidrBlocks []string // The Connect peer address. // // This member is required. PeerAddress *string // The Connect peer BGP options. BgpOptions *types.BgpOptions // The client token associated with the request. ClientToken *string // A Connect peer core network address. CoreNetworkAddress *string // The tags associated with the peer request. Tags []types.Tag noSmithyDocumentSerde } type CreateConnectPeerOutput struct { // The response to the request. ConnectPeer *types.ConnectPeer // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateConnectPeer{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateConnectPeer{}, 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_opCreateConnectPeerMiddleware(stack, options); err != nil { return err } if err = addOpCreateConnectPeerValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConnectPeer(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_initializeOpCreateConnectPeer struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateConnectPeer) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateConnectPeer) 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.(*CreateConnectPeerInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateConnectPeerInput ") } 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_opCreateConnectPeerMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateConnectPeer{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateConnectPeer", } }
186
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a core network as part of your global network, and optionally, with a // core network policy. func (c *Client) CreateCoreNetwork(ctx context.Context, params *CreateCoreNetworkInput, optFns ...func(*Options)) (*CreateCoreNetworkOutput, error) { if params == nil { params = &CreateCoreNetworkInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateCoreNetwork", params, optFns, c.addOperationCreateCoreNetworkMiddlewares) if err != nil { return nil, err } out := result.(*CreateCoreNetworkOutput) out.ResultMetadata = metadata return out, nil } type CreateCoreNetworkInput struct { // The ID of the global network that a core network will be a part of. // // This member is required. GlobalNetworkId *string // The client token associated with a core network request. ClientToken *string // The description of a core network. Description *string // The policy document for creating a core network. PolicyDocument *string // Key-value tags associated with a core network request. Tags []types.Tag noSmithyDocumentSerde } type CreateCoreNetworkOutput struct { // Returns details about a core network. CoreNetwork *types.CoreNetwork // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateCoreNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCoreNetwork{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCoreNetwork{}, 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_opCreateCoreNetworkMiddleware(stack, options); err != nil { return err } if err = addOpCreateCoreNetworkValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCoreNetwork(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_initializeOpCreateCoreNetwork struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateCoreNetwork) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateCoreNetwork) 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.(*CreateCoreNetworkInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCoreNetworkInput ") } 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_opCreateCoreNetworkMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCoreNetwork{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateCoreNetwork(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateCoreNetwork", } }
175
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new device in a global network. If you specify both a site ID and a // location, the location of the site is used for visualization in the Network // Manager console. func (c *Client) CreateDevice(ctx context.Context, params *CreateDeviceInput, optFns ...func(*Options)) (*CreateDeviceOutput, error) { if params == nil { params = &CreateDeviceInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateDevice", params, optFns, c.addOperationCreateDeviceMiddlewares) if err != nil { return nil, err } out := result.(*CreateDeviceOutput) out.ResultMetadata = metadata return out, nil } type CreateDeviceInput struct { // The ID of the global network. // // This member is required. GlobalNetworkId *string // The Amazon Web Services location of the device, if applicable. For an // on-premises device, you can omit this parameter. AWSLocation *types.AWSLocation // A description of the device. Constraints: Maximum length of 256 characters. Description *string // The location of the device. Location *types.Location // The model of the device. Constraints: Maximum length of 128 characters. Model *string // The serial number of the device. Constraints: Maximum length of 128 characters. SerialNumber *string // The ID of the site. SiteId *string // The tags to apply to the resource during creation. Tags []types.Tag // The type of the device. Type *string // The vendor of the device. Constraints: Maximum length of 128 characters. Vendor *string noSmithyDocumentSerde } type CreateDeviceOutput struct { // Information about the device. Device *types.Device // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateDeviceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateDevice{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateDevice{}, 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 = addOpCreateDeviceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDevice(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_opCreateDevice(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateDevice", } }
155
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new, empty global network. func (c *Client) CreateGlobalNetwork(ctx context.Context, params *CreateGlobalNetworkInput, optFns ...func(*Options)) (*CreateGlobalNetworkOutput, error) { if params == nil { params = &CreateGlobalNetworkInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateGlobalNetwork", params, optFns, c.addOperationCreateGlobalNetworkMiddlewares) if err != nil { return nil, err } out := result.(*CreateGlobalNetworkOutput) out.ResultMetadata = metadata return out, nil } type CreateGlobalNetworkInput struct { // A description of the global network. Constraints: Maximum length of 256 // characters. Description *string // The tags to apply to the resource during creation. Tags []types.Tag noSmithyDocumentSerde } type CreateGlobalNetworkOutput struct { // Information about the global network object. GlobalNetwork *types.GlobalNetwork // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateGlobalNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateGlobalNetwork{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateGlobalNetwork{}, 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_opCreateGlobalNetwork(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_opCreateGlobalNetwork(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateGlobalNetwork", } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new link for a specified site. func (c *Client) CreateLink(ctx context.Context, params *CreateLinkInput, optFns ...func(*Options)) (*CreateLinkOutput, error) { if params == nil { params = &CreateLinkInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateLink", params, optFns, c.addOperationCreateLinkMiddlewares) if err != nil { return nil, err } out := result.(*CreateLinkOutput) out.ResultMetadata = metadata return out, nil } type CreateLinkInput struct { // The upload speed and download speed in Mbps. // // This member is required. Bandwidth *types.Bandwidth // The ID of the global network. // // This member is required. GlobalNetworkId *string // The ID of the site. // // This member is required. SiteId *string // A description of the link. Constraints: Maximum length of 256 characters. Description *string // The provider of the link. Constraints: Maximum length of 128 characters. Cannot // include the following characters: | \ ^ Provider *string // The tags to apply to the resource during creation. Tags []types.Tag // The type of the link. Constraints: Maximum length of 128 characters. Cannot // include the following characters: | \ ^ Type *string noSmithyDocumentSerde } type CreateLinkOutput struct { // Information about the link. Link *types.Link // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateLinkMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateLink{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateLink{}, 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 = addOpCreateLinkValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLink(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_opCreateLink(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateLink", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new site in a global network. func (c *Client) CreateSite(ctx context.Context, params *CreateSiteInput, optFns ...func(*Options)) (*CreateSiteOutput, error) { if params == nil { params = &CreateSiteInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateSite", params, optFns, c.addOperationCreateSiteMiddlewares) if err != nil { return nil, err } out := result.(*CreateSiteOutput) out.ResultMetadata = metadata return out, nil } type CreateSiteInput struct { // The ID of the global network. // // This member is required. GlobalNetworkId *string // A description of your site. Constraints: Maximum length of 256 characters. Description *string // The site location. This information is used for visualization in the Network // Manager console. If you specify the address, the latitude and longitude are // automatically calculated. // - Address : The physical address of the site. // - Latitude : The latitude of the site. // - Longitude : The longitude of the site. Location *types.Location // The tags to apply to the resource during creation. Tags []types.Tag noSmithyDocumentSerde } type CreateSiteOutput struct { // Information about the site. Site *types.Site // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateSiteMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSite{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSite{}, 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 = addOpCreateSiteValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSite(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_opCreateSite(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateSite", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates an Amazon Web Services site-to-site VPN attachment on an edge location // of a core network. func (c *Client) CreateSiteToSiteVpnAttachment(ctx context.Context, params *CreateSiteToSiteVpnAttachmentInput, optFns ...func(*Options)) (*CreateSiteToSiteVpnAttachmentOutput, error) { if params == nil { params = &CreateSiteToSiteVpnAttachmentInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateSiteToSiteVpnAttachment", params, optFns, c.addOperationCreateSiteToSiteVpnAttachmentMiddlewares) if err != nil { return nil, err } out := result.(*CreateSiteToSiteVpnAttachmentOutput) out.ResultMetadata = metadata return out, nil } type CreateSiteToSiteVpnAttachmentInput struct { // The ID of a core network where you're creating a site-to-site VPN attachment. // // This member is required. CoreNetworkId *string // The ARN identifying the VPN attachment. // // This member is required. VpnConnectionArn *string // The client token associated with the request. ClientToken *string // The tags associated with the request. Tags []types.Tag noSmithyDocumentSerde } type CreateSiteToSiteVpnAttachmentOutput struct { // Details about a site-to-site VPN attachment. SiteToSiteVpnAttachment *types.SiteToSiteVpnAttachment // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateSiteToSiteVpnAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSiteToSiteVpnAttachment{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSiteToSiteVpnAttachment{}, 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_opCreateSiteToSiteVpnAttachmentMiddleware(stack, options); err != nil { return err } if err = addOpCreateSiteToSiteVpnAttachmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSiteToSiteVpnAttachment(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_initializeOpCreateSiteToSiteVpnAttachment struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateSiteToSiteVpnAttachment) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateSiteToSiteVpnAttachment) 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.(*CreateSiteToSiteVpnAttachmentInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateSiteToSiteVpnAttachmentInput ") } 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_opCreateSiteToSiteVpnAttachmentMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateSiteToSiteVpnAttachment{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateSiteToSiteVpnAttachment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateSiteToSiteVpnAttachment", } }
174
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a transit gateway peering connection. func (c *Client) CreateTransitGatewayPeering(ctx context.Context, params *CreateTransitGatewayPeeringInput, optFns ...func(*Options)) (*CreateTransitGatewayPeeringOutput, error) { if params == nil { params = &CreateTransitGatewayPeeringInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayPeering", params, optFns, c.addOperationCreateTransitGatewayPeeringMiddlewares) if err != nil { return nil, err } out := result.(*CreateTransitGatewayPeeringOutput) out.ResultMetadata = metadata return out, nil } type CreateTransitGatewayPeeringInput struct { // The ID of a core network. // // This member is required. CoreNetworkId *string // The ARN of the transit gateway for the peering request. // // This member is required. TransitGatewayArn *string // The client token associated with the request. ClientToken *string // The list of key-value tags associated with the request. Tags []types.Tag noSmithyDocumentSerde } type CreateTransitGatewayPeeringOutput struct { // Returns information about the transit gateway peering connection request. TransitGatewayPeering *types.TransitGatewayPeering // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateTransitGatewayPeeringMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTransitGatewayPeering{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateTransitGatewayPeering{}, 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_opCreateTransitGatewayPeeringMiddleware(stack, options); err != nil { return err } if err = addOpCreateTransitGatewayPeeringValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayPeering(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_initializeOpCreateTransitGatewayPeering struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateTransitGatewayPeering) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateTransitGatewayPeering) 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.(*CreateTransitGatewayPeeringInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTransitGatewayPeeringInput ") } 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_opCreateTransitGatewayPeeringMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTransitGatewayPeering{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateTransitGatewayPeering(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateTransitGatewayPeering", } }
173
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a transit gateway route table attachment. func (c *Client) CreateTransitGatewayRouteTableAttachment(ctx context.Context, params *CreateTransitGatewayRouteTableAttachmentInput, optFns ...func(*Options)) (*CreateTransitGatewayRouteTableAttachmentOutput, error) { if params == nil { params = &CreateTransitGatewayRouteTableAttachmentInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayRouteTableAttachment", params, optFns, c.addOperationCreateTransitGatewayRouteTableAttachmentMiddlewares) if err != nil { return nil, err } out := result.(*CreateTransitGatewayRouteTableAttachmentOutput) out.ResultMetadata = metadata return out, nil } type CreateTransitGatewayRouteTableAttachmentInput struct { // The ID of the peer for the // // This member is required. PeeringId *string // The ARN of the transit gateway route table for the attachment request. For // example, "TransitGatewayRouteTableArn": // "arn:aws:ec2:us-west-2:123456789012:transit-gateway-route-table/tgw-rtb-9876543210123456" // . // // This member is required. TransitGatewayRouteTableArn *string // The client token associated with the request. ClientToken *string // The list of key-value tags associated with the request. Tags []types.Tag noSmithyDocumentSerde } type CreateTransitGatewayRouteTableAttachmentOutput struct { // The route table associated with the create transit gateway route table // attachment request. TransitGatewayRouteTableAttachment *types.TransitGatewayRouteTableAttachment // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateTransitGatewayRouteTableAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTransitGatewayRouteTableAttachment{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateTransitGatewayRouteTableAttachment{}, 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_opCreateTransitGatewayRouteTableAttachmentMiddleware(stack, options); err != nil { return err } if err = addOpCreateTransitGatewayRouteTableAttachmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayRouteTableAttachment(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_initializeOpCreateTransitGatewayRouteTableAttachment struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateTransitGatewayRouteTableAttachment) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateTransitGatewayRouteTableAttachment) 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.(*CreateTransitGatewayRouteTableAttachmentInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTransitGatewayRouteTableAttachmentInput ") } 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_opCreateTransitGatewayRouteTableAttachmentMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTransitGatewayRouteTableAttachment{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateTransitGatewayRouteTableAttachment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateTransitGatewayRouteTableAttachment", } }
177
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package networkmanager 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/networkmanager/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a VPC attachment on an edge location of a core network. func (c *Client) CreateVpcAttachment(ctx context.Context, params *CreateVpcAttachmentInput, optFns ...func(*Options)) (*CreateVpcAttachmentOutput, error) { if params == nil { params = &CreateVpcAttachmentInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateVpcAttachment", params, optFns, c.addOperationCreateVpcAttachmentMiddlewares) if err != nil { return nil, err } out := result.(*CreateVpcAttachmentOutput) out.ResultMetadata = metadata return out, nil } type CreateVpcAttachmentInput struct { // The ID of a core network for the VPC attachment. // // This member is required. CoreNetworkId *string // The subnet ARN of the VPC attachment. // // This member is required. SubnetArns []string // The ARN of the VPC. // // This member is required. VpcArn *string // The client token associated with the request. ClientToken *string // Options for the VPC attachment. Options *types.VpcOptions // The key-value tags associated with the request. Tags []types.Tag noSmithyDocumentSerde } type CreateVpcAttachmentOutput struct { // Provides details about the VPC attachment. VpcAttachment *types.VpcAttachment // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateVpcAttachment{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateVpcAttachment{}, 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_opCreateVpcAttachmentMiddleware(stack, options); err != nil { return err } if err = addOpCreateVpcAttachmentValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcAttachment(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_initializeOpCreateVpcAttachment struct { tokenProvider IdempotencyTokenProvider } func (*idempotencyToken_initializeOpCreateVpcAttachment) ID() string { return "OperationIdempotencyTokenAutoFill" } func (m *idempotencyToken_initializeOpCreateVpcAttachment) 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.(*CreateVpcAttachmentInput) if !ok { return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVpcAttachmentInput ") } 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_opCreateVpcAttachmentMiddleware(stack *middleware.Stack, cfg Options) error { return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVpcAttachment{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) } func newServiceMetadataMiddleware_opCreateVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "networkmanager", OperationName: "CreateVpcAttachment", } }
181