Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
aws.organizations.getResourceTags
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi
Get tags attached to the specified AWS Organizations resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const account = aws.organizations.getResourceTags({
resourceId: "123456123846",
});
import pulumi
import pulumi_aws as aws
account = aws.organizations.get_resource_tags(resource_id="123456123846")
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/organizations"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := organizations.GetResourceTags(ctx, &organizations.GetResourceTagsArgs{
ResourceId: "123456123846",
}, 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 account = Aws.Organizations.GetResourceTags.Invoke(new()
{
ResourceId = "123456123846",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.organizations.OrganizationsFunctions;
import com.pulumi.aws.organizations.inputs.GetResourceTagsArgs;
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 account = OrganizationsFunctions.getResourceTags(GetResourceTagsArgs.builder()
.resourceId("123456123846")
.build());
}
}
variables:
account:
fn::invoke:
Function: aws:organizations:getResourceTags
Arguments:
resourceId: '123456123846'
Using getResourceTags
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 getResourceTags(args: GetResourceTagsArgs, opts?: InvokeOptions): Promise<GetResourceTagsResult>
function getResourceTagsOutput(args: GetResourceTagsOutputArgs, opts?: InvokeOptions): Output<GetResourceTagsResult>
def get_resource_tags(resource_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
opts: Optional[InvokeOptions] = None) -> GetResourceTagsResult
def get_resource_tags_output(resource_id: Optional[pulumi.Input[str]] = None,
tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetResourceTagsResult]
func GetResourceTags(ctx *Context, args *GetResourceTagsArgs, opts ...InvokeOption) (*GetResourceTagsResult, error)
func GetResourceTagsOutput(ctx *Context, args *GetResourceTagsOutputArgs, opts ...InvokeOption) GetResourceTagsResultOutput
> Note: This function is named GetResourceTags
in the Go SDK.
public static class GetResourceTags
{
public static Task<GetResourceTagsResult> InvokeAsync(GetResourceTagsArgs args, InvokeOptions? opts = null)
public static Output<GetResourceTagsResult> Invoke(GetResourceTagsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetResourceTagsResult> getResourceTags(GetResourceTagsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:organizations/getResourceTags:getResourceTags
arguments:
# arguments dictionary
The following arguments are supported:
- Resource
Id string - ID of the resource with the tags to list. See details below.
- Dictionary<string, string>
- Map of key=value pairs for each tag set on the resource.
- Resource
Id string - ID of the resource with the tags to list. See details below.
- map[string]string
- Map of key=value pairs for each tag set on the resource.
- resource
Id String - ID of the resource with the tags to list. See details below.
- Map<String,String>
- Map of key=value pairs for each tag set on the resource.
- resource
Id string - ID of the resource with the tags to list. See details below.
- {[key: string]: string}
- Map of key=value pairs for each tag set on the resource.
- resource_
id str - ID of the resource with the tags to list. See details below.
- Mapping[str, str]
- Map of key=value pairs for each tag set on the resource.
- resource
Id String - ID of the resource with the tags to list. See details below.
- Map<String>
- Map of key=value pairs for each tag set on the resource.
getResourceTags Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Id string - Dictionary<string, string>
- Map of key=value pairs for each tag set on the resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Resource
Id string - map[string]string
- Map of key=value pairs for each tag set on the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Id String - Map<String,String>
- Map of key=value pairs for each tag set on the resource.
- id string
- The provider-assigned unique ID for this managed resource.
- resource
Id string - {[key: string]: string}
- Map of key=value pairs for each tag set on the resource.
- id str
- The provider-assigned unique ID for this managed resource.
- resource_
id str - Mapping[str, str]
- Map of key=value pairs for each tag set on the resource.
- id String
- The provider-assigned unique ID for this managed resource.
- resource
Id String - Map<String>
- Map of key=value pairs for each tag set on the resource.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.
AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi