Skip to content
v2.278.0

CfnVariableProps Struct ​

Properties for defining a CfnVariable.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_frauddetector as frauddetector } from 'aws-cdk-lib';
const cfnVariableProps: frauddetector.CfnVariableProps = {
  dataSource: 'dataSource',
  dataType: 'dataType',
  defaultValue: 'defaultValue',
  name: 'name',

  // the properties below are optional
  description: 'description',
  tags: [{
    key: 'key',
    value: 'value',
  }],
  variableType: 'variableType',
};
python
from aws_cdk import CfnTag
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_frauddetector as frauddetector

cfn_variable_props = frauddetector.CfnVariableProps(
    data_source="dataSource",
    data_type="dataType",
    default_value="defaultValue",
    name="name",

    # the properties below are optional
    description="description",
    tags=[CfnTag(
        key="key",
        value="value"
    )],
    variable_type="variableType"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.frauddetector.*;

CfnVariableProps cfnVariableProps = CfnVariableProps.builder()
        .dataSource("dataSource")
        .dataType("dataType")
        .defaultValue("defaultValue")
        .name("name")

        // the properties below are optional
        .description("description")
        .tags(List.of(CfnTag.builder()
                .key("key")
                .value("value")
                .build()))
        .variableType("variableType")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.FraudDetector;

var cfnVariableProps = new CfnVariableProps {
    DataSource = "dataSource",
    DataType = "dataType",
    DefaultValue = "defaultValue",
    Name = "name",

    // the properties below are optional
    Description = "description",
    Tags = new [] { new CfnTag {
        Key = "key",
        Value = "value"
    } },
    VariableType = "variableType"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

cfnVariableProps := &CfnVariableProps{
	DataSource: jsii.String("dataSource"),
	DataType: jsii.String("dataType"),
	DefaultValue: jsii.String("defaultValue"),
	Name: jsii.String("name"),

	// the properties below are optional
	Description: jsii.String("description"),
	Tags: []CfnTag{
		&CfnTag{
			Key: jsii.String("key"),
			Value: jsii.String("value"),
		},
	},
	VariableType: jsii.String("variableType"),
}

Properties ​

dataSourcestringdata_sourcestrdataSourceStringDataSourcestringDataSource*string required #
The data source of the variable.
notes

Valid values: EVENT | EXTERNAL_MODEL_SCORE

When defining a variable within a detector, you can only use the EVENT value for DataSource when the Inline property is set to true. If the Inline property is set false, you can use either EVENT or MODEL_SCORE for DataSource.

dataTypestringdata_typestrdataTypeStringDataTypestringDataType*string required #
The data type of the variable.

Valid data types: STRING | INTEGER | BOOLEAN | FLOAT

defaultValuestringdefault_valuestrdefaultValueStringDefaultValuestringDefaultValue*string required #
The default value of the variable.
descriptionoptionalstringdescriptionoptionalstrdescriptionoptionalStringDescriptionoptionalstringDescriptionoptional*string #
The description of the variable.
namestringnamestrnameStringNamestringName*string required #
The name of the variable.

Pattern: ^[0-9a-z_-]+$

tagsoptionalCfnTag[]tagsoptionaltyping.List[CfnTag]tagsoptionalList<CfnTag>TagsoptionalCfnTag[]Tagsoptional*[]CfnTag #
An array of key-value pairs to apply to this resource.

For more information, see Tag .

variableTypeoptionalstringvariable_typeoptionalstrvariableTypeoptionalStringVariableTypeoptionalstringVariableTypeoptional*string #
The type of the variable. For more information see Variable types .
notes

Valid Values: AUTH_CODE | AVS | BILLING_ADDRESS_L1 | BILLING_ADDRESS_L2 | BILLING_CITY | BILLING_COUNTRY | BILLING_NAME | BILLING_PHONE | BILLING_STATE | BILLING_ZIP | CARD_BIN | CATEGORICAL | CURRENCY_CODE | EMAIL_ADDRESS | FINGERPRINT | FRAUD_LABEL | FREE_FORM_TEXT | IP_ADDRESS | NUMERIC | ORDER_ID | PAYMENT_TYPE | PHONE_NUMBER | PRICE | PRODUCT_CATEGORY | SHIPPING_ADDRESS_L1 | SHIPPING_ADDRESS_L2 | SHIPPING_CITY | SHIPPING_COUNTRY | SHIPPING_NAME | SHIPPING_PHONE | SHIPPING_STATE | SHIPPING_ZIP | USERAGENT