1. Packages
  2. Vra Provider
  3. API Docs
  4. getPolicyDay2Action
vra 0.13.0 published on Wednesday, May 14, 2025 by vmware

vra.getPolicyDay2Action

Explore with Pulumi AI

vra logo
vra 0.13.0 published on Wednesday, May 14, 2025 by vmware

    The following examples shows how to lookup for a day2 action policy:

    Day2 Action policy data source by its id:

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = vra.getPolicyDay2Action({
        id: _var.vra_day2_action_policy_id,
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.get_policy_day2_action(id=var["vra_day2_action_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.LookupPolicyDay2Action(ctx, &vra.LookupPolicyDay2ActionArgs{
    			Id: pulumi.StringRef(_var.Vra_day2_action_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.GetPolicyDay2Action.Invoke(new()
        {
            Id = @var.Vra_day2_action_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.GetPolicyDay2ActionArgs;
    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.getPolicyDay2Action(GetPolicyDay2ActionArgs.builder()
                .id(var_.vra_day2_action_policy_id())
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: vra:getPolicyDay2Action
          arguments:
            id: ${var.vra_day2_action_policy_id}
    

    Day2 Action policy data source by name search:

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = vra.getPolicyDay2Action({
        search: _var.vra_day2_action_policy_search_name,
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.get_policy_day2_action(search=var["vra_day2_action_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.LookupPolicyDay2Action(ctx, &vra.LookupPolicyDay2ActionArgs{
    			Search: pulumi.StringRef(_var.Vra_day2_action_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.GetPolicyDay2Action.Invoke(new()
        {
            Search = @var.Vra_day2_action_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.GetPolicyDay2ActionArgs;
    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.getPolicyDay2Action(GetPolicyDay2ActionArgs.builder()
                .search(var_.vra_day2_action_policy_search_name())
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: vra:getPolicyDay2Action
          arguments:
            search: ${var.vra_day2_action_policy_search_name}
    

    Using getPolicyDay2Action

    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 getPolicyDay2Action(args: GetPolicyDay2ActionArgs, opts?: InvokeOptions): Promise<GetPolicyDay2ActionResult>
    function getPolicyDay2ActionOutput(args: GetPolicyDay2ActionOutputArgs, opts?: InvokeOptions): Output<GetPolicyDay2ActionResult>
    def get_policy_day2_action(id: Optional[str] = None,
                               search: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetPolicyDay2ActionResult
    def get_policy_day2_action_output(id: Optional[pulumi.Input[str]] = None,
                               search: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetPolicyDay2ActionResult]
    func LookupPolicyDay2Action(ctx *Context, args *LookupPolicyDay2ActionArgs, opts ...InvokeOption) (*LookupPolicyDay2ActionResult, error)
    func LookupPolicyDay2ActionOutput(ctx *Context, args *LookupPolicyDay2ActionOutputArgs, opts ...InvokeOption) LookupPolicyDay2ActionResultOutput

    > Note: This function is named LookupPolicyDay2Action in the Go SDK.

    public static class GetPolicyDay2Action 
    {
        public static Task<GetPolicyDay2ActionResult> InvokeAsync(GetPolicyDay2ActionArgs args, InvokeOptions? opts = null)
        public static Output<GetPolicyDay2ActionResult> Invoke(GetPolicyDay2ActionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPolicyDay2ActionResult> getPolicyDay2Action(GetPolicyDay2ActionArgs args, InvokeOptions options)
    public static Output<GetPolicyDay2ActionResult> getPolicyDay2Action(GetPolicyDay2ActionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vra:index/getPolicyDay2Action:getPolicyDay2Action
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The id of the policy instance.
    Search string

    Search criteria to narrow down the policy instance.

    Note: One of id or search must be specified.

    Id string
    The id of the policy instance.
    Search string

    Search criteria to narrow down the policy instance.

    Note: One of id or search must be specified.

    id String
    The id of the policy instance.
    search String

    Search criteria to narrow down the policy instance.

    Note: One of id or search must be specified.

    id string
    The id of the policy instance.
    search string

    Search criteria to narrow down the policy instance.

    Note: One of id or search must be specified.

    id str
    The id of the policy instance.
    search str

    Search criteria to narrow down the policy instance.

    Note: One of id or search must be specified.

    id String
    The id of the policy instance.
    search String

    Search criteria to narrow down the policy instance.

    Note: One of id or search must be specified.

    getPolicyDay2Action Result

    The following output properties are available:

    Actions List<string>
    List of allowed actions for authority/authorities.
    Authorities List<string>
    List of authorities that will be allowed to perform certain actions.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    The user the entity was created by.
    Criterias List<ImmutableDictionary<string, string>>
    The policy criteria.
    Description string
    A human-friendly description for the policy instance.
    EnforcementType string
    The type of enforcement for the policy.
    Id string
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    A human-friendly name used as an identifier for the policy instance.
    OrgId string
    The id of the organization this entity belongs to.
    ProjectCriterias List<ImmutableDictionary<string, string>>
    The project based criteria.
    ProjectId string
    The id of the project this entity belongs to.
    Search string
    Actions []string
    List of allowed actions for authority/authorities.
    Authorities []string
    List of authorities that will be allowed to perform certain actions.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy 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.
    EnforcementType string
    The type of enforcement for the policy.
    Id string
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    A human-friendly name used as an identifier for the policy instance.
    OrgId string
    The id of the organization this entity belongs to.
    ProjectCriterias []map[string]string
    The project based criteria.
    ProjectId string
    The id of the project this entity belongs to.
    Search string
    actions List<String>
    List of allowed actions for authority/authorities.
    authorities List<String>
    List of authorities that will be allowed to perform certain actions.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy 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.
    enforcementType String
    The type of enforcement for the policy.
    id String
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    A human-friendly name used as an identifier for the policy instance.
    orgId String
    The id of the organization this entity belongs to.
    projectCriterias List<Map<String,String>>
    The project based criteria.
    projectId String
    The id of the project this entity belongs to.
    search String
    actions string[]
    List of allowed actions for authority/authorities.
    authorities string[]
    List of authorities that will be allowed to perform certain actions.
    createdAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy 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.
    enforcementType string
    The type of enforcement for the policy.
    id string
    lastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy string
    The user the entity was last updated by.
    name string
    A human-friendly name used as an identifier for the policy instance.
    orgId string
    The id of the organization this entity belongs to.
    projectCriterias {[key: string]: string}[]
    The project based criteria.
    projectId string
    The id of the project this entity belongs to.
    search string
    actions Sequence[str]
    List of allowed actions for authority/authorities.
    authorities Sequence[str]
    List of authorities that will be allowed to perform certain actions.
    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_at str
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    last_updated_by str
    The user the entity was last updated by.
    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
    actions List<String>
    List of allowed actions for authority/authorities.
    authorities List<String>
    List of authorities that will be allowed to perform certain actions.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy 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.
    enforcementType String
    The type of enforcement for the policy.
    id String
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    A human-friendly name used as an identifier for the policy instance.
    orgId String
    The id of the organization this entity belongs to.
    projectCriterias List<Map<String>>
    The project based criteria.
    projectId 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.
    vra logo
    vra 0.13.0 published on Wednesday, May 14, 2025 by vmware