vra.PolicyDay2Action
Explore with Pulumi AI
Creates a Day2 Action policy resource to manage what actions are available for deployed resources.
Example Usage
S
The following example shows how to create a day2 action policy resource:
import * as pulumi from "@pulumi/pulumi";
import * as vra from "@pulumi/vra";
const policyDay2Action = new vra.PolicyDay2Action("policyDay2Action", {
actions: [
"Deployment.ChangeLease",
"Deployment.EditDeployment",
],
authorities: [
"USER:admin",
"GROUP:vraadamadmins@",
],
description: "Approval Policy [terraform-day2-action-policy] created by Terraform",
enforcementType: "HARD",
});
import pulumi
import pulumi_vra as vra
policy_day2_action = vra.PolicyDay2Action("policyDay2Action",
actions=[
"Deployment.ChangeLease",
"Deployment.EditDeployment",
],
authorities=[
"USER:admin",
"GROUP:vraadamadmins@",
],
description="Approval Policy [terraform-day2-action-policy] created by Terraform",
enforcement_type="HARD")
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.NewPolicyDay2Action(ctx, "policyDay2Action", &vra.PolicyDay2ActionArgs{
Actions: pulumi.StringArray{
pulumi.String("Deployment.ChangeLease"),
pulumi.String("Deployment.EditDeployment"),
},
Authorities: pulumi.StringArray{
pulumi.String("USER:admin"),
pulumi.String("GROUP:vraadamadmins@"),
},
Description: pulumi.String("Approval Policy [terraform-day2-action-policy] created by Terraform"),
EnforcementType: pulumi.String("HARD"),
})
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 policyDay2Action = new Vra.PolicyDay2Action("policyDay2Action", new()
{
Actions = new[]
{
"Deployment.ChangeLease",
"Deployment.EditDeployment",
},
Authorities = new[]
{
"USER:admin",
"GROUP:vraadamadmins@",
},
Description = "Approval Policy [terraform-day2-action-policy] created by Terraform",
EnforcementType = "HARD",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vra.PolicyDay2Action;
import com.pulumi.vra.PolicyDay2ActionArgs;
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) {
var policyDay2Action = new PolicyDay2Action("policyDay2Action", PolicyDay2ActionArgs.builder()
.actions(
"Deployment.ChangeLease",
"Deployment.EditDeployment")
.authorities(
"USER:admin",
"GROUP:vraadamadmins@")
.description("Approval Policy [terraform-day2-action-policy] created by Terraform")
.enforcementType("HARD")
.build());
}
}
resources:
policyDay2Action:
type: vra:PolicyDay2Action
properties:
actions:
- Deployment.ChangeLease
- Deployment.EditDeployment
authorities:
- USER:admin
- GROUP:vraadamadmins@
description: Approval Policy [terraform-day2-action-policy] created by Terraform
enforcementType: HARD
Create PolicyDay2Action Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PolicyDay2Action(name: string, args: PolicyDay2ActionArgs, opts?: CustomResourceOptions);
@overload
def PolicyDay2Action(resource_name: str,
args: PolicyDay2ActionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PolicyDay2Action(resource_name: str,
opts: Optional[ResourceOptions] = None,
authorities: Optional[Sequence[str]] = None,
enforcement_type: Optional[str] = None,
actions: Optional[Sequence[str]] = None,
criterias: Optional[Sequence[Mapping[str, str]]] = None,
description: Optional[str] = None,
name: Optional[str] = None,
policy_day2_action_id: Optional[str] = None,
project_criterias: Optional[Sequence[Mapping[str, str]]] = None,
project_id: Optional[str] = None)
func NewPolicyDay2Action(ctx *Context, name string, args PolicyDay2ActionArgs, opts ...ResourceOption) (*PolicyDay2Action, error)
public PolicyDay2Action(string name, PolicyDay2ActionArgs args, CustomResourceOptions? opts = null)
public PolicyDay2Action(String name, PolicyDay2ActionArgs args)
public PolicyDay2Action(String name, PolicyDay2ActionArgs args, CustomResourceOptions options)
type: vra:PolicyDay2Action
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 PolicyDay2ActionArgs
- 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 PolicyDay2ActionArgs
- 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 PolicyDay2ActionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PolicyDay2ActionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PolicyDay2ActionArgs
- 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 policyDay2ActionResource = new Vra.PolicyDay2Action("policyDay2ActionResource", new()
{
Authorities = new[]
{
"string",
},
EnforcementType = "string",
Actions = new[]
{
"string",
},
Criterias = new[]
{
{
{ "string", "string" },
},
},
Description = "string",
Name = "string",
PolicyDay2ActionId = "string",
ProjectCriterias = new[]
{
{
{ "string", "string" },
},
},
ProjectId = "string",
});
example, err := vra.NewPolicyDay2Action(ctx, "policyDay2ActionResource", &vra.PolicyDay2ActionArgs{
Authorities: pulumi.StringArray{
pulumi.String("string"),
},
EnforcementType: pulumi.String("string"),
Actions: pulumi.StringArray{
pulumi.String("string"),
},
Criterias: pulumi.StringMapArray{
pulumi.StringMap{
"string": pulumi.String("string"),
},
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
PolicyDay2ActionId: pulumi.String("string"),
ProjectCriterias: pulumi.StringMapArray{
pulumi.StringMap{
"string": pulumi.String("string"),
},
},
ProjectId: pulumi.String("string"),
})
var policyDay2ActionResource = new PolicyDay2Action("policyDay2ActionResource", PolicyDay2ActionArgs.builder()
.authorities("string")
.enforcementType("string")
.actions("string")
.criterias(Map.of("string", "string"))
.description("string")
.name("string")
.policyDay2ActionId("string")
.projectCriterias(Map.of("string", "string"))
.projectId("string")
.build());
policy_day2_action_resource = vra.PolicyDay2Action("policyDay2ActionResource",
authorities=["string"],
enforcement_type="string",
actions=["string"],
criterias=[{
"string": "string",
}],
description="string",
name="string",
policy_day2_action_id="string",
project_criterias=[{
"string": "string",
}],
project_id="string")
const policyDay2ActionResource = new vra.PolicyDay2Action("policyDay2ActionResource", {
authorities: ["string"],
enforcementType: "string",
actions: ["string"],
criterias: [{
string: "string",
}],
description: "string",
name: "string",
policyDay2ActionId: "string",
projectCriterias: [{
string: "string",
}],
projectId: "string",
});
type: vra:PolicyDay2Action
properties:
actions:
- string
authorities:
- string
criterias:
- string: string
description: string
enforcementType: string
name: string
policyDay2ActionId: string
projectCriterias:
- string: string
projectId: string
PolicyDay2Action 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 PolicyDay2Action resource accepts the following input properties:
- List<string>
- List of authorities that will be allowed to perform certain actions.
- Enforcement
Type string - The type of enforcement for the policy. Supported values:
HARD
,SOFT
. - Actions List<string>
- List of allowed actions for authority/authorities.
- Criterias
List<Immutable
Dictionary<string, string>> - The policy criteria.
- Description string
- A human-friendly description for the policy instance.
- Name string
- A human-friendly name used as an identifier for the policy instance.
- Policy
Day2Action stringId - Project
Criterias List<ImmutableDictionary<string, string>> - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - Project
Id string - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- []string
- List of authorities that will be allowed to perform certain actions.
- Enforcement
Type string - The type of enforcement for the policy. Supported values:
HARD
,SOFT
. - Actions []string
- List of allowed actions for authority/authorities.
- Criterias []map[string]string
- The policy criteria.
- Description string
- A human-friendly description for the policy instance.
- Name string
- A human-friendly name used as an identifier for the policy instance.
- Policy
Day2Action stringId - Project
Criterias []map[string]string - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - Project
Id string - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- List<String>
- List of authorities that will be allowed to perform certain actions.
- enforcement
Type String - The type of enforcement for the policy. Supported values:
HARD
,SOFT
. - actions List<String>
- List of allowed actions for authority/authorities.
- criterias List<Map<String,String>>
- The policy criteria.
- description String
- A human-friendly description for the policy instance.
- name String
- A human-friendly name used as an identifier for the policy instance.
- policy
Day2Action StringId - project
Criterias List<Map<String,String>> - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - project
Id String - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- string[]
- List of authorities that will be allowed to perform certain actions.
- enforcement
Type string - The type of enforcement for the policy. Supported values:
HARD
,SOFT
. - actions string[]
- List of allowed actions for authority/authorities.
- criterias {[key: string]: string}[]
- The policy criteria.
- description string
- A human-friendly description for the policy instance.
- name string
- A human-friendly name used as an identifier for the policy instance.
- policy
Day2Action stringId - project
Criterias {[key: string]: string}[] - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - project
Id string - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- Sequence[str]
- List of authorities that will be allowed to perform certain actions.
- enforcement_
type str - The type of enforcement for the policy. Supported values:
HARD
,SOFT
. - actions Sequence[str]
- List of allowed actions for authority/authorities.
- criterias Sequence[Mapping[str, str]]
- The policy criteria.
- description str
- A human-friendly description for the policy instance.
- name str
- A human-friendly name used as an identifier for the policy instance.
- policy_
day2_ straction_ id - project_
criterias Sequence[Mapping[str, str]] - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - project_
id str - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- List<String>
- List of authorities that will be allowed to perform certain actions.
- enforcement
Type String - The type of enforcement for the policy. Supported values:
HARD
,SOFT
. - actions List<String>
- List of allowed actions for authority/authorities.
- criterias List<Map<String>>
- The policy criteria.
- description String
- A human-friendly description for the policy instance.
- name String
- A human-friendly name used as an identifier for the policy instance.
- policy
Day2Action StringId - project
Criterias List<Map<String>> - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - project
Id String - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the PolicyDay2Action resource produces the following output properties:
- 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.
- Id string
- The provider-assigned unique ID for this managed resource.
- 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.
- Org
Id string - The id of the organization this entity belongs to.
- 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.
- Id string
- The provider-assigned unique ID for this managed resource.
- 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.
- Org
Id string - The id of the organization this entity belongs to.
- 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.
- id String
- The provider-assigned unique ID for this managed resource.
- 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.
- org
Id String - The id of the organization this entity belongs to.
- 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.
- id string
- The provider-assigned unique ID for this managed resource.
- 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.
- org
Id string - The id of the organization this entity belongs to.
- 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.
- id str
- The provider-assigned unique ID for this managed resource.
- 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.
- org_
id str - The id of the organization this entity belongs to.
- 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.
- id String
- The provider-assigned unique ID for this managed resource.
- 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.
- org
Id String - The id of the organization this entity belongs to.
Look up Existing PolicyDay2Action Resource
Get an existing PolicyDay2Action 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?: PolicyDay2ActionState, opts?: CustomResourceOptions): PolicyDay2Action
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[str]] = None,
authorities: Optional[Sequence[str]] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
criterias: Optional[Sequence[Mapping[str, str]]] = None,
description: Optional[str] = None,
enforcement_type: Optional[str] = None,
last_updated_at: Optional[str] = None,
last_updated_by: Optional[str] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
policy_day2_action_id: Optional[str] = None,
project_criterias: Optional[Sequence[Mapping[str, str]]] = None,
project_id: Optional[str] = None) -> PolicyDay2Action
func GetPolicyDay2Action(ctx *Context, name string, id IDInput, state *PolicyDay2ActionState, opts ...ResourceOption) (*PolicyDay2Action, error)
public static PolicyDay2Action Get(string name, Input<string> id, PolicyDay2ActionState? state, CustomResourceOptions? opts = null)
public static PolicyDay2Action get(String name, Output<String> id, PolicyDay2ActionState state, CustomResourceOptions options)
resources: _: type: vra:PolicyDay2Action 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.
- Actions List<string>
- List of allowed actions for authority/authorities.
- List<string>
- List of authorities that will be allowed to perform certain actions.
- 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. Supported values:
HARD
,SOFT
. - 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.
- 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.
- Policy
Day2Action stringId - Project
Criterias List<ImmutableDictionary<string, string>> - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - Project
Id string - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- Actions []string
- List of allowed actions for authority/authorities.
- []string
- List of authorities that will be allowed to perform certain actions.
- 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. Supported values:
HARD
,SOFT
. - 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.
- 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.
- Policy
Day2Action stringId - Project
Criterias []map[string]string - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - Project
Id string - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- actions List<String>
- List of allowed actions for authority/authorities.
- List<String>
- List of authorities that will be allowed to perform certain actions.
- 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. Supported values:
HARD
,SOFT
. - 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.
- 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.
- policy
Day2Action StringId - project
Criterias List<Map<String,String>> - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - project
Id String - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- actions string[]
- List of allowed actions for authority/authorities.
- string[]
- List of authorities that will be allowed to perform certain actions.
- 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. Supported values:
HARD
,SOFT
. - 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.
- 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.
- policy
Day2Action stringId - project
Criterias {[key: string]: string}[] - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - project
Id string - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- actions Sequence[str]
- List of allowed actions for authority/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. Supported values:
HARD
,SOFT
. - 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.
- 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.
- policy_
day2_ straction_ id - project_
criterias Sequence[Mapping[str, str]] - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - project_
id str - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
- actions List<String>
- List of allowed actions for authority/authorities.
- List<String>
- List of authorities that will be allowed to perform certain actions.
- 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. Supported values:
HARD
,SOFT
. - 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.
- 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.
- policy
Day2Action StringId - project
Criterias List<Map<String>> - The project based criteria. Updating this argument triggers a recreation of the resource. It cannot be specified when
project_id
is set. - project
Id String - The id of the project this entity belongs to. Updating this argument triggers a recreation of the resource.
Import
To import an existing Day2 Action policy, use the id
as in the following example:
$ pulumi import vra:index/policyDay2Action:PolicyDay2Action policy_day2_action "b8c9cb7f-1faf-474d-8b9b-27ba3f1c7930"`
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vra vmware/terraform-provider-vra
- License
- Notes
- This Pulumi package is based on the
vra
Terraform Provider.