ApiKeyProps

class aws_cdk.aws_apigateway.ApiKeyProps(*, default_cors_preflight_options=None, default_integration=None, default_method_options=None, api_key_name=None, customer_id=None, description=None, enabled=None, generate_distinct_id=None, resources=None)

Bases: aws_cdk.aws_apigateway.ResourceOptions

__init__(*, default_cors_preflight_options=None, default_integration=None, default_method_options=None, api_key_name=None, customer_id=None, description=None, enabled=None, generate_distinct_id=None, resources=None)

ApiKey Properties.

Parameters
  • default_cors_preflight_options (Optional[CorsOptions]) – Adds a CORS preflight OPTIONS method to this resource and all child resources. You can add CORS at the resource-level using addCorsPreflight. Default: - CORS is disabled

  • default_integration (Optional[Integration]) – An integration to use as a default for all methods created within this API unless an integration is specified. Default: - Inherited from parent.

  • default_method_options (Optional[MethodOptions]) – Method options to use as a default for all methods created within this API unless custom options are specified. Default: - Inherited from parent.

  • api_key_name (Optional[str]) – A name for the API key. If you don’t specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name. Default: automically generated name

  • customer_id (Optional[str]) – An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. Default: none

  • description (Optional[str]) – A description of the purpose of the API key. Default: none

  • enabled (Optional[bool]) – Indicates whether the API key can be used by clients. Default: true

  • generate_distinct_id (Optional[bool]) – Specifies whether the key identifier is distinct from the created API key value. Default: false

  • resources (Optional[List[RestApi]]) – A list of resources this api key is associated with. Default: none

Attributes

api_key_name

A name for the API key.

If you don’t specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the API key name.

default :default: automically generated name

link: :link:: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-name

Return type

Optional[str]

customer_id

An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.

default :default: none

link: :link:: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-customerid

Return type

Optional[str]

default_cors_preflight_options

Adds a CORS preflight OPTIONS method to this resource and all child resources.

You can add CORS at the resource-level using addCorsPreflight.

default :default: - CORS is disabled

Return type

Optional[CorsOptions]

default_integration

An integration to use as a default for all methods created within this API unless an integration is specified.

default :default: - Inherited from parent.

Return type

Optional[Integration]

default_method_options

Method options to use as a default for all methods created within this API unless custom options are specified.

default :default: - Inherited from parent.

Return type

Optional[MethodOptions]

description

A description of the purpose of the API key.

default :default: none

link: :link:: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-description

Return type

Optional[str]

enabled

Indicates whether the API key can be used by clients.

default :default: true

link: :link:: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-enabled

Return type

Optional[bool]

generate_distinct_id

Specifies whether the key identifier is distinct from the created API key value.

default :default: false

link: :link:: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-generatedistinctid

Return type

Optional[bool]

resources

A list of resources this api key is associated with.

default :default: none

Return type

Optional[List[RestApi]]