CfnApiKeyProps

class aws_cdk.aws_apigateway.CfnApiKeyProps(*, customer_id=None, description=None, enabled=None, generate_distinct_id=None, name=None, stage_keys=None, tags=None, value=None)

Bases: object

Properties for defining a CfnApiKey.

Parameters:
  • customer_id (Optional[str]) – An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.

  • description (Optional[str]) – The description of the ApiKey.

  • enabled (Union[bool, IResolvable, None]) – Specifies whether the ApiKey can be used by callers. Default: - false

  • generate_distinct_id (Union[bool, IResolvable, None]) – Specifies whether ( true ) or not ( false ) the key identifier is distinct from the created API key value. This parameter is deprecated and should not be used.

  • 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. For more information, see Name Type . .. epigraph:: If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.

  • stage_keys (Union[IResolvable, Sequence[Union[IResolvable, StageKeyProperty, Dict[str, Any]]], None]) – DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – The key-value map of strings. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws: . The tag value can be up to 256 characters.

  • value (Optional[str]) – Specifies a value of the API key.

See:

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

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_apigateway as apigateway

cfn_api_key_props = apigateway.CfnApiKeyProps(
    customer_id="customerId",
    description="description",
    enabled=False,
    generate_distinct_id=False,
    name="name",
    stage_keys=[apigateway.CfnApiKey.StageKeyProperty(
        rest_api_id="restApiId",
        stage_name="stageName"
    )],
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    value="value"
)

Attributes

customer_id

An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.

See:

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

description

The description of the ApiKey.

See:

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

enabled

Specifies whether the ApiKey can be used by callers.

Default:
  • false

See:

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

generate_distinct_id

Specifies whether ( true ) or not ( false ) the key identifier is distinct from the created API key value.

This parameter is deprecated and should not be used.

See:

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

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. For more information, see Name Type . .. epigraph:

If you specify a name, you cannot perform updates that require replacement of this resource. You can perform updates that require no or some interruption. If you must replace the resource, specify a new name.
See:

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

stage_keys

DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.

See:

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

tags

The key-value map of strings.

The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with aws: . The tag value can be up to 256 characters.

See:

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

value

Specifies a value of the API key.

See:

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