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",
});
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")
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
})
}
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",
});
});
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());
}
}
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
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
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:
- Consumer
Identifier 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
. - string
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.
- Consumer
Identifier 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
. - string
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.
- consumer
Identifier 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
. - String
Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.
The following arguments are optional:
- allow
Writes Boolean - Whether to allow write operations for a datashare.
- consumer
Identifier 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
. - string
Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.
The following arguments are optional:
- allow
Writes 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
. - 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.
- consumer
Identifier 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
. - String
Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.
The following arguments are optional:
- allow
Writes 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.
- Managed
By string - Identifier of a datashare to show its managing entity.
- Producer
Arn string - Amazon Resource Name (ARN) of the producer.
- Id string
- The provider-assigned unique ID for this managed resource.
- Managed
By string - Identifier of a datashare to show its managing entity.
- Producer
Arn string - Amazon Resource Name (ARN) of the producer.
- id String
- The provider-assigned unique ID for this managed resource.
- managed
By String - Identifier of a datashare to show its managing entity.
- producer
Arn String - Amazon Resource Name (ARN) of the producer.
- id string
- The provider-assigned unique ID for this managed resource.
- managed
By string - Identifier of a datashare to show its managing entity.
- producer
Arn 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.
- managed
By String - Identifier of a datashare to show its managing entity.
- producer
Arn 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.
- Allow
Writes bool - Whether to allow write operations for a datashare.
- Consumer
Identifier 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
. - string
Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.
The following arguments are optional:
- Managed
By string - Identifier of a datashare to show its managing entity.
- Producer
Arn string - Amazon Resource Name (ARN) of the producer.
- Allow
Writes bool - Whether to allow write operations for a datashare.
- Consumer
Identifier 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
. - string
Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.
The following arguments are optional:
- Managed
By string - Identifier of a datashare to show its managing entity.
- Producer
Arn string - Amazon Resource Name (ARN) of the producer.
- allow
Writes Boolean - Whether to allow write operations for a datashare.
- consumer
Identifier 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
. - String
Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.
The following arguments are optional:
- managed
By String - Identifier of a datashare to show its managing entity.
- producer
Arn String - Amazon Resource Name (ARN) of the producer.
- allow
Writes boolean - Whether to allow write operations for a datashare.
- consumer
Identifier 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
. - string
Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.
The following arguments are optional:
- managed
By string - Identifier of a datashare to show its managing entity.
- producer
Arn 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
. - 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.
- allow
Writes Boolean - Whether to allow write operations for a datashare.
- consumer
Identifier 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
. - String
Amazon Resource Name (ARN) of the datashare that producers are to authorize sharing for.
The following arguments are optional:
- managed
By String - Identifier of a datashare to show its managing entity.
- producer
Arn 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
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.