Class CfnApiKey
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
A CloudFormation AWS::ApiGateway::ApiKey
.
public class CfnApiKey : CfnResource, IInspectable
- Inheritance
-
CfnApiKey
- Implements
-
IInspectable
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.APIGateway;
var cfnApiKey = new CfnApiKey(this, "MyCfnApiKey", new CfnApiKeyProps {
CustomerId = "customerId",
Description = "description",
Enabled = false,
GenerateDistinctId = false,
Name = "name",
StageKeys = new [] { new StageKeyProperty {
RestApiId = "restApiId",
StageName = "stageName"
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Value = "value"
});
Remarks
The AWS::ApiGateway::ApiKey
resource creates a unique key that you can distribute to clients who are executing API Gateway Method
resources that require an API key. To specify which API key clients must use, map the API key with the RestApi
and Stage
resources that include the methods that require a key.
CloudformationResource: AWS::ApiGateway::ApiKey
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html
ExampleMetadata: fixture=_generated
Constructors
CfnApiKey(Construct, string, ICfnApiKeyProps?)
Create a new AWS::ApiGateway::ApiKey
.
public CfnApiKey(Construct scope, string id, ICfnApiKeyProps? props = null)
Parameters
scope
Construct- scope in which this resource is defined.
id
string- scoped id of the resource.
props
ICfnApiKeyProps- resource properties.
Properties
AttrApiKeyId
The ID for the API key.
public virtual string AttrApiKeyId { get; }
Property Value
Remarks
For example: abc123
.
CloudformationAttribute: APIKeyId
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
CustomerId
An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
public virtual string? CustomerId { get; set; }
Property Value
Remarks
Description
The description of the ApiKey.
public virtual string? Description { get; set; }
Property Value
Remarks
Enabled
Specifies whether the ApiKey can be used by callers.
public virtual object? Enabled { get; set; }
Property Value
Remarks
GenerateDistinctId
Specifies whether ( true
) or not ( false
) the key identifier is distinct from the created API key value.
public virtual object? GenerateDistinctId { get; set; }
Property Value
Remarks
This parameter is deprecated and should not be used.
Name
A name for the API key.
public virtual string? Name { get; set; }
Property Value
Remarks
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 .
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.
StageKeys
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
public virtual object? StageKeys { get; set; }
Property Value
Remarks
Tags
The key-value map of strings.
public virtual TagManager Tags { get; }
Property Value
- TagManager
Remarks
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
Specifies a value of the API key.
public virtual string? Value { get; set; }
Property Value
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
inspector
TreeInspector- tree inspector to collect and process attributes.
RenderProperties(IDictionary<string, object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
props
IDictionary<string, object>