AWS Classic

v5.16.2 published on Tuesday, Oct 4, 2022 by Pulumi

DataSource

Provides an AppSync Data Source.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var exampleTable = new Aws.DynamoDB.Table("exampleTable", new()
    {
        ReadCapacity = 1,
        WriteCapacity = 1,
        HashKey = "UserId",
        Attributes = new[]
        {
            new Aws.DynamoDB.Inputs.TableAttributeArgs
            {
                Name = "UserId",
                Type = "S",
            },
        },
    });

    var exampleRole = new Aws.Iam.Role("exampleRole", new()
    {
        AssumeRolePolicy = @"{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {
      ""Action"": ""sts:AssumeRole"",
      ""Principal"": {
        ""Service"": ""appsync.amazonaws.com""
      },
      ""Effect"": ""Allow""
    }
  ]
}
",
    });

    var exampleRolePolicy = new Aws.Iam.RolePolicy("exampleRolePolicy", new()
    {
        Role = exampleRole.Id,
        Policy = exampleTable.Arn.Apply(arn => @$"{{
  ""Version"": ""2012-10-17"",
  ""Statement"": [
    {{
      ""Action"": [
        ""dynamodb:*""
      ],
      ""Effect"": ""Allow"",
      ""Resource"": [
        ""{arn}""
      ]
    }}
  ]
}}
"),
    });

    var exampleGraphQLApi = new Aws.AppSync.GraphQLApi("exampleGraphQLApi", new()
    {
        AuthenticationType = "API_KEY",
    });

    var exampleDataSource = new Aws.AppSync.DataSource("exampleDataSource", new()
    {
        ApiId = exampleGraphQLApi.Id,
        Name = "tf_appsync_example",
        ServiceRoleArn = exampleRole.Arn,
        Type = "AMAZON_DYNAMODB",
        DynamodbConfig = new Aws.AppSync.Inputs.DataSourceDynamodbConfigArgs
        {
            TableName = exampleTable.Name,
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/appsync"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/dynamodb"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/iam"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleTable, err := dynamodb.NewTable(ctx, "exampleTable", &dynamodb.TableArgs{
			ReadCapacity:  pulumi.Int(1),
			WriteCapacity: pulumi.Int(1),
			HashKey:       pulumi.String("UserId"),
			Attributes: dynamodb.TableAttributeArray{
				&dynamodb.TableAttributeArgs{
					Name: pulumi.String("UserId"),
					Type: pulumi.String("S"),
				},
			},
		})
		if err != nil {
			return err
		}
		exampleRole, err := iam.NewRole(ctx, "exampleRole", &iam.RoleArgs{
			AssumeRolePolicy: pulumi.Any(fmt.Sprintf(`{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "appsync.amazonaws.com"
      },
      "Effect": "Allow"
    }
  ]
}
`)),
		})
		if err != nil {
			return err
		}
		_, err = iam.NewRolePolicy(ctx, "exampleRolePolicy", &iam.RolePolicyArgs{
			Role: exampleRole.ID(),
			Policy: exampleTable.Arn.ApplyT(func(arn string) (string, error) {
				return fmt.Sprintf(`{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "dynamodb:*"
      ],
      "Effect": "Allow",
      "Resource": [
        "%v"
      ]
    }
  ]
}
`, arn), nil
			}).(pulumi.StringOutput),
		})
		if err != nil {
			return err
		}
		exampleGraphQLApi, err := appsync.NewGraphQLApi(ctx, "exampleGraphQLApi", &appsync.GraphQLApiArgs{
			AuthenticationType: pulumi.String("API_KEY"),
		})
		if err != nil {
			return err
		}
		_, err = appsync.NewDataSource(ctx, "exampleDataSource", &appsync.DataSourceArgs{
			ApiId:          exampleGraphQLApi.ID(),
			Name:           pulumi.String("tf_appsync_example"),
			ServiceRoleArn: exampleRole.Arn,
			Type:           pulumi.String("AMAZON_DYNAMODB"),
			DynamodbConfig: &appsync.DataSourceDynamodbConfigArgs{
				TableName: exampleTable.Name,
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dynamodb.Table;
import com.pulumi.aws.dynamodb.TableArgs;
import com.pulumi.aws.dynamodb.inputs.TableAttributeArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.iam.RolePolicy;
import com.pulumi.aws.iam.RolePolicyArgs;
import com.pulumi.aws.appsync.GraphQLApi;
import com.pulumi.aws.appsync.GraphQLApiArgs;
import com.pulumi.aws.appsync.DataSource;
import com.pulumi.aws.appsync.DataSourceArgs;
import com.pulumi.aws.appsync.inputs.DataSourceDynamodbConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleTable = new Table("exampleTable", TableArgs.builder()        
            .readCapacity(1)
            .writeCapacity(1)
            .hashKey("UserId")
            .attributes(TableAttributeArgs.builder()
                .name("UserId")
                .type("S")
                .build())
            .build());

        var exampleRole = new Role("exampleRole", RoleArgs.builder()        
            .assumeRolePolicy("""
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "appsync.amazonaws.com"
      },
      "Effect": "Allow"
    }
  ]
}
            """)
            .build());

        var exampleRolePolicy = new RolePolicy("exampleRolePolicy", RolePolicyArgs.builder()        
            .role(exampleRole.id())
            .policy(exampleTable.arn().applyValue(arn -> """
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "dynamodb:*"
      ],
      "Effect": "Allow",
      "Resource": [
        "%s"
      ]
    }
  ]
}
", arn)))
            .build());

        var exampleGraphQLApi = new GraphQLApi("exampleGraphQLApi", GraphQLApiArgs.builder()        
            .authenticationType("API_KEY")
            .build());

        var exampleDataSource = new DataSource("exampleDataSource", DataSourceArgs.builder()        
            .apiId(exampleGraphQLApi.id())
            .name("tf_appsync_example")
            .serviceRoleArn(exampleRole.arn())
            .type("AMAZON_DYNAMODB")
            .dynamodbConfig(DataSourceDynamodbConfigArgs.builder()
                .tableName(exampleTable.name())
                .build())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example_table = aws.dynamodb.Table("exampleTable",
    read_capacity=1,
    write_capacity=1,
    hash_key="UserId",
    attributes=[aws.dynamodb.TableAttributeArgs(
        name="UserId",
        type="S",
    )])
example_role = aws.iam.Role("exampleRole", assume_role_policy="""{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "appsync.amazonaws.com"
      },
      "Effect": "Allow"
    }
  ]
}
""")
example_role_policy = aws.iam.RolePolicy("exampleRolePolicy",
    role=example_role.id,
    policy=example_table.arn.apply(lambda arn: f"""{{
  "Version": "2012-10-17",
  "Statement": [
    {{
      "Action": [
        "dynamodb:*"
      ],
      "Effect": "Allow",
      "Resource": [
        "{arn}"
      ]
    }}
  ]
}}
"""))
example_graph_ql_api = aws.appsync.GraphQLApi("exampleGraphQLApi", authentication_type="API_KEY")
example_data_source = aws.appsync.DataSource("exampleDataSource",
    api_id=example_graph_ql_api.id,
    name="tf_appsync_example",
    service_role_arn=example_role.arn,
    type="AMAZON_DYNAMODB",
    dynamodb_config=aws.appsync.DataSourceDynamodbConfigArgs(
        table_name=example_table.name,
    ))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleTable = new aws.dynamodb.Table("exampleTable", {
    readCapacity: 1,
    writeCapacity: 1,
    hashKey: "UserId",
    attributes: [{
        name: "UserId",
        type: "S",
    }],
});
const exampleRole = new aws.iam.Role("exampleRole", {assumeRolePolicy: `{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "appsync.amazonaws.com"
      },
      "Effect": "Allow"
    }
  ]
}
`});
const exampleRolePolicy = new aws.iam.RolePolicy("exampleRolePolicy", {
    role: exampleRole.id,
    policy: pulumi.interpolate`{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": [
        "dynamodb:*"
      ],
      "Effect": "Allow",
      "Resource": [
        "${exampleTable.arn}"
      ]
    }
  ]
}
`,
});
const exampleGraphQLApi = new aws.appsync.GraphQLApi("exampleGraphQLApi", {authenticationType: "API_KEY"});
const exampleDataSource = new aws.appsync.DataSource("exampleDataSource", {
    apiId: exampleGraphQLApi.id,
    name: "tf_appsync_example",
    serviceRoleArn: exampleRole.arn,
    type: "AMAZON_DYNAMODB",
    dynamodbConfig: {
        tableName: exampleTable.name,
    },
});
resources:
  exampleTable:
    type: aws:dynamodb:Table
    properties:
      readCapacity: 1
      writeCapacity: 1
      hashKey: UserId
      attributes:
        - name: UserId
          type: S
  exampleRole:
    type: aws:iam:Role
    properties:
      assumeRolePolicy: |
        {
          "Version": "2012-10-17",
          "Statement": [
            {
              "Action": "sts:AssumeRole",
              "Principal": {
                "Service": "appsync.amazonaws.com"
              },
              "Effect": "Allow"
            }
          ]
        }        
  exampleRolePolicy:
    type: aws:iam:RolePolicy
    properties:
      role: ${exampleRole.id}
      policy: |
        {
          "Version": "2012-10-17",
          "Statement": [
            {
              "Action": [
                "dynamodb:*"
              ],
              "Effect": "Allow",
              "Resource": [
                "${exampleTable.arn}"
              ]
            }
          ]
        }        
  exampleGraphQLApi:
    type: aws:appsync:GraphQLApi
    properties:
      authenticationType: API_KEY
  exampleDataSource:
    type: aws:appsync:DataSource
    properties:
      apiId: ${exampleGraphQLApi.id}
      name: tf_appsync_example
      serviceRoleArn: ${exampleRole.arn}
      type: AMAZON_DYNAMODB
      dynamodbConfig:
        tableName: ${exampleTable.name}

Create a DataSource Resource

new DataSource(name: string, args: DataSourceArgs, opts?: CustomResourceOptions);
@overload
def DataSource(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               api_id: Optional[str] = None,
               description: Optional[str] = None,
               dynamodb_config: Optional[DataSourceDynamodbConfigArgs] = None,
               elasticsearch_config: Optional[DataSourceElasticsearchConfigArgs] = None,
               http_config: Optional[DataSourceHttpConfigArgs] = None,
               lambda_config: Optional[DataSourceLambdaConfigArgs] = None,
               name: Optional[str] = None,
               relational_database_config: Optional[DataSourceRelationalDatabaseConfigArgs] = None,
               service_role_arn: Optional[str] = None,
               type: Optional[str] = None)
@overload
def DataSource(resource_name: str,
               args: DataSourceArgs,
               opts: Optional[ResourceOptions] = None)
func NewDataSource(ctx *Context, name string, args DataSourceArgs, opts ...ResourceOption) (*DataSource, error)
public DataSource(string name, DataSourceArgs args, CustomResourceOptions? opts = null)
public DataSource(String name, DataSourceArgs args)
public DataSource(String name, DataSourceArgs args, CustomResourceOptions options)
type: aws:appsync:DataSource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args DataSourceArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

DataSource Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The DataSource resource accepts the following input properties:

ApiId string

API ID for the GraphQL API for the data source.

Type string

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

Description string

Description of the data source.

DynamodbConfig DataSourceDynamodbConfigArgs

DynamoDB settings. See below

ElasticsearchConfig DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

HttpConfig DataSourceHttpConfigArgs

HTTP settings. See below

LambdaConfig DataSourceLambdaConfigArgs

AWS Lambda settings. See below

Name string

User-supplied name for the data source.

RelationalDatabaseConfig DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

ServiceRoleArn string

IAM service role ARN for the data source.

ApiId string

API ID for the GraphQL API for the data source.

Type string

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

Description string

Description of the data source.

DynamodbConfig DataSourceDynamodbConfigArgs

DynamoDB settings. See below

ElasticsearchConfig DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

HttpConfig DataSourceHttpConfigArgs

HTTP settings. See below

LambdaConfig DataSourceLambdaConfigArgs

AWS Lambda settings. See below

Name string

User-supplied name for the data source.

RelationalDatabaseConfig DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

ServiceRoleArn string

IAM service role ARN for the data source.

apiId String

API ID for the GraphQL API for the data source.

type String

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

description String

Description of the data source.

dynamodbConfig DataSourceDynamodbConfigArgs

DynamoDB settings. See below

elasticsearchConfig DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

httpConfig DataSourceHttpConfigArgs

HTTP settings. See below

lambdaConfig DataSourceLambdaConfigArgs

AWS Lambda settings. See below

name String

User-supplied name for the data source.

relationalDatabaseConfig DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

serviceRoleArn String

IAM service role ARN for the data source.

apiId string

API ID for the GraphQL API for the data source.

type string

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

description string

Description of the data source.

dynamodbConfig DataSourceDynamodbConfigArgs

DynamoDB settings. See below

elasticsearchConfig DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

httpConfig DataSourceHttpConfigArgs

HTTP settings. See below

lambdaConfig DataSourceLambdaConfigArgs

AWS Lambda settings. See below

name string

User-supplied name for the data source.

relationalDatabaseConfig DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

serviceRoleArn string

IAM service role ARN for the data source.

api_id str

API ID for the GraphQL API for the data source.

type str

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

description str

Description of the data source.

dynamodb_config DataSourceDynamodbConfigArgs

DynamoDB settings. See below

elasticsearch_config DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

http_config DataSourceHttpConfigArgs

HTTP settings. See below

lambda_config DataSourceLambdaConfigArgs

AWS Lambda settings. See below

name str

User-supplied name for the data source.

relational_database_config DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

service_role_arn str

IAM service role ARN for the data source.

apiId String

API ID for the GraphQL API for the data source.

type String

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

description String

Description of the data source.

dynamodbConfig Property Map

DynamoDB settings. See below

elasticsearchConfig Property Map

Amazon Elasticsearch settings. See below

httpConfig Property Map

HTTP settings. See below

lambdaConfig Property Map

AWS Lambda settings. See below

name String

User-supplied name for the data source.

relationalDatabaseConfig Property Map

AWS RDS settings. See Relational Database Config

serviceRoleArn String

IAM service role ARN for the data source.

Outputs

All input properties are implicitly available as output properties. Additionally, the DataSource resource produces the following output properties:

Arn string

ARN

Id string

The provider-assigned unique ID for this managed resource.

Arn string

ARN

Id string

The provider-assigned unique ID for this managed resource.

arn String

ARN

id String

The provider-assigned unique ID for this managed resource.

arn string

ARN

id string

The provider-assigned unique ID for this managed resource.

arn str

ARN

id str

The provider-assigned unique ID for this managed resource.

arn String

ARN

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing DataSource Resource

Get an existing DataSource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DataSourceState, opts?: CustomResourceOptions): DataSource
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        api_id: Optional[str] = None,
        arn: Optional[str] = None,
        description: Optional[str] = None,
        dynamodb_config: Optional[DataSourceDynamodbConfigArgs] = None,
        elasticsearch_config: Optional[DataSourceElasticsearchConfigArgs] = None,
        http_config: Optional[DataSourceHttpConfigArgs] = None,
        lambda_config: Optional[DataSourceLambdaConfigArgs] = None,
        name: Optional[str] = None,
        relational_database_config: Optional[DataSourceRelationalDatabaseConfigArgs] = None,
        service_role_arn: Optional[str] = None,
        type: Optional[str] = None) -> DataSource
func GetDataSource(ctx *Context, name string, id IDInput, state *DataSourceState, opts ...ResourceOption) (*DataSource, error)
public static DataSource Get(string name, Input<string> id, DataSourceState? state, CustomResourceOptions? opts = null)
public static DataSource get(String name, Output<String> id, DataSourceState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApiId string

API ID for the GraphQL API for the data source.

Arn string

ARN

Description string

Description of the data source.

DynamodbConfig DataSourceDynamodbConfigArgs

DynamoDB settings. See below

ElasticsearchConfig DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

HttpConfig DataSourceHttpConfigArgs

HTTP settings. See below

LambdaConfig DataSourceLambdaConfigArgs

AWS Lambda settings. See below

Name string

User-supplied name for the data source.

RelationalDatabaseConfig DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

ServiceRoleArn string

IAM service role ARN for the data source.

Type string

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

ApiId string

API ID for the GraphQL API for the data source.

Arn string

ARN

Description string

Description of the data source.

DynamodbConfig DataSourceDynamodbConfigArgs

DynamoDB settings. See below

ElasticsearchConfig DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

HttpConfig DataSourceHttpConfigArgs

HTTP settings. See below

LambdaConfig DataSourceLambdaConfigArgs

AWS Lambda settings. See below

Name string

User-supplied name for the data source.

RelationalDatabaseConfig DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

ServiceRoleArn string

IAM service role ARN for the data source.

Type string

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

apiId String

API ID for the GraphQL API for the data source.

arn String

ARN

description String

Description of the data source.

dynamodbConfig DataSourceDynamodbConfigArgs

DynamoDB settings. See below

elasticsearchConfig DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

httpConfig DataSourceHttpConfigArgs

HTTP settings. See below

lambdaConfig DataSourceLambdaConfigArgs

AWS Lambda settings. See below

name String

User-supplied name for the data source.

relationalDatabaseConfig DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

serviceRoleArn String

IAM service role ARN for the data source.

type String

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

apiId string

API ID for the GraphQL API for the data source.

arn string

ARN

description string

Description of the data source.

dynamodbConfig DataSourceDynamodbConfigArgs

DynamoDB settings. See below

elasticsearchConfig DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

httpConfig DataSourceHttpConfigArgs

HTTP settings. See below

lambdaConfig DataSourceLambdaConfigArgs

AWS Lambda settings. See below

name string

User-supplied name for the data source.

relationalDatabaseConfig DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

serviceRoleArn string

IAM service role ARN for the data source.

type string

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

api_id str

API ID for the GraphQL API for the data source.

arn str

ARN

description str

Description of the data source.

dynamodb_config DataSourceDynamodbConfigArgs

DynamoDB settings. See below

elasticsearch_config DataSourceElasticsearchConfigArgs

Amazon Elasticsearch settings. See below

http_config DataSourceHttpConfigArgs

HTTP settings. See below

lambda_config DataSourceLambdaConfigArgs

AWS Lambda settings. See below

name str

User-supplied name for the data source.

relational_database_config DataSourceRelationalDatabaseConfigArgs

AWS RDS settings. See Relational Database Config

service_role_arn str

IAM service role ARN for the data source.

type str

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

apiId String

API ID for the GraphQL API for the data source.

arn String

ARN

description String

Description of the data source.

dynamodbConfig Property Map

DynamoDB settings. See below

elasticsearchConfig Property Map

Amazon Elasticsearch settings. See below

httpConfig Property Map

HTTP settings. See below

lambdaConfig Property Map

AWS Lambda settings. See below

name String

User-supplied name for the data source.

relationalDatabaseConfig Property Map

AWS RDS settings. See Relational Database Config

serviceRoleArn String

IAM service role ARN for the data source.

type String

Type of the Data Source. Valid values: AWS_LAMBDA, AMAZON_DYNAMODB, AMAZON_ELASTICSEARCH, HTTP, NONE, RELATIONAL_DATABASE.

Supporting Types

DataSourceDynamodbConfig

TableName string

Name of the DynamoDB table.

DeltaSyncConfig DataSourceDynamodbConfigDeltaSyncConfig
Region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

UseCallerCredentials bool

Set to true to use Amazon Cognito credentials with this data source.

Versioned bool
TableName string

Name of the DynamoDB table.

DeltaSyncConfig DataSourceDynamodbConfigDeltaSyncConfig
Region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

UseCallerCredentials bool

Set to true to use Amazon Cognito credentials with this data source.

Versioned bool
tableName String

Name of the DynamoDB table.

deltaSyncConfig DataSourceDynamodbConfigDeltaSyncConfig
region String

AWS Region for RDS HTTP endpoint. Defaults to current region.

useCallerCredentials Boolean

Set to true to use Amazon Cognito credentials with this data source.

versioned Boolean
tableName string

Name of the DynamoDB table.

deltaSyncConfig DataSourceDynamodbConfigDeltaSyncConfig
region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

useCallerCredentials boolean

Set to true to use Amazon Cognito credentials with this data source.

versioned boolean
table_name str

Name of the DynamoDB table.

delta_sync_config DataSourceDynamodbConfigDeltaSyncConfig
region str

AWS Region for RDS HTTP endpoint. Defaults to current region.

use_caller_credentials bool

Set to true to use Amazon Cognito credentials with this data source.

versioned bool
tableName String

Name of the DynamoDB table.

deltaSyncConfig Property Map
region String

AWS Region for RDS HTTP endpoint. Defaults to current region.

useCallerCredentials Boolean

Set to true to use Amazon Cognito credentials with this data source.

versioned Boolean

DataSourceDynamodbConfigDeltaSyncConfig

DataSourceElasticsearchConfig

Endpoint string

HTTP URL.

Region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

Endpoint string

HTTP URL.

Region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

endpoint String

HTTP URL.

region String

AWS Region for RDS HTTP endpoint. Defaults to current region.

endpoint string

HTTP URL.

region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

endpoint str

HTTP URL.

region str

AWS Region for RDS HTTP endpoint. Defaults to current region.

endpoint String

HTTP URL.

region String

AWS Region for RDS HTTP endpoint. Defaults to current region.

DataSourceHttpConfig

Endpoint string

HTTP URL.

AuthorizationConfig DataSourceHttpConfigAuthorizationConfig

Authorization configuration in case the HTTP endpoint requires authorization. See Authorization Config.

Endpoint string

HTTP URL.

AuthorizationConfig DataSourceHttpConfigAuthorizationConfig

Authorization configuration in case the HTTP endpoint requires authorization. See Authorization Config.

endpoint String

HTTP URL.

authorizationConfig DataSourceHttpConfigAuthorizationConfig

Authorization configuration in case the HTTP endpoint requires authorization. See Authorization Config.

endpoint string

HTTP URL.

authorizationConfig DataSourceHttpConfigAuthorizationConfig

Authorization configuration in case the HTTP endpoint requires authorization. See Authorization Config.

endpoint str

HTTP URL.

authorization_config DataSourceHttpConfigAuthorizationConfig

Authorization configuration in case the HTTP endpoint requires authorization. See Authorization Config.

endpoint String

HTTP URL.

authorizationConfig Property Map

Authorization configuration in case the HTTP endpoint requires authorization. See Authorization Config.

DataSourceHttpConfigAuthorizationConfig

AuthorizationType string

Authorization type that the HTTP endpoint requires. Default values is AWS_IAM.

AwsIamConfig DataSourceHttpConfigAuthorizationConfigAwsIamConfig

Identity and Access Management (IAM) settings. See AWS IAM Config.

AuthorizationType string

Authorization type that the HTTP endpoint requires. Default values is AWS_IAM.

AwsIamConfig DataSourceHttpConfigAuthorizationConfigAwsIamConfig

Identity and Access Management (IAM) settings. See AWS IAM Config.

authorizationType String

Authorization type that the HTTP endpoint requires. Default values is AWS_IAM.

awsIamConfig DataSourceHttpConfigAuthorizationConfigAwsIamConfig

Identity and Access Management (IAM) settings. See AWS IAM Config.

authorizationType string

Authorization type that the HTTP endpoint requires. Default values is AWS_IAM.

awsIamConfig DataSourceHttpConfigAuthorizationConfigAwsIamConfig

Identity and Access Management (IAM) settings. See AWS IAM Config.

authorization_type str

Authorization type that the HTTP endpoint requires. Default values is AWS_IAM.

aws_iam_config DataSourceHttpConfigAuthorizationConfigAwsIamConfig

Identity and Access Management (IAM) settings. See AWS IAM Config.

authorizationType String

Authorization type that the HTTP endpoint requires. Default values is AWS_IAM.

awsIamConfig Property Map

Identity and Access Management (IAM) settings. See AWS IAM Config.

DataSourceHttpConfigAuthorizationConfigAwsIamConfig

SigningRegion string

Signing Amazon Web Services Region for IAM authorization.

SigningServiceName string

Signing service name for IAM authorization.

SigningRegion string

Signing Amazon Web Services Region for IAM authorization.

SigningServiceName string

Signing service name for IAM authorization.

signingRegion String

Signing Amazon Web Services Region for IAM authorization.

signingServiceName String

Signing service name for IAM authorization.

signingRegion string

Signing Amazon Web Services Region for IAM authorization.

signingServiceName string

Signing service name for IAM authorization.

signing_region str

Signing Amazon Web Services Region for IAM authorization.

signing_service_name str

Signing service name for IAM authorization.

signingRegion String

Signing Amazon Web Services Region for IAM authorization.

signingServiceName String

Signing service name for IAM authorization.

DataSourceLambdaConfig

FunctionArn string

ARN for the Lambda function.

FunctionArn string

ARN for the Lambda function.

functionArn String

ARN for the Lambda function.

functionArn string

ARN for the Lambda function.

function_arn str

ARN for the Lambda function.

functionArn String

ARN for the Lambda function.

DataSourceRelationalDatabaseConfig

HttpEndpointConfig DataSourceRelationalDatabaseConfigHttpEndpointConfig

Amazon RDS HTTP endpoint configuration. See HTTP Endpoint Config.

SourceType string

Source type for the relational database. Valid values: RDS_HTTP_ENDPOINT.

HttpEndpointConfig DataSourceRelationalDatabaseConfigHttpEndpointConfig

Amazon RDS HTTP endpoint configuration. See HTTP Endpoint Config.

SourceType string

Source type for the relational database. Valid values: RDS_HTTP_ENDPOINT.

httpEndpointConfig DataSourceRelationalDatabaseConfigHttpEndpointConfig

Amazon RDS HTTP endpoint configuration. See HTTP Endpoint Config.

sourceType String

Source type for the relational database. Valid values: RDS_HTTP_ENDPOINT.

httpEndpointConfig DataSourceRelationalDatabaseConfigHttpEndpointConfig

Amazon RDS HTTP endpoint configuration. See HTTP Endpoint Config.

sourceType string

Source type for the relational database. Valid values: RDS_HTTP_ENDPOINT.

http_endpoint_config DataSourceRelationalDatabaseConfigHttpEndpointConfig

Amazon RDS HTTP endpoint configuration. See HTTP Endpoint Config.

source_type str

Source type for the relational database. Valid values: RDS_HTTP_ENDPOINT.

httpEndpointConfig Property Map

Amazon RDS HTTP endpoint configuration. See HTTP Endpoint Config.

sourceType String

Source type for the relational database. Valid values: RDS_HTTP_ENDPOINT.

DataSourceRelationalDatabaseConfigHttpEndpointConfig

AwsSecretStoreArn string

AWS secret store ARN for database credentials.

DbClusterIdentifier string

Amazon RDS cluster identifier.

DatabaseName string

Logical database name.

Region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

Schema string

Logical schema name.

AwsSecretStoreArn string

AWS secret store ARN for database credentials.

DbClusterIdentifier string

Amazon RDS cluster identifier.

DatabaseName string

Logical database name.

Region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

Schema string

Logical schema name.

awsSecretStoreArn String

AWS secret store ARN for database credentials.

dbClusterIdentifier String

Amazon RDS cluster identifier.

databaseName String

Logical database name.

region String

AWS Region for RDS HTTP endpoint. Defaults to current region.

schema String

Logical schema name.

awsSecretStoreArn string

AWS secret store ARN for database credentials.

dbClusterIdentifier string

Amazon RDS cluster identifier.

databaseName string

Logical database name.

region string

AWS Region for RDS HTTP endpoint. Defaults to current region.

schema string

Logical schema name.

aws_secret_store_arn str

AWS secret store ARN for database credentials.

db_cluster_identifier str

Amazon RDS cluster identifier.

database_name str

Logical database name.

region str

AWS Region for RDS HTTP endpoint. Defaults to current region.

schema str

Logical schema name.

awsSecretStoreArn String

AWS secret store ARN for database credentials.

dbClusterIdentifier String

Amazon RDS cluster identifier.

databaseName String

Logical database name.

region String

AWS Region for RDS HTTP endpoint. Defaults to current region.

schema String

Logical schema name.

Import

aws_appsync_datasource can be imported with their api_id, a hyphen, and name, e.g.,

 $ pulumi import aws:appsync/dataSource:DataSource example abcdef123456-example

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.