CfnDataSource

class aws_cdk.aws_appsync.CfnDataSource(scope, id, *, api_id, name, type, description=None, dynamo_db_config=None, elasticsearch_config=None, event_bridge_config=None, http_config=None, lambda_config=None, metrics_config=None, open_search_service_config=None, relational_database_config=None, service_role_arn=None)

Bases: CfnResource

The AWS::AppSync::DataSource resource creates data sources for resolvers in AWS AppSync to connect to, such as Amazon DynamoDB , AWS Lambda , and Amazon OpenSearch Service .

Resolvers use these data sources to fetch data when clients make GraphQL calls.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-appsync-datasource.html

CloudformationResource:

AWS::AppSync::DataSource

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

cfn_data_source = appsync.CfnDataSource(self, "MyCfnDataSource",
    api_id="apiId",
    name="name",
    type="type",

    # the properties below are optional
    description="description",
    dynamo_db_config=appsync.CfnDataSource.DynamoDBConfigProperty(
        aws_region="awsRegion",
        table_name="tableName",

        # the properties below are optional
        delta_sync_config=appsync.CfnDataSource.DeltaSyncConfigProperty(
            base_table_ttl="baseTableTtl",
            delta_sync_table_name="deltaSyncTableName",
            delta_sync_table_ttl="deltaSyncTableTtl"
        ),
        use_caller_credentials=False,
        versioned=False
    ),
    elasticsearch_config=appsync.CfnDataSource.ElasticsearchConfigProperty(
        aws_region="awsRegion",
        endpoint="endpoint"
    ),
    event_bridge_config=appsync.CfnDataSource.EventBridgeConfigProperty(
        event_bus_arn="eventBusArn"
    ),
    http_config=appsync.CfnDataSource.HttpConfigProperty(
        endpoint="endpoint",

        # the properties below are optional
        authorization_config=appsync.CfnDataSource.AuthorizationConfigProperty(
            authorization_type="authorizationType",

            # the properties below are optional
            aws_iam_config=appsync.CfnDataSource.AwsIamConfigProperty(
                signing_region="signingRegion",
                signing_service_name="signingServiceName"
            )
        )
    ),
    lambda_config=appsync.CfnDataSource.LambdaConfigProperty(
        lambda_function_arn="lambdaFunctionArn"
    ),
    metrics_config="metricsConfig",
    open_search_service_config=appsync.CfnDataSource.OpenSearchServiceConfigProperty(
        aws_region="awsRegion",
        endpoint="endpoint"
    ),
    relational_database_config=appsync.CfnDataSource.RelationalDatabaseConfigProperty(
        relational_database_source_type="relationalDatabaseSourceType",

        # the properties below are optional
        rds_http_endpoint_config=appsync.CfnDataSource.RdsHttpEndpointConfigProperty(
            aws_region="awsRegion",
            aws_secret_store_arn="awsSecretStoreArn",
            db_cluster_identifier="dbClusterIdentifier",

            # the properties below are optional
            database_name="databaseName",
            schema="schema"
        )
    ),
    service_role_arn="serviceRoleArn"
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • api_id (str) – Unique AWS AppSync GraphQL API identifier where this data source will be created.

  • name (str) – Friendly name for you to identify your AppSync data source after creation.

  • type (str) – The type of the data source. - AWS_LAMBDA : The data source is an AWS Lambda function. - AMAZON_DYNAMODB : The data source is an Amazon DynamoDB table. - AMAZON_ELASTICSEARCH : The data source is an Amazon OpenSearch Service domain. - AMAZON_EVENTBRIDGE : The data source is an Amazon EventBridge event bus. - AMAZON_OPENSEARCH_SERVICE : The data source is an Amazon OpenSearch Service domain. - NONE : There is no data source. This type is used when you wish to invoke a GraphQL operation without connecting to a data source, such as performing data transformation with resolvers or triggering a subscription to be invoked from a mutation. - HTTP : The data source is an HTTP endpoint. - RELATIONAL_DATABASE : The data source is a relational database.

  • description (Optional[str]) – The description of the data source.

  • dynamo_db_config (Union[IResolvable, DynamoDBConfigProperty, Dict[str, Any], None]) – AWS Region and TableName for an Amazon DynamoDB table in your account.

  • elasticsearch_config (Union[IResolvable, ElasticsearchConfigProperty, Dict[str, Any], None]) – AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account. As of September 2021, Amazon Elasticsearch Service is Amazon OpenSearch Service . This property is deprecated. For new data sources, use OpenSearchServiceConfig to specify an OpenSearch Service data source.

  • event_bridge_config (Union[IResolvable, EventBridgeConfigProperty, Dict[str, Any], None]) – An EventBridge configuration that contains a valid ARN of an event bus.

  • http_config (Union[IResolvable, HttpConfigProperty, Dict[str, Any], None]) – Endpoints for an HTTP data source.

  • lambda_config (Union[IResolvable, LambdaConfigProperty, Dict[str, Any], None]) – An ARN of a Lambda function in valid ARN format. This can be the ARN of a Lambda function that exists in the current account or in another account.

  • metrics_config (Optional[str]) – Enables or disables enhanced data source metrics for specified data sources. Note that MetricsConfig won’t be used unless the dataSourceLevelMetricsBehavior value is set to PER_DATA_SOURCE_METRICS . If the dataSourceLevelMetricsBehavior is set to FULL_REQUEST_DATA_SOURCE_METRICS instead, MetricsConfig will be ignored. However, you can still set its value. MetricsConfig can be ENABLED or DISABLED .

  • open_search_service_config (Union[IResolvable, OpenSearchServiceConfigProperty, Dict[str, Any], None]) – AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.

  • relational_database_config (Union[IResolvable, RelationalDatabaseConfigProperty, Dict[str, Any], None]) – Relational Database configuration of the relational database data source.

  • service_role_arn (Optional[str]) – The AWS Identity and Access Management service role ARN for the data source. The system assumes this role when accessing the data source. Required if Type is specified as AWS_LAMBDA , AMAZON_DYNAMODB , AMAZON_ELASTICSEARCH , AMAZON_EVENTBRIDGE , or AMAZON_OPENSEARCH_SERVICE .

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::AppSync::DataSource'
api_id

Unique AWS AppSync GraphQL API identifier where this data source will be created.

attr_data_source_arn

The Amazon Resource Name (ARN) of the API key, such as arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/datasources/datasourcename .

CloudformationAttribute:

DataSourceArn

attr_id

The ID value.

CloudformationAttribute:

Id

attr_name

Friendly name for you to identify your AWS AppSync data source after creation.

CloudformationAttribute:

Name

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

description

The description of the data source.

dynamo_db_config

AWS Region and TableName for an Amazon DynamoDB table in your account.

elasticsearch_config

AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.

event_bridge_config

An EventBridge configuration that contains a valid ARN of an event bus.

http_config

Endpoints for an HTTP data source.

lambda_config

An ARN of a Lambda function in valid ARN format.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

metrics_config

Enables or disables enhanced data source metrics for specified data sources.

name

Friendly name for you to identify your AppSync data source after creation.

node

The tree node.

open_search_service_config

AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

relational_database_config

Relational Database configuration of the relational database data source.

service_role_arn

The AWS Identity and Access Management service role ARN for the data source.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

type

The type of the data source.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

AuthorizationConfigProperty

class CfnDataSource.AuthorizationConfigProperty(*, authorization_type, aws_iam_config=None)

Bases: object

The AuthorizationConfig property type specifies the authorization type and configuration for an AWS AppSync http data source.

AuthorizationConfig is a property of the AWS AppSync DataSource HttpConfig property type.

Parameters:
  • authorization_type (str) – The authorization type that the HTTP endpoint requires. - AWS_IAM : The authorization type is Signature Version 4 (SigV4).

  • aws_iam_config (Union[IResolvable, AwsIamConfigProperty, Dict[str, Any], None]) – The AWS Identity and Access Management settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-authorizationconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

authorization_config_property = appsync.CfnDataSource.AuthorizationConfigProperty(
    authorization_type="authorizationType",

    # the properties below are optional
    aws_iam_config=appsync.CfnDataSource.AwsIamConfigProperty(
        signing_region="signingRegion",
        signing_service_name="signingServiceName"
    )
)

Attributes

authorization_type

The authorization type that the HTTP endpoint requires.

  • AWS_IAM : The authorization type is Signature Version 4 (SigV4).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-authorizationconfig.html#cfn-appsync-datasource-authorizationconfig-authorizationtype

aws_iam_config

The AWS Identity and Access Management settings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-authorizationconfig.html#cfn-appsync-datasource-authorizationconfig-awsiamconfig

AwsIamConfigProperty

class CfnDataSource.AwsIamConfigProperty(*, signing_region=None, signing_service_name=None)

Bases: object

Use the AwsIamConfig property type to specify AwsIamConfig for a AWS AppSync authorizaton.

AwsIamConfig is a property of the AWS AppSync DataSource AuthorizationConfig resource.

Parameters:
  • signing_region (Optional[str]) – The signing Region for AWS Identity and Access Management authorization.

  • signing_service_name (Optional[str]) – The signing service name for AWS Identity and Access Management authorization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-awsiamconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

aws_iam_config_property = appsync.CfnDataSource.AwsIamConfigProperty(
    signing_region="signingRegion",
    signing_service_name="signingServiceName"
)

Attributes

signing_region

The signing Region for AWS Identity and Access Management authorization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-awsiamconfig.html#cfn-appsync-datasource-awsiamconfig-signingregion

signing_service_name

The signing service name for AWS Identity and Access Management authorization.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-awsiamconfig.html#cfn-appsync-datasource-awsiamconfig-signingservicename

DeltaSyncConfigProperty

class CfnDataSource.DeltaSyncConfigProperty(*, base_table_ttl, delta_sync_table_name, delta_sync_table_ttl)

Bases: object

Describes a Delta Sync configuration.

Parameters:
  • base_table_ttl (str) – The number of minutes that an Item is stored in the data source.

  • delta_sync_table_name (str) – The Delta Sync table name.

  • delta_sync_table_ttl (str) – The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-deltasyncconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

delta_sync_config_property = appsync.CfnDataSource.DeltaSyncConfigProperty(
    base_table_ttl="baseTableTtl",
    delta_sync_table_name="deltaSyncTableName",
    delta_sync_table_ttl="deltaSyncTableTtl"
)

Attributes

base_table_ttl

The number of minutes that an Item is stored in the data source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-deltasyncconfig.html#cfn-appsync-datasource-deltasyncconfig-basetablettl

delta_sync_table_name

The Delta Sync table name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-deltasyncconfig.html#cfn-appsync-datasource-deltasyncconfig-deltasynctablename

delta_sync_table_ttl

The number of minutes that a Delta Sync log entry is stored in the Delta Sync table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-deltasyncconfig.html#cfn-appsync-datasource-deltasyncconfig-deltasynctablettl

DynamoDBConfigProperty

class CfnDataSource.DynamoDBConfigProperty(*, aws_region, table_name, delta_sync_config=None, use_caller_credentials=None, versioned=None)

Bases: object

The DynamoDBConfig property type specifies the AwsRegion and TableName for an Amazon DynamoDB table in your account for an AWS AppSync data source.

DynamoDBConfig is a property of the AWS::AppSync::DataSource property type.

Parameters:
  • aws_region (str) – The AWS Region.

  • table_name (str) – The table name.

  • delta_sync_config (Union[IResolvable, DeltaSyncConfigProperty, Dict[str, Any], None]) – The DeltaSyncConfig for a versioned datasource.

  • use_caller_credentials (Union[bool, IResolvable, None]) – Set to TRUE to use AWS Identity and Access Management with this data source.

  • versioned (Union[bool, IResolvable, None]) – Set to TRUE to use Conflict Detection and Resolution with this data source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-dynamodbconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

dynamo_dBConfig_property = appsync.CfnDataSource.DynamoDBConfigProperty(
    aws_region="awsRegion",
    table_name="tableName",

    # the properties below are optional
    delta_sync_config=appsync.CfnDataSource.DeltaSyncConfigProperty(
        base_table_ttl="baseTableTtl",
        delta_sync_table_name="deltaSyncTableName",
        delta_sync_table_ttl="deltaSyncTableTtl"
    ),
    use_caller_credentials=False,
    versioned=False
)

Attributes

aws_region

The AWS Region.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-dynamodbconfig.html#cfn-appsync-datasource-dynamodbconfig-awsregion

delta_sync_config

The DeltaSyncConfig for a versioned datasource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-dynamodbconfig.html#cfn-appsync-datasource-dynamodbconfig-deltasyncconfig

table_name

The table name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-dynamodbconfig.html#cfn-appsync-datasource-dynamodbconfig-tablename

use_caller_credentials

Set to TRUE to use AWS Identity and Access Management with this data source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-dynamodbconfig.html#cfn-appsync-datasource-dynamodbconfig-usecallercredentials

versioned

Set to TRUE to use Conflict Detection and Resolution with this data source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-dynamodbconfig.html#cfn-appsync-datasource-dynamodbconfig-versioned

ElasticsearchConfigProperty

class CfnDataSource.ElasticsearchConfigProperty(*, aws_region, endpoint)

Bases: object

The ElasticsearchConfig property type specifies the AwsRegion and Endpoints for an Amazon OpenSearch Service domain in your account for an AWS AppSync data source.

ElasticsearchConfig is a property of the AWS::AppSync::DataSource property type.

As of September 2021, Amazon Elasticsearch Service is Amazon OpenSearch Service . This property is deprecated. For new data sources, use OpenSearchServiceConfig to specify an OpenSearch Service data source.

Parameters:
  • aws_region (str) – The AWS Region.

  • endpoint (str) – The endpoint.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-elasticsearchconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

elasticsearch_config_property = appsync.CfnDataSource.ElasticsearchConfigProperty(
    aws_region="awsRegion",
    endpoint="endpoint"
)

Attributes

aws_region

The AWS Region.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-elasticsearchconfig.html#cfn-appsync-datasource-elasticsearchconfig-awsregion

endpoint

The endpoint.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-elasticsearchconfig.html#cfn-appsync-datasource-elasticsearchconfig-endpoint

EventBridgeConfigProperty

class CfnDataSource.EventBridgeConfigProperty(*, event_bus_arn)

Bases: object

The data source.

This can be an API destination, resource, or AWS service.

Parameters:

event_bus_arn (str) – The event bus pipeline’s ARN. For more information about event buses, see EventBridge event buses .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-eventbridgeconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

event_bridge_config_property = appsync.CfnDataSource.EventBridgeConfigProperty(
    event_bus_arn="eventBusArn"
)

Attributes

event_bus_arn

The event bus pipeline’s ARN.

For more information about event buses, see EventBridge event buses .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-eventbridgeconfig.html#cfn-appsync-datasource-eventbridgeconfig-eventbusarn

HttpConfigProperty

class CfnDataSource.HttpConfigProperty(*, endpoint, authorization_config=None)

Bases: object

Use the HttpConfig property type to specify HttpConfig for an AWS AppSync data source.

HttpConfig is a property of the AWS::AppSync::DataSource resource.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-httpconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

http_config_property = appsync.CfnDataSource.HttpConfigProperty(
    endpoint="endpoint",

    # the properties below are optional
    authorization_config=appsync.CfnDataSource.AuthorizationConfigProperty(
        authorization_type="authorizationType",

        # the properties below are optional
        aws_iam_config=appsync.CfnDataSource.AwsIamConfigProperty(
            signing_region="signingRegion",
            signing_service_name="signingServiceName"
        )
    )
)

Attributes

authorization_config

The authorization configuration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-httpconfig.html#cfn-appsync-datasource-httpconfig-authorizationconfig

endpoint

The endpoint.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-httpconfig.html#cfn-appsync-datasource-httpconfig-endpoint

LambdaConfigProperty

class CfnDataSource.LambdaConfigProperty(*, lambda_function_arn)

Bases: object

The LambdaConfig property type specifies the Lambda function ARN for an AWS AppSync data source.

LambdaConfig is a property of the AWS::AppSync::DataSource property type.

Parameters:

lambda_function_arn (str) – The ARN for the Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-lambdaconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

lambda_config_property = appsync.CfnDataSource.LambdaConfigProperty(
    lambda_function_arn="lambdaFunctionArn"
)

Attributes

lambda_function_arn

The ARN for the Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-lambdaconfig.html#cfn-appsync-datasource-lambdaconfig-lambdafunctionarn

OpenSearchServiceConfigProperty

class CfnDataSource.OpenSearchServiceConfigProperty(*, aws_region, endpoint)

Bases: object

The OpenSearchServiceConfig property type specifies the AwsRegion and Endpoints for an Amazon OpenSearch Service domain in your account for an AWS AppSync data source.

OpenSearchServiceConfig is a property of the AWS::AppSync::DataSource property type.

Parameters:
  • aws_region (str) – The AWS Region.

  • endpoint (str) – The endpoint.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-opensearchserviceconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

open_search_service_config_property = appsync.CfnDataSource.OpenSearchServiceConfigProperty(
    aws_region="awsRegion",
    endpoint="endpoint"
)

Attributes

aws_region

The AWS Region.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-opensearchserviceconfig.html#cfn-appsync-datasource-opensearchserviceconfig-awsregion

endpoint

The endpoint.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-opensearchserviceconfig.html#cfn-appsync-datasource-opensearchserviceconfig-endpoint

RdsHttpEndpointConfigProperty

class CfnDataSource.RdsHttpEndpointConfigProperty(*, aws_region, aws_secret_store_arn, db_cluster_identifier, database_name=None, schema=None)

Bases: object

Use the RdsHttpEndpointConfig property type to specify the RdsHttpEndpoint for an AWS AppSync relational database.

RdsHttpEndpointConfig is a property of the AWS AppSync DataSource RelationalDatabaseConfig resource.

Parameters:
  • aws_region (str) – AWS Region for RDS HTTP endpoint.

  • aws_secret_store_arn (str) – The ARN for database credentials stored in AWS Secrets Manager .

  • db_cluster_identifier (str) – Amazon RDS cluster Amazon Resource Name (ARN).

  • database_name (Optional[str]) – Logical database name.

  • schema (Optional[str]) – Logical schema name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-rdshttpendpointconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

rds_http_endpoint_config_property = appsync.CfnDataSource.RdsHttpEndpointConfigProperty(
    aws_region="awsRegion",
    aws_secret_store_arn="awsSecretStoreArn",
    db_cluster_identifier="dbClusterIdentifier",

    # the properties below are optional
    database_name="databaseName",
    schema="schema"
)

Attributes

aws_region

AWS Region for RDS HTTP endpoint.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-rdshttpendpointconfig.html#cfn-appsync-datasource-rdshttpendpointconfig-awsregion

aws_secret_store_arn

The ARN for database credentials stored in AWS Secrets Manager .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-rdshttpendpointconfig.html#cfn-appsync-datasource-rdshttpendpointconfig-awssecretstorearn

database_name

Logical database name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-rdshttpendpointconfig.html#cfn-appsync-datasource-rdshttpendpointconfig-databasename

db_cluster_identifier

Amazon RDS cluster Amazon Resource Name (ARN).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-rdshttpendpointconfig.html#cfn-appsync-datasource-rdshttpendpointconfig-dbclusteridentifier

schema

Logical schema name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-rdshttpendpointconfig.html#cfn-appsync-datasource-rdshttpendpointconfig-schema

RelationalDatabaseConfigProperty

class CfnDataSource.RelationalDatabaseConfigProperty(*, relational_database_source_type, rds_http_endpoint_config=None)

Bases: object

Use the RelationalDatabaseConfig property type to specify RelationalDatabaseConfig for an AWS AppSync data source.

RelationalDatabaseConfig is a property of the AWS::AppSync::DataSource property type.

Parameters:
  • relational_database_source_type (str) – The type of relational data source.

  • rds_http_endpoint_config (Union[IResolvable, RdsHttpEndpointConfigProperty, Dict[str, Any], None]) – Information about the Amazon RDS resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-relationaldatabaseconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_appsync as appsync

relational_database_config_property = appsync.CfnDataSource.RelationalDatabaseConfigProperty(
    relational_database_source_type="relationalDatabaseSourceType",

    # the properties below are optional
    rds_http_endpoint_config=appsync.CfnDataSource.RdsHttpEndpointConfigProperty(
        aws_region="awsRegion",
        aws_secret_store_arn="awsSecretStoreArn",
        db_cluster_identifier="dbClusterIdentifier",

        # the properties below are optional
        database_name="databaseName",
        schema="schema"
    )
)

Attributes

rds_http_endpoint_config

Information about the Amazon RDS resource.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-relationaldatabaseconfig.html#cfn-appsync-datasource-relationaldatabaseconfig-rdshttpendpointconfig

relational_database_source_type

The type of relational data source.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-relationaldatabaseconfig.html#cfn-appsync-datasource-relationaldatabaseconfig-relationaldatabasesourcetype