1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ram
  5. ResourceShare

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

aws-native.ram.ResourceShare

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

Resource type definition for AWS::RAM::ResourceShare

Example Usage

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var myresourceshare = new AwsNative.Ram.ResourceShare("myresourceshare", new()
    {
        Name = "My Resource Share",
        ResourceArns = new[]
        {
            "arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678",
        },
        Principals = new[]
        {
            "210987654321",
        },
        Tags = new[]
        {
            new AwsNative.Inputs.TagArgs
            {
                Key = "Key1",
                Value = "Value1",
            },
            new AwsNative.Inputs.TagArgs
            {
                Key = "Key2",
                Value = "Value2",
            },
        },
    });

});
Copy
package main

import (
	awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ram"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewResourceShare(ctx, "myresourceshare", &ram.ResourceShareArgs{
			Name: pulumi.String("My Resource Share"),
			ResourceArns: pulumi.StringArray{
				pulumi.String("arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678"),
			},
			Principals: pulumi.StringArray{
				pulumi.String("210987654321"),
			},
			Tags: aws.TagArray{
				&aws.TagArgs{
					Key:   pulumi.String("Key1"),
					Value: pulumi.String("Value1"),
				},
				&aws.TagArgs{
					Key:   pulumi.String("Key2"),
					Value: pulumi.String("Value2"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const myresourceshare = new aws_native.ram.ResourceShare("myresourceshare", {
    name: "My Resource Share",
    resourceArns: ["arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678"],
    principals: ["210987654321"],
    tags: [
        {
            key: "Key1",
            value: "Value1",
        },
        {
            key: "Key2",
            value: "Value2",
        },
    ],
});
Copy
import pulumi
import pulumi_aws_native as aws_native

myresourceshare = aws_native.ram.ResourceShare("myresourceshare",
    name="My Resource Share",
    resource_arns=["arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678"],
    principals=["210987654321"],
    tags=[
        {
            "key": "Key1",
            "value": "Value1",
        },
        {
            "key": "Key2",
            "value": "Value2",
        },
    ])
Copy

Coming soon!

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var myresourceshare = new AwsNative.Ram.ResourceShare("myresourceshare", new()
    {
        Name = "My Resource Share",
        ResourceArns = new[]
        {
            "arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678",
        },
        Principals = new[]
        {
            "210987654321",
        },
        Tags = new[]
        {
            new AwsNative.Inputs.TagArgs
            {
                Key = "Key1",
                Value = "Value1",
            },
            new AwsNative.Inputs.TagArgs
            {
                Key = "Key2",
                Value = "Value2",
            },
        },
    });

});
Copy
package main

import (
	awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ram"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.NewResourceShare(ctx, "myresourceshare", &ram.ResourceShareArgs{
			Name: pulumi.String("My Resource Share"),
			ResourceArns: pulumi.StringArray{
				pulumi.String("arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678"),
			},
			Principals: pulumi.StringArray{
				pulumi.String("210987654321"),
			},
			Tags: aws.TagArray{
				&aws.TagArgs{
					Key:   pulumi.String("Key1"),
					Value: pulumi.String("Value1"),
				},
				&aws.TagArgs{
					Key:   pulumi.String("Key2"),
					Value: pulumi.String("Value2"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const myresourceshare = new aws_native.ram.ResourceShare("myresourceshare", {
    name: "My Resource Share",
    resourceArns: ["arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678"],
    principals: ["210987654321"],
    tags: [
        {
            key: "Key1",
            value: "Value1",
        },
        {
            key: "Key2",
            value: "Value2",
        },
    ],
});
Copy
import pulumi
import pulumi_aws_native as aws_native

myresourceshare = aws_native.ram.ResourceShare("myresourceshare",
    name="My Resource Share",
    resource_arns=["arn:aws:ec2:us-east-1:123456789012:resource-type/12345678-1234-1234-1234-12345678"],
    principals=["210987654321"],
    tags=[
        {
            "key": "Key1",
            "value": "Value1",
        },
        {
            "key": "Key2",
            "value": "Value2",
        },
    ])
Copy

Coming soon!

Create ResourceShare Resource

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

Constructor syntax

new ResourceShare(name: string, args?: ResourceShareArgs, opts?: CustomResourceOptions);
@overload
def ResourceShare(resource_name: str,
                  args: Optional[ResourceShareArgs] = None,
                  opts: Optional[ResourceOptions] = None)

@overload
def ResourceShare(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  allow_external_principals: Optional[bool] = None,
                  name: Optional[str] = None,
                  permission_arns: Optional[Sequence[str]] = None,
                  principals: Optional[Sequence[str]] = None,
                  resource_arns: Optional[Sequence[str]] = None,
                  sources: Optional[Sequence[str]] = None,
                  tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
func NewResourceShare(ctx *Context, name string, args *ResourceShareArgs, opts ...ResourceOption) (*ResourceShare, error)
public ResourceShare(string name, ResourceShareArgs? args = null, CustomResourceOptions? opts = null)
public ResourceShare(String name, ResourceShareArgs args)
public ResourceShare(String name, ResourceShareArgs args, CustomResourceOptions options)
type: aws-native:ram:ResourceShare
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 ResourceShareArgs
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 ResourceShareArgs
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 ResourceShareArgs
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 ResourceShareArgs
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. ResourceShareArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

AllowExternalPrincipals bool
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share. A value of true lets you share with individual AWS accounts that are not in your organization. A value of false only has meaning if your account is a member of an AWS Organization. The default value is true.
Name string
Specifies the name of the resource share.
PermissionArns List<string>
Specifies the Amazon Resource Names (ARNs) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.
Principals List<string>

Specifies the principals to associate with the resource share. The possible values are:

  • An AWS account ID

  • An Amazon Resource Name (ARN) of an organization in AWS Organizations

  • An ARN of an organizational unit (OU) in AWS Organizations

  • An ARN of an IAM role

  • An ARN of an IAM user

ResourceArns List<string>
Specifies a list of one or more ARNs of the resources to associate with the resource share.
Sources List<string>
Specifies from which source accounts the service principal has access to the resources in this resource share.
Tags List<Pulumi.AwsNative.Inputs.Tag>
Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.
AllowExternalPrincipals bool
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share. A value of true lets you share with individual AWS accounts that are not in your organization. A value of false only has meaning if your account is a member of an AWS Organization. The default value is true.
Name string
Specifies the name of the resource share.
PermissionArns []string
Specifies the Amazon Resource Names (ARNs) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.
Principals []string

Specifies the principals to associate with the resource share. The possible values are:

  • An AWS account ID

  • An Amazon Resource Name (ARN) of an organization in AWS Organizations

  • An ARN of an organizational unit (OU) in AWS Organizations

  • An ARN of an IAM role

  • An ARN of an IAM user

ResourceArns []string
Specifies a list of one or more ARNs of the resources to associate with the resource share.
Sources []string
Specifies from which source accounts the service principal has access to the resources in this resource share.
Tags TagArgs
Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.
allowExternalPrincipals Boolean
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share. A value of true lets you share with individual AWS accounts that are not in your organization. A value of false only has meaning if your account is a member of an AWS Organization. The default value is true.
name String
Specifies the name of the resource share.
permissionArns List<String>
Specifies the Amazon Resource Names (ARNs) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.
principals List<String>

Specifies the principals to associate with the resource share. The possible values are:

  • An AWS account ID

  • An Amazon Resource Name (ARN) of an organization in AWS Organizations

  • An ARN of an organizational unit (OU) in AWS Organizations

  • An ARN of an IAM role

  • An ARN of an IAM user

resourceArns List<String>
Specifies a list of one or more ARNs of the resources to associate with the resource share.
sources List<String>
Specifies from which source accounts the service principal has access to the resources in this resource share.
tags List<Tag>
Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.
allowExternalPrincipals boolean
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share. A value of true lets you share with individual AWS accounts that are not in your organization. A value of false only has meaning if your account is a member of an AWS Organization. The default value is true.
name string
Specifies the name of the resource share.
permissionArns string[]
Specifies the Amazon Resource Names (ARNs) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.
principals string[]

Specifies the principals to associate with the resource share. The possible values are:

  • An AWS account ID

  • An Amazon Resource Name (ARN) of an organization in AWS Organizations

  • An ARN of an organizational unit (OU) in AWS Organizations

  • An ARN of an IAM role

  • An ARN of an IAM user

resourceArns string[]
Specifies a list of one or more ARNs of the resources to associate with the resource share.
sources string[]
Specifies from which source accounts the service principal has access to the resources in this resource share.
tags Tag[]
Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.
allow_external_principals bool
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share. A value of true lets you share with individual AWS accounts that are not in your organization. A value of false only has meaning if your account is a member of an AWS Organization. The default value is true.
name str
Specifies the name of the resource share.
permission_arns Sequence[str]
Specifies the Amazon Resource Names (ARNs) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.
principals Sequence[str]

Specifies the principals to associate with the resource share. The possible values are:

  • An AWS account ID

  • An Amazon Resource Name (ARN) of an organization in AWS Organizations

  • An ARN of an organizational unit (OU) in AWS Organizations

  • An ARN of an IAM role

  • An ARN of an IAM user

resource_arns Sequence[str]
Specifies a list of one or more ARNs of the resources to associate with the resource share.
sources Sequence[str]
Specifies from which source accounts the service principal has access to the resources in this resource share.
tags Sequence[TagArgs]
Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.
allowExternalPrincipals Boolean
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share. A value of true lets you share with individual AWS accounts that are not in your organization. A value of false only has meaning if your account is a member of an AWS Organization. The default value is true.
name String
Specifies the name of the resource share.
permissionArns List<String>
Specifies the Amazon Resource Names (ARNs) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.
principals List<String>

Specifies the principals to associate with the resource share. The possible values are:

  • An AWS account ID

  • An Amazon Resource Name (ARN) of an organization in AWS Organizations

  • An ARN of an organizational unit (OU) in AWS Organizations

  • An ARN of an IAM role

  • An ARN of an IAM user

resourceArns List<String>
Specifies a list of one or more ARNs of the resources to associate with the resource share.
sources List<String>
Specifies from which source accounts the service principal has access to the resources in this resource share.
tags List<Property Map>
Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.

Outputs

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

Arn string
The Amazon Resource Name (ARN) of the resource share.
Id string
The provider-assigned unique ID for this managed resource.
Arn string
The Amazon Resource Name (ARN) of the resource share.
Id string
The provider-assigned unique ID for this managed resource.
arn String
The Amazon Resource Name (ARN) of the resource share.
id String
The provider-assigned unique ID for this managed resource.
arn string
The Amazon Resource Name (ARN) of the resource share.
id string
The provider-assigned unique ID for this managed resource.
arn str
The Amazon Resource Name (ARN) of the resource share.
id str
The provider-assigned unique ID for this managed resource.
arn String
The Amazon Resource Name (ARN) of the resource share.
id String
The provider-assigned unique ID for this managed resource.

Supporting Types

Tag
, TagArgs

Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
Key This property is required. string
The key name of the tag
Value This property is required. string
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag
key This property is required. string
The key name of the tag
value This property is required. string
The value of the tag
key This property is required. str
The key name of the tag
value This property is required. str
The value of the tag
key This property is required. String
The key name of the tag
value This property is required. String
The value of the tag

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi