LogtailConfig
This class encapsulates and extends the ROS resource type ALIYUN::SLS::LogtailConfig, which is used to configure Logtail properties for data collection.
Initializers
import ros_cdk_sls
ros_cdk_sls.LogtailConfig(
scope: Construct,
id: str,
logstore_name: typing.Union[str, IResolvable],
logtail_config_name: typing.Union[str, IResolvable],
project_name: typing.Union[str, IResolvable],
clone_from: typing.Union[IResolvable, CloneFromProperty] = None,
raw_config_data: typing.Union[IResolvable, typing.Mapping[typing.Any]] = None,
enable_resource_property_constraint: bool = None
)
| Name | Type | Description |
|---|---|---|
scope |
ros_cdk_core.Construct |
No description. |
id |
str |
No description. |
logstore_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property logstoreName: Logstore name: 1. |
logtail_config_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property logtailConfigName: Logtail config name: 1. |
project_name |
typing.Union[str, ros_cdk_core.IResolvable] |
Property projectName: Project name: 1. |
clone_from |
typing.Union[ros_cdk_core.IResolvable, CloneFromProperty] |
Property cloneFrom: Clone logtail config data from existing logtail config. |
raw_config_data |
typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]] |
Property rawConfigData: The format is the same as the response of SLS API GetConfig. |
enable_resource_property_constraint |
bool |
No description. |
scopeRequired
- Type: ros_cdk_core.Construct
idRequired
- Type: str
logstore_nameRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property logstoreName: Logstore name: 1.
Only supports lowercase letters, numbers, hyphens (-) and underscores (_). 2. Must start and end with lowercase letters and numbers. 3. The name length is 3-63 characters.
logtail_config_nameRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property logtailConfigName: Logtail config name: 1.
Only supports lowercase letters, numbers, hyphens (-) and underscores (_). 2. Must start and end with lowercase letters and numbers. 3. The name length is 3-63 characters.
project_nameRequired
- Type: typing.Union[str, ros_cdk_core.IResolvable]
Property projectName: Project name: 1.
Only supports lowercase letters, numbers, hyphens (-) and underscores (_). 2. Must start and end with lowercase letters and numbers. 3. The name length is 3-63 characters.
clone_fromOptional
- Type: typing.Union[ros_cdk_core.IResolvable, CloneFromProperty]
Property cloneFrom: Clone logtail config data from existing logtail config.
Either CloneFrom or RawConfigData must be specified. If CloneFrom and RawConfigData are both specified, logtail config data will be merged from both with RawConfigData first.
raw_config_dataOptional
- Type: typing.Union[ros_cdk_core.IResolvable, typing.Mapping[typing.Any]]
Property rawConfigData: The format is the same as the response of SLS API GetConfig.
Either CloneFrom or RawConfigData must be specified. If CloneFrom and RawConfigData are both specified, logtail config data will be merged from both with RawConfigData first. configName, outputType, outputDetail in data will be ignored.For example: { "configName": "test-logtail-config", "createTime": 1574843554, "inputDetail": { "acceptNoEnoughKeys": false, "adjustTimezone": false, "advanced": { "force_multiconfig": false }, "autoExtend": true, "delayAlarmBytes": 0, "delaySkipBytes": 0, "discardNonUtf8": false, "discardUnmatch": false, "dockerExcludeEnv": {}, "dockerExcludeLabel": {}, "dockerFile": false, "dockerIncludeEnv": {}, "dockerIncludeLabel": {}, "enableRawLog": false, "enableTag": false, "fileEncoding": "utf8", "filePattern": "test.log*", "filterKey": [], "filterRegex": [], "key": [ "time", "logger", "level", "request_id", "user_id", "region_id", "content" ], "localStorage": true, "logPath": "/var/log/test", "logTimezone": "", "logType": "delimiter_log", "maxDepth": 100, "maxSendRate": -1, "mergeType": "topic", "preserve": true, "preserveDepth": 1, "priority": 0, "quote": "\u0001", "sendRateExpire": 0, "sensitive_keys": [], "separator": ",,,", "shardHashKey": [], "tailExisted": false, "timeFormat": "", "timeKey": "", "topicFormat": "none" }, "inputType": "file", "lastModifyTime": 1574843554, "logSample": "2019-11-27 10:48:23,160,,,MAIN,,,INFO,,,98DCC51D-BE5D-49C7-B3FD-37B2BAEFB296,,,123456789,,,cn-hangzhou,,,this is a simple test.", "outputDetail": { "endpoint": "cn-hangzhou-intranet.log.aliyuncs.com", "logstoreName": "test-logstore", "region": "cn-hangzhou" }, "outputType": "LogService" }
enable_resource_property_constraintOptional
- Type: bool
Methods
| Name | Description |
|---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack and Asset
as they participate in synthesizing the cloud assembly.
- Type: ros_cdk_core.ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: ros_cdk_core.RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: ros_cdk_core.Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: ros_cdk_core.RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
| Name | Description |
|---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_sls
ros_cdk_sls.LogtailConfig.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
| Name | Type | Description |
|---|---|---|
node |
ros_cdk_core.ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
ros_cdk_core.Stack |
The stack in which this resource is defined. |
resource |
ros_cdk_core.RosResource |
No description. |
attr_applied_machine_groups |
ros_cdk_core.IResolvable |
Attribute AppliedMachineGroups: Applied machine groups. |
attr_endpoint |
ros_cdk_core.IResolvable |
Attribute Endpoint: Endpoint address. |
attr_logtail_config_name |
ros_cdk_core.IResolvable |
Attribute LogtailConfigName: Logtail config name. |
nodeRequired
node: ConstructNode
- Type: ros_cdk_core.ConstructNode
The construct tree node associated with this construct.
refRequired
ref: str
- Type: str
stackRequired
stack: Stack
- Type: ros_cdk_core.Stack
The stack in which this resource is defined.
resourceOptional
resource: RosResource
- Type: ros_cdk_core.RosResource
attr_applied_machine_groupsRequired
attr_applied_machine_groups: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute AppliedMachineGroups: Applied machine groups.
attr_endpointRequired
attr_endpoint: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute Endpoint: Endpoint address.
attr_logtail_config_nameRequired
attr_logtail_config_name: IResolvable
- Type: ros_cdk_core.IResolvable
Attribute LogtailConfigName: Logtail config name.