oci.Identity.Tag
Explore with Pulumi AI
This resource provides the Tag resource in Oracle Cloud Infrastructure Identity service.
Creates a new tag in the specified tag namespace.
The tag requires either the OCID or the name of the tag namespace that will contain this tag definition.
You must specify a name for the tag, which must be unique across all tags in the tag namespace and cannot be changed. The name can contain any ASCII character except the space (_) or period (.) characters. Names are case insensitive. That means, for example, “myTag” and “mytag” are not allowed in the same namespace. If you specify a name that’s already in use in the tag namespace, a 409 error is returned.
The tag must have a description. It does not have to be unique, and you can change it with UpdateTag.
The tag must have a value type, which is specified with a validator. Tags can use either a static value or a list of possible values. Static values are entered by a user applying the tag to a resource. Lists are created by you and the user must apply a value from the list. Lists are validiated.
- If no
validator
is set, the user applying the tag to a resource can type in a static value or leave the tag value empty. - If a
validator
is set, the user applying the tag to a resource must select from a list of values that you supply with EnumTagDefinitionValidator.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testTag = new oci.identity.Tag("test_tag", {
description: tagDescription,
name: tagName,
tagNamespaceId: testTagNamespace.id,
definedTags: {
"Operations.CostCenter": "42",
},
freeformTags: {
Department: "Finance",
},
isCostTracking: tagIsCostTracking,
validator: {
validatorType: tagValidatorValidatorType,
values: tagValidatorValues,
},
isRetired: false,
});
import pulumi
import pulumi_oci as oci
test_tag = oci.identity.Tag("test_tag",
description=tag_description,
name=tag_name,
tag_namespace_id=test_tag_namespace["id"],
defined_tags={
"Operations.CostCenter": "42",
},
freeform_tags={
"Department": "Finance",
},
is_cost_tracking=tag_is_cost_tracking,
validator=oci.identity.TagValidatorArgs(
validator_type=tag_validator_validator_type,
values=tag_validator_values,
),
is_retired=False)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Identity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Identity.NewTag(ctx, "test_tag", &Identity.TagArgs{
Description: pulumi.Any(tagDescription),
Name: pulumi.Any(tagName),
TagNamespaceId: pulumi.Any(testTagNamespace.Id),
DefinedTags: pulumi.Map{
"Operations.CostCenter": pulumi.Any("42"),
},
FreeformTags: pulumi.Map{
"Department": pulumi.Any("Finance"),
},
IsCostTracking: pulumi.Any(tagIsCostTracking),
Validator: &identity.TagValidatorArgs{
ValidatorType: pulumi.Any(tagValidatorValidatorType),
Values: pulumi.Any(tagValidatorValues),
},
IsRetired: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testTag = new Oci.Identity.Tag("test_tag", new()
{
Description = tagDescription,
Name = tagName,
TagNamespaceId = testTagNamespace.Id,
DefinedTags =
{
{ "Operations.CostCenter", "42" },
},
FreeformTags =
{
{ "Department", "Finance" },
},
IsCostTracking = tagIsCostTracking,
Validator = new Oci.Identity.Inputs.TagValidatorArgs
{
ValidatorType = tagValidatorValidatorType,
Values = tagValidatorValues,
},
IsRetired = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Identity.Tag;
import com.pulumi.oci.Identity.TagArgs;
import com.pulumi.oci.Identity.inputs.TagValidatorArgs;
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 testTag = new Tag("testTag", TagArgs.builder()
.description(tagDescription)
.name(tagName)
.tagNamespaceId(testTagNamespace.id())
.definedTags(Map.of("Operations.CostCenter", "42"))
.freeformTags(Map.of("Department", "Finance"))
.isCostTracking(tagIsCostTracking)
.validator(TagValidatorArgs.builder()
.validatorType(tagValidatorValidatorType)
.values(tagValidatorValues)
.build())
.isRetired(false)
.build());
}
}
resources:
testTag:
type: oci:Identity:Tag
name: test_tag
properties:
description: ${tagDescription}
name: ${tagName}
tagNamespaceId: ${testTagNamespace.id}
definedTags:
Operations.CostCenter: '42'
freeformTags:
Department: Finance
isCostTracking: ${tagIsCostTracking}
validator:
validatorType: ${tagValidatorValidatorType}
values: ${tagValidatorValues}
isRetired: false
Create Tag Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Tag(name: string, args: TagArgs, opts?: CustomResourceOptions);
@overload
def Tag(resource_name: str,
args: TagArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Tag(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
tag_namespace_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, Any]] = None,
freeform_tags: Optional[Mapping[str, Any]] = None,
is_cost_tracking: Optional[bool] = None,
is_retired: Optional[bool] = None,
name: Optional[str] = None,
validator: Optional[_identity.TagValidatorArgs] = None)
func NewTag(ctx *Context, name string, args TagArgs, opts ...ResourceOption) (*Tag, error)
public Tag(string name, TagArgs args, CustomResourceOptions? opts = null)
type: oci:Identity:Tag
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 TagArgs
- 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 TagArgs
- 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 TagArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TagArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TagArgs
- 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 tagResource = new Oci.Identity.Tag("tagResource", new()
{
Description = "string",
TagNamespaceId = "string",
DefinedTags =
{
{ "string", "any" },
},
FreeformTags =
{
{ "string", "any" },
},
IsCostTracking = false,
IsRetired = false,
Name = "string",
Validator = new Oci.Identity.Inputs.TagValidatorArgs
{
ValidatorType = "string",
Values = new[]
{
"string",
},
},
});
example, err := Identity.NewTag(ctx, "tagResource", &Identity.TagArgs{
Description: pulumi.String("string"),
TagNamespaceId: pulumi.String("string"),
DefinedTags: pulumi.Map{
"string": pulumi.Any("any"),
},
FreeformTags: pulumi.Map{
"string": pulumi.Any("any"),
},
IsCostTracking: pulumi.Bool(false),
IsRetired: pulumi.Bool(false),
Name: pulumi.String("string"),
Validator: &identity.TagValidatorArgs{
ValidatorType: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
})
var tagResource = new Tag("tagResource", TagArgs.builder()
.description("string")
.tagNamespaceId("string")
.definedTags(Map.of("string", "any"))
.freeformTags(Map.of("string", "any"))
.isCostTracking(false)
.isRetired(false)
.name("string")
.validator(TagValidatorArgs.builder()
.validatorType("string")
.values("string")
.build())
.build());
tag_resource = oci.identity.Tag("tagResource",
description="string",
tag_namespace_id="string",
defined_tags={
"string": "any",
},
freeform_tags={
"string": "any",
},
is_cost_tracking=False,
is_retired=False,
name="string",
validator=oci.identity.TagValidatorArgs(
validator_type="string",
values=["string"],
))
const tagResource = new oci.identity.Tag("tagResource", {
description: "string",
tagNamespaceId: "string",
definedTags: {
string: "any",
},
freeformTags: {
string: "any",
},
isCostTracking: false,
isRetired: false,
name: "string",
validator: {
validatorType: "string",
values: ["string"],
},
});
type: oci:Identity:Tag
properties:
definedTags:
string: any
description: string
freeformTags:
string: any
isCostTracking: false
isRetired: false
name: string
tagNamespaceId: string
validator:
validatorType: string
values:
- string
Tag Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The Tag resource accepts the following input properties:
- Description string
- (Updatable) The description you assign to the tag during creation.
- Tag
Namespace stringId - The OCID of the tag namespace.
- Dictionary<string, object>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Dictionary<string, object>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Is
Cost boolTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- Is
Retired bool (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Name string
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- Validator
Tag
Validator (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- Description string
- (Updatable) The description you assign to the tag during creation.
- Tag
Namespace stringId - The OCID of the tag namespace.
- map[string]interface{}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- map[string]interface{}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Is
Cost boolTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- Is
Retired bool (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Name string
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- Validator
Tag
Validator Args (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- description String
- (Updatable) The description you assign to the tag during creation.
- tag
Namespace StringId - The OCID of the tag namespace.
- Map<String,Object>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Map<String,Object>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Cost BooleanTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- is
Retired Boolean (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name String
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- validator
Tag
Validator (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- description string
- (Updatable) The description you assign to the tag during creation.
- tag
Namespace stringId - The OCID of the tag namespace.
- {[key: string]: any}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- {[key: string]: any}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Cost booleanTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- is
Retired boolean (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name string
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- validator
Tag
Validator (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- description str
- (Updatable) The description you assign to the tag during creation.
- tag_
namespace_ strid - The OCID of the tag namespace.
- Mapping[str, Any]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Mapping[str, Any]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is_
cost_ booltracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- is_
retired bool (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name str
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- validator
identity.
Tag Validator Args (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- description String
- (Updatable) The description you assign to the tag during creation.
- tag
Namespace StringId - The OCID of the tag namespace.
- Map<Any>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Map<Any>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Cost BooleanTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- is
Retired Boolean (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name String
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- validator Property Map
(Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
Outputs
All input properties are implicitly available as output properties. Additionally, the Tag resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - Time
Created string - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Id string
- The provider-assigned unique ID for this managed resource.
- State string
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - Time
Created string - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - time
Created String - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- id string
- The provider-assigned unique ID for this managed resource.
- state string
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - time
Created string - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- id str
- The provider-assigned unique ID for this managed resource.
- state str
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - time_
created str - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- id String
- The provider-assigned unique ID for this managed resource.
- state String
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - time
Created String - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
Look up Existing Tag Resource
Get an existing Tag 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?: TagState, opts?: CustomResourceOptions): Tag
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
defined_tags: Optional[Mapping[str, Any]] = None,
description: Optional[str] = None,
freeform_tags: Optional[Mapping[str, Any]] = None,
is_cost_tracking: Optional[bool] = None,
is_retired: Optional[bool] = None,
name: Optional[str] = None,
state: Optional[str] = None,
tag_namespace_id: Optional[str] = None,
time_created: Optional[str] = None,
validator: Optional[_identity.TagValidatorArgs] = None) -> Tag
func GetTag(ctx *Context, name string, id IDInput, state *TagState, opts ...ResourceOption) (*Tag, error)
public static Tag Get(string name, Input<string> id, TagState? state, CustomResourceOptions? opts = null)
public static Tag get(String name, Output<String> id, TagState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Dictionary<string, object>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- (Updatable) The description you assign to the tag during creation.
- Dictionary<string, object>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Is
Cost boolTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- Is
Retired bool (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Name string
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- State string
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - Tag
Namespace stringId - The OCID of the tag namespace.
- Time
Created string - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Validator
Tag
Validator (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- map[string]interface{}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- (Updatable) The description you assign to the tag during creation.
- map[string]interface{}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- Is
Cost boolTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- Is
Retired bool (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- Name string
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- State string
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - Tag
Namespace stringId - The OCID of the tag namespace.
- Time
Created string - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Validator
Tag
Validator Args (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- Map<String,Object>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- (Updatable) The description you assign to the tag during creation.
- Map<String,Object>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Cost BooleanTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- is
Retired Boolean (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name String
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- state String
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - tag
Namespace StringId - The OCID of the tag namespace.
- time
Created String - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- validator
Tag
Validator (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- {[key: string]: any}
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description string
- (Updatable) The description you assign to the tag during creation.
- {[key: string]: any}
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Cost booleanTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- is
Retired boolean (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name string
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- state string
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - tag
Namespace stringId - The OCID of the tag namespace.
- time
Created string - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- validator
Tag
Validator (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- Mapping[str, Any]
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description str
- (Updatable) The description you assign to the tag during creation.
- Mapping[str, Any]
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is_
cost_ booltracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- is_
retired bool (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name str
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- state str
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - tag_
namespace_ strid - The OCID of the tag namespace.
- time_
created str - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- validator
identity.
Tag Validator Args (Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
- Map<Any>
- (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- (Updatable) The description you assign to the tag during creation.
- Map<Any>
- (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:
{"Department": "Finance"}
- is
Cost BooleanTracking - (Updatable) Indicates whether the tag is enabled for cost tracking.
- is
Retired Boolean (Updatable) Indicates whether the tag is retired. See Retiring Key Definitions and Namespace Definitions.
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
- name String
- The name you assign to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed.
- state String
- The tag's current state. After creating a tag, make sure its
lifecycleState
is ACTIVE before using it. After retiring a tag, make sure itslifecycleState
is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag'slifecycleState
changes from DELETING to DELETED. - tag
Namespace StringId - The OCID of the tag namespace.
- time
Created String - Date and time the tag was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- validator Property Map
(Updatable) Validates a definedTag value. Each validator performs validation steps in addition to the standard validation for definedTag values. For more information, see Limits on Tags.
If you define a validator after a value has been set for a defined tag, then any updates that attempt to change the value must pass the additional validation defined by the current rule. Previously set values (even those that would fail the current validation) are not updated. You can still update other attributes to resources that contain a non-valid defined tag.
To clear the validator call UpdateTag with DefaultTagDefinitionValidator.
Supporting Types
TagValidator, TagValidatorArgs
- Validator
Type string - (Updatable) Specifies the type of validation: a static value (no validation) or a list.
- Values List<string>
- (Updatable) The list of allowed values for a definedTag value.
- Validator
Type string - (Updatable) Specifies the type of validation: a static value (no validation) or a list.
- Values []string
- (Updatable) The list of allowed values for a definedTag value.
- validator
Type String - (Updatable) Specifies the type of validation: a static value (no validation) or a list.
- values List<String>
- (Updatable) The list of allowed values for a definedTag value.
- validator
Type string - (Updatable) Specifies the type of validation: a static value (no validation) or a list.
- values string[]
- (Updatable) The list of allowed values for a definedTag value.
- validator_
type str - (Updatable) Specifies the type of validation: a static value (no validation) or a list.
- values Sequence[str]
- (Updatable) The list of allowed values for a definedTag value.
- validator
Type String - (Updatable) Specifies the type of validation: a static value (no validation) or a list.
- values List<String>
- (Updatable) The list of allowed values for a definedTag value.
Import
Tags can be imported using the tagNamespaceId
and tagName
, e.g.
$ pulumi import oci:Identity/tag:Tag test_tag "tagNamespaces/{tagNamespaceId}/tags/{tagName}"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.