Class CfnDataSource
A CloudFormation AWS::AppSync::DataSource
.
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.AWS.AppSync.dll
Syntax (csharp)
public class CfnDataSource : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnDataSource
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
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
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.AppSync;
var cfnDataSource = new CfnDataSource(this, "MyCfnDataSource", new CfnDataSourceProps {
ApiId = "apiId",
Name = "name",
Type = "type",
// the properties below are optional
Description = "description",
DynamoDbConfig = new DynamoDBConfigProperty {
AwsRegion = "awsRegion",
TableName = "tableName",
// the properties below are optional
DeltaSyncConfig = new DeltaSyncConfigProperty {
BaseTableTtl = "baseTableTtl",
DeltaSyncTableName = "deltaSyncTableName",
DeltaSyncTableTtl = "deltaSyncTableTtl"
},
UseCallerCredentials = false,
Versioned = false
},
ElasticsearchConfig = new ElasticsearchConfigProperty {
AwsRegion = "awsRegion",
Endpoint = "endpoint"
},
EventBridgeConfig = new EventBridgeConfigProperty {
EventBusArn = "eventBusArn"
},
HttpConfig = new HttpConfigProperty {
Endpoint = "endpoint",
// the properties below are optional
AuthorizationConfig = new AuthorizationConfigProperty {
AuthorizationType = "authorizationType",
// the properties below are optional
AwsIamConfig = new AwsIamConfigProperty {
SigningRegion = "signingRegion",
SigningServiceName = "signingServiceName"
}
}
},
LambdaConfig = new LambdaConfigProperty {
LambdaFunctionArn = "lambdaFunctionArn"
},
OpenSearchServiceConfig = new OpenSearchServiceConfigProperty {
AwsRegion = "awsRegion",
Endpoint = "endpoint"
},
RelationalDatabaseConfig = new RelationalDatabaseConfigProperty {
RelationalDatabaseSourceType = "relationalDatabaseSourceType",
// the properties below are optional
RdsHttpEndpointConfig = new RdsHttpEndpointConfigProperty {
AwsRegion = "awsRegion",
AwsSecretStoreArn = "awsSecretStoreArn",
DbClusterIdentifier = "dbClusterIdentifier",
// the properties below are optional
DatabaseName = "databaseName",
Schema = "schema"
}
},
ServiceRoleArn = "serviceRoleArn"
});
Synopsis
Constructors
CfnDataSource(Construct, String, ICfnDataSourceProps) | Create a new |
CfnDataSource(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnDataSource(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
ApiId | Unique AWS AppSync GraphQL API identifier where this data source will be created. |
AttrDataSourceArn | The Amazon Resource Name (ARN) of the API key, such as |
AttrName | Friendly name for you to identify your AWS AppSync data source after creation. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | The description of the data source. |
DynamoDbConfig | AWS Region and TableName for an Amazon DynamoDB table in your account. |
ElasticsearchConfig | AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account. |
EventBridgeConfig | An EventBridge configuration that contains a valid ARN of an event bus. |
HttpConfig | Endpoints for an HTTP data source. |
LambdaConfig | An ARN of a Lambda function in valid ARN format. |
Name | Friendly name for you to identify your AppSync data source after creation. |
OpenSearchServiceConfig | AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account. |
RelationalDatabaseConfig | Relational Database configuration of the relational database data source. |
ServiceRoleArn | The AWS Identity and Access Management service role ARN for the data source. |
Type | The type of the data source. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnDataSource(Construct, String, ICfnDataSourceProps)
Create a new AWS::AppSync::DataSource
.
public CfnDataSource(Construct scope, string id, ICfnDataSourceProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnDataSourceProps
- resource properties.
CfnDataSource(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnDataSource(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnDataSource(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnDataSource(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
ApiId
Unique AWS AppSync GraphQL API identifier where this data source will be created.
public virtual string ApiId { get; set; }
Property Value
System.String
Remarks
AttrDataSourceArn
The Amazon Resource Name (ARN) of the API key, such as arn:aws:appsync:us-east-1:123456789012:apis/graphqlapiid/datasources/datasourcename
.
public virtual string AttrDataSourceArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: DataSourceArn
AttrName
Friendly name for you to identify your AWS AppSync data source after creation.
public virtual string AttrName { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Name
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
The description of the data source.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
DynamoDbConfig
AWS Region and TableName for an Amazon DynamoDB table in your account.
public virtual object DynamoDbConfig { get; set; }
Property Value
System.Object
Remarks
ElasticsearchConfig
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
public virtual object ElasticsearchConfig { get; set; }
Property Value
System.Object
Remarks
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.
EventBridgeConfig
An EventBridge configuration that contains a valid ARN of an event bus.
public virtual object EventBridgeConfig { get; set; }
Property Value
System.Object
Remarks
HttpConfig
Endpoints for an HTTP data source.
public virtual object HttpConfig { get; set; }
Property Value
System.Object
Remarks
LambdaConfig
An ARN of a Lambda function in valid ARN format.
public virtual object LambdaConfig { get; set; }
Property Value
System.Object
Remarks
This can be the ARN of a Lambda function that exists in the current account or in another account.
Name
Friendly name for you to identify your AppSync data source after creation.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
OpenSearchServiceConfig
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
public virtual object OpenSearchServiceConfig { get; set; }
Property Value
System.Object
Remarks
RelationalDatabaseConfig
Relational Database configuration of the relational database data source.
public virtual object RelationalDatabaseConfig { get; set; }
Property Value
System.Object
Remarks
ServiceRoleArn
The AWS Identity and Access Management service role ARN for the data source.
public virtual string ServiceRoleArn { get; set; }
Property Value
System.String
Remarks
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
.
Type
The type of the data source.
public virtual string Type { get; set; }
Property Value
System.String
Remarks
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>