databricks.TagPolicy
Explore with Pulumi AI
Define tag policies to manage governed tags in your account.
Note This resource can only be used with an account-level provider!
Create TagPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new TagPolicy(name: string, args: TagPolicyArgs, opts?: CustomResourceOptions);
@overload
def TagPolicy(resource_name: str,
args: TagPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def TagPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
tag_key: Optional[str] = None,
description: Optional[str] = None,
values: Optional[Sequence[TagPolicyValueArgs]] = None,
workspace_id: Optional[str] = None)
func NewTagPolicy(ctx *Context, name string, args TagPolicyArgs, opts ...ResourceOption) (*TagPolicy, error)
public TagPolicy(string name, TagPolicyArgs args, CustomResourceOptions? opts = null)
public TagPolicy(String name, TagPolicyArgs args)
public TagPolicy(String name, TagPolicyArgs args, CustomResourceOptions options)
type: databricks:TagPolicy
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 TagPolicyArgs
- 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 TagPolicyArgs
- 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 TagPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TagPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TagPolicyArgs
- 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 tagPolicyResource = new Databricks.TagPolicy("tagPolicyResource", new()
{
TagKey = "string",
Description = "string",
Values = new[]
{
new Databricks.Inputs.TagPolicyValueArgs
{
Name = "string",
},
},
WorkspaceId = "string",
});
example, err := databricks.NewTagPolicy(ctx, "tagPolicyResource", &databricks.TagPolicyArgs{
TagKey: pulumi.String("string"),
Description: pulumi.String("string"),
Values: databricks.TagPolicyValueArray{
&databricks.TagPolicyValueArgs{
Name: pulumi.String("string"),
},
},
WorkspaceId: pulumi.String("string"),
})
var tagPolicyResource = new TagPolicy("tagPolicyResource", TagPolicyArgs.builder()
.tagKey("string")
.description("string")
.values(TagPolicyValueArgs.builder()
.name("string")
.build())
.workspaceId("string")
.build());
tag_policy_resource = databricks.TagPolicy("tagPolicyResource",
tag_key="string",
description="string",
values=[{
"name": "string",
}],
workspace_id="string")
const tagPolicyResource = new databricks.TagPolicy("tagPolicyResource", {
tagKey: "string",
description: "string",
values: [{
name: "string",
}],
workspaceId: "string",
});
type: databricks:TagPolicy
properties:
description: string
tagKey: string
values:
- name: string
workspaceId: string
TagPolicy 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 TagPolicy resource accepts the following input properties:
- Tag
Key string - Description string
- Values
List<Tag
Policy Value> - Workspace
Id string - Workspace ID of the resource
- Tag
Key string - Description string
- Values
[]Tag
Policy Value Args - Workspace
Id string - Workspace ID of the resource
- tag
Key String - description String
- values
List<Tag
Policy Value> - workspace
Id String - Workspace ID of the resource
- tag
Key string - description string
- values
Tag
Policy Value[] - workspace
Id string - Workspace ID of the resource
- tag_
key str - description str
- values
Sequence[Tag
Policy Value Args] - workspace_
id str - Workspace ID of the resource
- tag
Key String - description String
- values List<Property Map>
- workspace
Id String - Workspace ID of the resource
Outputs
All input properties are implicitly available as output properties. Additionally, the TagPolicy 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 TagPolicy Resource
Get an existing TagPolicy 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?: TagPolicyState, opts?: CustomResourceOptions): TagPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
tag_key: Optional[str] = None,
values: Optional[Sequence[TagPolicyValueArgs]] = None,
workspace_id: Optional[str] = None) -> TagPolicy
func GetTagPolicy(ctx *Context, name string, id IDInput, state *TagPolicyState, opts ...ResourceOption) (*TagPolicy, error)
public static TagPolicy Get(string name, Input<string> id, TagPolicyState? state, CustomResourceOptions? opts = null)
public static TagPolicy get(String name, Output<String> id, TagPolicyState state, CustomResourceOptions options)
resources: _: type: databricks:TagPolicy 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.
- Description string
- Tag
Key string - Values
List<Tag
Policy Value> - Workspace
Id string - Workspace ID of the resource
- Description string
- Tag
Key string - Values
[]Tag
Policy Value Args - Workspace
Id string - Workspace ID of the resource
- description String
- tag
Key String - values
List<Tag
Policy Value> - workspace
Id String - Workspace ID of the resource
- description string
- tag
Key string - values
Tag
Policy Value[] - workspace
Id string - Workspace ID of the resource
- description str
- tag_
key str - values
Sequence[Tag
Policy Value Args] - workspace_
id str - Workspace ID of the resource
- description String
- tag
Key String - values List<Property Map>
- workspace
Id String - Workspace ID of the resource
Supporting Types
TagPolicyValue, TagPolicyValueArgs
- Name string
- Name string
- name String
- name string
- name str
- name String
Import
As of Pulumi v1.5, resources can be imported through configuration.
hcl
import {
id = “tag_key”
to = databricks_tag_policy.this
}
If you are using an older version of Pulumi, import the resource using the pulumi import
command as follows:
$ pulumi import databricks:index/tagPolicy:TagPolicy databricks_tag_policy "tag_key"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricks
Terraform Provider.