Class CfnApiKey
A CloudFormation AWS::ApiGateway::ApiKey
.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.AWS.APIGateway.dll
Syntax (csharp)
public class CfnApiKey : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnApiKey
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
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
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"
});
Synopsis
Constructors
CfnApiKey(Construct, String, ICfnApiKeyProps) | Create a new |
CfnApiKey(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnApiKey(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrApiKeyId | The ID for the API key. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
CustomerId | An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace. |
Description | The description of the ApiKey. |
Enabled | Specifies whether the ApiKey can be used by callers. |
GenerateDistinctId | Specifies whether ( |
Name | A name for the API key. |
StageKeys | DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key. |
Tags | The key-value map of strings. |
Value | Specifies a value of the API key. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
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 System.String
- scoped id of the resource.
- props ICfnApiKeyProps
- resource properties.
CfnApiKey(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnApiKey(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnApiKey(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnApiKey(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrApiKeyId
The ID for the API key.
public virtual string AttrApiKeyId { get; }
Property Value
System.String
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
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
CustomerId
An AWS Marketplace customer identifier, when integrating with the AWS SaaS Marketplace.
public virtual string CustomerId { get; set; }
Property Value
System.String
Remarks
Description
The description of the ApiKey.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
Enabled
Specifies whether the ApiKey can be used by callers.
public virtual object Enabled { get; set; }
Property Value
System.Object
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
System.Object
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
System.String
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
System.Object
Remarks
Tags
The key-value map of strings.
public virtual TagManager Tags { get; }
Property Value
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
System.String
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 System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>