Show / Hide Table of Contents

Class ApiKeyOptions

The options for creating an API Key.

Inheritance
System.Object
ApiKeyOptions
Implements
IApiKeyOptions
IResourceOptions
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class ApiKeyOptions : Object, IApiKeyOptions, IResourceOptions
Syntax (vb)
Public Class ApiKeyOptions
    Inherits Object
    Implements IApiKeyOptions, IResourceOptions
Remarks

ExampleMetadata: infused

Examples
RestApi api;

var key = api.AddApiKey("ApiKey", new ApiKeyOptions {
    ApiKeyName = "myApiKey1",
    Value = "MyApiKeyThatIsAtLeast20Characters"
});

Synopsis

Constructors

ApiKeyOptions()

Properties

ApiKeyName

A name for the API key.

DefaultCorsPreflightOptions

Adds a CORS preflight OPTIONS method to this resource and all child resources.

DefaultIntegration

An integration to use as a default for all methods created within this API unless an integration is specified.

DefaultMethodOptions

Method options to use as a default for all methods created within this API unless custom options are specified.

Description

A description of the purpose of the API key.

Value

The value of the API key.

Constructors

ApiKeyOptions()

public ApiKeyOptions()

Properties

ApiKeyName

A name for the API key.

public string ApiKeyName { 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.

Default: automically generated name

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-name

DefaultCorsPreflightOptions

Adds a CORS preflight OPTIONS method to this resource and all child resources.

public ICorsOptions DefaultCorsPreflightOptions { get; set; }
Property Value

ICorsOptions

Remarks

You can add CORS at the resource-level using addCorsPreflight.

Default: - CORS is disabled

DefaultIntegration

An integration to use as a default for all methods created within this API unless an integration is specified.

public Integration DefaultIntegration { get; set; }
Property Value

Integration

Remarks

Default: - Inherited from parent.

DefaultMethodOptions

Method options to use as a default for all methods created within this API unless custom options are specified.

public IMethodOptions DefaultMethodOptions { get; set; }
Property Value

IMethodOptions

Remarks

Default: - Inherited from parent.

Description

A description of the purpose of the API key.

public string Description { get; set; }
Property Value

System.String

Remarks

Default: none

Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-description

Value

The value of the API key.

public string Value { get; set; }
Property Value

System.String

Remarks

Must be at least 20 characters long.

Default: none

Link: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-value

Implements

IApiKeyOptions
IResourceOptions
Back to top Generated by DocFX