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.

CreateRestApiInput

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

type CreateRestApiInput struct { ApiKeySource *string `locationName:"apiKeySource" type:"string" enum:"ApiKeySourceType"` BinaryMediaTypes []*string `locationName:"binaryMediaTypes" type:"list"` CloneFrom *string `locationName:"cloneFrom" type:"string"` Description *string `locationName:"description" type:"string"` EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` MinimumCompressionSize *int64 `locationName:"minimumCompressionSize" type:"integer"` Name *string `locationName:"name" type:"string" required:"true"` Policy *string `locationName:"policy" type:"string"` Version *string `locationName:"version" type:"string"` }

The POST Request to add a new RestApi resource to your collection.

ApiKeySource

Type: *string

The source of the API key for metering requests according to a usage plan. Valid values are: HEADER to read the API key from the X-API-Key header of a request. AUTHORIZER to read the API key from the UsageIdentifierKey from a custom authorizer.

BinaryMediaTypes

Type: []*string

The list of binary media types supported by the RestApi. By default, the RestApi supports only UTF-8-encoded text payloads.

CloneFrom

Type: *string

The ID of the RestApi that you want to clone from.

Description

Type: *string

The description of the RestApi.

EndpointConfiguration

The endpoint configuration to indicate the types of endpoints an API (RestApi) or its custom domain name (DomainName) has.

MinimumCompressionSize

Type: *int64

A nullable integer that is used to enable compression (with non-negative between 0 and 10485760 (10M) bytes, inclusive) or disable compression (with a null value) on an API. When compression is enabled, compression or decompression is not applied on the payload if the payload size is smaller than this value. Setting it to zero allows compression for any payload size.

Name

Type: *string

[Required] The name of the RestApi.

Name is a required field

Policy

Type: *string

A stringified JSON policy document that applies to this RestApi regardless of the caller and Method

Version

Type: *string

A version identifier for the API.

Method

GoString

func (s CreateRestApiInput) GoString() string

GoString returns the string representation

SetApiKeySource

func (s *CreateRestApiInput) SetApiKeySource(v string) *CreateRestApiInput

SetApiKeySource sets the ApiKeySource field's value.

SetBinaryMediaTypes

func (s *CreateRestApiInput) SetBinaryMediaTypes(v []*string) *CreateRestApiInput

SetBinaryMediaTypes sets the BinaryMediaTypes field's value.

SetCloneFrom

func (s *CreateRestApiInput) SetCloneFrom(v string) *CreateRestApiInput

SetCloneFrom sets the CloneFrom field's value.

SetDescription

func (s *CreateRestApiInput) SetDescription(v string) *CreateRestApiInput

SetDescription sets the Description field's value.

SetEndpointConfiguration

func (s *CreateRestApiInput) SetEndpointConfiguration(v *EndpointConfiguration) *CreateRestApiInput

SetEndpointConfiguration sets the EndpointConfiguration field's value.

SetMinimumCompressionSize

func (s *CreateRestApiInput) SetMinimumCompressionSize(v int64) *CreateRestApiInput

SetMinimumCompressionSize sets the MinimumCompressionSize field's value.

SetName

func (s *CreateRestApiInput) SetName(v string) *CreateRestApiInput

SetName sets the Name field's value.

SetPolicy

func (s *CreateRestApiInput) SetPolicy(v string) *CreateRestApiInput

SetPolicy sets the Policy field's value.

SetVersion

func (s *CreateRestApiInput) SetVersion(v string) *CreateRestApiInput

SetVersion sets the Version field's value.

String

func (s CreateRestApiInput) String() string

String returns the string representation

Validate

func (s *CreateRestApiInput) Validate() error

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

On this page: