nutanix.AssociateCategoryToVolumeGroupV2
Explore with Pulumi AI
Provides a resource to Creates a new Volume Disk.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as nutanix from "@pierskarsenbarg/nutanix";
// Associate categories to volume group
const example = new nutanix.AssociateCategoryToVolumeGroupV2("example", {
categories: [
{
extId: "85e68112-5b2b-4220-bc8d-e529e4bf420e",
},
{
extId: "45588de3-7c18-4230-a147-7e26ad92d8a6",
},
{
extId: "1c6638f2-5215-4086-8f21-a30e75cb8068",
},
],
extId: "f0c0a4ac-c734-4770-b5d7-eca6793eeeb7",
});
// Volume Group extId
import pulumi
import pulumi_nutanix as nutanix
# Associate categories to volume group
example = nutanix.AssociateCategoryToVolumeGroupV2("example",
categories=[
{
"ext_id": "85e68112-5b2b-4220-bc8d-e529e4bf420e",
},
{
"ext_id": "45588de3-7c18-4230-a147-7e26ad92d8a6",
},
{
"ext_id": "1c6638f2-5215-4086-8f21-a30e75cb8068",
},
],
ext_id="f0c0a4ac-c734-4770-b5d7-eca6793eeeb7")
# Volume Group extId
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 {
// Associate categories to volume group
_, err := nutanix.NewAssociateCategoryToVolumeGroupV2(ctx, "example", &nutanix.AssociateCategoryToVolumeGroupV2Args{
Categories: nutanix.AssociateCategoryToVolumeGroupV2CategoryArray{
&nutanix.AssociateCategoryToVolumeGroupV2CategoryArgs{
ExtId: pulumi.String("85e68112-5b2b-4220-bc8d-e529e4bf420e"),
},
&nutanix.AssociateCategoryToVolumeGroupV2CategoryArgs{
ExtId: pulumi.String("45588de3-7c18-4230-a147-7e26ad92d8a6"),
},
&nutanix.AssociateCategoryToVolumeGroupV2CategoryArgs{
ExtId: pulumi.String("1c6638f2-5215-4086-8f21-a30e75cb8068"),
},
},
ExtId: pulumi.String("f0c0a4ac-c734-4770-b5d7-eca6793eeeb7"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Nutanix = PiersKarsenbarg.Nutanix;
return await Deployment.RunAsync(() =>
{
// Associate categories to volume group
var example = new Nutanix.AssociateCategoryToVolumeGroupV2("example", new()
{
Categories = new[]
{
new Nutanix.Inputs.AssociateCategoryToVolumeGroupV2CategoryArgs
{
ExtId = "85e68112-5b2b-4220-bc8d-e529e4bf420e",
},
new Nutanix.Inputs.AssociateCategoryToVolumeGroupV2CategoryArgs
{
ExtId = "45588de3-7c18-4230-a147-7e26ad92d8a6",
},
new Nutanix.Inputs.AssociateCategoryToVolumeGroupV2CategoryArgs
{
ExtId = "1c6638f2-5215-4086-8f21-a30e75cb8068",
},
},
ExtId = "f0c0a4ac-c734-4770-b5d7-eca6793eeeb7",
});
// Volume Group extId
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.nutanix.AssociateCategoryToVolumeGroupV2;
import com.pulumi.nutanix.AssociateCategoryToVolumeGroupV2Args;
import com.pulumi.nutanix.inputs.AssociateCategoryToVolumeGroupV2CategoryArgs;
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) {
// Associate categories to volume group
var example = new AssociateCategoryToVolumeGroupV2("example", AssociateCategoryToVolumeGroupV2Args.builder()
.categories(
AssociateCategoryToVolumeGroupV2CategoryArgs.builder()
.extId("85e68112-5b2b-4220-bc8d-e529e4bf420e")
.build(),
AssociateCategoryToVolumeGroupV2CategoryArgs.builder()
.extId("45588de3-7c18-4230-a147-7e26ad92d8a6")
.build(),
AssociateCategoryToVolumeGroupV2CategoryArgs.builder()
.extId("1c6638f2-5215-4086-8f21-a30e75cb8068")
.build())
.extId("f0c0a4ac-c734-4770-b5d7-eca6793eeeb7")
.build());
// Volume Group extId
}
}
resources:
# Associate categories to volume group
example:
type: nutanix:AssociateCategoryToVolumeGroupV2
properties:
categories:
- extId: 85e68112-5b2b-4220-bc8d-e529e4bf420e
- extId: 45588de3-7c18-4230-a147-7e26ad92d8a6
- extId: 1c6638f2-5215-4086-8f21-a30e75cb8068
extId: f0c0a4ac-c734-4770-b5d7-eca6793eeeb7
Create AssociateCategoryToVolumeGroupV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AssociateCategoryToVolumeGroupV2(name: string, args: AssociateCategoryToVolumeGroupV2Args, opts?: CustomResourceOptions);
@overload
def AssociateCategoryToVolumeGroupV2(resource_name: str,
args: AssociateCategoryToVolumeGroupV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def AssociateCategoryToVolumeGroupV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
ext_id: Optional[str] = None,
categories: Optional[Sequence[AssociateCategoryToVolumeGroupV2CategoryArgs]] = None)
func NewAssociateCategoryToVolumeGroupV2(ctx *Context, name string, args AssociateCategoryToVolumeGroupV2Args, opts ...ResourceOption) (*AssociateCategoryToVolumeGroupV2, error)
public AssociateCategoryToVolumeGroupV2(string name, AssociateCategoryToVolumeGroupV2Args args, CustomResourceOptions? opts = null)
public AssociateCategoryToVolumeGroupV2(String name, AssociateCategoryToVolumeGroupV2Args args)
public AssociateCategoryToVolumeGroupV2(String name, AssociateCategoryToVolumeGroupV2Args args, CustomResourceOptions options)
type: nutanix:AssociateCategoryToVolumeGroupV2
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 AssociateCategoryToVolumeGroupV2Args
- 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 AssociateCategoryToVolumeGroupV2Args
- 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 AssociateCategoryToVolumeGroupV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AssociateCategoryToVolumeGroupV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AssociateCategoryToVolumeGroupV2Args
- 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 associateCategoryToVolumeGroupV2Resource = new Nutanix.AssociateCategoryToVolumeGroupV2("associateCategoryToVolumeGroupV2Resource", new()
{
ExtId = "string",
Categories = new[]
{
new Nutanix.Inputs.AssociateCategoryToVolumeGroupV2CategoryArgs
{
ExtId = "string",
EntityType = "string",
Name = "string",
Uris = new[]
{
"string",
},
},
},
});
example, err := nutanix.NewAssociateCategoryToVolumeGroupV2(ctx, "associateCategoryToVolumeGroupV2Resource", &nutanix.AssociateCategoryToVolumeGroupV2Args{
ExtId: pulumi.String("string"),
Categories: nutanix.AssociateCategoryToVolumeGroupV2CategoryArray{
&nutanix.AssociateCategoryToVolumeGroupV2CategoryArgs{
ExtId: pulumi.String("string"),
EntityType: pulumi.String("string"),
Name: pulumi.String("string"),
Uris: pulumi.StringArray{
pulumi.String("string"),
},
},
},
})
var associateCategoryToVolumeGroupV2Resource = new AssociateCategoryToVolumeGroupV2("associateCategoryToVolumeGroupV2Resource", AssociateCategoryToVolumeGroupV2Args.builder()
.extId("string")
.categories(AssociateCategoryToVolumeGroupV2CategoryArgs.builder()
.extId("string")
.entityType("string")
.name("string")
.uris("string")
.build())
.build());
associate_category_to_volume_group_v2_resource = nutanix.AssociateCategoryToVolumeGroupV2("associateCategoryToVolumeGroupV2Resource",
ext_id="string",
categories=[{
"ext_id": "string",
"entity_type": "string",
"name": "string",
"uris": ["string"],
}])
const associateCategoryToVolumeGroupV2Resource = new nutanix.AssociateCategoryToVolumeGroupV2("associateCategoryToVolumeGroupV2Resource", {
extId: "string",
categories: [{
extId: "string",
entityType: "string",
name: "string",
uris: ["string"],
}],
});
type: nutanix:AssociateCategoryToVolumeGroupV2
properties:
categories:
- entityType: string
extId: string
name: string
uris:
- string
extId: string
AssociateCategoryToVolumeGroupV2 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 AssociateCategoryToVolumeGroupV2 resource accepts the following input properties:
- Ext
Id string - Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Associate Category To Volume Group V2Category> - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- Ext
Id string - Categories
[]Associate
Category To Volume Group V2Category Args - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- ext
Id String - categories
List<Associate
Category To Volume Group V2Category> - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- ext
Id string - categories
Associate
Category To Volume Group V2Category[] - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- ext_
id str - categories
Sequence[Associate
Category To Volume Group V2Category Args] - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- ext
Id String - categories List<Property Map>
- -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
Outputs
All input properties are implicitly available as output properties. Additionally, the AssociateCategoryToVolumeGroupV2 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 AssociateCategoryToVolumeGroupV2 Resource
Get an existing AssociateCategoryToVolumeGroupV2 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?: AssociateCategoryToVolumeGroupV2State, opts?: CustomResourceOptions): AssociateCategoryToVolumeGroupV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
categories: Optional[Sequence[AssociateCategoryToVolumeGroupV2CategoryArgs]] = None,
ext_id: Optional[str] = None) -> AssociateCategoryToVolumeGroupV2
func GetAssociateCategoryToVolumeGroupV2(ctx *Context, name string, id IDInput, state *AssociateCategoryToVolumeGroupV2State, opts ...ResourceOption) (*AssociateCategoryToVolumeGroupV2, error)
public static AssociateCategoryToVolumeGroupV2 Get(string name, Input<string> id, AssociateCategoryToVolumeGroupV2State? state, CustomResourceOptions? opts = null)
public static AssociateCategoryToVolumeGroupV2 get(String name, Output<String> id, AssociateCategoryToVolumeGroupV2State state, CustomResourceOptions options)
resources: _: type: nutanix:AssociateCategoryToVolumeGroupV2 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.
- Categories
List<Piers
Karsenbarg. Nutanix. Inputs. Associate Category To Volume Group V2Category> - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- Ext
Id string
- Categories
[]Associate
Category To Volume Group V2Category Args - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- Ext
Id string
- categories
List<Associate
Category To Volume Group V2Category> - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- ext
Id String
- categories
Associate
Category To Volume Group V2Category[] - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- ext
Id string
- categories
Sequence[Associate
Category To Volume Group V2Category Args] - -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- ext_
id str
- categories List<Property Map>
- -(Required) The category to be associated/disassociated with the Volume Group. This is a mandatory field.
- ext
Id String
Supporting Types
AssociateCategoryToVolumeGroupV2Category, AssociateCategoryToVolumeGroupV2CategoryArgs
- Ext
Id string - -(Required) The external identifier of the category.
- Entity
Type string -(Optional) Type of entity that's represented by this reference. Default value is "CATEGORY". Valid values are:
- "CATEGORY".
See detailed information in Nutanix Associate/Disassociate category to/from a Volume Group V4.
- Name string
- -(Optional) Name of entity that's represented by this reference
- Uris List<string>
- -(Optional) URI of entities that's represented by this reference.
- Ext
Id string - -(Required) The external identifier of the category.
- Entity
Type string -(Optional) Type of entity that's represented by this reference. Default value is "CATEGORY". Valid values are:
- "CATEGORY".
See detailed information in Nutanix Associate/Disassociate category to/from a Volume Group V4.
- Name string
- -(Optional) Name of entity that's represented by this reference
- Uris []string
- -(Optional) URI of entities that's represented by this reference.
- ext
Id String - -(Required) The external identifier of the category.
- entity
Type String -(Optional) Type of entity that's represented by this reference. Default value is "CATEGORY". Valid values are:
- "CATEGORY".
See detailed information in Nutanix Associate/Disassociate category to/from a Volume Group V4.
- name String
- -(Optional) Name of entity that's represented by this reference
- uris List<String>
- -(Optional) URI of entities that's represented by this reference.
- ext
Id string - -(Required) The external identifier of the category.
- entity
Type string -(Optional) Type of entity that's represented by this reference. Default value is "CATEGORY". Valid values are:
- "CATEGORY".
See detailed information in Nutanix Associate/Disassociate category to/from a Volume Group V4.
- name string
- -(Optional) Name of entity that's represented by this reference
- uris string[]
- -(Optional) URI of entities that's represented by this reference.
- ext_
id str - -(Required) The external identifier of the category.
- entity_
type str -(Optional) Type of entity that's represented by this reference. Default value is "CATEGORY". Valid values are:
- "CATEGORY".
See detailed information in Nutanix Associate/Disassociate category to/from a Volume Group V4.
- name str
- -(Optional) Name of entity that's represented by this reference
- uris Sequence[str]
- -(Optional) URI of entities that's represented by this reference.
- ext
Id String - -(Required) The external identifier of the category.
- entity
Type String -(Optional) Type of entity that's represented by this reference. Default value is "CATEGORY". Valid values are:
- "CATEGORY".
See detailed information in Nutanix Associate/Disassociate category to/from a Volume Group V4.
- name String
- -(Optional) Name of entity that's represented by this reference
- uris List<String>
- -(Optional) URI of entities that's represented by this reference.
Package Details
- Repository
- nutanix pierskarsenbarg/pulumi-nutanix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
nutanix
Terraform Provider.