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",
],
});
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",
])
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
})
}
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",
},
});
});
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());
}
}
resources:
nAME:
type: cyral:Datalabel
properties:
classificationRule:
ruleCode: some-rego-code
ruleStatus: ENABLED
ruleType: REGO
description: Customer name
tags:
- PII
- SENSITIVE
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 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 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 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 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 String
- The unique name of the resource.
- args 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",
},
});
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"),
},
})
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());
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"])
const datalabelResource = new cyral.Datalabel("datalabelResource", {
classificationRule: {
ruleCode: "string",
ruleStatus: "string",
ruleType: "string",
},
datalabelId: "string",
description: "string",
name: "string",
tags: ["string"],
});
type: cyral:Datalabel
properties:
classificationRule:
ruleCode: string
ruleStatus: string
ruleType: string
datalabelId: string
description: string
name: string
tags:
- string
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:
- Classification
Rule DatalabelClassification Rule - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- Datalabel
Id string - Description string
- Description of the data label.
- Name string
- Name of the data label.
- List<string>
- Tags that can be used to categorize data labels.
- Classification
Rule DatalabelClassification Rule Args - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- Datalabel
Id string - Description string
- Description of the data label.
- Name string
- Name of the data label.
- []string
- Tags that can be used to categorize data labels.
- classification
Rule DatalabelClassification Rule - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- datalabel
Id String - description String
- Description of the data label.
- name String
- Name of the data label.
- List<String>
- Tags that can be used to categorize data labels.
- classification
Rule DatalabelClassification Rule - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- datalabel
Id string - description string
- Description of the data label.
- name string
- Name of the data label.
- string[]
- Tags that can be used to categorize data labels.
- classification_
rule DatalabelClassification Rule Args - 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.
- Sequence[str]
- Tags that can be used to categorize data labels.
- classification
Rule Property Map - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- datalabel
Id String - description String
- Description of the data label.
- name String
- Name of the data label.
- 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
- 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.
- Classification
Rule DatalabelClassification Rule - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- Datalabel
Id string - Description string
- Description of the data label.
- Name string
- Name of the data label.
- List<string>
- Tags that can be used to categorize data labels.
- Classification
Rule DatalabelClassification Rule Args - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- Datalabel
Id string - Description string
- Description of the data label.
- Name string
- Name of the data label.
- []string
- Tags that can be used to categorize data labels.
- classification
Rule DatalabelClassification Rule - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- datalabel
Id String - description String
- Description of the data label.
- name String
- Name of the data label.
- List<String>
- Tags that can be used to categorize data labels.
- classification
Rule DatalabelClassification Rule - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- datalabel
Id string - description string
- Description of the data label.
- name string
- Name of the data label.
- string[]
- Tags that can be used to categorize data labels.
- classification_
rule DatalabelClassification Rule Args - 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.
- Sequence[str]
- Tags that can be used to categorize data labels.
- classification
Rule Property Map - Classification rules are used by the Automatic Data Map feature to automatically map data locations to labels.
- datalabel
Id String - description String
- Description of the data label.
- name String
- Name of the data label.
- List<String>
- Tags that can be used to categorize data labels.
Supporting Types
DatalabelClassificationRule, DatalabelClassificationRuleArgs
- Rule
Code string - Actual code of the classification rule. For example, this attribute may contain REGO code for
REGO
-type classification rules. - Rule
Status string - Status of the classification rule. List of supported values:
ENABLED
DISABLED
- Rule
Type string - Type of the classification rule. List of supported values:
UNKNOWN
REGO
- Rule
Code string - Actual code of the classification rule. For example, this attribute may contain REGO code for
REGO
-type classification rules. - Rule
Status string - Status of the classification rule. List of supported values:
ENABLED
DISABLED
- Rule
Type string - Type of the classification rule. List of supported values:
UNKNOWN
REGO
- rule
Code String - Actual code of the classification rule. For example, this attribute may contain REGO code for
REGO
-type classification rules. - rule
Status String - Status of the classification rule. List of supported values:
ENABLED
DISABLED
- rule
Type String - Type of the classification rule. List of supported values:
UNKNOWN
REGO
- rule
Code string - Actual code of the classification rule. For example, this attribute may contain REGO code for
REGO
-type classification rules. - rule
Status string - Status of the classification rule. List of supported values:
ENABLED
DISABLED
- rule
Type 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
- rule
Code String - Actual code of the classification rule. For example, this attribute may contain REGO code for
REGO
-type classification rules. - rule
Status String - Status of the classification rule. List of supported values:
ENABLED
DISABLED
- rule
Type 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.