Class CfnDataSource
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 .
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.AppSync
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnDataSource : CfnResource, IInspectable
Syntax (vb)
Public Class CfnDataSource
Inherits CfnResource
Implements IInspectable
Remarks
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
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"
},
MetricsConfig = "metricsConfig",
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(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 |
CfnDataSource(Construct, String, ICfnDataSourceProps) |
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 |
AttrId | The ID value. |
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. |
MetricsConfig | Enables or disables enhanced data source metrics for specified data sources. |
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(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
CfnDataSource(Construct, String, ICfnDataSourceProps)
public CfnDataSource(Construct scope, string id, ICfnDataSourceProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnDataSourceProps
Resource properties.
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
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
AttrId
The ID value.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
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
DynamoDbConfig
AWS Region and TableName for an Amazon DynamoDB table in your account.
public virtual object DynamoDbConfig { get; set; }
Property Value
System.Object
ElasticsearchConfig
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
public virtual object ElasticsearchConfig { get; set; }
Property Value
System.Object
EventBridgeConfig
An EventBridge configuration that contains a valid ARN of an event bus.
public virtual object EventBridgeConfig { get; set; }
Property Value
System.Object
HttpConfig
Endpoints for an HTTP data source.
public virtual object HttpConfig { get; set; }
Property Value
System.Object
LambdaConfig
An ARN of a Lambda function in valid ARN format.
public virtual object LambdaConfig { get; set; }
Property Value
System.Object
MetricsConfig
Enables or disables enhanced data source metrics for specified data sources.
public virtual string MetricsConfig { get; set; }
Property Value
System.String
Name
Friendly name for you to identify your AppSync data source after creation.
public virtual string Name { get; set; }
Property Value
System.String
OpenSearchServiceConfig
AWS Region and Endpoints for an Amazon OpenSearch Service domain in your account.
public virtual object OpenSearchServiceConfig { get; set; }
Property Value
System.Object
RelationalDatabaseConfig
Relational Database configuration of the relational database data source.
public virtual object RelationalDatabaseConfig { get; set; }
Property Value
System.Object
ServiceRoleArn
The AWS Identity and Access Management service role ARN for the data source.
public virtual string ServiceRoleArn { get; set; }
Property Value
System.String
Type
The type of the data source.
public virtual string Type { get; set; }
Property Value
System.String
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>