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.

RestApi

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

type RestApi struct { ApiKeySource *string `locationName:"apiKeySource" type:"string" enum:"ApiKeySourceType"` BinaryMediaTypes []*string `locationName:"binaryMediaTypes" type:"list"` CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` Description *string `locationName:"description" type:"string"` EndpointConfiguration *EndpointConfiguration `locationName:"endpointConfiguration" type:"structure"` Id *string `locationName:"id" type:"string"` MinimumCompressionSize *int64 `locationName:"minimumCompressionSize" type:"integer"` Name *string `locationName:"name" type:"string"` Policy *string `locationName:"policy" type:"string"` Version *string `locationName:"version" type:"string"` Warnings []*string `locationName:"warnings" type:"list"` }

Represents a REST API.

Create an API (https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-create-api.html)

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.

CreatedDate

Type: *time.Time

The timestamp when the API was created.

Description

Type: *string

The API's description.

EndpointConfiguration

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

Id

Type: *string

The API's identifier. This identifier is unique across all of your APIs in API Gateway.

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

The API's name.

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.

Warnings

Type: []*string

The warning messages reported when failonwarnings is turned on during API import.

Method

GoString

func (s RestApi) GoString() string

GoString returns the string representation

SetApiKeySource

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

SetApiKeySource sets the ApiKeySource field's value.

SetBinaryMediaTypes

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

SetBinaryMediaTypes sets the BinaryMediaTypes field's value.

SetCreatedDate

func (s *RestApi) SetCreatedDate(v time.Time) *RestApi

SetCreatedDate sets the CreatedDate field's value.

SetDescription

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

SetDescription sets the Description field's value.

SetEndpointConfiguration

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

SetEndpointConfiguration sets the EndpointConfiguration field's value.

SetId

func (s *RestApi) SetId(v string) *RestApi

SetId sets the Id field's value.

SetMinimumCompressionSize

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

SetMinimumCompressionSize sets the MinimumCompressionSize field's value.

SetName

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

SetName sets the Name field's value.

SetPolicy

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

SetPolicy sets the Policy field's value.

SetVersion

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

SetVersion sets the Version field's value.

SetWarnings

func (s *RestApi) SetWarnings(v []*string) *RestApi

SetWarnings sets the Warnings field's value.

String

func (s RestApi) String() string

String returns the string representation

On this page: