CfnDataSource

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

Bases: aws_cdk.core.CfnResource

A CloudFormation AWS::AppSync::DataSource.

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.

CloudformationResource

AWS::AppSync::DataSource

Link

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

ExampleMetadata

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.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"
    ),
    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"
    ),
    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"
)

Create a new AWS::AppSync::DataSource.

Parameters
  • scope (Construct) –

    • scope in which this resource is defined.

  • id (str) –

    • scoped id of the resource.

  • 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_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.

  • 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.

  • 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 , 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_depends_on(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_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters
  • key (str) –

  • value (Any) –

See

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.

Return type

None

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 intermdediate 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).

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 resoure, please consult that specific resource’s documentation.

Return type

None

get_att(attribute_name)

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.

Return type

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters

key (str) –

See

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.

Return type

Any

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters

inspector (TreeInspector) –

  • tree inspector to collect and process attributes.

Return type

None

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

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.

Link

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

Return type

str

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

Return type

str

attr_name

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

CloudformationAttribute

Name

Return type

str

cfn_options

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

Return type

ICfnResourceOptions

cfn_resource_type

AWS resource type.

Return type

str

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.

Return type

List[str]

description

The description of the data source.

Link

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

Return type

Optional[str]

dynamo_db_config

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

Link

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

Return type

Union[IResolvable, DynamoDBConfigProperty, None]

elasticsearch_config

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.

Link

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

Return type

Union[IResolvable, ElasticsearchConfigProperty, None]

http_config

Endpoints for an HTTP data source.

Link

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

Return type

Union[IResolvable, HttpConfigProperty, None]

lambda_config

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.

Link

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

Return type

Union[IResolvable, LambdaConfigProperty, None]

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).

Return type

str

Returns

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

name

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

Link

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

Return type

str

node

The construct tree node associated with this construct.

Return type

ConstructNode

open_search_service_config

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

Link

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

Return type

Union[IResolvable, OpenSearchServiceConfigProperty, None]

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 }).

Return type

str

relational_database_config

Relational Database configuration of the relational database data source.

Link

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

Return type

Union[IResolvable, RelationalDatabaseConfigProperty, None]

service_role_arn

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 , or AMAZON_OPENSEARCH_SERVICE .

Link

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

Return type

Optional[str]

stack

The stack in which this element is defined.

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

Return type

Stack

type

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_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.

Link

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

Return type

str

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(construct)

Check whether the given construct is a CfnResource.

Parameters

construct (IConstruct) –

Return type

bool

classmethod is_construct(x)

Return whether the given object is a Construct.

Parameters

x (Any) –

Return type

bool

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.

Link

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.
import aws_cdk.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).

Link

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

Return type

str

aws_iam_config

The AWS Identity and Access Management settings.

Link

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

Return type

Union[IResolvable, AwsIamConfigProperty, None]

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.

Link

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.
import aws_cdk.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.

Link

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

Return type

Optional[str]

signing_service_name

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

Link

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

Return type

Optional[str]

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.

Link

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.
import aws_cdk.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.

Link

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

Return type

str

delta_sync_table_name

The Delta Sync table name.

Link

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

Return type

str

delta_sync_table_ttl

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

Link

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

Return type

str

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.

Link

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.
import aws_cdk.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.

Link

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

Return type

str

delta_sync_config

The DeltaSyncConfig for a versioned datasource.

Link

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

Return type

Union[IResolvable, DeltaSyncConfigProperty, None]

table_name

The table name.

Link

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

Return type

str

use_caller_credentials

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

Link

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

Return type

Union[bool, IResolvable, None]

versioned

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

Link

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

Return type

Union[bool, IResolvable, None]

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.

Link

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.
import aws_cdk.aws_appsync as appsync

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

Attributes

aws_region

The AWS Region.

Link

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

Return type

str

endpoint

The endpoint.

Link

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

Return type

str

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
Link

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.
import aws_cdk.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.

Link

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

Return type

Union[IResolvable, AuthorizationConfigProperty, None]

endpoint

The endpoint.

Link

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

Return type

str

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.

Link

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.
import aws_cdk.aws_appsync as appsync

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

Attributes

lambda_function_arn

The ARN for the Lambda function.

Link

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

Return type

str

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.

Link

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.
import aws_cdk.aws_appsync as appsync

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

Attributes

aws_region

The AWS Region.

Link

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

Return type

str

endpoint

The endpoint.

Link

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

Return type

str

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.

Link

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.
import aws_cdk.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.

Link

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

Return type

str

aws_secret_store_arn

The ARN for database credentials stored in AWS Secrets Manager .

Link

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

Return type

str

database_name

Logical database name.

Link

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

Return type

Optional[str]

db_cluster_identifier

Amazon RDS cluster Amazon Resource Name (ARN).

Link

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

Return type

str

schema

Logical schema name.

Link

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

Return type

Optional[str]

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.

Link

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.
import aws_cdk.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.

Link

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

Return type

Union[IResolvable, RdsHttpEndpointConfigProperty, None]

relational_database_source_type

The type of relational data source.

Link

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

Return type

str