AWS Classic

Pulumi Official
Package maintained by Pulumi
v5.9.2 published on Friday, Jun 24, 2022 by Pulumi

getResource

Provides details for a Cloud Control API Resource. The reading of these resources is proxied through Cloud Control API handlers to the backend service.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(Aws.CloudControl.GetResource.InvokeAsync(new Aws.CloudControl.GetResourceArgs
        {
            Identifier = "example",
            TypeName = "AWS::ECS::Cluster",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/cloudcontrol"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudcontrol.LookupResource(ctx, &cloudcontrol.LookupResourceArgs{
			Identifier: "example",
			TypeName:   "AWS::ECS::Cluster",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(CloudcontrolFunctions.getResource(GetResourceArgs.builder()
            .identifier("example")
            .typeName("AWS::ECS::Cluster")
            .build()));

    }
}
import pulumi
import pulumi_aws as aws

example = aws.cloudcontrol.get_resource(identifier="example",
    type_name="AWS::ECS::Cluster")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = pulumi.output(aws.cloudcontrol.getResource({
    identifier: "example",
    typeName: "AWS::ECS::Cluster",
}));
variables:
  example:
    Fn::Invoke:
      Function: aws:cloudcontrol:getResource
      Arguments:
        identifier: example
        typeName: AWS::ECS::Cluster

Using getResource

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 getResource(args: GetResourceArgs, opts?: InvokeOptions): Promise<GetResourceResult>
function getResourceOutput(args: GetResourceOutputArgs, opts?: InvokeOptions): Output<GetResourceResult>
def get_resource(identifier: Optional[str] = None,
                 role_arn: Optional[str] = None,
                 type_name: Optional[str] = None,
                 type_version_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetResourceResult
def get_resource_output(identifier: Optional[pulumi.Input[str]] = None,
                 role_arn: Optional[pulumi.Input[str]] = None,
                 type_name: Optional[pulumi.Input[str]] = None,
                 type_version_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetResourceResult]
func LookupResource(ctx *Context, args *LookupResourceArgs, opts ...InvokeOption) (*LookupResourceResult, error)
func LookupResourceOutput(ctx *Context, args *LookupResourceOutputArgs, opts ...InvokeOption) LookupResourceResultOutput

> Note: This function is named LookupResource in the Go SDK.

public static class GetResource 
{
    public static Task<GetResourceResult> InvokeAsync(GetResourceArgs args, InvokeOptions? opts = null)
    public static Output<GetResourceResult> Invoke(GetResourceInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetResourceResult> getResource(GetResourceArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: aws:cloudcontrol/getResource:getResource
  Arguments:
    # Arguments dictionary

The following arguments are supported:

Identifier string

Identifier of the CloudFormation resource type. For example, vpc-12345678.

TypeName string

CloudFormation resource type name. For example, AWS::EC2::VPC.

RoleArn string

Amazon Resource Name (ARN) of the IAM Role to assume for operations.

TypeVersionId string

Identifier of the CloudFormation resource type version.

Identifier string

Identifier of the CloudFormation resource type. For example, vpc-12345678.

TypeName string

CloudFormation resource type name. For example, AWS::EC2::VPC.

RoleArn string

Amazon Resource Name (ARN) of the IAM Role to assume for operations.

TypeVersionId string

Identifier of the CloudFormation resource type version.

identifier String

Identifier of the CloudFormation resource type. For example, vpc-12345678.

typeName String

CloudFormation resource type name. For example, AWS::EC2::VPC.

roleArn String

Amazon Resource Name (ARN) of the IAM Role to assume for operations.

typeVersionId String

Identifier of the CloudFormation resource type version.

identifier string

Identifier of the CloudFormation resource type. For example, vpc-12345678.

typeName string

CloudFormation resource type name. For example, AWS::EC2::VPC.

roleArn string

Amazon Resource Name (ARN) of the IAM Role to assume for operations.

typeVersionId string

Identifier of the CloudFormation resource type version.

identifier str

Identifier of the CloudFormation resource type. For example, vpc-12345678.

type_name str

CloudFormation resource type name. For example, AWS::EC2::VPC.

role_arn str

Amazon Resource Name (ARN) of the IAM Role to assume for operations.

type_version_id str

Identifier of the CloudFormation resource type version.

identifier String

Identifier of the CloudFormation resource type. For example, vpc-12345678.

typeName String

CloudFormation resource type name. For example, AWS::EC2::VPC.

roleArn String

Amazon Resource Name (ARN) of the IAM Role to assume for operations.

typeVersionId String

Identifier of the CloudFormation resource type version.

getResource Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Identifier string
Properties string

JSON string matching the CloudFormation resource type schema with current configuration.

TypeName string
RoleArn string
TypeVersionId string
Id string

The provider-assigned unique ID for this managed resource.

Identifier string
Properties string

JSON string matching the CloudFormation resource type schema with current configuration.

TypeName string
RoleArn string
TypeVersionId string
id String

The provider-assigned unique ID for this managed resource.

identifier String
properties String

JSON string matching the CloudFormation resource type schema with current configuration.

typeName String
roleArn String
typeVersionId String
id string

The provider-assigned unique ID for this managed resource.

identifier string
properties string

JSON string matching the CloudFormation resource type schema with current configuration.

typeName string
roleArn string
typeVersionId string
id str

The provider-assigned unique ID for this managed resource.

identifier str
properties str

JSON string matching the CloudFormation resource type schema with current configuration.

type_name str
role_arn str
type_version_id str
id String

The provider-assigned unique ID for this managed resource.

identifier String
properties String

JSON string matching the CloudFormation resource type schema with current configuration.

typeName String
roleArn String
typeVersionId String

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.