getResourceShare

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: SELF

Search 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=[{
"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:
- exampleNameTagValue

Return

A collection of values returned by getResourceShare.

Parameters

argument

A collection of arguments for invoking getResourceShare.


suspend fun getResourceShare(filters: List<GetResourceShareFilter>? = null, name: String? = null, resourceOwner: String, resourceShareStatus: String? = null, tags: Map<String, String>? = null): GetResourceShareResult

Return

A collection of values returned by getResourceShare.

Parameters

filters

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

Name of the resource share to retrieve.

resourceOwner

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

resourceShareStatus

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

Tags attached to the resource share.

See also


Return

A collection of values returned by getResourceShare.

Parameters

argument

Builder for com.pulumi.aws.ram.kotlin.inputs.GetResourceSharePlainArgs.

See also