Data source for looking up a Resource by ID or by name. Use either id or name, but not both.
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(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetResourceResult
def get_resource_output(id: Optional[pulumi.Input[str]] = None,
name: 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: formal:index/getResource:getResource
arguments:
# arguments dictionaryThe following arguments are supported:
getResource Result
The following output properties are available:
- Created
At int - Creation time of the Resource.
- Environment string
- Environment for the Resource.
- Hostname string
- Hostname of the Resource.
- Port int
- The port your Resource is listening on.
- Space
Id string - The ID of the Space the Resource is in.
- Technology string
- Technology of the Resource.
- Termination
Protection bool - If set to true, the Resource cannot be deleted.
- Id string
- The ID of this Resource.
- Name string
- The name of the Resource to look up. Use this to fetch a resource by name.
- Created
At int - Creation time of the Resource.
- Environment string
- Environment for the Resource.
- Hostname string
- Hostname of the Resource.
- Port int
- The port your Resource is listening on.
- Space
Id string - The ID of the Space the Resource is in.
- Technology string
- Technology of the Resource.
- Termination
Protection bool - If set to true, the Resource cannot be deleted.
- Id string
- The ID of this Resource.
- Name string
- The name of the Resource to look up. Use this to fetch a resource by name.
- created
At Integer - Creation time of the Resource.
- environment String
- Environment for the Resource.
- hostname String
- Hostname of the Resource.
- port Integer
- The port your Resource is listening on.
- space
Id String - The ID of the Space the Resource is in.
- technology String
- Technology of the Resource.
- termination
Protection Boolean - If set to true, the Resource cannot be deleted.
- id String
- The ID of this Resource.
- name String
- The name of the Resource to look up. Use this to fetch a resource by name.
- created
At number - Creation time of the Resource.
- environment string
- Environment for the Resource.
- hostname string
- Hostname of the Resource.
- port number
- The port your Resource is listening on.
- space
Id string - The ID of the Space the Resource is in.
- technology string
- Technology of the Resource.
- termination
Protection boolean - If set to true, the Resource cannot be deleted.
- id string
- The ID of this Resource.
- name string
- The name of the Resource to look up. Use this to fetch a resource by name.
- created_
at int - Creation time of the Resource.
- environment str
- Environment for the Resource.
- hostname str
- Hostname of the Resource.
- port int
- The port your Resource is listening on.
- space_
id str - The ID of the Space the Resource is in.
- technology str
- Technology of the Resource.
- termination_
protection bool - If set to true, the Resource cannot be deleted.
- id str
- The ID of this Resource.
- name str
- The name of the Resource to look up. Use this to fetch a resource by name.
- created
At Number - Creation time of the Resource.
- environment String
- Environment for the Resource.
- hostname String
- Hostname of the Resource.
- port Number
- The port your Resource is listening on.
- space
Id String - The ID of the Space the Resource is in.
- technology String
- Technology of the Resource.
- termination
Protection Boolean - If set to true, the Resource cannot be deleted.
- id String
- The ID of this Resource.
- name String
- The name of the Resource to look up. Use this to fetch a resource by name.
Package Details
- Repository
- formal formalco/pulumi-formal
- License
- MPL-2.0
- Notes
- This Pulumi package is based on the
formalTerraform Provider.
