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.

Account

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

type Account struct { ApiKeyVersion *string `locationName:"apiKeyVersion" type:"string"` CloudwatchRoleArn *string `locationName:"cloudwatchRoleArn" type:"string"` Features []*string `locationName:"features" type:"list"` ThrottleSettings *ThrottleSettings `locationName:"throttleSettings" type:"structure"` }

Represents an AWS account that is associated with API Gateway.

To view the account info, call GET on this resource.

Error Codes

The following exception may be thrown when the request fails.

UnauthorizedException NotFoundException TooManyRequestsException For detailed error code information, including the corresponding HTTP Status Codes, see API Gateway Error Codes (https://docs.aws.amazon.com/apigateway/api-reference/handling-errors/#api-error-codes)

Example: Get the information about an account.

Request

GET /account HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com X-Amz-Date: 20160531T184618Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash} Response

The successful response returns a 200 OK status code and a payload similar to the following:

{ "_links": { "curies": { "href": "https://docs.aws.amazon.com/apigateway/latest/developerguide/account-apigateway-{rel}.html", "name": "account", "templated": true }, "self": { "href": "/account" }, "account:update": { "href": "/account" } }, "cloudwatchRoleArn": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "throttleSettings": { "rateLimit": 500, "burstLimit": 1000 } } In addition to making the REST API call directly, you can use the AWS CLI and an AWS SDK to access this resource.

API Gateway Limits (https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-limits.html)Developer Guide (https://docs.aws.amazon.com/apigateway/latest/developerguide/welcome.html), AWS CLI (https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-account.html)

ApiKeyVersion

Type: *string

The version of the API keys used for the account.

CloudwatchRoleArn

Type: *string

The ARN of an Amazon CloudWatch role for the current Account.

Features

Type: []*string

A list of features supported for the account. When usage plans are enabled, the features list will include an entry of "UsagePlans".

ThrottleSettings

The API request rate limits.

Method

GoString

func (s Account) GoString() string

GoString returns the string representation

SetApiKeyVersion

func (s *Account) SetApiKeyVersion(v string) *Account

SetApiKeyVersion sets the ApiKeyVersion field's value.

SetCloudwatchRoleArn

func (s *Account) SetCloudwatchRoleArn(v string) *Account

SetCloudwatchRoleArn sets the CloudwatchRoleArn field's value.

SetFeatures

func (s *Account) SetFeatures(v []*string) *Account

SetFeatures sets the Features field's value.

SetThrottleSettings

func (s *Account) SetThrottleSettings(v *ThrottleSettings) *Account

SetThrottleSettings sets the ThrottleSettings field's value.

String

func (s Account) String() string

String returns the string representation

On this page: