ApiKeyProps

class aws_cdk.aws_apigatewayv2.ApiKeyProps(*, api_key_name=None, description=None, value=None, customer_id=None, enabled=None, generate_distinct_id=None)

Bases: ApiKeyOptions

ApiKey Properties.

Parameters:
  • 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: automatically generated name

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

  • value (Optional[str]) – The value of the API key. Must be at least 20 characters long. Default: none

  • customer_id (Optional[str]) – An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. 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

ExampleMetadata:

infused

Example:

# Auto-generated name and value
auto_key = apigwv2.ApiKey(self, "AutoKey")

# Explicit name and value
explicit_key = apigwv2.ApiKey(self, "ExplicitKey",
    api_key_name="MyWebSocketApiKey",
    value="MyApiKeyThatIsAtLeast20Characters"
)

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:

automatically generated name

Link:

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

customer_id

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

Default:

none

Link:

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

description

A description of the purpose of the API key.

Default:

none

Link:

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

enabled

Indicates whether the API key can be used by clients.

Default:

true

Link:

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

generate_distinct_id

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

Default:

false

Link:

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

value

The value of the API key.

Must be at least 20 characters long.

Default:

none

Link:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-value