Class CfnGraphQLApi
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::AppSync::GraphQLApi
.
The AWS::AppSync::GraphQLApi
resource creates a new AWS AppSync GraphQL API. This is the top-level construct for your application. For more information, see Quick Start in the AWS AppSync Developer Guide .
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.*; CfnGraphQLApi cfnGraphQLApi = CfnGraphQLApi.Builder.create(this, "MyCfnGraphQLApi") .authenticationType("authenticationType") .name("name") // the properties below are optional .additionalAuthenticationProviders(List.of(AdditionalAuthenticationProviderProperty.builder() .authenticationType("authenticationType") // the properties below are optional .lambdaAuthorizerConfig(LambdaAuthorizerConfigProperty.builder() .authorizerResultTtlInSeconds(123) .authorizerUri("authorizerUri") .identityValidationExpression("identityValidationExpression") .build()) .openIdConnectConfig(OpenIDConnectConfigProperty.builder() .authTtl(123) .clientId("clientId") .iatTtl(123) .issuer("issuer") .build()) .userPoolConfig(CognitoUserPoolConfigProperty.builder() .appIdClientRegex("appIdClientRegex") .awsRegion("awsRegion") .userPoolId("userPoolId") .build()) .build())) .apiType("apiType") .lambdaAuthorizerConfig(LambdaAuthorizerConfigProperty.builder() .authorizerResultTtlInSeconds(123) .authorizerUri("authorizerUri") .identityValidationExpression("identityValidationExpression") .build()) .logConfig(LogConfigProperty.builder() .cloudWatchLogsRoleArn("cloudWatchLogsRoleArn") .excludeVerboseContent(false) .fieldLogLevel("fieldLogLevel") .build()) .mergedApiExecutionRoleArn("mergedApiExecutionRoleArn") .openIdConnectConfig(OpenIDConnectConfigProperty.builder() .authTtl(123) .clientId("clientId") .iatTtl(123) .issuer("issuer") .build()) .ownerContact("ownerContact") .tags(List.of(CfnTag.builder() .key("key") .value("value") .build())) .userPoolConfig(UserPoolConfigProperty.builder() .appIdClientRegex("appIdClientRegex") .awsRegion("awsRegion") .defaultAction("defaultAction") .userPoolId("userPoolId") .build()) .visibility("visibility") .xrayEnabled(false) .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Describes an additional authentication provider.static final class
A fluent builder forCfnGraphQLApi
.static interface
Describes an Amazon Cognito user pool configuration.static interface
Configuration for AWS Lambda function authorization.static interface
TheLogConfig
property type specifies the logging configuration when writing GraphQL operations and tracing to Amazon CloudWatch for an AWS AppSync GraphQL API.static interface
TheOpenIDConnectConfig
property type specifies the optional authorization configuration for using an OpenID Connect compliant service with your GraphQL endpoint for an AWS AppSync GraphQL API.static interface
TheUserPoolConfig
property type specifies the optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint for an AWS AppSync GraphQL API.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnGraphQLApi
(Construct scope, String id, CfnGraphQLApiProps props) Create a newAWS::AppSync::GraphQLApi
.protected
CfnGraphQLApi
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnGraphQLApi
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionA list of additional authentication providers for theGraphqlApi
API.The value that indicates whether the GraphQL API is a standard API (GRAPHQL
) or merged API (MERGED
).Unique AWS AppSync GraphQL API identifier.The Amazon Resource Name (ARN) of the API key, such asarn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid
.The fully qualified domain name (FQDN) of the endpoint URL of your GraphQL API.The Endpoint URL of your GraphQL API.The fully qualified domain name (FQDN) of the real-time endpoint URL of your GraphQL API.The GraphQL API real-time endpoint URL.Security configuration for your GraphQL API.ALambdaAuthorizerConfig
holds configuration on how to authorize AWS AppSync API access when using theAWS_LAMBDA
authorizer mode.The Amazon CloudWatch Logs configuration.The AWS Identity and Access Management service role ARN for a merged API.getName()
The API name.The OpenID Connect configuration.The owner contact information for an API resource.getTags()
An arbitrary set of tags (key-value pairs) for this GraphQL API.Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.Sets the scope of the GraphQL API to public (GLOBAL
) or private (PRIVATE
).A flag indicating whether to use AWS X-Ray tracing for thisGraphqlApi
.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
A list of additional authentication providers for theGraphqlApi
API.void
A list of additional authentication providers for theGraphqlApi
API.void
setApiType
(String value) The value that indicates whether the GraphQL API is a standard API (GRAPHQL
) or merged API (MERGED
).void
setAuthenticationType
(String value) Security configuration for your GraphQL API.void
ALambdaAuthorizerConfig
holds configuration on how to authorize AWS AppSync API access when using theAWS_LAMBDA
authorizer mode.void
ALambdaAuthorizerConfig
holds configuration on how to authorize AWS AppSync API access when using theAWS_LAMBDA
authorizer mode.void
setLogConfig
(IResolvable value) The Amazon CloudWatch Logs configuration.void
The Amazon CloudWatch Logs configuration.void
The AWS Identity and Access Management service role ARN for a merged API.void
The API name.void
The OpenID Connect configuration.void
The OpenID Connect configuration.void
setOwnerContact
(String value) The owner contact information for an API resource.void
setUserPoolConfig
(IResolvable value) Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.void
Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint.void
setVisibility
(String value) Sets the scope of the GraphQL API to public (GLOBAL
) or private (PRIVATE
).void
setXrayEnabled
(Boolean value) A flag indicating whether to use AWS X-Ray tracing for thisGraphqlApi
.void
setXrayEnabled
(IResolvable value) A flag indicating whether to use AWS X-Ray tracing for thisGraphqlApi
.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnGraphQLApi
protected CfnGraphQLApi(software.amazon.jsii.JsiiObjectRef objRef) -
CfnGraphQLApi
protected CfnGraphQLApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnGraphQLApi
@Stability(Stable) public CfnGraphQLApi(@NotNull Construct scope, @NotNull String id, @NotNull CfnGraphQLApiProps props) Create a newAWS::AppSync::GraphQLApi
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrApiId
Unique AWS AppSync GraphQL API identifier. -
getAttrArn
The Amazon Resource Name (ARN) of the API key, such asarn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid
. -
getAttrGraphQlDns
The fully qualified domain name (FQDN) of the endpoint URL of your GraphQL API. -
getAttrGraphQlUrl
The Endpoint URL of your GraphQL API. -
getAttrRealtimeDns
The fully qualified domain name (FQDN) of the real-time endpoint URL of your GraphQL API. -
getAttrRealtimeUrl
The GraphQL API real-time endpoint URL.For more information, see Discovering the real-time endpoint from the GraphQL endpoint .
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
An arbitrary set of tags (key-value pairs) for this GraphQL API. -
getAuthenticationType
Security configuration for your GraphQL API.For allowed values (such as
API_KEY
,AWS_IAM
,AMAZON_COGNITO_USER_POOLS
,OPENID_CONNECT
, orAWS_LAMBDA
), see Security in the AWS AppSync Developer Guide . -
setAuthenticationType
Security configuration for your GraphQL API.For allowed values (such as
API_KEY
,AWS_IAM
,AMAZON_COGNITO_USER_POOLS
,OPENID_CONNECT
, orAWS_LAMBDA
), see Security in the AWS AppSync Developer Guide . -
getName
The API name. -
setName
The API name. -
getAdditionalAuthenticationProviders
A list of additional authentication providers for theGraphqlApi
API. -
setAdditionalAuthenticationProviders
A list of additional authentication providers for theGraphqlApi
API. -
setAdditionalAuthenticationProviders
A list of additional authentication providers for theGraphqlApi
API. -
getApiType
The value that indicates whether the GraphQL API is a standard API (GRAPHQL
) or merged API (MERGED
).The following values are valid:
GRAPHQL | MERGED
-
setApiType
The value that indicates whether the GraphQL API is a standard API (GRAPHQL
) or merged API (MERGED
).The following values are valid:
GRAPHQL | MERGED
-
getLambdaAuthorizerConfig
ALambdaAuthorizerConfig
holds configuration on how to authorize AWS AppSync API access when using theAWS_LAMBDA
authorizer mode.Be aware that an AWS AppSync API may have only one Lambda authorizer configured at a time.
-
setLambdaAuthorizerConfig
ALambdaAuthorizerConfig
holds configuration on how to authorize AWS AppSync API access when using theAWS_LAMBDA
authorizer mode.Be aware that an AWS AppSync API may have only one Lambda authorizer configured at a time.
-
setLambdaAuthorizerConfig
@Stability(Stable) public void setLambdaAuthorizerConfig(@Nullable CfnGraphQLApi.LambdaAuthorizerConfigProperty value) ALambdaAuthorizerConfig
holds configuration on how to authorize AWS AppSync API access when using theAWS_LAMBDA
authorizer mode.Be aware that an AWS AppSync API may have only one Lambda authorizer configured at a time.
-
getLogConfig
The Amazon CloudWatch Logs configuration. -
setLogConfig
The Amazon CloudWatch Logs configuration. -
setLogConfig
The Amazon CloudWatch Logs configuration. -
getMergedApiExecutionRoleArn
The AWS Identity and Access Management service role ARN for a merged API.The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the
AUTO_MERGE
to update the merged API endpoint with the source API changes automatically. -
setMergedApiExecutionRoleArn
The AWS Identity and Access Management service role ARN for a merged API.The AppSync service assumes this role on behalf of the Merged API to validate access to source APIs at runtime and to prompt the
AUTO_MERGE
to update the merged API endpoint with the source API changes automatically. -
getOpenIdConnectConfig
The OpenID Connect configuration. -
setOpenIdConnectConfig
The OpenID Connect configuration. -
setOpenIdConnectConfig
@Stability(Stable) public void setOpenIdConnectConfig(@Nullable CfnGraphQLApi.OpenIDConnectConfigProperty value) The OpenID Connect configuration. -
getOwnerContact
The owner contact information for an API resource.This field accepts any string input with a length of 0 - 256 characters.
-
setOwnerContact
The owner contact information for an API resource.This field accepts any string input with a length of 0 - 256 characters.
-
getUserPoolConfig
Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint. -
setUserPoolConfig
Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint. -
setUserPoolConfig
@Stability(Stable) public void setUserPoolConfig(@Nullable CfnGraphQLApi.UserPoolConfigProperty value) Optional authorization configuration for using Amazon Cognito user pools with your GraphQL endpoint. -
getVisibility
Sets the scope of the GraphQL API to public (GLOBAL
) or private (PRIVATE
).By default, the scope is set to
Global
if no value is provided. -
setVisibility
Sets the scope of the GraphQL API to public (GLOBAL
) or private (PRIVATE
).By default, the scope is set to
Global
if no value is provided. -
getXrayEnabled
A flag indicating whether to use AWS X-Ray tracing for thisGraphqlApi
. -
setXrayEnabled
A flag indicating whether to use AWS X-Ray tracing for thisGraphqlApi
. -
setXrayEnabled
A flag indicating whether to use AWS X-Ray tracing for thisGraphqlApi
.
-