Class CfnApiKey

java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:49.380Z") @Stability(Stable) public class CfnApiKey extends CfnResource implements IInspectable
A CloudFormation AWS::AppSync::ApiKey.

The AWS::AppSync::ApiKey resource creates a unique key that you can distribute to clients who are executing GraphQL operations with AWS AppSync that require an API key.

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.appsync.*;
 CfnApiKey cfnApiKey = CfnApiKey.Builder.create(this, "MyCfnApiKey")
         .apiId("apiId")
         // the properties below are optional
         .apiKeyId("apiKeyId")
         .description("description")
         .expires(123)
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnApiKey

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

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

      @Stability(Stable) public CfnApiKey(@NotNull Construct scope, @NotNull String id, @NotNull CfnApiKeyProps props)
      Create a new AWS::AppSync::ApiKey.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrApiKey

      @Stability(Stable) @NotNull public String getAttrApiKey()
      The API key.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the API key, such as arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/apikey/apikeya1bzhi .
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getApiId

      @Stability(Stable) @NotNull public String getApiId()
      Unique AWS AppSync GraphQL API ID for this API key.
    • setApiId

      @Stability(Stable) public void setApiId(@NotNull String value)
      Unique AWS AppSync GraphQL API ID for this API key.
    • getApiKeyId

      @Stability(Stable) @Nullable public String getApiKeyId()
      The API key ID.
    • setApiKeyId

      @Stability(Stable) public void setApiKeyId(@Nullable String value)
      The API key ID.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      Unique description of your API key.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      Unique description of your API key.
    • getExpires

      @Stability(Stable) @Nullable public Number getExpires()
      The time after which the API key expires.

      The date is represented as seconds since the epoch, rounded down to the nearest hour.

    • setExpires

      @Stability(Stable) public void setExpires(@Nullable Number value)
      The time after which the API key expires.

      The date is represented as seconds since the epoch, rounded down to the nearest hour.