alicloud.sls.CollectionPolicy
Explore with Pulumi AI
Provides a SLS Collection Policy resource.
Orchestration policies for cloud product log collection.
For information about SLS Collection Policy and how to use it, see What is Collection Policy.
NOTE: Available since v1.232.0.
Create CollectionPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new CollectionPolicy(name: string, args: CollectionPolicyArgs, opts?: CustomResourceOptions);
@overload
def CollectionPolicy(resource_name: str,
args: CollectionPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def CollectionPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_code: Optional[str] = None,
enabled: Optional[bool] = None,
policy_config: Optional[CollectionPolicyPolicyConfigArgs] = None,
policy_name: Optional[str] = None,
product_code: Optional[str] = None,
centralize_config: Optional[CollectionPolicyCentralizeConfigArgs] = None,
centralize_enabled: Optional[bool] = None,
data_config: Optional[CollectionPolicyDataConfigArgs] = None,
resource_directory: Optional[CollectionPolicyResourceDirectoryArgs] = None)
func NewCollectionPolicy(ctx *Context, name string, args CollectionPolicyArgs, opts ...ResourceOption) (*CollectionPolicy, error)
public CollectionPolicy(string name, CollectionPolicyArgs args, CustomResourceOptions? opts = null)
public CollectionPolicy(String name, CollectionPolicyArgs args)
public CollectionPolicy(String name, CollectionPolicyArgs args, CustomResourceOptions options)
type: alicloud:sls:CollectionPolicy
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 CollectionPolicyArgs
- 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 CollectionPolicyArgs
- 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 CollectionPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args CollectionPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args CollectionPolicyArgs
- 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 collectionPolicyResource = new AliCloud.Sls.CollectionPolicy("collectionPolicyResource", new()
{
DataCode = "string",
Enabled = false,
PolicyConfig = new AliCloud.Sls.Inputs.CollectionPolicyPolicyConfigArgs
{
ResourceMode = "string",
InstanceIds = new[]
{
"string",
},
Regions = new[]
{
"string",
},
ResourceTags =
{
{ "string", "string" },
},
},
PolicyName = "string",
ProductCode = "string",
CentralizeConfig = new AliCloud.Sls.Inputs.CollectionPolicyCentralizeConfigArgs
{
DestLogstore = "string",
DestProject = "string",
DestRegion = "string",
DestTtl = 0,
},
CentralizeEnabled = false,
DataConfig = new AliCloud.Sls.Inputs.CollectionPolicyDataConfigArgs
{
DataProject = "string",
DataRegion = "string",
},
ResourceDirectory = new AliCloud.Sls.Inputs.CollectionPolicyResourceDirectoryArgs
{
AccountGroupType = "string",
Members = new[]
{
"string",
},
},
});
example, err := sls.NewCollectionPolicy(ctx, "collectionPolicyResource", &sls.CollectionPolicyArgs{
DataCode: pulumi.String("string"),
Enabled: pulumi.Bool(false),
PolicyConfig: &sls.CollectionPolicyPolicyConfigArgs{
ResourceMode: pulumi.String("string"),
InstanceIds: pulumi.StringArray{
pulumi.String("string"),
},
Regions: pulumi.StringArray{
pulumi.String("string"),
},
ResourceTags: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
PolicyName: pulumi.String("string"),
ProductCode: pulumi.String("string"),
CentralizeConfig: &sls.CollectionPolicyCentralizeConfigArgs{
DestLogstore: pulumi.String("string"),
DestProject: pulumi.String("string"),
DestRegion: pulumi.String("string"),
DestTtl: pulumi.Int(0),
},
CentralizeEnabled: pulumi.Bool(false),
DataConfig: &sls.CollectionPolicyDataConfigArgs{
DataProject: pulumi.String("string"),
DataRegion: pulumi.String("string"),
},
ResourceDirectory: &sls.CollectionPolicyResourceDirectoryArgs{
AccountGroupType: pulumi.String("string"),
Members: pulumi.StringArray{
pulumi.String("string"),
},
},
})
var collectionPolicyResource = new CollectionPolicy("collectionPolicyResource", CollectionPolicyArgs.builder()
.dataCode("string")
.enabled(false)
.policyConfig(CollectionPolicyPolicyConfigArgs.builder()
.resourceMode("string")
.instanceIds("string")
.regions("string")
.resourceTags(Map.of("string", "string"))
.build())
.policyName("string")
.productCode("string")
.centralizeConfig(CollectionPolicyCentralizeConfigArgs.builder()
.destLogstore("string")
.destProject("string")
.destRegion("string")
.destTtl(0)
.build())
.centralizeEnabled(false)
.dataConfig(CollectionPolicyDataConfigArgs.builder()
.dataProject("string")
.dataRegion("string")
.build())
.resourceDirectory(CollectionPolicyResourceDirectoryArgs.builder()
.accountGroupType("string")
.members("string")
.build())
.build());
collection_policy_resource = alicloud.sls.CollectionPolicy("collectionPolicyResource",
data_code="string",
enabled=False,
policy_config={
"resource_mode": "string",
"instance_ids": ["string"],
"regions": ["string"],
"resource_tags": {
"string": "string",
},
},
policy_name="string",
product_code="string",
centralize_config={
"dest_logstore": "string",
"dest_project": "string",
"dest_region": "string",
"dest_ttl": 0,
},
centralize_enabled=False,
data_config={
"data_project": "string",
"data_region": "string",
},
resource_directory={
"account_group_type": "string",
"members": ["string"],
})
const collectionPolicyResource = new alicloud.sls.CollectionPolicy("collectionPolicyResource", {
dataCode: "string",
enabled: false,
policyConfig: {
resourceMode: "string",
instanceIds: ["string"],
regions: ["string"],
resourceTags: {
string: "string",
},
},
policyName: "string",
productCode: "string",
centralizeConfig: {
destLogstore: "string",
destProject: "string",
destRegion: "string",
destTtl: 0,
},
centralizeEnabled: false,
dataConfig: {
dataProject: "string",
dataRegion: "string",
},
resourceDirectory: {
accountGroupType: "string",
members: ["string"],
},
});
type: alicloud:sls:CollectionPolicy
properties:
centralizeConfig:
destLogstore: string
destProject: string
destRegion: string
destTtl: 0
centralizeEnabled: false
dataCode: string
dataConfig:
dataProject: string
dataRegion: string
enabled: false
policyConfig:
instanceIds:
- string
regions:
- string
resourceMode: string
resourceTags:
string: string
policyName: string
productCode: string
resourceDirectory:
accountGroupType: string
members:
- string
CollectionPolicy 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 CollectionPolicy resource accepts the following input properties:
- Data
Code string - Log type encoding.
- Enabled bool
- Whether to open.
- Policy
Config Pulumi.Ali Cloud. Sls. Inputs. Collection Policy Policy Config - Collection rule configuration. See
policy_config
below. - Policy
Name string - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- Product
Code string - Product code.
- Centralize
Config Pulumi.Ali Cloud. Sls. Inputs. Collection Policy Centralize Config - Centralized transfer configuration. See
centralize_config
below. - Centralize
Enabled bool - Whether to enable centralized Conversion. The default value is false.
- Data
Config Pulumi.Ali Cloud. Sls. Inputs. Collection Policy Data Config - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - Resource
Directory Pulumi.Ali Cloud. Sls. Inputs. Collection Policy Resource Directory - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- Data
Code string - Log type encoding.
- Enabled bool
- Whether to open.
- Policy
Config CollectionPolicy Policy Config Args - Collection rule configuration. See
policy_config
below. - Policy
Name string - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- Product
Code string - Product code.
- Centralize
Config CollectionPolicy Centralize Config Args - Centralized transfer configuration. See
centralize_config
below. - Centralize
Enabled bool - Whether to enable centralized Conversion. The default value is false.
- Data
Config CollectionPolicy Data Config Args - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - Resource
Directory CollectionPolicy Resource Directory Args - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- data
Code String - Log type encoding.
- enabled Boolean
- Whether to open.
- policy
Config CollectionPolicy Policy Config - Collection rule configuration. See
policy_config
below. - policy
Name String - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- product
Code String - Product code.
- centralize
Config CollectionPolicy Centralize Config - Centralized transfer configuration. See
centralize_config
below. - centralize
Enabled Boolean - Whether to enable centralized Conversion. The default value is false.
- data
Config CollectionPolicy Data Config - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - resource
Directory CollectionPolicy Resource Directory - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- data
Code string - Log type encoding.
- enabled boolean
- Whether to open.
- policy
Config CollectionPolicy Policy Config - Collection rule configuration. See
policy_config
below. - policy
Name string - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- product
Code string - Product code.
- centralize
Config CollectionPolicy Centralize Config - Centralized transfer configuration. See
centralize_config
below. - centralize
Enabled boolean - Whether to enable centralized Conversion. The default value is false.
- data
Config CollectionPolicy Data Config - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - resource
Directory CollectionPolicy Resource Directory - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- data_
code str - Log type encoding.
- enabled bool
- Whether to open.
- policy_
config CollectionPolicy Policy Config Args - Collection rule configuration. See
policy_config
below. - policy_
name str - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- product_
code str - Product code.
- centralize_
config CollectionPolicy Centralize Config Args - Centralized transfer configuration. See
centralize_config
below. - centralize_
enabled bool - Whether to enable centralized Conversion. The default value is false.
- data_
config CollectionPolicy Data Config Args - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - resource_
directory CollectionPolicy Resource Directory Args - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- data
Code String - Log type encoding.
- enabled Boolean
- Whether to open.
- policy
Config Property Map - Collection rule configuration. See
policy_config
below. - policy
Name String - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- product
Code String - Product code.
- centralize
Config Property Map - Centralized transfer configuration. See
centralize_config
below. - centralize
Enabled Boolean - Whether to enable centralized Conversion. The default value is false.
- data
Config Property Map - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - resource
Directory Property Map - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
Outputs
All input properties are implicitly available as output properties. Additionally, the CollectionPolicy 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 CollectionPolicy Resource
Get an existing CollectionPolicy 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?: CollectionPolicyState, opts?: CustomResourceOptions): CollectionPolicy
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
centralize_config: Optional[CollectionPolicyCentralizeConfigArgs] = None,
centralize_enabled: Optional[bool] = None,
data_code: Optional[str] = None,
data_config: Optional[CollectionPolicyDataConfigArgs] = None,
enabled: Optional[bool] = None,
policy_config: Optional[CollectionPolicyPolicyConfigArgs] = None,
policy_name: Optional[str] = None,
product_code: Optional[str] = None,
resource_directory: Optional[CollectionPolicyResourceDirectoryArgs] = None) -> CollectionPolicy
func GetCollectionPolicy(ctx *Context, name string, id IDInput, state *CollectionPolicyState, opts ...ResourceOption) (*CollectionPolicy, error)
public static CollectionPolicy Get(string name, Input<string> id, CollectionPolicyState? state, CustomResourceOptions? opts = null)
public static CollectionPolicy get(String name, Output<String> id, CollectionPolicyState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Centralize
Config Pulumi.Ali Cloud. Sls. Inputs. Collection Policy Centralize Config - Centralized transfer configuration. See
centralize_config
below. - Centralize
Enabled bool - Whether to enable centralized Conversion. The default value is false.
- Data
Code string - Log type encoding.
- Data
Config Pulumi.Ali Cloud. Sls. Inputs. Collection Policy Data Config - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - Enabled bool
- Whether to open.
- Policy
Config Pulumi.Ali Cloud. Sls. Inputs. Collection Policy Policy Config - Collection rule configuration. See
policy_config
below. - Policy
Name string - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- Product
Code string - Product code.
- Resource
Directory Pulumi.Ali Cloud. Sls. Inputs. Collection Policy Resource Directory - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- Centralize
Config CollectionPolicy Centralize Config Args - Centralized transfer configuration. See
centralize_config
below. - Centralize
Enabled bool - Whether to enable centralized Conversion. The default value is false.
- Data
Code string - Log type encoding.
- Data
Config CollectionPolicy Data Config Args - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - Enabled bool
- Whether to open.
- Policy
Config CollectionPolicy Policy Config Args - Collection rule configuration. See
policy_config
below. - Policy
Name string - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- Product
Code string - Product code.
- Resource
Directory CollectionPolicy Resource Directory Args - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- centralize
Config CollectionPolicy Centralize Config - Centralized transfer configuration. See
centralize_config
below. - centralize
Enabled Boolean - Whether to enable centralized Conversion. The default value is false.
- data
Code String - Log type encoding.
- data
Config CollectionPolicy Data Config - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - enabled Boolean
- Whether to open.
- policy
Config CollectionPolicy Policy Config - Collection rule configuration. See
policy_config
below. - policy
Name String - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- product
Code String - Product code.
- resource
Directory CollectionPolicy Resource Directory - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- centralize
Config CollectionPolicy Centralize Config - Centralized transfer configuration. See
centralize_config
below. - centralize
Enabled boolean - Whether to enable centralized Conversion. The default value is false.
- data
Code string - Log type encoding.
- data
Config CollectionPolicy Data Config - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - enabled boolean
- Whether to open.
- policy
Config CollectionPolicy Policy Config - Collection rule configuration. See
policy_config
below. - policy
Name string - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- product
Code string - Product code.
- resource
Directory CollectionPolicy Resource Directory - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- centralize_
config CollectionPolicy Centralize Config Args - Centralized transfer configuration. See
centralize_config
below. - centralize_
enabled bool - Whether to enable centralized Conversion. The default value is false.
- data_
code str - Log type encoding.
- data_
config CollectionPolicy Data Config Args - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - enabled bool
- Whether to open.
- policy_
config CollectionPolicy Policy Config Args - Collection rule configuration. See
policy_config
below. - policy_
name str - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- product_
code str - Product code.
- resource_
directory CollectionPolicy Resource Directory Args - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
- centralize
Config Property Map - Centralized transfer configuration. See
centralize_config
below. - centralize
Enabled Boolean - Whether to enable centralized Conversion. The default value is false.
- data
Code String - Log type encoding.
- data
Config Property Map - The configuration is supported only when the log type is global. For example, if the productCode is sls, global logs will be collected to the corresponding region during the first configuration. See
data_config
below. - enabled Boolean
- Whether to open.
- policy
Config Property Map - Collection rule configuration. See
policy_config
below. - policy
Name String - The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
- product
Code String - Product code.
- resource
Directory Property Map - For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See
resource_directory
below.
Supporting Types
CollectionPolicyCentralizeConfig, CollectionPolicyCentralizeConfigArgs
- Dest
Logstore string - When the central logstore is transferred to the destination logstore, its geographical attribute should be consistent with the destRegion and belong to the destProject.
- Dest
Project string - The geographical attributes of the centralized transfer project should be consistent with the destRegion.
- Dest
Region string - Centralized transfer destination area.
- Dest
Ttl int - The number of days for the central transfer destination. This is valid only if the central transfer destination log store is not created for the first time.
- Dest
Logstore string - When the central logstore is transferred to the destination logstore, its geographical attribute should be consistent with the destRegion and belong to the destProject.
- Dest
Project string - The geographical attributes of the centralized transfer project should be consistent with the destRegion.
- Dest
Region string - Centralized transfer destination area.
- Dest
Ttl int - The number of days for the central transfer destination. This is valid only if the central transfer destination log store is not created for the first time.
- dest
Logstore String - When the central logstore is transferred to the destination logstore, its geographical attribute should be consistent with the destRegion and belong to the destProject.
- dest
Project String - The geographical attributes of the centralized transfer project should be consistent with the destRegion.
- dest
Region String - Centralized transfer destination area.
- dest
Ttl Integer - The number of days for the central transfer destination. This is valid only if the central transfer destination log store is not created for the first time.
- dest
Logstore string - When the central logstore is transferred to the destination logstore, its geographical attribute should be consistent with the destRegion and belong to the destProject.
- dest
Project string - The geographical attributes of the centralized transfer project should be consistent with the destRegion.
- dest
Region string - Centralized transfer destination area.
- dest
Ttl number - The number of days for the central transfer destination. This is valid only if the central transfer destination log store is not created for the first time.
- dest_
logstore str - When the central logstore is transferred to the destination logstore, its geographical attribute should be consistent with the destRegion and belong to the destProject.
- dest_
project str - The geographical attributes of the centralized transfer project should be consistent with the destRegion.
- dest_
region str - Centralized transfer destination area.
- dest_
ttl int - The number of days for the central transfer destination. This is valid only if the central transfer destination log store is not created for the first time.
- dest
Logstore String - When the central logstore is transferred to the destination logstore, its geographical attribute should be consistent with the destRegion and belong to the destProject.
- dest
Project String - The geographical attributes of the centralized transfer project should be consistent with the destRegion.
- dest
Region String - Centralized transfer destination area.
- dest
Ttl Number - The number of days for the central transfer destination. This is valid only if the central transfer destination log store is not created for the first time.
CollectionPolicyDataConfig, CollectionPolicyDataConfigArgs
- Data
Project string - Valid only when the log type is global. For example, if the productCode is sls, the log is collected to the default dedicated Project of the account in a specific dataRegion.
- Data
Region string - If and only if the log type is global log type, for example, if productCode is sls, global logs will be collected to the corresponding region during the first configuration.
- Data
Project string - Valid only when the log type is global. For example, if the productCode is sls, the log is collected to the default dedicated Project of the account in a specific dataRegion.
- Data
Region string - If and only if the log type is global log type, for example, if productCode is sls, global logs will be collected to the corresponding region during the first configuration.
- data
Project String - Valid only when the log type is global. For example, if the productCode is sls, the log is collected to the default dedicated Project of the account in a specific dataRegion.
- data
Region String - If and only if the log type is global log type, for example, if productCode is sls, global logs will be collected to the corresponding region during the first configuration.
- data
Project string - Valid only when the log type is global. For example, if the productCode is sls, the log is collected to the default dedicated Project of the account in a specific dataRegion.
- data
Region string - If and only if the log type is global log type, for example, if productCode is sls, global logs will be collected to the corresponding region during the first configuration.
- data_
project str - Valid only when the log type is global. For example, if the productCode is sls, the log is collected to the default dedicated Project of the account in a specific dataRegion.
- data_
region str - If and only if the log type is global log type, for example, if productCode is sls, global logs will be collected to the corresponding region during the first configuration.
- data
Project String - Valid only when the log type is global. For example, if the productCode is sls, the log is collected to the default dedicated Project of the account in a specific dataRegion.
- data
Region String - If and only if the log type is global log type, for example, if productCode is sls, global logs will be collected to the corresponding region during the first configuration.
CollectionPolicyPolicyConfig, CollectionPolicyPolicyConfigArgs
- Resource
Mode string - Resource collection mode. If all is configured, all instances under the account will be collected to the default logstore. If attributeMode is configured, filtering will be performed according to the region attribute and resource label of the instance. If instanceMode is configured, filtering will be performed according to the instance ID.
- Instance
Ids List<string> - A collection of instance IDs, valid only if resourceMode is instanceMode. Only instances whose instance ID is in the instance ID collection are collected.
- Regions List<string>
- The region collection to which the instance belongs. Valid only when resourceMode is set to attributeMode. Wildcard characters are supported. If the region collection filter item is an empty array, it means that you do not need to filter by region, and all instances meet the filtering condition of the region collection. Otherwise, only instances with region attributes in the region collection are collected. The region collection and resource label of the instance. The instance objects are collected only when all of them are met.
- Dictionary<string, string>
Resource label, valid if and only if resourceMode is attributeMode.
If the resource label filter item is empty, it means that you do not need to filter by resource label, and all instances meet the resource label filter condition. Otherwise, only instances whose resource label attributes meet the resource label configuration are collected.
The resource tag and the region collection to which the instance belongs work together. The instance objects are collected only when all of them are met.
- Resource
Mode string - Resource collection mode. If all is configured, all instances under the account will be collected to the default logstore. If attributeMode is configured, filtering will be performed according to the region attribute and resource label of the instance. If instanceMode is configured, filtering will be performed according to the instance ID.
- Instance
Ids []string - A collection of instance IDs, valid only if resourceMode is instanceMode. Only instances whose instance ID is in the instance ID collection are collected.
- Regions []string
- The region collection to which the instance belongs. Valid only when resourceMode is set to attributeMode. Wildcard characters are supported. If the region collection filter item is an empty array, it means that you do not need to filter by region, and all instances meet the filtering condition of the region collection. Otherwise, only instances with region attributes in the region collection are collected. The region collection and resource label of the instance. The instance objects are collected only when all of them are met.
- map[string]string
Resource label, valid if and only if resourceMode is attributeMode.
If the resource label filter item is empty, it means that you do not need to filter by resource label, and all instances meet the resource label filter condition. Otherwise, only instances whose resource label attributes meet the resource label configuration are collected.
The resource tag and the region collection to which the instance belongs work together. The instance objects are collected only when all of them are met.
- resource
Mode String - Resource collection mode. If all is configured, all instances under the account will be collected to the default logstore. If attributeMode is configured, filtering will be performed according to the region attribute and resource label of the instance. If instanceMode is configured, filtering will be performed according to the instance ID.
- instance
Ids List<String> - A collection of instance IDs, valid only if resourceMode is instanceMode. Only instances whose instance ID is in the instance ID collection are collected.
- regions List<String>
- The region collection to which the instance belongs. Valid only when resourceMode is set to attributeMode. Wildcard characters are supported. If the region collection filter item is an empty array, it means that you do not need to filter by region, and all instances meet the filtering condition of the region collection. Otherwise, only instances with region attributes in the region collection are collected. The region collection and resource label of the instance. The instance objects are collected only when all of them are met.
- Map<String,String>
Resource label, valid if and only if resourceMode is attributeMode.
If the resource label filter item is empty, it means that you do not need to filter by resource label, and all instances meet the resource label filter condition. Otherwise, only instances whose resource label attributes meet the resource label configuration are collected.
The resource tag and the region collection to which the instance belongs work together. The instance objects are collected only when all of them are met.
- resource
Mode string - Resource collection mode. If all is configured, all instances under the account will be collected to the default logstore. If attributeMode is configured, filtering will be performed according to the region attribute and resource label of the instance. If instanceMode is configured, filtering will be performed according to the instance ID.
- instance
Ids string[] - A collection of instance IDs, valid only if resourceMode is instanceMode. Only instances whose instance ID is in the instance ID collection are collected.
- regions string[]
- The region collection to which the instance belongs. Valid only when resourceMode is set to attributeMode. Wildcard characters are supported. If the region collection filter item is an empty array, it means that you do not need to filter by region, and all instances meet the filtering condition of the region collection. Otherwise, only instances with region attributes in the region collection are collected. The region collection and resource label of the instance. The instance objects are collected only when all of them are met.
- {[key: string]: string}
Resource label, valid if and only if resourceMode is attributeMode.
If the resource label filter item is empty, it means that you do not need to filter by resource label, and all instances meet the resource label filter condition. Otherwise, only instances whose resource label attributes meet the resource label configuration are collected.
The resource tag and the region collection to which the instance belongs work together. The instance objects are collected only when all of them are met.
- resource_
mode str - Resource collection mode. If all is configured, all instances under the account will be collected to the default logstore. If attributeMode is configured, filtering will be performed according to the region attribute and resource label of the instance. If instanceMode is configured, filtering will be performed according to the instance ID.
- instance_
ids Sequence[str] - A collection of instance IDs, valid only if resourceMode is instanceMode. Only instances whose instance ID is in the instance ID collection are collected.
- regions Sequence[str]
- The region collection to which the instance belongs. Valid only when resourceMode is set to attributeMode. Wildcard characters are supported. If the region collection filter item is an empty array, it means that you do not need to filter by region, and all instances meet the filtering condition of the region collection. Otherwise, only instances with region attributes in the region collection are collected. The region collection and resource label of the instance. The instance objects are collected only when all of them are met.
- Mapping[str, str]
Resource label, valid if and only if resourceMode is attributeMode.
If the resource label filter item is empty, it means that you do not need to filter by resource label, and all instances meet the resource label filter condition. Otherwise, only instances whose resource label attributes meet the resource label configuration are collected.
The resource tag and the region collection to which the instance belongs work together. The instance objects are collected only when all of them are met.
- resource
Mode String - Resource collection mode. If all is configured, all instances under the account will be collected to the default logstore. If attributeMode is configured, filtering will be performed according to the region attribute and resource label of the instance. If instanceMode is configured, filtering will be performed according to the instance ID.
- instance
Ids List<String> - A collection of instance IDs, valid only if resourceMode is instanceMode. Only instances whose instance ID is in the instance ID collection are collected.
- regions List<String>
- The region collection to which the instance belongs. Valid only when resourceMode is set to attributeMode. Wildcard characters are supported. If the region collection filter item is an empty array, it means that you do not need to filter by region, and all instances meet the filtering condition of the region collection. Otherwise, only instances with region attributes in the region collection are collected. The region collection and resource label of the instance. The instance objects are collected only when all of them are met.
- Map<String>
Resource label, valid if and only if resourceMode is attributeMode.
If the resource label filter item is empty, it means that you do not need to filter by resource label, and all instances meet the resource label filter condition. Otherwise, only instances whose resource label attributes meet the resource label configuration are collected.
The resource tag and the region collection to which the instance belongs work together. The instance objects are collected only when all of them are met.
CollectionPolicyResourceDirectory, CollectionPolicyResourceDirectoryArgs
- Account
Group stringType - Support all mode all and custom mode custom under this resource directory
- Members List<string>
- When the resource directory is configured in the custom mode, the corresponding member account list
- Account
Group stringType - Support all mode all and custom mode custom under this resource directory
- Members []string
- When the resource directory is configured in the custom mode, the corresponding member account list
- account
Group StringType - Support all mode all and custom mode custom under this resource directory
- members List<String>
- When the resource directory is configured in the custom mode, the corresponding member account list
- account
Group stringType - Support all mode all and custom mode custom under this resource directory
- members string[]
- When the resource directory is configured in the custom mode, the corresponding member account list
- account_
group_ strtype - Support all mode all and custom mode custom under this resource directory
- members Sequence[str]
- When the resource directory is configured in the custom mode, the corresponding member account list
- account
Group StringType - Support all mode all and custom mode custom under this resource directory
- members List<String>
- When the resource directory is configured in the custom mode, the corresponding member account list
Import
SLS Collection Policy can be imported using the id, e.g.
$ pulumi import alicloud:sls/collectionPolicy:CollectionPolicy example <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.