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, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnApiKey
Inherits CfnResource
Implements IConstruct, 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;
CfnApiKey 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 to use when integrating with the AWS SaaS Marketplace. |
Description | A description of the purpose of the API key. |
Enabled | Indicates whether the API key can be used by clients. |
GenerateDistinctId | Specifies whether the key identifier is distinct from the created API key value. |
Name | A name for the API key. |
StageKeys | A list of stages to associate with this API key. |
Tags | An array of arbitrary tags (key-value pairs) to associate with the API key. |
Value | The 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 to use when integrating with the AWS SaaS Marketplace.
public virtual string CustomerId { get; set; }
Property Value
System.String
Remarks
Description
A description of the purpose of the API key.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
Enabled
Indicates whether the API key can be used by clients.
public virtual object Enabled { get; set; }
Property Value
System.Object
Remarks
GenerateDistinctId
Specifies whether 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
A list of stages to associate with this API key.
public virtual object StageKeys { get; set; }
Property Value
System.Object
Remarks
Tags
An array of arbitrary tags (key-value pairs) to associate with the API key.
public virtual TagManager Tags { get; }
Property Value
Remarks
Value
The value of the API key.
public virtual string Value { get; set; }
Property Value
System.String
Remarks
Must be at least 20 characters long.
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>