1. Packages
  2. AWS
  3. API Docs
  4. redshift
  5. DataShareAuthorization
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

aws.redshift.DataShareAuthorization

Explore with Pulumi AI

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: "123456789012",
    dataShareArn: "arn:aws:redshift:us-west-2:123456789012:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.redshift.DataShareAuthorization("example",
    consumer_identifier="123456789012",
    data_share_arn="arn:aws:redshift:us-west-2:123456789012:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share")
Copy
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("123456789012"),
			DataShareArn:       pulumi.String("arn:aws:redshift:us-west-2:123456789012:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 = "123456789012",
        DataShareArn = "arn:aws:redshift:us-west-2:123456789012:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share",
    });

});
Copy
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("123456789012")
            .dataShareArn("arn:aws:redshift:us-west-2:123456789012:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share")
            .build());

    }
}
Copy
resources:
  example:
    type: aws:redshift:DataShareAuthorization
    properties:
      consumerIdentifier: '123456789012'
      dataShareArn: arn:aws:redshift:us-west-2:123456789012:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. DataShareAuthorizationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. DataShareAuthorizationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DataShareAuthorizationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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,
});
Copy
example, err := redshift.NewDataShareAuthorization(ctx, "dataShareAuthorizationResource", &redshift.DataShareAuthorizationArgs{
	ConsumerIdentifier: pulumi.String("string"),
	DataShareArn:       pulumi.String("string"),
	AllowWrites:        pulumi.Bool(false),
})
Copy
var dataShareAuthorizationResource = new DataShareAuthorization("dataShareAuthorizationResource", DataShareAuthorizationArgs.builder()
    .consumerIdentifier("string")
    .dataShareArn("string")
    .allowWrites(false)
    .build());
Copy
data_share_authorization_resource = aws.redshift.DataShareAuthorization("dataShareAuthorizationResource",
    consumer_identifier="string",
    data_share_arn="string",
    allow_writes=False)
Copy
const dataShareAuthorizationResource = new aws.redshift.DataShareAuthorization("dataShareAuthorizationResource", {
    consumerIdentifier: "string",
    dataShareArn: "string",
    allowWrites: false,
});
Copy
type: aws:redshift:DataShareAuthorization
properties:
    allowWrites: false
    consumerIdentifier: string
    dataShareArn: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The DataShareAuthorization resource accepts the following input properties:

ConsumerIdentifier This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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)
resources:  _:    type: aws:redshift:DataShareAuthorization    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:123456789012:datashare:3072dae5-022b-4d45-9cd3-01f010aae4b2/example_share,123456789012
Copy

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.