GetResourceShare

aws.ram.ResourceShare Retrieve information about a RAM Resource Share.

Search by filters

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const tagFilter = pulumi.output(aws.ram.getResourceShare({
    filters: [{
        name: "NameOfTag",
        values: ["exampleNameTagValue"],
    }],
    name: "MyResourceName",
    resourceOwner: "SELF",
}, { async: true }));
import pulumi
import pulumi_aws as aws

tag_filter = aws.ram.get_resource_share(filters=[{
        "name": "NameOfTag",
        "values": ["exampleNameTagValue"],
    }],
    name="MyResourceName",
    resource_owner="SELF")
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var tagFilter = Output.Create(Aws.Ram.GetResourceShare.InvokeAsync(new Aws.Ram.GetResourceShareArgs
        {
            Filters = 
            {
                new Aws.Ram.Inputs.GetResourceShareFilterArgs
                {
                    Name = "NameOfTag",
                    Values = 
                    {
                        "exampleNameTagValue",
                    },
                },
            },
            Name = "MyResourceName",
            ResourceOwner = "SELF",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ram"
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ram.LookupResourceShare(ctx, &ram.LookupResourceShareArgs{
			Filters: []ram.GetResourceShareFilter{
				ram.GetResourceShareFilter{
					Name: "NameOfTag",
					Values: []string{
						"exampleNameTagValue",
					},
				},
			},
			Name:          "MyResourceName",
			ResourceOwner: "SELF",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.Ram.GetResourceShare.InvokeAsync(new Aws.Ram.GetResourceShareArgs
        {
            Name = "example",
            ResourceOwner = "SELF",
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ram"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ram.LookupResourceShare(ctx, &ram.LookupResourceShareArgs{
            Name:          "example",
            ResourceOwner: "SELF",
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ram.get_resource_share(name="example",
    resource_owner="SELF")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.ram.getResourceShare({
    name: "example",
    resourceOwner: "SELF",
}, { async: true }));

Using GetResourceShare

function getResourceShare(args: GetResourceShareArgs, opts?: InvokeOptions): Promise<GetResourceShareResult>
function  get_resource_share(filters=None, name=None, resource_owner=None, tags=None, opts=None)
func LookupResourceShare(ctx *Context, args *LookupResourceShareArgs, opts ...InvokeOption) (*LookupResourceShareResult, error)

Note: This function is named LookupResourceShare in the Go SDK.

public static class GetResourceShare {
    public static Task<GetResourceShareResult> InvokeAsync(GetResourceShareArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the tag key to filter on.

ResourceOwner string

The owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS

Filters List<GetResourceShareFilterArgs>

A filter used to scope the list e.g. by tags. See related docs.

Tags Dictionary<string, string>

The Tags attached to the RAM share

Name string

The name of the tag key to filter on.

ResourceOwner string

The owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS

Filters []GetResourceShareFilter

A filter used to scope the list e.g. by tags. See related docs.

Tags map[string]string

The Tags attached to the RAM share

name string

The name of the tag key to filter on.

resourceOwner string

The owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS

filters GetResourceShareFilter[]

A filter used to scope the list e.g. by tags. See related docs.

tags {[key: string]: string}

The Tags attached to the RAM share

name str

The name of the tag key to filter on.

resource_owner str

The owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS

filters List[GetResourceShareFilter]

A filter used to scope the list e.g. by tags. See related docs.

tags Dict[str, str]

The Tags attached to the RAM share

GetResourceShare Result

The following output properties are available:

Arn string

The Amazon Resource Name (ARN) of the resource share.

Id string

The provider-assigned unique ID for this managed resource.

Name string
OwningAccountId string

The ID of the AWS account that owns the resource share.

ResourceOwner string
Status string

The Status of the RAM share.

Tags Dictionary<string, string>

The Tags attached to the RAM share

Filters List<GetResourceShareFilter>
Arn string

The Amazon Resource Name (ARN) of the resource share.

Id string

The provider-assigned unique ID for this managed resource.

Name string
OwningAccountId string

The ID of the AWS account that owns the resource share.

ResourceOwner string
Status string

The Status of the RAM share.

Tags map[string]string

The Tags attached to the RAM share

Filters []GetResourceShareFilter
arn string

The Amazon Resource Name (ARN) of the resource share.

id string

The provider-assigned unique ID for this managed resource.

name string
owningAccountId string

The ID of the AWS account that owns the resource share.

resourceOwner string
status string

The Status of the RAM share.

tags {[key: string]: string}

The Tags attached to the RAM share

filters GetResourceShareFilter[]
arn str

The Amazon Resource Name (ARN) of the resource share.

id str

The provider-assigned unique ID for this managed resource.

name str
owning_account_id str

The ID of the AWS account that owns the resource share.

resource_owner str
status str

The Status of the RAM share.

tags Dict[str, str]

The Tags attached to the RAM share

filters List[GetResourceShareFilter]

Supporting Types

GetResourceShareFilter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The name of the tag key to filter on.

Values List<string>

The value of the tag key.

Name string

The name of the tag key to filter on.

Values []string

The value of the tag key.

name string

The name of the tag key to filter on.

values string[]

The value of the tag key.

name str

The name of the tag key to filter on.

values List[str]

The value of the tag key.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.