Paws::ApiGateway::CreateRestApi - Arguments for method CreateRestApi on Paws::ApiGateway


This class represents the parameters used for calling the method CreateRestApi on the Amazon API Gateway service. Use the attributes of this class as arguments to method CreateRestApi.

You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateRestApi.


    my $apigateway = Paws->service('ApiGateway');
    my $RestApi = $apigateway->CreateRestApi(
      Name                  => 'MyString',
      ApiKeySource          => 'HEADER',               # OPTIONAL
      BinaryMediaTypes      => [ 'MyString', ... ],    # OPTIONAL
      CloneFrom             => 'MyString',             # OPTIONAL
      Description           => 'MyString',             # OPTIONAL
      EndpointConfiguration => {
        types => [
          'REGIONAL', ...                              # values: REGIONAL, EDGE
        ],                                             # OPTIONAL
      },    # OPTIONAL
      MinimumCompressionSize => 1,             # OPTIONAL
      Policy                 => 'MyString',    # OPTIONAL
      Version                => 'MyString',    # OPTIONAL

    # Results:
    my $ApiKeySource           = $RestApi->ApiKeySource;
    my $BinaryMediaTypes       = $RestApi->BinaryMediaTypes;
    my $CreatedDate            = $RestApi->CreatedDate;
    my $Description            = $RestApi->Description;
    my $EndpointConfiguration  = $RestApi->EndpointConfiguration;
    my $Id                     = $RestApi->Id;
    my $MinimumCompressionSize = $RestApi->MinimumCompressionSize;
    my $Name                   = $RestApi->Name;
    my $Policy                 = $RestApi->Policy;
    my $Version                = $RestApi->Version;
    my $Warnings               = $RestApi->Warnings;

    # Returns a L<Paws::ApiGateway::RestApi> object.

Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see


ApiKeySource => Str

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.

Valid values are: "HEADER", "AUTHORIZER"

BinaryMediaTypes => ArrayRef[Str|Undef]

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

CloneFrom => Str

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

Description => Str

The description of the RestApi.

EndpointConfiguration => Paws::ApiGateway::EndpointConfiguration

The endpoint configuration of this RestApi showing the endpoint types of the API.

MinimumCompressionSize => Int

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.

REQUIRED Name => Str

[Required] The name of the RestApi.

Policy => Str

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

Version => Str

A version identifier for the API.


This class forms part of Paws, documenting arguments for method CreateRestApi in Paws::ApiGateway


The source code is located here:

Please report bugs to: