GraphqlApiAttributes

class aws_cdk.aws_appsync.GraphqlApiAttributes(*, graphql_api_id, graphql_api_arn=None, graph_ql_endpoint_arn=None, modes=None, visibility=None)

Bases: object

Attributes for GraphQL imports.

Parameters:
  • graphql_api_id (str) – an unique AWS AppSync GraphQL API identifier i.e. ‘lxz775lwdrgcndgz3nurvac7oa’.

  • graphql_api_arn (Optional[str]) – the arn for the GraphQL Api. Default: - autogenerated arn

  • graph_ql_endpoint_arn (Optional[str]) – The GraphQl endpoint arn for the GraphQL API. Default: - none, required to construct event rules from imported APIs

  • modes (Optional[Sequence[AuthorizationType]]) – The Authorization Types for this GraphQL Api. Default: - none, required to construct event rules from imported APIs

  • visibility (Optional[Visibility]) – The GraphQl API visibility. Default: - GLOBAL

ExampleMetadata:

infused

Example:

source_api = appsync.GraphqlApi(self, "FirstSourceAPI",
    name="FirstSourceAPI",
    definition=appsync.Definition.from_file(path.join(__dirname, "appsync.merged-api-1.graphql"))
)

imported_merged_api = appsync.GraphqlApi.from_graphql_api_attributes(self, "ImportedMergedApi",
    graphql_api_id="MyApiId",
    graphql_api_arn="MyApiArn"
)

imported_execution_role = iam.Role.from_role_arn(self, "ExecutionRole", "arn:aws:iam::ACCOUNT:role/MyExistingRole")
appsync.SourceApiAssociation(self, "SourceApiAssociation2",
    source_api=source_api,
    merged_api=imported_merged_api,
    merge_type=appsync.MergeType.MANUAL_MERGE,
    merged_api_execution_role=imported_execution_role
)

Attributes

graph_ql_endpoint_arn

The GraphQl endpoint arn for the GraphQL API.

Default:
  • none, required to construct event rules from imported APIs

graphql_api_arn

the arn for the GraphQL Api.

Default:
  • autogenerated arn

graphql_api_id

an unique AWS AppSync GraphQL API identifier i.e. ‘lxz775lwdrgcndgz3nurvac7oa’.

modes

The Authorization Types for this GraphQL Api.

Default:
  • none, required to construct event rules from imported APIs

visibility

The GraphQl API visibility.

Default:
  • GLOBAL