@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-25T18:29:08.244Z") public interface ApiKeyProps extends ApiKeyOptions
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.apigateway.*; import software.amazon.awscdk.core.*; Authorizer authorizer; Integration integration; Model model; RequestValidator requestValidator; RestApi restApi; ApiKeyProps apiKeyProps = ApiKeyProps.builder() .apiKeyName("apiKeyName") .customerId("customerId") .defaultCorsPreflightOptions(CorsOptions.builder() .allowOrigins(List.of("allowOrigins")) // the properties below are optional .allowCredentials(false) .allowHeaders(List.of("allowHeaders")) .allowMethods(List.of("allowMethods")) .disableCache(false) .exposeHeaders(List.of("exposeHeaders")) .maxAge(Duration.minutes(30)) .statusCode(123) .build()) .defaultIntegration(integration) .defaultMethodOptions(MethodOptions.builder() .apiKeyRequired(false) .authorizationScopes(List.of("authorizationScopes")) .authorizationType(AuthorizationType.NONE) .authorizer(authorizer) .methodResponses(List.of(MethodResponse.builder() .statusCode("statusCode") // the properties below are optional .responseModels(Map.of( "responseModelsKey", model)) .responseParameters(Map.of( "responseParametersKey", false)) .build())) .operationName("operationName") .requestModels(Map.of( "requestModelsKey", model)) .requestParameters(Map.of( "requestParametersKey", false)) .requestValidator(requestValidator) .requestValidatorOptions(RequestValidatorOptions.builder() .requestValidatorName("requestValidatorName") .validateRequestBody(false) .validateRequestParameters(false) .build()) .build()) .description("description") .enabled(false) .generateDistinctId(false) .resources(List.of(restApi)) .value("value") .build();
Modifier and Type | Interface and Description |
---|---|
static class |
ApiKeyProps.Builder
A builder for
ApiKeyProps |
static class |
ApiKeyProps.Jsii$Proxy
An implementation for
ApiKeyProps |
Modifier and Type | Method and Description |
---|---|
static ApiKeyProps.Builder |
builder() |
default java.lang.String |
getCustomerId()
An AWS Marketplace customer identifier to use when integrating with the AWS SaaS Marketplace.
|
default java.lang.Boolean |
getEnabled()
Indicates whether the API key can be used by clients.
|
default java.lang.Boolean |
getGenerateDistinctId()
Specifies whether the key identifier is distinct from the created API key value.
|
default java.util.List<IRestApi> |
getResources()
A list of resources this api key is associated with.
|
getApiKeyName, getDescription, getValue
getDefaultCorsPreflightOptions, getDefaultIntegration, getDefaultMethodOptions
default java.lang.String getCustomerId()
Default: none
default java.lang.Boolean getEnabled()
Default: true
default java.lang.Boolean getGenerateDistinctId()
Default: false
default java.util.List<IRestApi> getResources()
Default: none
static ApiKeyProps.Builder builder()
builder
in interface ApiKeyOptions
builder
in interface ResourceOptions
ApiKeyProps.Builder
of ApiKeyProps