Interface IApiKeyProps
ApiKey Properties.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IApiKeyProps : IApiKeyOptions, IResourceOptions
Syntax (vb)
Public Interface IApiKeyProps
Inherits IApiKeyOptions, IResourceOptions
Remarks
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;
using Amazon.CDK.AWS.APIGateway;
Authorizer authorizer;
Integration integration;
Model model;
RequestValidator requestValidator;
RestApi restApi;
Stage stage;
var apiKeyProps = new ApiKeyProps {
ApiKeyName = "apiKeyName",
CustomerId = "customerId",
DefaultCorsPreflightOptions = new CorsOptions {
AllowOrigins = new [] { "allowOrigins" },
// the properties below are optional
AllowCredentials = false,
AllowHeaders = new [] { "allowHeaders" },
AllowMethods = new [] { "allowMethods" },
DisableCache = false,
ExposeHeaders = new [] { "exposeHeaders" },
MaxAge = Duration.Minutes(30),
StatusCode = 123
},
DefaultIntegration = integration,
DefaultMethodOptions = new MethodOptions {
ApiKeyRequired = false,
AuthorizationScopes = new [] { "authorizationScopes" },
AuthorizationType = AuthorizationType.NONE,
Authorizer = authorizer,
MethodResponses = new [] { new MethodResponse {
StatusCode = "statusCode",
// the properties below are optional
ResponseModels = new Dictionary<string, IModel> {
{ "responseModelsKey", model }
},
ResponseParameters = new Dictionary<string, boolean> {
{ "responseParametersKey", false }
}
} },
OperationName = "operationName",
RequestModels = new Dictionary<string, IModel> {
{ "requestModelsKey", model }
},
RequestParameters = new Dictionary<string, boolean> {
{ "requestParametersKey", false }
},
RequestValidator = requestValidator,
RequestValidatorOptions = new RequestValidatorOptions {
RequestValidatorName = "requestValidatorName",
ValidateRequestBody = false,
ValidateRequestParameters = false
}
},
Description = "description",
Enabled = false,
GenerateDistinctId = false,
Resources = new [] { restApi },
Stages = new [] { stage },
Value = "value"
};
Synopsis
Properties
CustomerId | An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace. |
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. |
Resources | (deprecated) A list of resources this api key is associated with. |
Stages | A list of Stages this api key is associated with. |
Properties
CustomerId
An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
virtual string CustomerId { get; }
Property Value
System.String
Remarks
Enabled
Indicates whether the API key can be used by clients.
virtual Nullable<bool> Enabled { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
GenerateDistinctId
Specifies whether the key identifier is distinct from the created API key value.
virtual Nullable<bool> GenerateDistinctId { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Resources
(deprecated) A list of resources this api key is associated with.
virtual IRestApi[] Resources { get; }
Property Value
IRestApi[]
Remarks
Default: none
Stability: Deprecated
Stages
A list of Stages this api key is associated with.
virtual IStage[] Stages { get; }
Property Value
IStage[]
Remarks
Default: - the api key is not associated with any stages