interface GraphqlApiAttributes
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppSync.GraphqlApiAttributes |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappsync#GraphqlApiAttributes |
Java | software.amazon.awscdk.services.appsync.GraphqlApiAttributes |
Python | aws_cdk.aws_appsync.GraphqlApiAttributes |
TypeScript (source) | aws-cdk-lib » aws_appsync » GraphqlApiAttributes |
Attributes for GraphQL imports.
Example
const sourceApi = new appsync.GraphqlApi(this, 'FirstSourceAPI', {
name: 'FirstSourceAPI',
definition: appsync.Definition.fromFile(path.join(__dirname, 'appsync.merged-api-1.graphql')),
});
const importedMergedApi = appsync.GraphqlApi.fromGraphqlApiAttributes(this, 'ImportedMergedApi', {
graphqlApiId: 'MyApiId',
graphqlApiArn: 'MyApiArn',
});
const importedExecutionRole = iam.Role.fromRoleArn(this, 'ExecutionRole', 'arn:aws:iam::ACCOUNT:role/MyExistingRole');
new appsync.SourceApiAssociation(this, 'SourceApiAssociation2', {
sourceApi: sourceApi,
mergedApi: importedMergedApi,
mergeType: appsync.MergeType.MANUAL_MERGE,
mergedApiExecutionRole: importedExecutionRole,
});
Properties
Name | Type | Description |
---|---|---|
graphql | string | an unique AWS AppSync GraphQL API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'. |
graph | string | The GraphQl endpoint arn for the GraphQL API. |
graphql | string | the arn for the GraphQL Api. |
modes? | Authorization [] | The Authorization Types for this GraphQL Api. |
visibility? | Visibility | The GraphQl API visibility. |
graphqlApiId
Type:
string
an unique AWS AppSync GraphQL API identifier i.e. 'lxz775lwdrgcndgz3nurvac7oa'.
graphQLEndpointArn?
Type:
string
(optional, default: none, required to construct event rules from imported APIs)
The GraphQl endpoint arn for the GraphQL API.
graphqlApiArn?
Type:
string
(optional, default: autogenerated arn)
the arn for the GraphQL Api.
modes?
Type:
Authorization
[]
(optional, default: none, required to construct event rules from imported APIs)
The Authorization Types for this GraphQL Api.
visibility?
Type:
Visibility
(optional, default: GLOBAL)
The GraphQl API visibility.