Skip to content

Logstore

This class encapsulates and extends the ROS resource type ALIYUN::SLS::Logstore, which is used to create a Logstore in a Simple Log Service (SLS) project.

Initializers

import ros_cdk_sls
ros_cdk_sls.Logstore(
  scope: Construct,
  id: str,
  logstore_name: typing.Union[str, IResolvable],
  project_name: typing.Union[str, IResolvable],
  append_meta: typing.Union[bool, IResolvable] = None,
  auto_split: typing.Union[bool, IResolvable] = None,
  enable_tracking: typing.Union[bool, IResolvable] = None,
  encrypt_conf: typing.Union[IResolvable, EncryptConfProperty] = None,
  max_split_shard: typing.Union[typing.Union[int, float], IResolvable] = None,
  mode: typing.Union[str, IResolvable] = None,
  preserve_storage: typing.Union[bool, IResolvable] = None,
  shard_count: typing.Union[typing.Union[int, float], IResolvable] = None,
  ttl: typing.Union[typing.Union[int, float], IResolvable] = 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.
project_name typing.Union[str, ros_cdk_core.IResolvable] Property projectName: Project name: 1.
append_meta typing.Union[bool, ros_cdk_core.IResolvable] Property appendMeta: Whether to add client external network IP and log arrival time after receiving the log.
auto_split typing.Union[bool, ros_cdk_core.IResolvable] Property autoSplit: Whether to automatically split the shard.
enable_tracking typing.Union[bool, ros_cdk_core.IResolvable] Property enableTracking: Whether to enable WebTracking, which supports fast capture of various browsers and iOS\/Android\/APP access information.
encrypt_conf typing.Union[ros_cdk_core.IResolvable, EncryptConfProperty] Property encryptConf: Data encryption config.
max_split_shard typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property maxSplitShard: The maximum number of shards when splitting automatically.
mode typing.Union[str, ros_cdk_core.IResolvable] Property mode: The type of the Logstore.
preserve_storage typing.Union[bool, ros_cdk_core.IResolvable] Property preserveStorage: Whether to keep the log permanently.
shard_count typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property shardCount: The number of Shards.
ttl typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable] Property ttl: The lifecycle of log in the logstore in days.
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.


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.


append_metaOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property appendMeta: Whether to add client external network IP and log arrival time after receiving the log.

Default to false.


auto_splitOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property autoSplit: Whether to automatically split the shard.

Default to false.


enable_trackingOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property enableTracking: Whether to enable WebTracking, which supports fast capture of various browsers and iOS\/Android\/APP access information.

Default to false.


encrypt_confOptional

Property encryptConf: Data encryption config.


max_split_shardOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property maxSplitShard: The maximum number of shards when splitting automatically.

Must be specified if AutoSplit is set to true. Allowed Values: 1-64.


modeOptional

  • Type: typing.Union[str, ros_cdk_core.IResolvable]

Property mode: The type of the Logstore.

Simple Log Service provides two types of Logstores: Standard Logstores and Query Logstores. Valid values: standard: Standard Logstore. This type of Logstore supports the log analysis feature and is suitable for scenarios such as real-time monitoring and interactive analysis. You can also use this type of Logstore to build a comprehensive observability system. query: Query Logstore. This type of Logstore supports high-performance queries. The index traffic fee of a Query Logstore is approximately half that of a Standard Logstore. Query Logstores do not support SQL analysis. Query Logstores are suitable for scenarios in which the amount of data is large, the log retention period is long, or log analysis is not required. If logs are stored for weeks or months, the log retention period is considered long.


preserve_storageOptional

  • Type: typing.Union[bool, ros_cdk_core.IResolvable]

Property preserveStorage: Whether to keep the log permanently.

If set to true, TTL will be ignored. Default to false.


shard_countOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property shardCount: The number of Shards.

Allowed Values: 1-100, default to 2.


ttlOptional

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

Property ttl: The lifecycle of log in the logstore in days.

Allowed Values: 1-3600, default to 30.


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.

sessionRequired

  • Type: ros_cdk_core.ISynthesisSession

The synthesis session.


add_condition

def add_condition(
  condition: RosCondition
) -> None

conditionRequired

  • Type: ros_cdk_core.RosCondition

add_count

def add_count(
  count: typing.Union[typing.Union[int, float], IResolvable]
) -> None

countRequired

  • Type: typing.Union[typing.Union[int, float], ros_cdk_core.IResolvable]

add_dependency

def add_dependency(
  resource: Resource
) -> None

resourceRequired

  • Type: ros_cdk_core.Resource

add_resource_desc

def add_resource_desc(
  desc: str
) -> None

descRequired

  • Type: str

apply_removal_policy

def apply_removal_policy(
  policy: RemovalPolicy
) -> None

policyRequired

  • Type: ros_cdk_core.RemovalPolicy

get_att

def get_att(
  name: str
) -> IResolvable

nameRequired

  • Type: str

set_metadata

def set_metadata(
  key: str,
  value: typing.Any
) -> None

keyRequired

  • Type: str

valueRequired

  • 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.Logstore.is_construct(
  x: typing.Any
)

Return whether the given object is a Construct.

xRequired

  • 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_logstore_name ros_cdk_core.IResolvable Attribute LogstoreName: Logstore name.
attr_project_name ros_cdk_core.IResolvable Attribute ProjectName: Project 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_logstore_nameRequired

attr_logstore_name: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute LogstoreName: Logstore name.


attr_project_nameRequired

attr_project_name: IResolvable
  • Type: ros_cdk_core.IResolvable

Attribute ProjectName: Project name.