AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi
aws.ram.getResourceShare
Explore with Pulumi AI
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")
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
})
}
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 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"],
}])
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
})
}
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 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
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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:ram/getResourceShare:getResourceShare
arguments:
# arguments dictionary
The following arguments are supported:
- Resource
Owner string - Owner of the resource share. Valid values are
SELF
orOTHER-ACCOUNTS
. - Filters
List<Get
Resource Share Filter> - 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 string
- Name of the resource share to retrieve.
- string
- Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are
PENDING
,ACTIVE
,FAILED
,DELETING
, andDELETED
. - Dictionary<string, string>
- Tags attached to the resource share.
- Resource
Owner string - Owner of the resource share. Valid values are
SELF
orOTHER-ACCOUNTS
. - Filters
[]Get
Resource Share Filter - 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 string
- Name of the resource share to retrieve.
- string
- Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are
PENDING
,ACTIVE
,FAILED
,DELETING
, andDELETED
. - map[string]string
- Tags attached to the resource share.
- resource
Owner String - Owner of the resource share. Valid values are
SELF
orOTHER-ACCOUNTS
. - filters
List<Get
Resource Share Filter> - 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 String
- Name of the resource share to retrieve.
- String
- Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are
PENDING
,ACTIVE
,FAILED
,DELETING
, andDELETED
. - Map<String,String>
- Tags attached to the resource share.
- resource
Owner string - Owner of the resource share. Valid values are
SELF
orOTHER-ACCOUNTS
. - filters
Get
Resource Share Filter[] - 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 string
- Name of the resource share to retrieve.
- string
- Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are
PENDING
,ACTIVE
,FAILED
,DELETING
, andDELETED
. - {[key: string]: string}
- Tags attached to the resource share.
- resource_
owner str - Owner of the resource share. Valid values are
SELF
orOTHER-ACCOUNTS
. - filters
Sequence[Get
Resource Share Filter] - 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 str
- Name of the resource share to retrieve.
- str
- Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are
PENDING
,ACTIVE
,FAILED
,DELETING
, andDELETED
. - Mapping[str, str]
- Tags attached to the resource share.
- resource
Owner String - Owner of the resource share. Valid values are
SELF
orOTHER-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).
- name String
- Name of the resource share to retrieve.
- String
- Specifies that you want to retrieve details of only those resource shares that have this status. Valid values are
PENDING
,ACTIVE
,FAILED
,DELETING
, andDELETED
. - Map<String>
- Tags attached to the resource 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
- Owning
Account stringId - ID of the AWS account that owns the resource share.
- Resource
Arns List<string> - A list of resource ARNs associated with the resource share.
- Resource
Owner string - Status string
- Status of the resource share.
- Dictionary<string, string>
- Tags attached to the resource share.
- Filters
List<Get
Resource Share Filter> - string
- Arn string
- ARN of the resource share.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Owning
Account stringId - ID of the AWS account that owns the resource share.
- Resource
Arns []string - A list of resource ARNs associated with the resource share.
- Resource
Owner string - Status string
- Status of the resource share.
- map[string]string
- Tags attached to the resource share.
- Filters
[]Get
Resource Share Filter - string
- arn String
- ARN of the resource share.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- owning
Account StringId - ID of the AWS account that owns the resource share.
- resource
Arns List<String> - A list of resource ARNs associated with the resource share.
- resource
Owner String - status String
- Status of the resource share.
- Map<String,String>
- Tags attached to the resource share.
- filters
List<Get
Resource Share Filter> - String
- arn string
- ARN of the resource share.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- owning
Account stringId - ID of the AWS account that owns the resource share.
- resource
Arns string[] - A list of resource ARNs associated with the resource share.
- resource
Owner string - status string
- Status of the resource share.
- {[key: string]: string}
- Tags attached to the resource share.
- filters
Get
Resource Share Filter[] - string
- arn str
- ARN of the resource share.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- owning_
account_ strid - ID of the AWS account that owns the resource share.
- resource_
arns Sequence[str] - A list of resource ARNs associated with the resource share.
- resource_
owner str - status str
- Status of the resource share.
- Mapping[str, str]
- Tags attached to the resource share.
- filters
Sequence[Get
Resource Share Filter] - str
- arn String
- ARN of the resource share.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- owning
Account StringId - ID of the AWS account that owns the resource share.
- resource
Arns List<String> - A list of resource ARNs associated with the resource share.
- resource
Owner String - status String
- Status of the resource share.
- Map<String>
- Tags attached to the resource share.
- filters List<Property Map>
- String
Supporting Types
GetResourceShareFilter
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.