1. Packages
  2. AWS Classic
  3. API Docs
  4. redshift
  5. DataShareConsumerAssociation

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

aws.redshift.DataShareConsumerAssociation

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi

    Resource for managing an AWS Redshift Data Share Consumer Association.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.redshift.DataShareConsumerAssociation("example", {
        dataShareArn: "arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example",
        associateEntireAccount: true,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.redshift.DataShareConsumerAssociation("example",
        data_share_arn="arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example",
        associate_entire_account=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redshift.NewDataShareConsumerAssociation(ctx, "example", &redshift.DataShareConsumerAssociationArgs{
    			DataShareArn:           pulumi.String("arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example"),
    			AssociateEntireAccount: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.RedShift.DataShareConsumerAssociation("example", new()
        {
            DataShareArn = "arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example",
            AssociateEntireAccount = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshift.DataShareConsumerAssociation;
    import com.pulumi.aws.redshift.DataShareConsumerAssociationArgs;
    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 example = new DataShareConsumerAssociation("example", DataShareConsumerAssociationArgs.builder()        
                .dataShareArn("arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example")
                .associateEntireAccount(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:redshift:DataShareConsumerAssociation
        properties:
          dataShareArn: arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example
          associateEntireAccount: true
    

    Consumer Region

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.redshift.DataShareConsumerAssociation("example", {
        dataShareArn: "arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example",
        consumerRegion: "us-west-2",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.redshift.DataShareConsumerAssociation("example",
        data_share_arn="arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example",
        consumer_region="us-west-2")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/redshift"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := redshift.NewDataShareConsumerAssociation(ctx, "example", &redshift.DataShareConsumerAssociationArgs{
    			DataShareArn:   pulumi.String("arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example"),
    			ConsumerRegion: pulumi.String("us-west-2"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.RedShift.DataShareConsumerAssociation("example", new()
        {
            DataShareArn = "arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example",
            ConsumerRegion = "us-west-2",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshift.DataShareConsumerAssociation;
    import com.pulumi.aws.redshift.DataShareConsumerAssociationArgs;
    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 example = new DataShareConsumerAssociation("example", DataShareConsumerAssociationArgs.builder()        
                .dataShareArn("arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example")
                .consumerRegion("us-west-2")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:redshift:DataShareConsumerAssociation
        properties:
          dataShareArn: arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example
          consumerRegion: us-west-2
    

    Create DataShareConsumerAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new DataShareConsumerAssociation(name: string, args: DataShareConsumerAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def DataShareConsumerAssociation(resource_name: str,
                                     args: DataShareConsumerAssociationArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataShareConsumerAssociation(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     data_share_arn: Optional[str] = None,
                                     allow_writes: Optional[bool] = None,
                                     associate_entire_account: Optional[bool] = None,
                                     consumer_arn: Optional[str] = None,
                                     consumer_region: Optional[str] = None)
    func NewDataShareConsumerAssociation(ctx *Context, name string, args DataShareConsumerAssociationArgs, opts ...ResourceOption) (*DataShareConsumerAssociation, error)
    public DataShareConsumerAssociation(string name, DataShareConsumerAssociationArgs args, CustomResourceOptions? opts = null)
    public DataShareConsumerAssociation(String name, DataShareConsumerAssociationArgs args)
    public DataShareConsumerAssociation(String name, DataShareConsumerAssociationArgs args, CustomResourceOptions options)
    
    type: aws:redshift:DataShareConsumerAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args DataShareConsumerAssociationArgs
    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 DataShareConsumerAssociationArgs
    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 DataShareConsumerAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataShareConsumerAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataShareConsumerAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var dataShareConsumerAssociationResource = new Aws.RedShift.DataShareConsumerAssociation("dataShareConsumerAssociationResource", new()
    {
        DataShareArn = "string",
        AllowWrites = false,
        AssociateEntireAccount = false,
        ConsumerArn = "string",
        ConsumerRegion = "string",
    });
    
    example, err := redshift.NewDataShareConsumerAssociation(ctx, "dataShareConsumerAssociationResource", &redshift.DataShareConsumerAssociationArgs{
    	DataShareArn:           pulumi.String("string"),
    	AllowWrites:            pulumi.Bool(false),
    	AssociateEntireAccount: pulumi.Bool(false),
    	ConsumerArn:            pulumi.String("string"),
    	ConsumerRegion:         pulumi.String("string"),
    })
    
    var dataShareConsumerAssociationResource = new DataShareConsumerAssociation("dataShareConsumerAssociationResource", DataShareConsumerAssociationArgs.builder()        
        .dataShareArn("string")
        .allowWrites(false)
        .associateEntireAccount(false)
        .consumerArn("string")
        .consumerRegion("string")
        .build());
    
    data_share_consumer_association_resource = aws.redshift.DataShareConsumerAssociation("dataShareConsumerAssociationResource",
        data_share_arn="string",
        allow_writes=False,
        associate_entire_account=False,
        consumer_arn="string",
        consumer_region="string")
    
    const dataShareConsumerAssociationResource = new aws.redshift.DataShareConsumerAssociation("dataShareConsumerAssociationResource", {
        dataShareArn: "string",
        allowWrites: false,
        associateEntireAccount: false,
        consumerArn: "string",
        consumerRegion: "string",
    });
    
    type: aws:redshift:DataShareConsumerAssociation
    properties:
        allowWrites: false
        associateEntireAccount: false
        consumerArn: string
        consumerRegion: string
        dataShareArn: string
    

    DataShareConsumerAssociation 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 DataShareConsumerAssociation resource accepts the following input properties:

    DataShareArn string

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    AllowWrites bool
    Whether to allow write operations for a datashare.
    AssociateEntireAccount bool
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    ConsumerArn string
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    ConsumerRegion string
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    DataShareArn string

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    AllowWrites bool
    Whether to allow write operations for a datashare.
    AssociateEntireAccount bool
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    ConsumerArn string
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    ConsumerRegion string
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    dataShareArn String

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    allowWrites Boolean
    Whether to allow write operations for a datashare.
    associateEntireAccount Boolean
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    consumerArn String
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    consumerRegion String
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    dataShareArn string

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    allowWrites boolean
    Whether to allow write operations for a datashare.
    associateEntireAccount boolean
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    consumerArn string
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    consumerRegion string
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    data_share_arn str

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    allow_writes bool
    Whether to allow write operations for a datashare.
    associate_entire_account bool
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    consumer_arn str
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    consumer_region str
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    dataShareArn String

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    allowWrites Boolean
    Whether to allow write operations for a datashare.
    associateEntireAccount Boolean
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    consumerArn String
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    consumerRegion String
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedBy string
    Identifier of a datashare to show its managing entity.
    ProducerArn string
    Amazon Resource Name (ARN) of the producer.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedBy string
    Identifier of a datashare to show its managing entity.
    ProducerArn string
    Amazon Resource Name (ARN) of the producer.
    id String
    The provider-assigned unique ID for this managed resource.
    managedBy String
    Identifier of a datashare to show its managing entity.
    producerArn String
    Amazon Resource Name (ARN) of the producer.
    id string
    The provider-assigned unique ID for this managed resource.
    managedBy string
    Identifier of a datashare to show its managing entity.
    producerArn string
    Amazon Resource Name (ARN) of the producer.
    id str
    The provider-assigned unique ID for this managed resource.
    managed_by str
    Identifier of a datashare to show its managing entity.
    producer_arn str
    Amazon Resource Name (ARN) of the producer.
    id String
    The provider-assigned unique ID for this managed resource.
    managedBy String
    Identifier of a datashare to show its managing entity.
    producerArn String
    Amazon Resource Name (ARN) of the producer.

    Look up Existing DataShareConsumerAssociation Resource

    Get an existing DataShareConsumerAssociation 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?: DataShareConsumerAssociationState, opts?: CustomResourceOptions): DataShareConsumerAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_writes: Optional[bool] = None,
            associate_entire_account: Optional[bool] = None,
            consumer_arn: Optional[str] = None,
            consumer_region: Optional[str] = None,
            data_share_arn: Optional[str] = None,
            managed_by: Optional[str] = None,
            producer_arn: Optional[str] = None) -> DataShareConsumerAssociation
    func GetDataShareConsumerAssociation(ctx *Context, name string, id IDInput, state *DataShareConsumerAssociationState, opts ...ResourceOption) (*DataShareConsumerAssociation, error)
    public static DataShareConsumerAssociation Get(string name, Input<string> id, DataShareConsumerAssociationState? state, CustomResourceOptions? opts = null)
    public static DataShareConsumerAssociation get(String name, Output<String> id, DataShareConsumerAssociationState 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:
    AllowWrites bool
    Whether to allow write operations for a datashare.
    AssociateEntireAccount bool
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    ConsumerArn string
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    ConsumerRegion string
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    DataShareArn string

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    ManagedBy string
    Identifier of a datashare to show its managing entity.
    ProducerArn string
    Amazon Resource Name (ARN) of the producer.
    AllowWrites bool
    Whether to allow write operations for a datashare.
    AssociateEntireAccount bool
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    ConsumerArn string
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    ConsumerRegion string
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    DataShareArn string

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    ManagedBy string
    Identifier of a datashare to show its managing entity.
    ProducerArn string
    Amazon Resource Name (ARN) of the producer.
    allowWrites Boolean
    Whether to allow write operations for a datashare.
    associateEntireAccount Boolean
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    consumerArn String
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    consumerRegion String
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    dataShareArn String

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    managedBy String
    Identifier of a datashare to show its managing entity.
    producerArn String
    Amazon Resource Name (ARN) of the producer.
    allowWrites boolean
    Whether to allow write operations for a datashare.
    associateEntireAccount boolean
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    consumerArn string
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    consumerRegion string
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    dataShareArn string

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    managedBy string
    Identifier of a datashare to show its managing entity.
    producerArn string
    Amazon Resource Name (ARN) of the producer.
    allow_writes bool
    Whether to allow write operations for a datashare.
    associate_entire_account bool
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    consumer_arn str
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    consumer_region str
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    data_share_arn str

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    managed_by str
    Identifier of a datashare to show its managing entity.
    producer_arn str
    Amazon Resource Name (ARN) of the producer.
    allowWrites Boolean
    Whether to allow write operations for a datashare.
    associateEntireAccount Boolean
    Whether the datashare is associated with the entire account. Conflicts with consumer_arn and consumer_region.
    consumerArn String
    Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with associate_entire_account and consumer_region.
    consumerRegion String
    From a datashare consumer account, associates a datashare with all existing and future namespaces in the specified AWS Region. Conflicts with associate_entire_account and consumer_arn.
    dataShareArn String

    Amazon Resource Name (ARN) of the datashare that the consumer is to use with the account or the namespace.

    The following arguments are optional:

    managedBy String
    Identifier of a datashare to show its managing entity.
    producerArn String
    Amazon Resource Name (ARN) of the producer.

    Import

    Using pulumi import, import Redshift Data Share Consumer Association using the id. For example:

    $ pulumi import aws:redshift/dataShareConsumerAssociation:DataShareConsumerAssociation example arn:aws:redshift:us-west-2:012345678901:datashare:b3bfde75-73fd-408b-9086-d6fccfd6d588/example,,,us-west-2
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.32.0 published on Friday, Apr 19, 2024 by Pulumi