aws.cloudcontrol.getResource
Explore with Pulumi AI
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",
});
import pulumi
import pulumi_aws as aws
example = aws.cloudcontrol.get_resource(identifier="example",
    type_name="AWS::ECS::Cluster")
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
	})
}
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",
    });
});
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());
    }
}
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)
public static Output<GetResourceResult> getResource(GetResourceArgs args, InvokeOptions options)
fn::invoke:
  function: aws:cloudcontrol/getResource:getResource
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Identifier string
 - Identifier of the CloudFormation resource type. For example, 
vpc-12345678. - Type
Name string CloudFormation resource type name. For example,
AWS::EC2::VPC.The following arguments are optional:
- Role
Arn string - ARN of the IAM Role to assume for operations.
 - Type
Version stringId  - Identifier of the CloudFormation resource type version.
 
- Identifier string
 - Identifier of the CloudFormation resource type. For example, 
vpc-12345678. - Type
Name string CloudFormation resource type name. For example,
AWS::EC2::VPC.The following arguments are optional:
- Role
Arn string - ARN of the IAM Role to assume for operations.
 - Type
Version stringId  - Identifier of the CloudFormation resource type version.
 
- identifier String
 - Identifier of the CloudFormation resource type. For example, 
vpc-12345678. - type
Name String CloudFormation resource type name. For example,
AWS::EC2::VPC.The following arguments are optional:
- role
Arn String - ARN of the IAM Role to assume for operations.
 - type
Version StringId  - Identifier of the CloudFormation resource type version.
 
- identifier string
 - Identifier of the CloudFormation resource type. For example, 
vpc-12345678. - type
Name string CloudFormation resource type name. For example,
AWS::EC2::VPC.The following arguments are optional:
- role
Arn string - ARN of the IAM Role to assume for operations.
 - type
Version stringId  - 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.The following arguments are optional:
- role_
arn str - ARN of the IAM Role to assume for operations.
 - type_
version_ strid  - Identifier of the CloudFormation resource type version.
 
- identifier String
 - Identifier of the CloudFormation resource type. For example, 
vpc-12345678. - type
Name String CloudFormation resource type name. For example,
AWS::EC2::VPC.The following arguments are optional:
- role
Arn String - ARN of the IAM Role to assume for operations.
 - type
Version StringId  - 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.
 - Type
Name string - Role
Arn string - Type
Version stringId  
- 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.
 - Type
Name string - Role
Arn string - Type
Version stringId  
- 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.
 - type
Name String - role
Arn String - type
Version StringId  
- 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.
 - type
Name string - role
Arn string - type
Version stringId  
- 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_ strid  
- 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.
 - type
Name String - role
Arn String - type
Version StringId  
Package Details
- Repository
 - AWS Classic pulumi/pulumi-aws
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
awsTerraform Provider.