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.
- TypeName 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.
- TypeVersion stringId 
- 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.- The following arguments are optional: 
- RoleArn string
- ARN of the IAM Role to assume for operations.
- TypeVersion stringId 
- 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.- The following arguments are optional: 
- roleArn String
- ARN of the IAM Role to assume for operations.
- typeVersion StringId 
- 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.- The following arguments are optional: 
- roleArn string
- ARN of the IAM Role to assume for operations.
- typeVersion 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.
- typeName 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.
- typeVersion 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.
- TypeName string
- RoleArn string
- TypeVersion 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.
- TypeName string
- RoleArn string
- TypeVersion 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.
- typeName String
- roleArn String
- typeVersion 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.
- typeName string
- roleArn string
- typeVersion 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.
- typeName String
- roleArn String
- typeVersion StringId 
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.