1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. sls
  5. CollectionPolicy
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

alicloud.sls.CollectionPolicy

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi

    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:

    DataCode string
    Log type encoding.
    Enabled bool
    Whether to open.
    PolicyConfig Pulumi.AliCloud.Sls.Inputs.CollectionPolicyPolicyConfig
    Collection rule configuration. See policy_config below.
    PolicyName string
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    ProductCode string
    Product code.
    CentralizeConfig Pulumi.AliCloud.Sls.Inputs.CollectionPolicyCentralizeConfig
    Centralized transfer configuration. See centralize_config below.
    CentralizeEnabled bool
    Whether to enable centralized Conversion. The default value is false.
    DataConfig Pulumi.AliCloud.Sls.Inputs.CollectionPolicyDataConfig
    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.
    ResourceDirectory Pulumi.AliCloud.Sls.Inputs.CollectionPolicyResourceDirectory
    For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See resource_directory below.
    DataCode string
    Log type encoding.
    Enabled bool
    Whether to open.
    PolicyConfig CollectionPolicyPolicyConfigArgs
    Collection rule configuration. See policy_config below.
    PolicyName string
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    ProductCode string
    Product code.
    CentralizeConfig CollectionPolicyCentralizeConfigArgs
    Centralized transfer configuration. See centralize_config below.
    CentralizeEnabled bool
    Whether to enable centralized Conversion. The default value is false.
    DataConfig CollectionPolicyDataConfigArgs
    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.
    ResourceDirectory CollectionPolicyResourceDirectoryArgs
    For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See resource_directory below.
    dataCode String
    Log type encoding.
    enabled Boolean
    Whether to open.
    policyConfig CollectionPolicyPolicyConfig
    Collection rule configuration. See policy_config below.
    policyName String
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    productCode String
    Product code.
    centralizeConfig CollectionPolicyCentralizeConfig
    Centralized transfer configuration. See centralize_config below.
    centralizeEnabled Boolean
    Whether to enable centralized Conversion. The default value is false.
    dataConfig CollectionPolicyDataConfig
    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.
    resourceDirectory CollectionPolicyResourceDirectory
    For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See resource_directory below.
    dataCode string
    Log type encoding.
    enabled boolean
    Whether to open.
    policyConfig CollectionPolicyPolicyConfig
    Collection rule configuration. See policy_config below.
    policyName string
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    productCode string
    Product code.
    centralizeConfig CollectionPolicyCentralizeConfig
    Centralized transfer configuration. See centralize_config below.
    centralizeEnabled boolean
    Whether to enable centralized Conversion. The default value is false.
    dataConfig CollectionPolicyDataConfig
    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.
    resourceDirectory CollectionPolicyResourceDirectory
    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 CollectionPolicyPolicyConfigArgs
    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 CollectionPolicyCentralizeConfigArgs
    Centralized transfer configuration. See centralize_config below.
    centralize_enabled bool
    Whether to enable centralized Conversion. The default value is false.
    data_config CollectionPolicyDataConfigArgs
    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 CollectionPolicyResourceDirectoryArgs
    For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See resource_directory below.
    dataCode String
    Log type encoding.
    enabled Boolean
    Whether to open.
    policyConfig Property Map
    Collection rule configuration. See policy_config below.
    policyName String
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    productCode String
    Product code.
    centralizeConfig Property Map
    Centralized transfer configuration. See centralize_config below.
    centralizeEnabled Boolean
    Whether to enable centralized Conversion. The default value is false.
    dataConfig 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.
    resourceDirectory 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.
    The following state arguments are supported:
    CentralizeConfig Pulumi.AliCloud.Sls.Inputs.CollectionPolicyCentralizeConfig
    Centralized transfer configuration. See centralize_config below.
    CentralizeEnabled bool
    Whether to enable centralized Conversion. The default value is false.
    DataCode string
    Log type encoding.
    DataConfig Pulumi.AliCloud.Sls.Inputs.CollectionPolicyDataConfig
    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.
    PolicyConfig Pulumi.AliCloud.Sls.Inputs.CollectionPolicyPolicyConfig
    Collection rule configuration. See policy_config below.
    PolicyName string
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    ProductCode string
    Product code.
    ResourceDirectory Pulumi.AliCloud.Sls.Inputs.CollectionPolicyResourceDirectory
    For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See resource_directory below.
    CentralizeConfig CollectionPolicyCentralizeConfigArgs
    Centralized transfer configuration. See centralize_config below.
    CentralizeEnabled bool
    Whether to enable centralized Conversion. The default value is false.
    DataCode string
    Log type encoding.
    DataConfig CollectionPolicyDataConfigArgs
    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.
    PolicyConfig CollectionPolicyPolicyConfigArgs
    Collection rule configuration. See policy_config below.
    PolicyName string
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    ProductCode string
    Product code.
    ResourceDirectory CollectionPolicyResourceDirectoryArgs
    For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See resource_directory below.
    centralizeConfig CollectionPolicyCentralizeConfig
    Centralized transfer configuration. See centralize_config below.
    centralizeEnabled Boolean
    Whether to enable centralized Conversion. The default value is false.
    dataCode String
    Log type encoding.
    dataConfig CollectionPolicyDataConfig
    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.
    policyConfig CollectionPolicyPolicyConfig
    Collection rule configuration. See policy_config below.
    policyName String
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    productCode String
    Product code.
    resourceDirectory CollectionPolicyResourceDirectory
    For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See resource_directory below.
    centralizeConfig CollectionPolicyCentralizeConfig
    Centralized transfer configuration. See centralize_config below.
    centralizeEnabled boolean
    Whether to enable centralized Conversion. The default value is false.
    dataCode string
    Log type encoding.
    dataConfig CollectionPolicyDataConfig
    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.
    policyConfig CollectionPolicyPolicyConfig
    Collection rule configuration. See policy_config below.
    policyName string
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    productCode string
    Product code.
    resourceDirectory CollectionPolicyResourceDirectory
    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 CollectionPolicyCentralizeConfigArgs
    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 CollectionPolicyDataConfigArgs
    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 CollectionPolicyPolicyConfigArgs
    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 CollectionPolicyResourceDirectoryArgs
    For Resource Directory configuration, the account must have opened the resource directory and be an administrator or a delegated administrator. See resource_directory below.
    centralizeConfig Property Map
    Centralized transfer configuration. See centralize_config below.
    centralizeEnabled Boolean
    Whether to enable centralized Conversion. The default value is false.
    dataCode String
    Log type encoding.
    dataConfig 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.
    policyConfig Property Map
    Collection rule configuration. See policy_config below.
    policyName String
    The name of the rule, with a minimum of 3 characters and a maximum of 63 characters, must start with a letter.
    productCode String
    Product code.
    resourceDirectory 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

    DestLogstore 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.
    DestProject string
    The geographical attributes of the centralized transfer project should be consistent with the destRegion.
    DestRegion string
    Centralized transfer destination area.
    DestTtl 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.
    DestLogstore 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.
    DestProject string
    The geographical attributes of the centralized transfer project should be consistent with the destRegion.
    DestRegion string
    Centralized transfer destination area.
    DestTtl 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.
    destLogstore 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.
    destProject String
    The geographical attributes of the centralized transfer project should be consistent with the destRegion.
    destRegion String
    Centralized transfer destination area.
    destTtl 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.
    destLogstore 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.
    destProject string
    The geographical attributes of the centralized transfer project should be consistent with the destRegion.
    destRegion string
    Centralized transfer destination area.
    destTtl 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.
    destLogstore 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.
    destProject String
    The geographical attributes of the centralized transfer project should be consistent with the destRegion.
    destRegion String
    Centralized transfer destination area.
    destTtl 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

    DataProject 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.
    DataRegion 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.
    DataProject 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.
    DataRegion 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.
    dataProject 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.
    dataRegion 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.
    dataProject 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.
    dataRegion 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.
    dataProject 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.
    dataRegion 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

    ResourceMode 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.
    InstanceIds 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.
    ResourceTags 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.

    ResourceMode 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.
    InstanceIds []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.
    ResourceTags 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.

    resourceMode 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.
    instanceIds 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.
    resourceTags 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.

    resourceMode 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.
    instanceIds 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.
    resourceTags {[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.
    resource_tags 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.

    resourceMode 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.
    instanceIds 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.
    resourceTags 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

    AccountGroupType string
    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
    AccountGroupType string
    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
    accountGroupType String
    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
    accountGroupType string
    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_type str
    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
    accountGroupType String
    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.
    alicloud logo
    Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi