aws.redshift.DataShareConsumerAssociation
Explore with Pulumi AI
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.
Constructor 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:
- 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:
- Allow
Writes bool - Whether to allow write operations for a datashare.
- Associate
Entire boolAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - Consumer
Arn string - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - Consumer
Region 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
andconsumer_arn
.
- 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:
- Allow
Writes bool - Whether to allow write operations for a datashare.
- Associate
Entire boolAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - Consumer
Arn string - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - Consumer
Region 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
andconsumer_arn
.
- 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:
- allow
Writes Boolean - Whether to allow write operations for a datashare.
- associate
Entire BooleanAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - consumer
Arn String - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - consumer
Region 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
andconsumer_arn
.
- 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:
- allow
Writes boolean - Whether to allow write operations for a datashare.
- associate
Entire booleanAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - consumer
Arn string - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - consumer
Region 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
andconsumer_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_ boolaccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - consumer_
arn str - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_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
andconsumer_arn
.
- 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:
- allow
Writes Boolean - Whether to allow write operations for a datashare.
- associate
Entire BooleanAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - consumer
Arn String - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - consumer
Region 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
andconsumer_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.
- 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 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.
- Allow
Writes bool - Whether to allow write operations for a datashare.
- Associate
Entire boolAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - Consumer
Arn string - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - Consumer
Region 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
andconsumer_arn
. - 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:
- 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.
- Associate
Entire boolAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - Consumer
Arn string - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - Consumer
Region 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
andconsumer_arn
. - 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:
- 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.
- associate
Entire BooleanAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - consumer
Arn String - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - consumer
Region 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
andconsumer_arn
. - 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:
- 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.
- associate
Entire booleanAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - consumer
Arn string - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - consumer
Region 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
andconsumer_arn
. - 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:
- 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.
- associate_
entire_ boolaccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - consumer_
arn str - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_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
andconsumer_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.
- allow
Writes Boolean - Whether to allow write operations for a datashare.
- associate
Entire BooleanAccount - Whether the datashare is associated with the entire account. Conflicts with
consumer_arn
andconsumer_region
. - consumer
Arn String - Amazon Resource Name (ARN) of the consumer that is associated with the datashare. Conflicts with
associate_entire_account
andconsumer_region
. - consumer
Region 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
andconsumer_arn
. - 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:
- 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 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.