1. Packages
  2. Cyral Provider
  3. API Docs
  4. Datalabel
cyral 4.16.3 published on Monday, Apr 14, 2025 by cyralinc

cyral.Datalabel

Explore with Pulumi AI

Manages data labels. Data labels are part of the Cyral Data Map.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cyral from "@pulumi/cyral";

const nAME = new cyral.Datalabel("nAME", {
    classificationRule: {
        ruleCode: "some-rego-code",
        ruleStatus: "ENABLED",
        ruleType: "REGO",
    },
    description: "Customer name",
    tags: [
        "PII",
        "SENSITIVE",
    ],
});
Copy
import pulumi
import pulumi_cyral as cyral

n_ame = cyral.Datalabel("nAME",
    classification_rule={
        "rule_code": "some-rego-code",
        "rule_status": "ENABLED",
        "rule_type": "REGO",
    },
    description="Customer name",
    tags=[
        "PII",
        "SENSITIVE",
    ])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cyral/v4/cyral"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cyral.NewDatalabel(ctx, "nAME", &cyral.DatalabelArgs{
			ClassificationRule: &cyral.DatalabelClassificationRuleArgs{
				RuleCode:   pulumi.String("some-rego-code"),
				RuleStatus: pulumi.String("ENABLED"),
				RuleType:   pulumi.String("REGO"),
			},
			Description: pulumi.String("Customer name"),
			Tags: pulumi.StringArray{
				pulumi.String("PII"),
				pulumi.String("SENSITIVE"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cyral = Pulumi.Cyral;

return await Deployment.RunAsync(() => 
{
    var nAME = new Cyral.Datalabel("nAME", new()
    {
        ClassificationRule = new Cyral.Inputs.DatalabelClassificationRuleArgs
        {
            RuleCode = "some-rego-code",
            RuleStatus = "ENABLED",
            RuleType = "REGO",
        },
        Description = "Customer name",
        Tags = new[]
        {
            "PII",
            "SENSITIVE",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cyral.Datalabel;
import com.pulumi.cyral.DatalabelArgs;
import com.pulumi.cyral.inputs.DatalabelClassificationRuleArgs;
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 nAME = new Datalabel("nAME", DatalabelArgs.builder()
            .classificationRule(DatalabelClassificationRuleArgs.builder()
                .ruleCode("some-rego-code")
                .ruleStatus("ENABLED")
                .ruleType("REGO")
                .build())
            .description("Customer name")
            .tags(            
                "PII",
                "SENSITIVE")
            .build());

    }
}
Copy
resources:
  nAME:
    type: cyral:Datalabel
    properties:
      classificationRule:
        ruleCode: some-rego-code
        ruleStatus: ENABLED
        ruleType: REGO
      description: Customer name
      tags:
        - PII
        - SENSITIVE
Copy

Create Datalabel Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Datalabel(name: string, args?: DatalabelArgs, opts?: CustomResourceOptions);
@overload
def Datalabel(resource_name: str,
              args: Optional[DatalabelArgs] = None,
              opts: Optional[ResourceOptions] = None)

@overload
def Datalabel(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              classification_rule: Optional[DatalabelClassificationRuleArgs] = None,
              datalabel_id: Optional[str] = None,
              description: Optional[str] = None,
              name: Optional[str] = None,
              tags: Optional[Sequence[str]] = None)
func NewDatalabel(ctx *Context, name string, args *DatalabelArgs, opts ...ResourceOption) (*Datalabel, error)
public Datalabel(string name, DatalabelArgs? args = null, CustomResourceOptions? opts = null)
public Datalabel(String name, DatalabelArgs args)
public Datalabel(String name, DatalabelArgs args, CustomResourceOptions options)
type: cyral:Datalabel
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args DatalabelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args DatalabelArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args DatalabelArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args DatalabelArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DatalabelArgs
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 datalabelResource = new Cyral.Datalabel("datalabelResource", new()
{
    ClassificationRule = new Cyral.Inputs.DatalabelClassificationRuleArgs
    {
        RuleCode = "string",
        RuleStatus = "string",
        RuleType = "string",
    },
    DatalabelId = "string",
    Description = "string",
    Name = "string",
    Tags = new[]
    {
        "string",
    },
});
Copy
example, err := cyral.NewDatalabel(ctx, "datalabelResource", &cyral.DatalabelArgs{
	ClassificationRule: &cyral.DatalabelClassificationRuleArgs{
		RuleCode:   pulumi.String("string"),
		RuleStatus: pulumi.String("string"),
		RuleType:   pulumi.String("string"),
	},
	DatalabelId: pulumi.String("string"),
	Description: pulumi.String("string"),
	Name:        pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
})
Copy
var datalabelResource = new Datalabel("datalabelResource", DatalabelArgs.builder()
    .classificationRule(DatalabelClassificationRuleArgs.builder()
        .ruleCode("string")
        .ruleStatus("string")
        .ruleType("string")
        .build())
    .datalabelId("string")
    .description("string")
    .name("string")
    .tags("string")
    .build());
Copy
datalabel_resource = cyral.Datalabel("datalabelResource",
    classification_rule={
        "rule_code": "string",
        "rule_status": "string",
        "rule_type": "string",
    },
    datalabel_id="string",
    description="string",
    name="string",
    tags=["string"])
Copy
const datalabelResource = new cyral.Datalabel("datalabelResource", {
    classificationRule: {
        ruleCode: "string",
        ruleStatus: "string",
        ruleType: "string",
    },
    datalabelId: "string",
    description: "string",
    name: "string",
    tags: ["string"],
});
Copy
type: cyral:Datalabel
properties:
    classificationRule:
        ruleCode: string
        ruleStatus: string
        ruleType: string
    datalabelId: string
    description: string
    name: string
    tags:
        - string
Copy

Datalabel 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 Datalabel resource accepts the following input properties:

ClassificationRule DatalabelClassificationRule
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
DatalabelId string
Description string
Description of the data label.
Name string
Name of the data label.
Tags List<string>
Tags that can be used to categorize data labels.
ClassificationRule DatalabelClassificationRuleArgs
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
DatalabelId string
Description string
Description of the data label.
Name string
Name of the data label.
Tags []string
Tags that can be used to categorize data labels.
classificationRule DatalabelClassificationRule
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
datalabelId String
description String
Description of the data label.
name String
Name of the data label.
tags List<String>
Tags that can be used to categorize data labels.
classificationRule DatalabelClassificationRule
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
datalabelId string
description string
Description of the data label.
name string
Name of the data label.
tags string[]
Tags that can be used to categorize data labels.
classification_rule DatalabelClassificationRuleArgs
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
datalabel_id str
description str
Description of the data label.
name str
Name of the data label.
tags Sequence[str]
Tags that can be used to categorize data labels.
classificationRule Property Map
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
datalabelId String
description String
Description of the data label.
name String
Name of the data label.
tags List<String>
Tags that can be used to categorize data labels.

Outputs

All input properties are implicitly available as output properties. Additionally, the Datalabel 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 Datalabel Resource

Get an existing Datalabel 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?: DatalabelState, opts?: CustomResourceOptions): Datalabel
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        classification_rule: Optional[DatalabelClassificationRuleArgs] = None,
        datalabel_id: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        tags: Optional[Sequence[str]] = None) -> Datalabel
func GetDatalabel(ctx *Context, name string, id IDInput, state *DatalabelState, opts ...ResourceOption) (*Datalabel, error)
public static Datalabel Get(string name, Input<string> id, DatalabelState? state, CustomResourceOptions? opts = null)
public static Datalabel get(String name, Output<String> id, DatalabelState state, CustomResourceOptions options)
resources:  _:    type: cyral:Datalabel    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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.
The following state arguments are supported:
ClassificationRule DatalabelClassificationRule
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
DatalabelId string
Description string
Description of the data label.
Name string
Name of the data label.
Tags List<string>
Tags that can be used to categorize data labels.
ClassificationRule DatalabelClassificationRuleArgs
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
DatalabelId string
Description string
Description of the data label.
Name string
Name of the data label.
Tags []string
Tags that can be used to categorize data labels.
classificationRule DatalabelClassificationRule
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
datalabelId String
description String
Description of the data label.
name String
Name of the data label.
tags List<String>
Tags that can be used to categorize data labels.
classificationRule DatalabelClassificationRule
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
datalabelId string
description string
Description of the data label.
name string
Name of the data label.
tags string[]
Tags that can be used to categorize data labels.
classification_rule DatalabelClassificationRuleArgs
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
datalabel_id str
description str
Description of the data label.
name str
Name of the data label.
tags Sequence[str]
Tags that can be used to categorize data labels.
classificationRule Property Map
Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
datalabelId String
description String
Description of the data label.
name String
Name of the data label.
tags List<String>
Tags that can be used to categorize data labels.

Supporting Types

DatalabelClassificationRule
, DatalabelClassificationRuleArgs

RuleCode string
Actual code of the classification rule. For example, this attribute may contain REGO code for REGO-type classification rules.
RuleStatus string
Status of the classification rule. List of supported values:

  • ENABLED
  • DISABLED
RuleType string
Type of the classification rule. List of supported values:

  • UNKNOWN
  • REGO
RuleCode string
Actual code of the classification rule. For example, this attribute may contain REGO code for REGO-type classification rules.
RuleStatus string
Status of the classification rule. List of supported values:

  • ENABLED
  • DISABLED
RuleType string
Type of the classification rule. List of supported values:

  • UNKNOWN
  • REGO
ruleCode String
Actual code of the classification rule. For example, this attribute may contain REGO code for REGO-type classification rules.
ruleStatus String
Status of the classification rule. List of supported values:

  • ENABLED
  • DISABLED
ruleType String
Type of the classification rule. List of supported values:

  • UNKNOWN
  • REGO
ruleCode string
Actual code of the classification rule. For example, this attribute may contain REGO code for REGO-type classification rules.
ruleStatus string
Status of the classification rule. List of supported values:

  • ENABLED
  • DISABLED
ruleType string
Type of the classification rule. List of supported values:

  • UNKNOWN
  • REGO
rule_code str
Actual code of the classification rule. For example, this attribute may contain REGO code for REGO-type classification rules.
rule_status str
Status of the classification rule. List of supported values:

  • ENABLED
  • DISABLED
rule_type str
Type of the classification rule. List of supported values:

  • UNKNOWN
  • REGO
ruleCode String
Actual code of the classification rule. For example, this attribute may contain REGO code for REGO-type classification rules.
ruleStatus String
Status of the classification rule. List of supported values:

  • ENABLED
  • DISABLED
ruleType String
Type of the classification rule. List of supported values:

  • UNKNOWN
  • REGO

Package Details

Repository
cyral cyralinc/terraform-provider-cyral
License
Notes
This Pulumi package is based on the cyral Terraform Provider.