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

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

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.redshift.DataShareAuthorization

Explore with Pulumi AI

aws logo

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

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Resource for managing an AWS Redshift Data Share Authorization.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.redshift.DataShareAuthorization("example", {
        consumerIdentifier: "012345678901",
        dataShareArn: "arn:aws:redshift:us-west-2:012345678901:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.redshift.DataShareAuthorization("example",
        consumer_identifier="012345678901",
        data_share_arn="arn:aws:redshift:us-west-2:012345678901:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share")
    
    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.NewDataShareAuthorization(ctx, "example", &redshift.DataShareAuthorizationArgs{
    			ConsumerIdentifier: pulumi.String("012345678901"),
    			DataShareArn:       pulumi.String("arn:aws:redshift:us-west-2:012345678901:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share"),
    		})
    		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.DataShareAuthorization("example", new()
        {
            ConsumerIdentifier = "012345678901",
            DataShareArn = "arn:aws:redshift:us-west-2:012345678901:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.redshift.DataShareAuthorization;
    import com.pulumi.aws.redshift.DataShareAuthorizationArgs;
    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 DataShareAuthorization("example", DataShareAuthorizationArgs.builder()
                .consumerIdentifier("012345678901")
                .dataShareArn("arn:aws:redshift:us-west-2:012345678901:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:redshift:DataShareAuthorization
        properties:
          consumerIdentifier: '012345678901'
          dataShareArn: arn:aws:redshift:us-west-2:012345678901:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share
    

    Create DataShareAuthorization Resource

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

    Constructor syntax

    new DataShareAuthorization(name: string, args: DataShareAuthorizationArgs, opts?: CustomResourceOptions);
    @overload
    def DataShareAuthorization(resource_name: str,
                               args: DataShareAuthorizationArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataShareAuthorization(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               consumer_identifier: Optional[str] = None,
                               data_share_arn: Optional[str] = None,
                               allow_writes: Optional[bool] = None)
    func NewDataShareAuthorization(ctx *Context, name string, args DataShareAuthorizationArgs, opts ...ResourceOption) (*DataShareAuthorization, error)
    public DataShareAuthorization(string name, DataShareAuthorizationArgs args, CustomResourceOptions? opts = null)
    public DataShareAuthorization(String name, DataShareAuthorizationArgs args)
    public DataShareAuthorization(String name, DataShareAuthorizationArgs args, CustomResourceOptions options)
    
    type: aws:redshift:DataShareAuthorization
    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 DataShareAuthorizationArgs
    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 DataShareAuthorizationArgs
    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 DataShareAuthorizationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataShareAuthorizationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataShareAuthorizationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var dataShareAuthorizationResource = new Aws.RedShift.DataShareAuthorization("dataShareAuthorizationResource", new()
    {
        ConsumerIdentifier = "string",
        DataShareArn = "string",
        AllowWrites = false,
    });
    
    example, err := redshift.NewDataShareAuthorization(ctx, "dataShareAuthorizationResource", &redshift.DataShareAuthorizationArgs{
    	ConsumerIdentifier: pulumi.String("string"),
    	DataShareArn:       pulumi.String("string"),
    	AllowWrites:        pulumi.Bool(false),
    })
    
    var dataShareAuthorizationResource = new DataShareAuthorization("dataShareAuthorizationResource", DataShareAuthorizationArgs.builder()
        .consumerIdentifier("string")
        .dataShareArn("string")
        .allowWrites(false)
        .build());
    
    data_share_authorization_resource = aws.redshift.DataShareAuthorization("dataShareAuthorizationResource",
        consumer_identifier="string",
        data_share_arn="string",
        allow_writes=False)
    
    const dataShareAuthorizationResource = new aws.redshift.DataShareAuthorization("dataShareAuthorizationResource", {
        consumerIdentifier: "string",
        dataShareArn: "string",
        allowWrites: false,
    });
    
    type: aws:redshift:DataShareAuthorization
    properties:
        allowWrites: false
        consumerIdentifier: string
        dataShareArn: string
    

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

    ConsumerIdentifier string
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    DataShareArn string

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    The following arguments are optional:

    AllowWrites bool
    Whether to allow write operations for a datashare.
    ConsumerIdentifier string
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    DataShareArn string

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    The following arguments are optional:

    AllowWrites bool
    Whether to allow write operations for a datashare.
    consumerIdentifier String
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    dataShareArn String

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    The following arguments are optional:

    allowWrites Boolean
    Whether to allow write operations for a datashare.
    consumerIdentifier string
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    dataShareArn string

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    The following arguments are optional:

    allowWrites boolean
    Whether to allow write operations for a datashare.
    consumer_identifier str
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    data_share_arn str

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    The following arguments are optional:

    allow_writes bool
    Whether to allow write operations for a datashare.
    consumerIdentifier String
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    dataShareArn String

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    The following arguments are optional:

    allowWrites Boolean
    Whether to allow write operations for a datashare.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the DataShareAuthorization 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 DataShareAuthorization Resource

    Get an existing DataShareAuthorization 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?: DataShareAuthorizationState, opts?: CustomResourceOptions): DataShareAuthorization
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_writes: Optional[bool] = None,
            consumer_identifier: Optional[str] = None,
            data_share_arn: Optional[str] = None,
            managed_by: Optional[str] = None,
            producer_arn: Optional[str] = None) -> DataShareAuthorization
    func GetDataShareAuthorization(ctx *Context, name string, id IDInput, state *DataShareAuthorizationState, opts ...ResourceOption) (*DataShareAuthorization, error)
    public static DataShareAuthorization Get(string name, Input<string> id, DataShareAuthorizationState? state, CustomResourceOptions? opts = null)
    public static DataShareAuthorization get(String name, Output<String> id, DataShareAuthorizationState 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.
    ConsumerIdentifier string
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    DataShareArn string

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    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.
    ConsumerIdentifier string
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    DataShareArn string

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    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.
    consumerIdentifier String
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    dataShareArn String

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    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.
    consumerIdentifier string
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    dataShareArn string

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    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.
    consumer_identifier str
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    data_share_arn str

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    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.
    consumerIdentifier String
    Identifier of the data consumer that is authorized to access the datashare. This identifier is an AWS account ID or a keyword, such as ADX.
    dataShareArn String

    Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.

    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 Authorization using the id. For example:

    $ pulumi import aws:redshift/dataShareAuthorization:DataShareAuthorization example arn:aws:redshift:us-west-2:012345678901:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share,012345678901
    

    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.42.0 published on Wednesday, Jun 26, 2024 by Pulumi