nutanix.TemplateGuestOsActionsV2
Explore with Pulumi AI
Performs Guest OS actions on given template. It Initiates, Completes and Cancels the Guest OS operation.
Example
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
const example_1 = new nutanix.TemplateGuestOsActionsV2("example-1", {
action: "initiate",
extId: "ab520e1d-4950-1db1-917f-a9e2ea35b8e3",
versionId: "c2c249b0-98a0-43fa-9ff6-dcde578d3936",
});
const example_2 = new nutanix.TemplateGuestOsActionsV2("example-2", {
action: "complete",
extId: "8a938cc5-282b-48c4-81be-de22de145d07",
isActiveVersion: "true",
versionDescription: "version desc",
versionName: "version_name",
});
const example_3 = new nutanix.TemplateGuestOsActionsV2("example-3", {
action: "cancel",
extId: "1cefd0f5-6d38-4c9b-a07c-bdd2db004224",
});
import pulumi
import pulumi_nutanix as nutanix
example_1 = nutanix.TemplateGuestOsActionsV2("example-1",
action="initiate",
ext_id="ab520e1d-4950-1db1-917f-a9e2ea35b8e3",
version_id="c2c249b0-98a0-43fa-9ff6-dcde578d3936")
example_2 = nutanix.TemplateGuestOsActionsV2("example-2",
action="complete",
ext_id="8a938cc5-282b-48c4-81be-de22de145d07",
is_active_version="true",
version_description="version desc",
version_name="version_name")
example_3 = nutanix.TemplateGuestOsActionsV2("example-3",
action="cancel",
ext_id="1cefd0f5-6d38-4c9b-a07c-bdd2db004224")
package main
import (
"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := nutanix.NewTemplateGuestOsActionsV2(ctx, "example-1", &nutanix.TemplateGuestOsActionsV2Args{
Action: pulumi.String("initiate"),
ExtId: pulumi.String("ab520e1d-4950-1db1-917f-a9e2ea35b8e3"),
VersionId: pulumi.String("c2c249b0-98a0-43fa-9ff6-dcde578d3936"),
})
if err != nil {
return err
}
_, err = nutanix.NewTemplateGuestOsActionsV2(ctx, "example-2", &nutanix.TemplateGuestOsActionsV2Args{
Action: pulumi.String("complete"),
ExtId: pulumi.String("8a938cc5-282b-48c4-81be-de22de145d07"),
IsActiveVersion: pulumi.String("true"),
VersionDescription: pulumi.String("version desc"),
VersionName: pulumi.String("version_name"),
})
if err != nil {
return err
}
_, err = nutanix.NewTemplateGuestOsActionsV2(ctx, "example-3", &nutanix.TemplateGuestOsActionsV2Args{
Action: pulumi.String("cancel"),
ExtId: pulumi.String("1cefd0f5-6d38-4c9b-a07c-bdd2db004224"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;
return await Deployment.RunAsync(() =>
{
var example_1 = new Nutanix.TemplateGuestOsActionsV2("example-1", new()
{
Action = "initiate",
ExtId = "ab520e1d-4950-1db1-917f-a9e2ea35b8e3",
VersionId = "c2c249b0-98a0-43fa-9ff6-dcde578d3936",
});
var example_2 = new Nutanix.TemplateGuestOsActionsV2("example-2", new()
{
Action = "complete",
ExtId = "8a938cc5-282b-48c4-81be-de22de145d07",
IsActiveVersion = "true",
VersionDescription = "version desc",
VersionName = "version_name",
});
var example_3 = new Nutanix.TemplateGuestOsActionsV2("example-3", new()
{
Action = "cancel",
ExtId = "1cefd0f5-6d38-4c9b-a07c-bdd2db004224",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.TemplateGuestOsActionsV2;
import com.pulumi.nutanix.TemplateGuestOsActionsV2Args;
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 example_1 = new TemplateGuestOsActionsV2("example-1", TemplateGuestOsActionsV2Args.builder()
.action("initiate")
.extId("ab520e1d-4950-1db1-917f-a9e2ea35b8e3")
.versionId("c2c249b0-98a0-43fa-9ff6-dcde578d3936")
.build());
var example_2 = new TemplateGuestOsActionsV2("example-2", TemplateGuestOsActionsV2Args.builder()
.action("complete")
.extId("8a938cc5-282b-48c4-81be-de22de145d07")
.isActiveVersion("true")
.versionDescription("version desc")
.versionName("version_name")
.build());
var example_3 = new TemplateGuestOsActionsV2("example-3", TemplateGuestOsActionsV2Args.builder()
.action("cancel")
.extId("1cefd0f5-6d38-4c9b-a07c-bdd2db004224")
.build());
}
}
resources:
example-1:
type: nutanix:TemplateGuestOsActionsV2
properties:
action: initiate
extId: ab520e1d-4950-1db1-917f-a9e2ea35b8e3
versionId: c2c249b0-98a0-43fa-9ff6-dcde578d3936
example-2:
type: nutanix:TemplateGuestOsActionsV2
properties:
action: complete
extId: 8a938cc5-282b-48c4-81be-de22de145d07
isActiveVersion: true
versionDescription: version desc
versionName: version_name
example-3:
type: nutanix:TemplateGuestOsActionsV2
properties:
action: cancel
extId: 1cefd0f5-6d38-4c9b-a07c-bdd2db004224
Create TemplateGuestOsActionsV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TemplateGuestOsActionsV2(name: string, args: TemplateGuestOsActionsV2Args, opts?: CustomResourceOptions);
@overload
def TemplateGuestOsActionsV2(resource_name: str,
args: TemplateGuestOsActionsV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def TemplateGuestOsActionsV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
ext_id: Optional[str] = None,
is_active_version: Optional[str] = None,
version_description: Optional[str] = None,
version_id: Optional[str] = None,
version_name: Optional[str] = None)
func NewTemplateGuestOsActionsV2(ctx *Context, name string, args TemplateGuestOsActionsV2Args, opts ...ResourceOption) (*TemplateGuestOsActionsV2, error)
public TemplateGuestOsActionsV2(string name, TemplateGuestOsActionsV2Args args, CustomResourceOptions? opts = null)
public TemplateGuestOsActionsV2(String name, TemplateGuestOsActionsV2Args args)
public TemplateGuestOsActionsV2(String name, TemplateGuestOsActionsV2Args args, CustomResourceOptions options)
type: nutanix:TemplateGuestOsActionsV2
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 TemplateGuestOsActionsV2Args
- 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 TemplateGuestOsActionsV2Args
- 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 TemplateGuestOsActionsV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TemplateGuestOsActionsV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TemplateGuestOsActionsV2Args
- 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 templateGuestOsActionsV2Resource = new Nutanix.TemplateGuestOsActionsV2("templateGuestOsActionsV2Resource", new()
{
Action = "string",
ExtId = "string",
IsActiveVersion = "string",
VersionDescription = "string",
VersionId = "string",
VersionName = "string",
});
example, err := nutanix.NewTemplateGuestOsActionsV2(ctx, "templateGuestOsActionsV2Resource", &nutanix.TemplateGuestOsActionsV2Args{
Action: pulumi.String("string"),
ExtId: pulumi.String("string"),
IsActiveVersion: pulumi.String("string"),
VersionDescription: pulumi.String("string"),
VersionId: pulumi.String("string"),
VersionName: pulumi.String("string"),
})
var templateGuestOsActionsV2Resource = new TemplateGuestOsActionsV2("templateGuestOsActionsV2Resource", TemplateGuestOsActionsV2Args.builder()
.action("string")
.extId("string")
.isActiveVersion("string")
.versionDescription("string")
.versionId("string")
.versionName("string")
.build());
template_guest_os_actions_v2_resource = nutanix.TemplateGuestOsActionsV2("templateGuestOsActionsV2Resource",
action="string",
ext_id="string",
is_active_version="string",
version_description="string",
version_id="string",
version_name="string")
const templateGuestOsActionsV2Resource = new nutanix.TemplateGuestOsActionsV2("templateGuestOsActionsV2Resource", {
action: "string",
extId: "string",
isActiveVersion: "string",
versionDescription: "string",
versionId: "string",
versionName: "string",
});
type: nutanix:TemplateGuestOsActionsV2
properties:
action: string
extId: string
isActiveVersion: string
versionDescription: string
versionId: string
versionName: string
TemplateGuestOsActionsV2 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 TemplateGuestOsActionsV2 resource accepts the following input properties:
- Action string
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- Ext
Id string - The identifier of a Template.
- Is
Active stringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- Version
Description string - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - Version
Id string - The identifier of a Template Version. Only applicable with
Initiate
action. - Version
Name string - The user defined name of a Template Version. Only applicable with
complete
action.
- Action string
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- Ext
Id string - The identifier of a Template.
- Is
Active stringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- Version
Description string - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - Version
Id string - The identifier of a Template Version. Only applicable with
Initiate
action. - Version
Name string - The user defined name of a Template Version. Only applicable with
complete
action.
- action String
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- ext
Id String - The identifier of a Template.
- is
Active StringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- version
Description String - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - version
Id String - The identifier of a Template Version. Only applicable with
Initiate
action. - version
Name String - The user defined name of a Template Version. Only applicable with
complete
action.
- action string
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- ext
Id string - The identifier of a Template.
- is
Active stringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- version
Description string - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - version
Id string - The identifier of a Template Version. Only applicable with
Initiate
action. - version
Name string - The user defined name of a Template Version. Only applicable with
complete
action.
- action str
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- ext_
id str - The identifier of a Template.
- is_
active_ strversion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- version_
description str - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - version_
id str - The identifier of a Template Version. Only applicable with
Initiate
action. - version_
name str - The user defined name of a Template Version. Only applicable with
complete
action.
- action String
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- ext
Id String - The identifier of a Template.
- is
Active StringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- version
Description String - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - version
Id String - The identifier of a Template Version. Only applicable with
Initiate
action. - version
Name String - The user defined name of a Template Version. Only applicable with
complete
action.
Outputs
All input properties are implicitly available as output properties. Additionally, the TemplateGuestOsActionsV2 resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing TemplateGuestOsActionsV2 Resource
Get an existing TemplateGuestOsActionsV2 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?: TemplateGuestOsActionsV2State, opts?: CustomResourceOptions): TemplateGuestOsActionsV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[str] = None,
ext_id: Optional[str] = None,
is_active_version: Optional[str] = None,
version_description: Optional[str] = None,
version_id: Optional[str] = None,
version_name: Optional[str] = None) -> TemplateGuestOsActionsV2
func GetTemplateGuestOsActionsV2(ctx *Context, name string, id IDInput, state *TemplateGuestOsActionsV2State, opts ...ResourceOption) (*TemplateGuestOsActionsV2, error)
public static TemplateGuestOsActionsV2 Get(string name, Input<string> id, TemplateGuestOsActionsV2State? state, CustomResourceOptions? opts = null)
public static TemplateGuestOsActionsV2 get(String name, Output<String> id, TemplateGuestOsActionsV2State state, CustomResourceOptions options)
resources: _: type: nutanix:TemplateGuestOsActionsV2 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.
- Action string
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- Ext
Id string - The identifier of a Template.
- Is
Active stringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- Version
Description string - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - Version
Id string - The identifier of a Template Version. Only applicable with
Initiate
action. - Version
Name string - The user defined name of a Template Version. Only applicable with
complete
action.
- Action string
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- Ext
Id string - The identifier of a Template.
- Is
Active stringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- Version
Description string - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - Version
Id string - The identifier of a Template Version. Only applicable with
Initiate
action. - Version
Name string - The user defined name of a Template Version. Only applicable with
complete
action.
- action String
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- ext
Id String - The identifier of a Template.
- is
Active StringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- version
Description String - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - version
Id String - The identifier of a Template Version. Only applicable with
Initiate
action. - version
Name String - The user defined name of a Template Version. Only applicable with
complete
action.
- action string
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- ext
Id string - The identifier of a Template.
- is
Active stringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- version
Description string - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - version
Id string - The identifier of a Template Version. Only applicable with
Initiate
action. - version
Name string - The user defined name of a Template Version. Only applicable with
complete
action.
- action str
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- ext_
id str - The identifier of a Template.
- is_
active_ strversion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- version_
description str - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - version_
id str - The identifier of a Template Version. Only applicable with
Initiate
action. - version_
name str - The user defined name of a Template Version. Only applicable with
complete
action.
- action String
- Actions to be performed. Acceptable values are "initiate", "complete", "cancel" .
- ext
Id String - The identifier of a Template.
- is
Active StringVersion Specify whether to mark the Template Version as active or not. The newly created Version during Template Creation, Updating or Guest OS Updating is set to Active by default unless specified otherwise. Default is true. Only applicable with
complete
action.See detailed information in Nutanix Template Guest OS Action Initiate V4. See detailed information in Nutanix Template Guest OS Action Complete V4. See detailed information in Nutanix Template Guest OS Action Cancel V4.
- version
Description String - The user defined description of a Template Version. (Required) Only applicable with
complete
action. - version
Id String - The identifier of a Template Version. Only applicable with
Initiate
action. - version
Name String - The user defined name of a Template Version. Only applicable with
complete
action.
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.