HttpDataSourceOptions

class aws_cdk.aws_appsync.HttpDataSourceOptions(*, description=None, name=None, authorization_config=None)

Bases: DataSourceOptions

(experimental) Optional configuration for Http data sources.

Parameters:
  • description (Optional[str]) – (experimental) The description of the data source. Default: - No description

  • name (Optional[str]) – (experimental) The name of the data source, overrides the id given by cdk. Default: - generated by cdk given the id

  • authorization_config (Union[AwsIamConfig, Dict[str, Any], None]) – (experimental) The authorization config in case the HTTP endpoint requires authorization. Default: - none

Stability:

experimental

ExampleMetadata:

infused

Example:

api = appsync.GraphqlApi(self, "api",
    name="api",
    schema=appsync.Schema.from_asset(path.join(__dirname, "schema.graphql"))
)

http_ds = api.add_http_data_source("ds", "https://states.amazonaws.com",
    name="httpDsWithStepF",
    description="from appsync to StepFunctions Workflow",
    authorization_config=appsync.AwsIamConfig(
        signing_region="us-east-1",
        signing_service_name="states"
    )
)

http_ds.create_resolver(
    type_name="Mutation",
    field_name="callStepFunction",
    request_mapping_template=appsync.MappingTemplate.from_file("request.vtl"),
    response_mapping_template=appsync.MappingTemplate.from_file("response.vtl")
)

Attributes

authorization_config

(experimental) The authorization config in case the HTTP endpoint requires authorization.

Default:
  • none

Stability:

experimental

description

(experimental) The description of the data source.

Default:
  • No description

Stability:

experimental

name

(experimental) The name of the data source, overrides the id given by cdk.

Default:
  • generated by cdk given the id

Stability:

experimental