Package com.pulumi.aws.cloudcontrol
Class Resource
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.cloudcontrol.Resource
-
public class Resource extends com.pulumi.resources.CustomResourceManages a Cloud Control API Resource. The configuration and lifecycle handling of these resources is proxied through Cloud Control API handlers to the backend service. ## Example Usagepackage generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.cloudcontrol.Resource; import com.pulumi.aws.cloudcontrol.ResourceArgs; import static com.pulumi.codegen.internal.Serialization.*; import java.util.ArrayList; import java.util.Arrays; 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) { var example = new Resource("example", ResourceArgs.builder() .typeName("AWS::ECS::Cluster") .desiredState(serializeJson( jsonObject( jsonProperty("ClusterName", "example"), jsonProperty("Tags", jsonArray(jsonObject( jsonProperty("Key", "CostCenter"), jsonProperty("Value", "IT") ))) ))) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Resource(java.lang.String name)Resource(java.lang.String name, ResourceArgs args)Resource(java.lang.String name, ResourceArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>desiredState()static Resourceget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, ResourceState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>properties()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.String>>roleArn()com.pulumi.core.Output<java.lang.String>schema()com.pulumi.core.Output<java.lang.String>typeName()com.pulumi.core.Output<java.util.Optional<java.lang.String>>typeVersionId()
-
-
-
Constructor Detail
-
Resource
public Resource(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Resource
public Resource(java.lang.String name, ResourceArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Resource
public Resource(java.lang.String name, ResourceArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
desiredState
public com.pulumi.core.Output<java.lang.String> desiredState()
- Returns:
- JSON string matching the CloudFormation resource type schema with desired configuration.
-
properties
public com.pulumi.core.Output<java.lang.String> properties()
- Returns:
- JSON string matching the CloudFormation resource type schema with current configuration. Underlying attributes can be referenced via the `jsondecode()` function, for example, `jsondecode(data.aws_cloudcontrolapi_resource.example.properties)["example"]`.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
roleArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> roleArn()
- Returns:
- ARN of the IAM Role to assume for operations.
-
schema
public com.pulumi.core.Output<java.lang.String> schema()
- Returns:
- JSON string of the CloudFormation resource type schema which is used for plan time validation where possible. Automatically fetched if not provided. In large scale environments with multiple resources using the same `typeName`, it is recommended to fetch the schema once via the `aws.cloudformation.CloudFormationType` data source and use this argument to reduce `DescribeType` API operation throttling. This value is marked sensitive only to prevent large plan differences from showing.
-
typeName
public com.pulumi.core.Output<java.lang.String> typeName()
- Returns:
- CloudFormation resource type name. For example, `AWS::EC2::VPC`. The following arguments are optional:
-
typeVersionId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> typeVersionId()
- Returns:
- Identifier of the CloudFormation resource type version.
-
get
public static Resource get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable ResourceState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-