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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-11T23:26:28.836Z") @Stability(Stable) public class CfnApi extends CfnResource implements IInspectable, ITaggableV2
The AWS::AppSync::Api resource creates an AWS AppSync API that you can use for an AWS AppSync API with your preferred configuration, such as an Event API that provides real-time message publishing and message subscriptions over WebSockets.

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.*;
 CfnApi cfnApi = CfnApi.Builder.create(this, "MyCfnApi")
         .name("name")
         // the properties below are optional
         .eventConfig(EventConfigProperty.builder()
                 .authProviders(List.of(AuthProviderProperty.builder()
                         .authType("authType")
                         // the properties below are optional
                         .cognitoConfig(CognitoConfigProperty.builder()
                                 .awsRegion("awsRegion")
                                 .userPoolId("userPoolId")
                                 // the properties below are optional
                                 .appIdClientRegex("appIdClientRegex")
                                 .build())
                         .lambdaAuthorizerConfig(LambdaAuthorizerConfigProperty.builder()
                                 .authorizerUri("authorizerUri")
                                 // the properties below are optional
                                 .authorizerResultTtlInSeconds(123)
                                 .identityValidationExpression("identityValidationExpression")
                                 .build())
                         .openIdConnectConfig(OpenIDConnectConfigProperty.builder()
                                 .issuer("issuer")
                                 // the properties below are optional
                                 .authTtl(123)
                                 .clientId("clientId")
                                 .iatTtl(123)
                                 .build())
                         .build()))
                 .connectionAuthModes(List.of(AuthModeProperty.builder()
                         .authType("authType")
                         .build()))
                 .defaultPublishAuthModes(List.of(AuthModeProperty.builder()
                         .authType("authType")
                         .build()))
                 .defaultSubscribeAuthModes(List.of(AuthModeProperty.builder()
                         .authType("authType")
                         .build()))
                 // the properties below are optional
                 .logConfig(EventLogConfigProperty.builder()
                         .cloudWatchLogsRoleArn("cloudWatchLogsRoleArn")
                         .logLevel("logLevel")
                         .build())
                 .build())
         .ownerContact("ownerContact")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .build();
 

See Also:
  • 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

    • CfnApi

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

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

      @Stability(Stable) public CfnApi(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnApiProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). 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.
    • getAttrApiArn

      @Stability(Stable) @NotNull public String getAttrApiArn()
      The Amazon Resource Name (ARN) of the AWS AppSync Api.
    • getAttrApiId

      @Stability(Stable) @NotNull public String getAttrApiId()
      The unique identifier for the AWS AppSync Api generated by the service.
    • getAttrDns

      @Stability(Stable) @NotNull public IResolvable getAttrDns()
      A map of DNS names for the AppSync API.
    • getAttrDnsHttp

      @Stability(Stable) @NotNull public String getAttrDnsHttp()
      The domain name of the Api's HTTP endpoint.
    • getAttrDnsRealtime

      @Stability(Stable) @NotNull public String getAttrDnsRealtime()
      The domain name of the Api's real-time endpoint.
    • getCdkTagManager

      @Stability(Stable) @NotNull public TagManager getCdkTagManager()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getCdkTagManager in interface ITaggableV2
    • getCfnProperties

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

      @Stability(Stable) @NotNull public String getName()
      The name of the Api .
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of the Api .
    • getEventConfig

      @Stability(Stable) @Nullable public Object getEventConfig()
      Describes the authorization configuration for connections, message publishing, message subscriptions, and logging for an Event API.
    • setEventConfig

      @Stability(Stable) public void setEventConfig(@Nullable IResolvable value)
      Describes the authorization configuration for connections, message publishing, message subscriptions, and logging for an Event API.
    • setEventConfig

      @Stability(Stable) public void setEventConfig(@Nullable CfnApi.EventConfigProperty value)
      Describes the authorization configuration for connections, message publishing, message subscriptions, and logging for an Event API.
    • getOwnerContact

      @Stability(Stable) @Nullable public String getOwnerContact()
      The owner contact information for an API resource.
    • setOwnerContact

      @Stability(Stable) public void setOwnerContact(@Nullable String value)
      The owner contact information for an API resource.
    • getTags

      @Stability(Stable) @Nullable public List<CfnTag> getTags()
      A set of tags (key-value pairs) for this API.
    • setTags

      @Stability(Stable) public void setTags(@Nullable List<CfnTag> value)
      A set of tags (key-value pairs) for this API.