get Resource Share
aws.ram.ResourceShare Retrieve information about a RAM Resource Share.
Example Usage
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")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/v6/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: pulumi.StringRef("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());
}
}variables:
example:
fn::invoke:
Function: aws:ram:getResourceShare
Arguments:
name: example
resourceOwner: SELFSearch by filters
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const tagFilter = aws.ram.getResourceShare({
resourceOwner: "SELF",
filters: [{
name: "NameOfTag",
values: ["exampleNameTagValue"],
}],
});import pulumi
import pulumi_aws as aws
tag_filter = aws.ram.get_resource_share(resource_owner="SELF",
filters=[aws.ram.GetResourceShareFilterArgs(
name="NameOfTag",
values=["exampleNameTagValue"],
)])using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var tagFilter = Aws.Ram.GetResourceShare.Invoke(new()
{
ResourceOwner = "SELF",
Filters = new[]
{
new Aws.Ram.Inputs.GetResourceShareFilterInputArgs
{
Name = "NameOfTag",
Values = new[]
{
"exampleNameTagValue",
},
},
},
});
});package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/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{
ResourceOwner: "SELF",
Filters: []ram.GetResourceShareFilter{
{
Name: "NameOfTag",
Values: []string{
"exampleNameTagValue",
},
},
},
}, 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()
.resourceOwner("SELF")
.filters(GetResourceShareFilterArgs.builder()
.name("NameOfTag")
.values("exampleNameTagValue")
.build())
.build());
}
}variables:
tagFilter:
fn::invoke:
Function: aws:ram:getResourceShare
Arguments:
resourceOwner: SELF
filters:
- name: NameOfTag
values:
- exampleNameTagValueReturn
A collection of values returned by getResourceShare.
Parameters
A collection of arguments for invoking getResourceShare.
Return
A collection of values returned by getResourceShare.
See also
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 resource share to retrieve.
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 resource share.
Return
A collection of values returned by getResourceShare.
See also
Parameters
Builder for com.pulumi.aws.ram.kotlin.inputs.GetResourceSharePlainArgs.