import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * Create, Update and Delete category (key - value pair). * * ## Example * * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as nutanix from "@pierskarsenbarg/nutanix"; * * const example = new nutanix.CategoryV2("example", { * key: "category_example_key", * value: "category_example_value", * description: "category example description", * }); * ``` * * * ## Import * * This helps to manage existing entities which are not created through terraform. Category (key - value pair) can be imported using the `UUID` (ext_id in v4 terms). eg, * * `terraform import nutanix_category_v2. * ` * * Note: * We have two resources separately for category key (nutanix_category_key) and value (nutanix_category_key). Using v4 API, `nutanix.CategoryV2` represents category key value pair as one entity. * * Please use datasources (nutanix_categories_v2) to fetch uuids (ext_id) of all category key valye pairs to import them. * * See detailed information in [Nutanix Create Category v4](https://developers.nutanix.com/api-reference?namespace=prism&version=v4.3#tag/Categories/operation/createCategory). */ export declare class CategoryV2 extends pulumi.CustomResource { /** * Get an existing CategoryV2 resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CategoryV2State, opts?: pulumi.CustomResourceOptions): CategoryV2; /** * Returns true if the given object is an instance of CategoryV2. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CategoryV2; /** * This field gives basic information about resources that are associated with the category. * The results present under this field summarize the counts of various kinds of resources associated with the category. * For more detailed information about the UUIDs of the resources, please look into the field detailedAssociations. * This field will be ignored, if given in the payload of updateCategoryById or createCategory APIs. * This field will not be present by default in listCategories API, unless the parameter $expand=associations is present in the URL. */ readonly associations: pulumi.Output; /** * -(Optional) A string consisting of the description of the category as defined by the user. * Description can be optionally provided in the payload of createCategory and updateCategoryById APIs. * Description field can be updated through updateCategoryById API. * The server does not validate this value nor does it enforce the uniqueness or any other constraints. * It is the responsibility of the user to ensure that any semantic or syntactic constraints are retained when mutating this field. */ readonly description: pulumi.Output; /** * This field gives detailed information about the resources which are associated with the category. * The results present under this field contain the UUIDs of the entities and policies of various kinds associated with the category. * This field will be ignored, if given in the payload of updateCategoryById or createCategory APIs. * This field will not be present by default in listCategories or getCategoryById APIs, unless the parameter $expand=detailedAssociations is present in the URL. */ readonly detailedAssociations: pulumi.Output; /** * -(Required) The key of a category when it is represented in key:value format. Constraints applicable when field is given in the payload during create and update: * * - A string of maxlength of 64 * - Character at the start cannot be `$` * - Character `/` is not allowed anywhere. * * It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs. * This field can't be updated through `updateCategoryById` API. */ readonly key: pulumi.Output; /** * -(Optional) This field contains the UUID of a user who owns the category. * This field will be ignored if given in the payload of createCategory API. Hence, when a category is created, the logged-in user automatically becomes the owner of the category. * This field can be updated through updateCategoryById API, in which case, should be provided, UUID of a valid user is present in the system. * Validity of the user UUID can be checked by invoking the API: authn/users/{extId} in the 'Identity and Access Management' or 'IAM' namespace. * It is used for enabling RBAC access to self-owned categories. */ readonly ownerUuid: pulumi.Output; /** * -(Required) Denotes the type of a category. * Valid values are: * - `SYSTEM` Predefined categories contained in the system to be used by workflows visible in the UI that involve categories. System-defined categories can't be created through the Categories API. They are predefined in a configuration file and are created at PC boot-up time. System-defined categories can't be updated or deleted. * - `INTERNAL` Predefined categories contained in the system to be used by internal services, APIs and workflows that involve categories. These categories will not be visible in the UI. However, these categories will be returned in the response of `listCategories` and `getCategoryById` APIs, and are available for filtering as well. Internal categories can't be created through the Categories API. They are predefined in a configuration file and are created at PC boot-up time. Internal categories can't be updated or deleted. * - `USER` These categories get created by users through the invocation of `createCategory` API. User-defined categories can be updated or deleted after creation. */ readonly type: pulumi.Output; /** * -(Required) The value of a category when it is represented in key:value format. Constraints applicable when field is given in the payload during create and update: * * - A string of maxlength of 64 * - Character at the start cannot be `$` * - Character `/` is not allowed anywhere. * * It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs. * This field can't be updated through `updateCategoryById` API. * Updating the value will not change the extId of the category. */ readonly value: pulumi.Output; /** * Create a CategoryV2 resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CategoryV2Args, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CategoryV2 resources. */ export interface CategoryV2State { /** * This field gives basic information about resources that are associated with the category. * The results present under this field summarize the counts of various kinds of resources associated with the category. * For more detailed information about the UUIDs of the resources, please look into the field detailedAssociations. * This field will be ignored, if given in the payload of updateCategoryById or createCategory APIs. * This field will not be present by default in listCategories API, unless the parameter $expand=associations is present in the URL. */ associations?: pulumi.Input[] | undefined>; /** * -(Optional) A string consisting of the description of the category as defined by the user. * Description can be optionally provided in the payload of createCategory and updateCategoryById APIs. * Description field can be updated through updateCategoryById API. * The server does not validate this value nor does it enforce the uniqueness or any other constraints. * It is the responsibility of the user to ensure that any semantic or syntactic constraints are retained when mutating this field. */ description?: pulumi.Input; /** * This field gives detailed information about the resources which are associated with the category. * The results present under this field contain the UUIDs of the entities and policies of various kinds associated with the category. * This field will be ignored, if given in the payload of updateCategoryById or createCategory APIs. * This field will not be present by default in listCategories or getCategoryById APIs, unless the parameter $expand=detailedAssociations is present in the URL. */ detailedAssociations?: pulumi.Input[] | undefined>; /** * -(Required) The key of a category when it is represented in key:value format. Constraints applicable when field is given in the payload during create and update: * * - A string of maxlength of 64 * - Character at the start cannot be `$` * - Character `/` is not allowed anywhere. * * It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs. * This field can't be updated through `updateCategoryById` API. */ key?: pulumi.Input; /** * -(Optional) This field contains the UUID of a user who owns the category. * This field will be ignored if given in the payload of createCategory API. Hence, when a category is created, the logged-in user automatically becomes the owner of the category. * This field can be updated through updateCategoryById API, in which case, should be provided, UUID of a valid user is present in the system. * Validity of the user UUID can be checked by invoking the API: authn/users/{extId} in the 'Identity and Access Management' or 'IAM' namespace. * It is used for enabling RBAC access to self-owned categories. */ ownerUuid?: pulumi.Input; /** * -(Required) Denotes the type of a category. * Valid values are: * - `SYSTEM` Predefined categories contained in the system to be used by workflows visible in the UI that involve categories. System-defined categories can't be created through the Categories API. They are predefined in a configuration file and are created at PC boot-up time. System-defined categories can't be updated or deleted. * - `INTERNAL` Predefined categories contained in the system to be used by internal services, APIs and workflows that involve categories. These categories will not be visible in the UI. However, these categories will be returned in the response of `listCategories` and `getCategoryById` APIs, and are available for filtering as well. Internal categories can't be created through the Categories API. They are predefined in a configuration file and are created at PC boot-up time. Internal categories can't be updated or deleted. * - `USER` These categories get created by users through the invocation of `createCategory` API. User-defined categories can be updated or deleted after creation. */ type?: pulumi.Input; /** * -(Required) The value of a category when it is represented in key:value format. Constraints applicable when field is given in the payload during create and update: * * - A string of maxlength of 64 * - Character at the start cannot be `$` * - Character `/` is not allowed anywhere. * * It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs. * This field can't be updated through `updateCategoryById` API. * Updating the value will not change the extId of the category. */ value?: pulumi.Input; } /** * The set of arguments for constructing a CategoryV2 resource. */ export interface CategoryV2Args { /** * -(Optional) A string consisting of the description of the category as defined by the user. * Description can be optionally provided in the payload of createCategory and updateCategoryById APIs. * Description field can be updated through updateCategoryById API. * The server does not validate this value nor does it enforce the uniqueness or any other constraints. * It is the responsibility of the user to ensure that any semantic or syntactic constraints are retained when mutating this field. */ description?: pulumi.Input; /** * -(Required) The key of a category when it is represented in key:value format. Constraints applicable when field is given in the payload during create and update: * * - A string of maxlength of 64 * - Character at the start cannot be `$` * - Character `/` is not allowed anywhere. * * It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs. * This field can't be updated through `updateCategoryById` API. */ key: pulumi.Input; /** * -(Optional) This field contains the UUID of a user who owns the category. * This field will be ignored if given in the payload of createCategory API. Hence, when a category is created, the logged-in user automatically becomes the owner of the category. * This field can be updated through updateCategoryById API, in which case, should be provided, UUID of a valid user is present in the system. * Validity of the user UUID can be checked by invoking the API: authn/users/{extId} in the 'Identity and Access Management' or 'IAM' namespace. * It is used for enabling RBAC access to self-owned categories. */ ownerUuid?: pulumi.Input; /** * -(Required) Denotes the type of a category. * Valid values are: * - `SYSTEM` Predefined categories contained in the system to be used by workflows visible in the UI that involve categories. System-defined categories can't be created through the Categories API. They are predefined in a configuration file and are created at PC boot-up time. System-defined categories can't be updated or deleted. * - `INTERNAL` Predefined categories contained in the system to be used by internal services, APIs and workflows that involve categories. These categories will not be visible in the UI. However, these categories will be returned in the response of `listCategories` and `getCategoryById` APIs, and are available for filtering as well. Internal categories can't be created through the Categories API. They are predefined in a configuration file and are created at PC boot-up time. Internal categories can't be updated or deleted. * - `USER` These categories get created by users through the invocation of `createCategory` API. User-defined categories can be updated or deleted after creation. */ type?: pulumi.Input; /** * -(Required) The value of a category when it is represented in key:value format. Constraints applicable when field is given in the payload during create and update: * * - A string of maxlength of 64 * - Character at the start cannot be `$` * - Character `/` is not allowed anywhere. * * It is a mandatory field in the payload of `createCategory` and `updateCategoryById` APIs. * This field can't be updated through `updateCategoryById` API. * Updating the value will not change the extId of the category. */ value: pulumi.Input; } //# sourceMappingURL=categoryV2.d.ts.map