get Resource Share
aws.ram.ResourceShare Retrieve information about a RAM Resource Share.
Example Usage
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());
}
}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: SELFReturn
A collection of values returned by getResourceShare.
Parameters
A collection of arguments for invoking getResourceShare.
Return
A collection of values returned by getResourceShare.
Parameters
Filter used to scope the list e.g., by tags. See related docs (https://docs.aws.amazon.com/ram/latest/APIReference/API_TagFilter.html).
Name of the tag key to filter on.
Owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS.
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 attached to the RAM share
See also
Return
A collection of values returned by getResourceShare.
Parameters
Builder for com.pulumi.aws.ram.kotlin.inputs.GetResourceSharePlainArgs.