Interface IApiKeyOptions
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
The options for creating an API Key.
public interface IApiKeyOptions : IResourceOptions
- Inherited Members
Examples
RestApi api;
var key = api.AddApiKey("ApiKey", new ApiKeyOptions {
ApiKeyName = "myApiKey1",
Value = "MyApiKeyThatIsAtLeast20Characters"
});
Remarks
ExampleMetadata: infused
Properties
ApiKeyName
A name for the API key.
string? ApiKeyName { get; }
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.
Default: automically generated name
Description
A description of the purpose of the API key.
string? Description { get; }
Property Value
Remarks
Default: none
Value
The value of the API key.
string? Value { get; }
Property Value
Remarks
Must be at least 20 characters long.
Default: none