formal.Resource
Explore with Pulumi AI
Registering a Resource with Formal.
Create Resource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Resource(name: string, args: ResourceArgs, opts?: CustomResourceOptions);
@overload
def Resource(resource_name: str,
args: ResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Resource(resource_name: str,
opts: Optional[ResourceOptions] = None,
hostname: Optional[str] = None,
port: Optional[int] = None,
technology: Optional[str] = None,
environment: Optional[str] = None,
name: Optional[str] = None,
space_id: Optional[str] = None,
technology_provider: Optional[str] = None,
termination_protection: Optional[bool] = None)
func NewResource(ctx *Context, name string, args ResourceArgs, opts ...ResourceOption) (*Resource, error)
public Resource(string name, ResourceArgs args, CustomResourceOptions? opts = null)
public Resource(String name, ResourceArgs args)
public Resource(String name, ResourceArgs args, CustomResourceOptions options)
type: formal:Resource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var resourceResource = new Pulumi.Resource("resourceResource", new()
{
Hostname = "string",
Port = 0,
Technology = "string",
Name = "string",
SpaceId = "string",
TechnologyProvider = "string",
TerminationProtection = false,
});
example, err := formal.NewResource(ctx, "resourceResource", &formal.ResourceArgs{
Hostname: pulumi.String("string"),
Port: pulumi.Int(0),
Technology: pulumi.String("string"),
Name: pulumi.String("string"),
SpaceId: pulumi.String("string"),
TechnologyProvider: pulumi.String("string"),
TerminationProtection: pulumi.Bool(false),
})
var resourceResource = new Resource("resourceResource", ResourceArgs.builder()
.hostname("string")
.port(0)
.technology("string")
.name("string")
.spaceId("string")
.technologyProvider("string")
.terminationProtection(false)
.build());
resource_resource = formal.Resource("resourceResource",
hostname="string",
port=0,
technology="string",
name="string",
space_id="string",
technology_provider="string",
termination_protection=False)
const resourceResource = new formal.Resource("resourceResource", {
hostname: "string",
port: 0,
technology: "string",
name: "string",
spaceId: "string",
technologyProvider: "string",
terminationProtection: false,
});
type: formal:Resource
properties:
hostname: string
name: string
port: 0
spaceId: string
technology: string
technologyProvider: string
terminationProtection: false
Resource Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Resource resource accepts the following input properties:
- Hostname string
- Hostname of the Resource.
- Port int
- The port your Resource is listening on.
- Technology string
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - Environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- Name string
- Friendly name for the Resource.
- Space
Id string - The ID of the Space to create the Resource in.
- Technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- Termination
Protection bool - If set to true, the Resource cannot be deleted.
- Hostname string
- Hostname of the Resource.
- Port int
- The port your Resource is listening on.
- Technology string
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - Environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- Name string
- Friendly name for the Resource.
- Space
Id string - The ID of the Space to create the Resource in.
- Technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- Termination
Protection bool - If set to true, the Resource cannot be deleted.
- hostname String
- Hostname of the Resource.
- port Integer
- The port your Resource is listening on.
- technology String
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - environment String
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- name String
- Friendly name for the Resource.
- space
Id String - The ID of the Space to create the Resource in.
- technology
Provider String - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- termination
Protection Boolean - If set to true, the Resource cannot be deleted.
- hostname string
- Hostname of the Resource.
- port number
- The port your Resource is listening on.
- technology string
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- name string
- Friendly name for the Resource.
- space
Id string - The ID of the Space to create the Resource in.
- technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- termination
Protection boolean - If set to true, the Resource cannot be deleted.
- hostname str
- Hostname of the Resource.
- port int
- The port your Resource is listening on.
- technology str
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - environment str
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- name str
- Friendly name for the Resource.
- space_
id str - The ID of the Space to create the Resource in.
- technology_
provider str - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- termination_
protection bool - If set to true, the Resource cannot be deleted.
- hostname String
- Hostname of the Resource.
- port Number
- The port your Resource is listening on.
- technology String
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - environment String
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- name String
- Friendly name for the Resource.
- space
Id String - The ID of the Space to create the Resource in.
- technology
Provider String - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- termination
Protection Boolean - If set to true, the Resource cannot be deleted.
Outputs
All input properties are implicitly available as output properties. Additionally, the Resource resource produces the following output properties:
- created_
at int - Creation time of the Resource.
- id str
- The provider-assigned unique ID for this managed resource.
Look up Existing Resource Resource
Get an existing Resource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ResourceState, opts?: CustomResourceOptions): Resource
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[int] = None,
environment: Optional[str] = None,
hostname: Optional[str] = None,
name: Optional[str] = None,
port: Optional[int] = None,
space_id: Optional[str] = None,
technology: Optional[str] = None,
technology_provider: Optional[str] = None,
termination_protection: Optional[bool] = None) -> Resource
func GetResource(ctx *Context, name string, id IDInput, state *ResourceState, opts ...ResourceOption) (*Resource, error)
public static Resource Get(string name, Input<string> id, ResourceState? state, CustomResourceOptions? opts = null)
public static Resource get(String name, Output<String> id, ResourceState state, CustomResourceOptions options)
resources: _: type: formal:Resource get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At int - Creation time of the Resource.
- Environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- Hostname string
- Hostname of the Resource.
- Name string
- Friendly name for the Resource.
- Port int
- The port your Resource is listening on.
- Space
Id string - The ID of the Space to create the Resource in.
- Technology string
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - Technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- Termination
Protection bool - If set to true, the Resource cannot be deleted.
- Created
At int - Creation time of the Resource.
- Environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- Hostname string
- Hostname of the Resource.
- Name string
- Friendly name for the Resource.
- Port int
- The port your Resource is listening on.
- Space
Id string - The ID of the Space to create the Resource in.
- Technology string
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - Technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- Termination
Protection bool - If set to true, the Resource cannot be deleted.
- created
At Integer - Creation time of the Resource.
- environment String
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- hostname String
- Hostname of the Resource.
- name String
- Friendly name for the Resource.
- port Integer
- The port your Resource is listening on.
- space
Id String - The ID of the Space to create the Resource in.
- technology String
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - technology
Provider String - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- termination
Protection Boolean - If set to true, the Resource cannot be deleted.
- created
At number - Creation time of the Resource.
- environment string
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- hostname string
- Hostname of the Resource.
- name string
- Friendly name for the Resource.
- port number
- The port your Resource is listening on.
- space
Id string - The ID of the Space to create the Resource in.
- technology string
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - technology
Provider string - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- termination
Protection boolean - If set to true, the Resource cannot be deleted.
- created_
at int - Creation time of the Resource.
- environment str
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- hostname str
- Hostname of the Resource.
- name str
- Friendly name for the Resource.
- port int
- The port your Resource is listening on.
- space_
id str - The ID of the Space to create the Resource in.
- technology str
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - technology_
provider str - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- termination_
protection bool - If set to true, the Resource cannot be deleted.
- created
At Number - Creation time of the Resource.
- environment String
- Environment for the Resource, options: DEV, TEST, QA, UAT, EI, PRE, STG, NON_PROD, PROD, CORP.
- hostname String
- Hostname of the Resource.
- name String
- Friendly name for the Resource.
- port Number
- The port your Resource is listening on.
- space
Id String - The ID of the Space to create the Resource in.
- technology String
- Technology of the Resource: supported values are
snowflake
,postgres
,redshift
,mysql
,mariadb
,s3
,dynamodb
,mongodb
,documentdb
,http
,clickhouse
,redis
andssh
. - technology
Provider String - For SSH resources, if the backend connection is SSM, supported values are
aws-ec2
, andaws-ecs
- termination
Protection Boolean - If set to true, the Resource cannot be deleted.
Package Details
- Repository
- formal formalco/pulumi-formal
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
formal
Terraform Provider.