AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

PutRestApiInput

import "github.com/aws/aws-sdk-go/service/apigateway"

type PutRestApiInput struct { Body []byte `locationName:"body" type:"blob" required:"true"` FailOnWarnings *bool `location:"querystring" locationName:"failonwarnings" type:"boolean"` Mode *string `location:"querystring" locationName:"mode" type:"string" enum:"PutMode"` Parameters map[string]*string `location:"querystring" locationName:"parameters" type:"map"` RestApiId *string `location:"uri" locationName:"restapi_id" type:"string" required:"true"` }

A PUT request to update an existing API, with external API definitions specified as the request body.

Body

Type: []byte

[Required] The PUT request body containing external API definitions. Currently, only OpenAPI definition JSON/YAML files are supported. The maximum size of the API definition file is 2MB.

Body is a required field

FailOnWarnings

Type: *bool

A query parameter to indicate whether to rollback the API update (true) or not (false) when a warning is encountered. The default value is false.

Mode

Type: *string

The mode query parameter to specify the update mode. Valid values are "merge" and "overwrite". By default, the update mode is "merge".

Parameters

Type: map[string]*string

Custom header parameters as part of the request. For example, to exclude DocumentationParts from an imported API, set ignore=documentation as a parameters value, as in the AWS CLI command of aws apigateway import-rest-api --parameters ignore=documentation --body 'file:///path/to/imported-api-body.json'.

RestApiId

Type: *string

[Required] The string identifier of the associated RestApi.

RestApiId is a required field

Method

GoString

func (s PutRestApiInput) GoString() string

GoString returns the string representation

SetBody

func (s *PutRestApiInput) SetBody(v []byte) *PutRestApiInput

SetBody sets the Body field's value.

SetFailOnWarnings

func (s *PutRestApiInput) SetFailOnWarnings(v bool) *PutRestApiInput

SetFailOnWarnings sets the FailOnWarnings field's value.

SetMode

func (s *PutRestApiInput) SetMode(v string) *PutRestApiInput

SetMode sets the Mode field's value.

SetParameters

func (s *PutRestApiInput) SetParameters(v map[string]*string) *PutRestApiInput

SetParameters sets the Parameters field's value.

SetRestApiId

func (s *PutRestApiInput) SetRestApiId(v string) *PutRestApiInput

SetRestApiId sets the RestApiId field's value.

String

func (s PutRestApiInput) String() string

String returns the string representation

Validate

func (s *PutRestApiInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: