Class CfnApiKey
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.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnApiKey : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnApiKey
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
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.
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html
CloudformationResource: AWS::ApiGateway::ApiKey
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(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 |
CfnApiKey(Construct, String, ICfnApiKeyProps) |
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 | Tag Manager which manages the tags for this resource. |
TagsRaw | 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(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
CfnApiKey(Construct, String, ICfnApiKeyProps)
public CfnApiKey(Construct scope, string id, ICfnApiKeyProps props = null)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnApiKeyProps
Resource properties.
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
Description
The description of the ApiKey.
public virtual string Description { get; set; }
Property Value
System.String
Enabled
Specifies whether the ApiKey can be used by callers.
public virtual object Enabled { get; set; }
Property Value
System.Object
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
Name
A name for the API key.
public virtual string Name { get; set; }
Property Value
System.String
StageKeys
DEPRECATED FOR USAGE PLANS - Specifies stages associated with the API key.
public virtual object StageKeys { get; set; }
Property Value
System.Object
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
The key-value map of strings.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Value
Specifies a value of the API key.
public virtual string Value { get; set; }
Property Value
System.String
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>