cost_tracking_tags
Creates, updates, deletes, gets or lists a cost_tracking_tags resource.
Overview​
| Name | cost_tracking_tags |
| Type | Resource |
| Id | oci.identity.cost_tracking_tags |
Fields​
The following fields are returned by SELECT queries:
- list
A tag definition that belongs to a specific tag namespace. "Defined tags" must be set up in your tenancy before<br />you can apply them to resources.<br />For more information, see [Managing Tags and Tag Namespaces](/Content/Identity/Concepts/taggingoverview.htm).<br /><br />Warning: Oracle recommends that you avoid using any confidential information when you supply string values<br />using the API.<br />
| Name | Datatype | Description |
|---|---|---|
id | string | The OCID of the tag definition. |
name | string | The name assigned to the tag during creation. This is the tag key definition. The name must be unique within the tag namespace and cannot be changed. |
compartmentId | string | The OCID of the compartment that contains the tag definition. |
definedTags | object | Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](/Content/General/Concepts/resourcetags.htm). Example: {"Operations": {"CostCenter": "42"}} |
description | string | The description you assign to the tag. |
freeformTags | object | 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](/Content/General/Concepts/resourcetags.htm). Example: {"Department": "Finance"} |
isCostTracking | boolean | Indicates whether the tag is enabled for cost tracking. |
isRetired | boolean | Indicates whether the tag is retired. See [Retiring Key Definitions and Namespace Definitions](/Content/Tagging/Tasks/managingtagsandtagnamespaces.htm#retiringkeys). |
lifecycleState | 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 its lifecycleState is INACTIVE before using it. If you delete a tag, you cannot delete another tag until the deleted tag's lifecycleState changes from DELETING to DELETED. (ACTIVE, INACTIVE, DELETING, DELETED) |
systemTags | object | The system tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud": {"free-tier-retained": "true"}} |
tagNamespaceId | string | The OCID of the namespace that contains the tag definition. |
tagNamespaceName | string | The name of the tag namespace that contains the tag definition. |
timeCreated | string (date-time) | Date and time the tag was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z |
validator | object | 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](/Content/Tagging/Concepts/taggingoverview.htm#limits). 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](/api/#/en/identity/latest/datatypes/DefaultTagDefinitionValidator). |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | compartmentId, region | page, limit | Lists all the tags enabled for cost-tracking in the specified tenancy. For information about<br />cost-tracking tags, see [Using Cost-tracking Tags](/Content/Tagging/Tasks/usingcosttrackingtags.htm).<br /> |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
compartmentId | string | The OCID of the compartment (remember that the tenancy is simply the root compartment). |
region | string | OCI region identifier (e.g. us-ashburn-1, ap-sydney-1); resolves from OCI_REGION when not supplied in the query. (default: us-ashburn-1, x-stackQL-envVar: OCI_REGION) |
limit | integer | The maximum number of items to return in a paginated "List" call. |
page | string | The value of the opc-next-page response header from the previous "List" call. |
SELECT examples​
- list
Lists all the tags enabled for cost-tracking in the specified tenancy. For information about<br />cost-tracking tags, see [Using Cost-tracking Tags](/Content/Tagging/Tasks/usingcosttrackingtags.htm).<br />
SELECT
id,
name,
compartmentId,
definedTags,
description,
freeformTags,
isCostTracking,
isRetired,
lifecycleState,
systemTags,
tagNamespaceId,
tagNamespaceName,
timeCreated,
validator
FROM oci.identity.cost_tracking_tags
WHERE compartmentId = '{{ compartmentId }}' -- required
AND region = '{{ region }}' -- required
AND page = '{{ page }}'
AND limit = '{{ limit }}'
;