vra 0.13.0 published on Wednesday, May 14, 2025 by vmware
vra.getPolicyLease
Explore with Pulumi AI
The following examples shows how to lookup for a lease policy:
Lease policy data source by its id:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getPolicyLease({
id: _var.vra_lease_policy_id,
});
import pulumi
import pulumi_vra as vra
this = vra.get_policy_lease(id=var["vra_lease_policy_id"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vra.LookupPolicyLease(ctx, &vra.LookupPolicyLeaseArgs{
Id: pulumi.StringRef(_var.Vra_lease_policy_id),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() =>
{
var @this = Vra.GetPolicyLease.Invoke(new()
{
Id = @var.Vra_lease_policy_id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetPolicyLeaseArgs;
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 this = VraFunctions.getPolicyLease(GetPolicyLeaseArgs.builder()
.id(var_.vra_lease_policy_id())
.build());
}
}
variables:
this:
fn::invoke:
function: vra:getPolicyLease
arguments:
id: ${var.vra_lease_policy_id}
Lease policy data source by name search:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const _this = vra.getPolicyLease({
search: _var.vra_lease_policy_search_name,
});
import pulumi
import pulumi_vra as vra
this = vra.get_policy_lease(search=var["vra_lease_policy_search_name"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vra.LookupPolicyLease(ctx, &vra.LookupPolicyLeaseArgs{
Search: pulumi.StringRef(_var.Vra_lease_policy_search_name),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Vra = Pulumi.Vra;
return await Deployment.RunAsync(() =>
{
var @this = Vra.GetPolicyLease.Invoke(new()
{
Search = @var.Vra_lease_policy_search_name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.VraFunctions;
import com.pulumi.vra.inputs.GetPolicyLeaseArgs;
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 this = VraFunctions.getPolicyLease(GetPolicyLeaseArgs.builder()
.search(var_.vra_lease_policy_search_name())
.build());
}
}
variables:
this:
fn::invoke:
function: vra:getPolicyLease
arguments:
search: ${var.vra_lease_policy_search_name}
Using getPolicyLease
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 getPolicyLease(args: GetPolicyLeaseArgs, opts?: InvokeOptions): Promise<GetPolicyLeaseResult>
function getPolicyLeaseOutput(args: GetPolicyLeaseOutputArgs, opts?: InvokeOptions): Output<GetPolicyLeaseResult>
def get_policy_lease(id: Optional[str] = None,
search: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPolicyLeaseResult
def get_policy_lease_output(id: Optional[pulumi.Input[str]] = None,
search: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPolicyLeaseResult]
func LookupPolicyLease(ctx *Context, args *LookupPolicyLeaseArgs, opts ...InvokeOption) (*LookupPolicyLeaseResult, error)
func LookupPolicyLeaseOutput(ctx *Context, args *LookupPolicyLeaseOutputArgs, opts ...InvokeOption) LookupPolicyLeaseResultOutput
> Note: This function is named LookupPolicyLease
in the Go SDK.
public static class GetPolicyLease
{
public static Task<GetPolicyLeaseResult> InvokeAsync(GetPolicyLeaseArgs args, InvokeOptions? opts = null)
public static Output<GetPolicyLeaseResult> Invoke(GetPolicyLeaseInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetPolicyLeaseResult> getPolicyLease(GetPolicyLeaseArgs args, InvokeOptions options)
public static Output<GetPolicyLeaseResult> getPolicyLease(GetPolicyLeaseArgs args, InvokeOptions options)
fn::invoke:
function: vra:index/getPolicyLease:getPolicyLease
arguments:
# arguments dictionary
The following arguments are supported:
getPolicyLease Result
The following output properties are available:
- Created
At string - Date when the entity was created. The date is in ISO 8601 and UTC.
- Created
By string - The user the entity was created by.
- Criterias
List<Immutable
Dictionary<string, string>> - The policy criteria.
- Description string
- A human-friendly description for the policy instance.
- Enforcement
Type string - The type of enforcement for the policy.
- Id string
- Last
Updated stringAt - Date when the entity was last updated. The date is ISO 8601 and UTC.
- Last
Updated stringBy - The user the entity was last updated by.
- Lease
Grace double - The duration in days that an expired object should be held before it is deleted.
- Lease
Term doubleMax - The maximum duration in days between creation (or renewal) and expiration.
- Lease
Total doubleTerm Max - The maximum duration in days between creation and expiration. Unaffected by renewal.
- Name string
- A human-friendly name used as an identifier for the policy instance.
- Org
Id string - The id of the organization this entity belongs to.
- Project
Criterias List<ImmutableDictionary<string, string>> - The project based criteria.
- Project
Id string - The id of the project this entity belongs to.
- Search string
- Created
At string - Date when the entity was created. The date is in ISO 8601 and UTC.
- Created
By string - The user the entity was created by.
- Criterias []map[string]string
- The policy criteria.
- Description string
- A human-friendly description for the policy instance.
- Enforcement
Type string - The type of enforcement for the policy.
- Id string
- Last
Updated stringAt - Date when the entity was last updated. The date is ISO 8601 and UTC.
- Last
Updated stringBy - The user the entity was last updated by.
- Lease
Grace float64 - The duration in days that an expired object should be held before it is deleted.
- Lease
Term float64Max - The maximum duration in days between creation (or renewal) and expiration.
- Lease
Total float64Term Max - The maximum duration in days between creation and expiration. Unaffected by renewal.
- Name string
- A human-friendly name used as an identifier for the policy instance.
- Org
Id string - The id of the organization this entity belongs to.
- Project
Criterias []map[string]string - The project based criteria.
- Project
Id string - The id of the project this entity belongs to.
- Search string
- created
At String - Date when the entity was created. The date is in ISO 8601 and UTC.
- created
By String - The user the entity was created by.
- criterias List<Map<String,String>>
- The policy criteria.
- description String
- A human-friendly description for the policy instance.
- enforcement
Type String - The type of enforcement for the policy.
- id String
- last
Updated StringAt - Date when the entity was last updated. The date is ISO 8601 and UTC.
- last
Updated StringBy - The user the entity was last updated by.
- lease
Grace Double - The duration in days that an expired object should be held before it is deleted.
- lease
Term DoubleMax - The maximum duration in days between creation (or renewal) and expiration.
- lease
Total DoubleTerm Max - The maximum duration in days between creation and expiration. Unaffected by renewal.
- name String
- A human-friendly name used as an identifier for the policy instance.
- org
Id String - The id of the organization this entity belongs to.
- project
Criterias List<Map<String,String>> - The project based criteria.
- project
Id String - The id of the project this entity belongs to.
- search String
- created
At string - Date when the entity was created. The date is in ISO 8601 and UTC.
- created
By string - The user the entity was created by.
- criterias {[key: string]: string}[]
- The policy criteria.
- description string
- A human-friendly description for the policy instance.
- enforcement
Type string - The type of enforcement for the policy.
- id string
- last
Updated stringAt - Date when the entity was last updated. The date is ISO 8601 and UTC.
- last
Updated stringBy - The user the entity was last updated by.
- lease
Grace number - The duration in days that an expired object should be held before it is deleted.
- lease
Term numberMax - The maximum duration in days between creation (or renewal) and expiration.
- lease
Total numberTerm Max - The maximum duration in days between creation and expiration. Unaffected by renewal.
- name string
- A human-friendly name used as an identifier for the policy instance.
- org
Id string - The id of the organization this entity belongs to.
- project
Criterias {[key: string]: string}[] - The project based criteria.
- project
Id string - The id of the project this entity belongs to.
- search string
- created_
at str - Date when the entity was created. The date is in ISO 8601 and UTC.
- created_
by str - The user the entity was created by.
- criterias Sequence[Mapping[str, str]]
- The policy criteria.
- description str
- A human-friendly description for the policy instance.
- enforcement_
type str - The type of enforcement for the policy.
- id str
- last_
updated_ strat - Date when the entity was last updated. The date is ISO 8601 and UTC.
- last_
updated_ strby - The user the entity was last updated by.
- lease_
grace float - The duration in days that an expired object should be held before it is deleted.
- lease_
term_ floatmax - The maximum duration in days between creation (or renewal) and expiration.
- lease_
total_ floatterm_ max - The maximum duration in days between creation and expiration. Unaffected by renewal.
- name str
- A human-friendly name used as an identifier for the policy instance.
- org_
id str - The id of the organization this entity belongs to.
- project_
criterias Sequence[Mapping[str, str]] - The project based criteria.
- project_
id str - The id of the project this entity belongs to.
- search str
- created
At String - Date when the entity was created. The date is in ISO 8601 and UTC.
- created
By String - The user the entity was created by.
- criterias List<Map<String>>
- The policy criteria.
- description String
- A human-friendly description for the policy instance.
- enforcement
Type String - The type of enforcement for the policy.
- id String
- last
Updated StringAt - Date when the entity was last updated. The date is ISO 8601 and UTC.
- last
Updated StringBy - The user the entity was last updated by.
- lease
Grace Number - The duration in days that an expired object should be held before it is deleted.
- lease
Term NumberMax - The maximum duration in days between creation (or renewal) and expiration.
- lease
Total NumberTerm Max - The maximum duration in days between creation and expiration. Unaffected by renewal.
- name String
- A human-friendly name used as an identifier for the policy instance.
- org
Id String - The id of the organization this entity belongs to.
- project
Criterias List<Map<String>> - The project based criteria.
- project
Id String - The id of the project this entity belongs to.
- search String
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the
vra
Terraform Provider.