1. Packages
  2. AWS
  3. API Docs
  4. cloudcontrol
  5. getResource
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

aws.cloudcontrol.getResource

Explore with Pulumi AI

AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi

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

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.cloudcontrol.getResource({
    identifier: "example",
    typeName: "AWS::ECS::Cluster",
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.cloudcontrol.get_resource(identifier="example",
    type_name="AWS::ECS::Cluster")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/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
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.CloudControl.GetResource.Invoke(new()
    {
        Identifier = "example",
        TypeName = "AWS::ECS::Cluster",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.cloudcontrol.CloudcontrolFunctions;
import com.pulumi.aws.cloudcontrol.inputs.GetResourceArgs;
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 = CloudcontrolFunctions.getResource(GetResourceArgs.builder()
            .identifier("example")
            .typeName("AWS::ECS::Cluster")
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:cloudcontrol:getResource
      arguments:
        identifier: example
        typeName: AWS::ECS::Cluster
Copy

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>
Copy
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]
Copy
func LookupResource(ctx *Context, args *LookupResourceArgs, opts ...InvokeOption) (*LookupResourceResult, error)
func LookupResourceOutput(ctx *Context, args *LookupResourceOutputArgs, opts ...InvokeOption) LookupResourceResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetResourceResult> getResource(GetResourceArgs args, InvokeOptions options)
public static Output<GetResourceResult> getResource(GetResourceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:cloudcontrol/getResource:getResource
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Identifier This property is required. string
Identifier of the CloudFormation resource type. For example, vpc-12345678.
TypeName This property is required. string

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

The following arguments are optional:

RoleArn string
ARN of the IAM Role to assume for operations.
TypeVersionId string
Identifier of the CloudFormation resource type version.
Identifier This property is required. string
Identifier of the CloudFormation resource type. For example, vpc-12345678.
TypeName This property is required. string

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

The following arguments are optional:

RoleArn string
ARN of the IAM Role to assume for operations.
TypeVersionId string
Identifier of the CloudFormation resource type version.
identifier This property is required. String
Identifier of the CloudFormation resource type. For example, vpc-12345678.
typeName This property is required. String

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

The following arguments are optional:

roleArn String
ARN of the IAM Role to assume for operations.
typeVersionId String
Identifier of the CloudFormation resource type version.
identifier This property is required. string
Identifier of the CloudFormation resource type. For example, vpc-12345678.
typeName This property is required. string

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

The following arguments are optional:

roleArn string
ARN of the IAM Role to assume for operations.
typeVersionId string
Identifier of the CloudFormation resource type version.
identifier This property is required. str
Identifier of the CloudFormation resource type. For example, vpc-12345678.
type_name This property is required. str

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

The following arguments are optional:

role_arn str
ARN of the IAM Role to assume for operations.
type_version_id str
Identifier of the CloudFormation resource type version.
identifier This property is required. String
Identifier of the CloudFormation resource type. For example, vpc-12345678.
typeName This property is required. String

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

The following arguments are optional:

roleArn String
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
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.77.0 published on Wednesday, Apr 9, 2025 by Pulumi