1. Packages
  2. AWS
  3. API Docs
  4. ram
  5. getResourceShare
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi
aws logo
Viewing docs for AWS v5.43.0 (Older version)
published on Tuesday, Mar 10, 2026 by Pulumi

    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 = aws.ram.getResourceShare({
        filters: [{
            name: "NameOfTag",
            values: ["exampleNameTagValue"],
        }],
        name: "MyResourceName",
        resourceOwner: "SELF",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    tag_filter = aws.ram.get_resource_share(filters=[aws.ram.GetResourceShareFilterArgs(
            name="NameOfTag",
            values=["exampleNameTagValue"],
        )],
        name="MyResourceName",
        resource_owner="SELF")
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var tagFilter = Aws.Ram.GetResourceShare.Invoke(new()
        {
            Filters = new[]
            {
                new Aws.Ram.Inputs.GetResourceShareFilterInputArgs
                {
                    Name = "NameOfTag",
                    Values = new[]
                    {
                        "exampleNameTagValue",
                    },
                },
            },
            Name = "MyResourceName",
            ResourceOwner = "SELF",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ram"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ram.LookupResourceShare(ctx, &ram.LookupResourceShareArgs{
    			Filters: []ram.GetResourceShareFilter{
    				{
    					Name: "NameOfTag",
    					Values: []string{
    						"exampleNameTagValue",
    					},
    				},
    			},
    			Name:          "MyResourceName",
    			ResourceOwner: "SELF",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ram.RamFunctions;
    import com.pulumi.aws.ram.inputs.GetResourceShareArgs;
    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) {
            final var tagFilter = RamFunctions.getResourceShare(GetResourceShareArgs.builder()
                .filters(GetResourceShareFilterArgs.builder()
                    .name("NameOfTag")
                    .values("exampleNameTagValue")
                    .build())
                .name("MyResourceName")
                .resourceOwner("SELF")
                .build());
    
        }
    }
    
    variables:
      tagFilter:
        fn::invoke:
          Function: aws:ram:getResourceShare
          Arguments:
            filters:
              - name: NameOfTag
                values:
                  - exampleNameTagValue
            name: MyResourceName
            resourceOwner: SELF
    

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Ram.GetResourceShare.Invoke(new()
        {
            Name = "example",
            ResourceOwner = "SELF",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ram"
    	"github.com/pulumi/pulumi/sdk/v3/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
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ram.RamFunctions;
    import com.pulumi.aws.ram.inputs.GetResourceShareArgs;
    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) {
            final var example = RamFunctions.getResourceShare(GetResourceShareArgs.builder()
                .name("example")
                .resourceOwner("SELF")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.ram.getResourceShare({
        name: "example",
        resourceOwner: "SELF",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ram.get_resource_share(name="example",
        resource_owner="SELF")
    
    variables:
      example:
        fn::invoke:
          Function: aws:ram:getResourceShare
          Arguments:
            name: example
            resourceOwner: SELF
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var tagFilter = Aws.Ram.GetResourceShare.Invoke(new()
        {
            Filters = new[]
            {
                new Aws.Ram.Inputs.GetResourceShareFilterInputArgs
                {
                    Name = "NameOfTag",
                    Values = new[]
                    {
                        "exampleNameTagValue",
                    },
                },
            },
            Name = "MyResourceName",
            ResourceOwner = "SELF",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ram"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ram.LookupResourceShare(ctx, &ram.LookupResourceShareArgs{
    			Filters: []ram.GetResourceShareFilter{
    				{
    					Name: "NameOfTag",
    					Values: []string{
    						"exampleNameTagValue",
    					},
    				},
    			},
    			Name:          "MyResourceName",
    			ResourceOwner: "SELF",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ram.RamFunctions;
    import com.pulumi.aws.ram.inputs.GetResourceShareArgs;
    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) {
            final var tagFilter = RamFunctions.getResourceShare(GetResourceShareArgs.builder()
                .filters(GetResourceShareFilterArgs.builder()
                    .name("NameOfTag")
                    .values("exampleNameTagValue")
                    .build())
                .name("MyResourceName")
                .resourceOwner("SELF")
                .build());
    
        }
    }
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const tagFilter = aws.ram.getResourceShare({
        filters: [{
            name: "NameOfTag",
            values: ["exampleNameTagValue"],
        }],
        name: "MyResourceName",
        resourceOwner: "SELF",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    tag_filter = aws.ram.get_resource_share(filters=[aws.ram.GetResourceShareFilterArgs(
            name="NameOfTag",
            values=["exampleNameTagValue"],
        )],
        name="MyResourceName",
        resource_owner="SELF")
    
    variables:
      tagFilter:
        fn::invoke:
          Function: aws:ram:getResourceShare
          Arguments:
            filters:
              - name: NameOfTag
                values:
                  - exampleNameTagValue
            name: MyResourceName
            resourceOwner: SELF
    

    Using getResourceShare

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getResourceShare(args: GetResourceShareArgs, opts?: InvokeOptions): Promise<GetResourceShareResult>
    function getResourceShareOutput(args: GetResourceShareOutputArgs, opts?: InvokeOptions): Output<GetResourceShareResult>
    def get_resource_share(filters: Optional[Sequence[GetResourceShareFilter]] = None,
                           name: Optional[str] = None,
                           resource_owner: Optional[str] = None,
                           resource_share_status: Optional[str] = None,
                           tags: Optional[Mapping[str, str]] = None,
                           opts: Optional[InvokeOptions] = None) -> GetResourceShareResult
    def get_resource_share_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetResourceShareFilterArgs]]]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           resource_owner: Optional[pulumi.Input[str]] = None,
                           resource_share_status: Optional[pulumi.Input[str]] = None,
                           tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetResourceShareResult]
    func LookupResourceShare(ctx *Context, args *LookupResourceShareArgs, opts ...InvokeOption) (*LookupResourceShareResult, error)
    func LookupResourceShareOutput(ctx *Context, args *LookupResourceShareOutputArgs, opts ...InvokeOption) LookupResourceShareResultOutput

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

    public static class GetResourceShare 
    {
        public static Task<GetResourceShareResult> InvokeAsync(GetResourceShareArgs args, InvokeOptions? opts = null)
        public static Output<GetResourceShareResult> Invoke(GetResourceShareInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResourceShareResult> getResourceShare(GetResourceShareArgs args, InvokeOptions options)
    public static Output<GetResourceShareResult> getResourceShare(GetResourceShareArgs args, InvokeOptions options)
    
    fn::invoke:
      function: aws:ram/getResourceShare:getResourceShare
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name of the tag key to filter on.
    ResourceOwner string
    Owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS.
    Filters List<GetResourceShareFilter>
    Filter used to scope the list e.g., by tags. See [related docs] (https://docs.aws.amazon.com/ram/latest/APIReference/API_TagFilter.html).
    ResourceShareStatus string
    Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are PENDING, ACTIVE, FAILED, DELETING, and DELETED.
    Tags Dictionary<string, string>
    Tags attached to the RAM share
    Name string
    Name of the tag key to filter on.
    ResourceOwner string
    Owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS.
    Filters []GetResourceShareFilter
    Filter used to scope the list e.g., by tags. See [related docs] (https://docs.aws.amazon.com/ram/latest/APIReference/API_TagFilter.html).
    ResourceShareStatus string
    Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are PENDING, ACTIVE, FAILED, DELETING, and DELETED.
    Tags map[string]string
    Tags attached to the RAM share
    name String
    Name of the tag key to filter on.
    resourceOwner String
    Owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS.
    filters List<GetResourceShareFilter>
    Filter used to scope the list e.g., by tags. See [related docs] (https://docs.aws.amazon.com/ram/latest/APIReference/API_TagFilter.html).
    resourceShareStatus String
    Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are PENDING, ACTIVE, FAILED, DELETING, and DELETED.
    tags Map<String,String>
    Tags attached to the RAM share
    name string
    Name of the tag key to filter on.
    resourceOwner string
    Owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS.
    filters GetResourceShareFilter[]
    Filter used to scope the list e.g., by tags. See [related docs] (https://docs.aws.amazon.com/ram/latest/APIReference/API_TagFilter.html).
    resourceShareStatus string
    Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are PENDING, ACTIVE, FAILED, DELETING, and DELETED.
    tags {[key: string]: string}
    Tags attached to the RAM share
    name str
    Name of the tag key to filter on.
    resource_owner str
    Owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS.
    filters Sequence[GetResourceShareFilter]
    Filter used to scope the list e.g., by tags. See [related docs] (https://docs.aws.amazon.com/ram/latest/APIReference/API_TagFilter.html).
    resource_share_status str
    Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are PENDING, ACTIVE, FAILED, DELETING, and DELETED.
    tags Mapping[str, str]
    Tags attached to the RAM share
    name String
    Name of the tag key to filter on.
    resourceOwner String
    Owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS.
    filters List<Property Map>
    Filter used to scope the list e.g., by tags. See [related docs] (https://docs.aws.amazon.com/ram/latest/APIReference/API_TagFilter.html).
    resourceShareStatus String
    Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are PENDING, ACTIVE, FAILED, DELETING, and DELETED.
    tags Map<String>
    Tags attached to the RAM share

    getResourceShare Result

    The following output properties are available:

    Arn string
    ARN of the resource share.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    OwningAccountId string
    ID of the AWS account that owns the resource share.
    ResourceOwner string
    Status string
    Status of the RAM share.
    Tags Dictionary<string, string>
    Tags attached to the RAM share
    Filters List<GetResourceShareFilter>
    ResourceShareStatus string
    Arn string
    ARN of the resource share.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    OwningAccountId string
    ID of the AWS account that owns the resource share.
    ResourceOwner string
    Status string
    Status of the RAM share.
    Tags map[string]string
    Tags attached to the RAM share
    Filters []GetResourceShareFilter
    ResourceShareStatus string
    arn String
    ARN of the resource share.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    owningAccountId String
    ID of the AWS account that owns the resource share.
    resourceOwner String
    status String
    Status of the RAM share.
    tags Map<String,String>
    Tags attached to the RAM share
    filters List<GetResourceShareFilter>
    resourceShareStatus String
    arn string
    ARN of the resource share.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    owningAccountId string
    ID of the AWS account that owns the resource share.
    resourceOwner string
    status string
    Status of the RAM share.
    tags {[key: string]: string}
    Tags attached to the RAM share
    filters GetResourceShareFilter[]
    resourceShareStatus string
    arn str
    ARN of the resource share.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    owning_account_id str
    ID of the AWS account that owns the resource share.
    resource_owner str
    status str
    Status of the RAM share.
    tags Mapping[str, str]
    Tags attached to the RAM share
    filters Sequence[GetResourceShareFilter]
    resource_share_status str
    arn String
    ARN of the resource share.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    owningAccountId String
    ID of the AWS account that owns the resource share.
    resourceOwner String
    status String
    Status of the RAM share.
    tags Map<String>
    Tags attached to the RAM share
    filters List<Property Map>
    resourceShareStatus String

    Supporting Types

    GetResourceShareFilter

    Name string
    Name of the tag key to filter on.
    Values List<string>
    Value of the tag key.
    Name string
    Name of the tag key to filter on.
    Values []string
    Value of the tag key.
    name String
    Name of the tag key to filter on.
    values List<String>
    Value of the tag key.
    name string
    Name of the tag key to filter on.
    values string[]
    Value of the tag key.
    name str
    Name of the tag key to filter on.
    values Sequence[str]
    Value of the tag key.
    name String
    Name of the tag key to filter on.
    values List<String>
    Value of the tag key.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    Viewing docs for AWS v5.43.0 (Older version)
    published on Tuesday, Mar 10, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.