java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.location.alpha.ApiKey
All Implemented Interfaces:
IEnvironmentAware, IResource, IApiKey, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.133.0 (build 0f43e37)", date="2026-07-02T13:33:03.696Z") @Stability(Experimental) public class ApiKey extends Resource implements IApiKey
(experimental) An API Key.

Example:

 ApiKey.Builder.create(this, "APIKeyAny")
         // specify allowed actions
         .allowMapsActions(List.of(AllowMapsAction.GET_STATIC_MAP))
         .allowPlacesActions(List.of(AllowPlacesAction.GET_PLACE))
         .allowRoutesActions(List.of(AllowRoutesAction.CALCULATE_ISOLINES))
         .build();
 

See Also:
  • Field Details

    • PROPERTY_INJECTION_ID

      @Stability(Experimental) public static final String PROPERTY_INJECTION_ID
      (experimental) Uniquely identifies this class.
  • Constructor Details

    • ApiKey

      protected ApiKey(software.amazon.jsii.JsiiObjectRef objRef)
    • ApiKey

      protected ApiKey(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • ApiKey

      @Stability(Experimental) public ApiKey(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ApiKeyProps props)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      props -
    • ApiKey

      @Stability(Experimental) public ApiKey(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
  • Method Details

    • fromApiKeyArn

      @Stability(Experimental) @NotNull public static IApiKey fromApiKeyArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String apiKeyArn)
      (experimental) Use an existing api key by ARN.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      apiKeyArn - This parameter is required.
    • fromApiKeyName

      @Stability(Experimental) @NotNull public static IApiKey fromApiKeyName(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String apiKeyName)
      (experimental) Use an existing api key by name.

      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      apiKeyName - This parameter is required.
    • getApiKeyArn

      @Stability(Experimental) @NotNull public String getApiKeyArn()
      (experimental) The Amazon Resource Name (ARN) of the api key resource.
      Specified by:
      getApiKeyArn in interface IApiKey
    • getApiKeyCreateTime

      @Stability(Experimental) @NotNull public String getApiKeyCreateTime()
      (experimental) The timestamp for when the api key resource was created in ISO 8601 format.
    • getApiKeyName

      @Stability(Experimental) @NotNull public String getApiKeyName()
      (experimental) The name of the api key.
      Specified by:
      getApiKeyName in interface IApiKey
    • getApiKeyUpdateTime

      @Stability(Experimental) @NotNull public String getApiKeyUpdateTime()
      (experimental) The timestamp for when the api key resource was last updated in ISO 8601 format.