1. Packages
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. cms
  6. IntegrationPolicy
Viewing docs for Alibaba Cloud v3.101.0
published on Tuesday, Apr 28, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.101.0
published on Tuesday, Apr 28, 2026 by Pulumi

    Provides a Cms Integration Policy resource.

    Policies used by the Integration Center.

    For information about Cms Integration Policy and how to use it, see What is Integration Policy.

    NOTE: Available since v1.277.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    import * as random from "@pulumi/random";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new random.index.Integer("default", {
        min: 10000,
        max: 99999,
    });
    const defaultProject = new alicloud.log.Project("default", {projectName: `${name}-${_default.result}`});
    const defaultWorkspace = new alicloud.cms.Workspace("default", {
        workspaceName: name,
        slsProject: defaultProject.projectName,
    });
    const defaultIntegrationPolicy = new alicloud.cms.IntegrationPolicy("default", {
        policyType: "ECS",
        integrationPolicyName: name,
        workspace: defaultWorkspace.id,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    import pulumi_random as random
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = random.Integer("default",
        min=10000,
        max=99999)
    default_project = alicloud.log.Project("default", project_name=f"{name}-{default['result']}")
    default_workspace = alicloud.cms.Workspace("default",
        workspace_name=name,
        sls_project=default_project.project_name)
    default_integration_policy = alicloud.cms.IntegrationPolicy("default",
        policy_type="ECS",
        integration_policy_name=name,
        workspace=default_workspace.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/log"
    	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_default, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
    			Min: 10000,
    			Max: 99999,
    		})
    		if err != nil {
    			return err
    		}
    		defaultProject, err := log.NewProject(ctx, "default", &log.ProjectArgs{
    			ProjectName: pulumi.Sprintf("%v-%v", name, _default.Result),
    		})
    		if err != nil {
    			return err
    		}
    		defaultWorkspace, err := cms.NewWorkspace(ctx, "default", &cms.WorkspaceArgs{
    			WorkspaceName: pulumi.String(pulumi.String(name)),
    			SlsProject:    defaultProject.ProjectName,
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cms.NewIntegrationPolicy(ctx, "default", &cms.IntegrationPolicyArgs{
    			PolicyType:            pulumi.String("ECS"),
    			IntegrationPolicyName: pulumi.String(pulumi.String(name)),
    			Workspace:             defaultWorkspace.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    using Random = Pulumi.Random;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new Random.Index.Integer("default", new()
        {
            Min = 10000,
            Max = 99999,
        });
    
        var defaultProject = new AliCloud.Log.Project("default", new()
        {
            ProjectName = $"{name}-{@default.Result}",
        });
    
        var defaultWorkspace = new AliCloud.Cms.Workspace("default", new()
        {
            WorkspaceName = name,
            SlsProject = defaultProject.ProjectName,
        });
    
        var defaultIntegrationPolicy = new AliCloud.Cms.IntegrationPolicy("default", new()
        {
            PolicyType = "ECS",
            IntegrationPolicyName = name,
            Workspace = defaultWorkspace.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.random.Integer;
    import com.pulumi.random.IntegerArgs;
    import com.pulumi.alicloud.log.Project;
    import com.pulumi.alicloud.log.ProjectArgs;
    import com.pulumi.alicloud.cms.Workspace;
    import com.pulumi.alicloud.cms.WorkspaceArgs;
    import com.pulumi.alicloud.cms.IntegrationPolicy;
    import com.pulumi.alicloud.cms.IntegrationPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new Integer("default", IntegerArgs.builder()
                .min(10000)
                .max(99999)
                .build());
    
            var defaultProject = new Project("defaultProject", ProjectArgs.builder()
                .projectName(String.format("%s-%s", name,default_.result()))
                .build());
    
            var defaultWorkspace = new Workspace("defaultWorkspace", WorkspaceArgs.builder()
                .workspaceName(name)
                .slsProject(defaultProject.projectName())
                .build());
    
            var defaultIntegrationPolicy = new IntegrationPolicy("defaultIntegrationPolicy", IntegrationPolicyArgs.builder()
                .policyType("ECS")
                .integrationPolicyName(name)
                .workspace(defaultWorkspace.id())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: random:Integer
        properties:
          min: 10000
          max: 99999
      defaultProject:
        type: alicloud:log:Project
        name: default
        properties:
          projectName: ${name}-${default.result}
      defaultWorkspace:
        type: alicloud:cms:Workspace
        name: default
        properties:
          workspaceName: ${name}
          slsProject: ${defaultProject.projectName}
      defaultIntegrationPolicy:
        type: alicloud:cms:IntegrationPolicy
        name: default
        properties:
          policyType: ECS
          integrationPolicyName: ${name}
          workspace: ${defaultWorkspace.id}
    

    📚 Need more examples? VIEW MORE EXAMPLES

    Create IntegrationPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new IntegrationPolicy(name: string, args: IntegrationPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def IntegrationPolicy(resource_name: str,
                          args: IntegrationPolicyArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def IntegrationPolicy(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          integration_policy_name: Optional[str] = None,
                          policy_type: Optional[str] = None,
                          workspace: Optional[str] = None,
                          entity_group: Optional[IntegrationPolicyEntityGroupArgs] = None,
                          force: Optional[bool] = None)
    func NewIntegrationPolicy(ctx *Context, name string, args IntegrationPolicyArgs, opts ...ResourceOption) (*IntegrationPolicy, error)
    public IntegrationPolicy(string name, IntegrationPolicyArgs args, CustomResourceOptions? opts = null)
    public IntegrationPolicy(String name, IntegrationPolicyArgs args)
    public IntegrationPolicy(String name, IntegrationPolicyArgs args, CustomResourceOptions options)
    
    type: alicloud:cms:IntegrationPolicy
    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 IntegrationPolicyArgs
    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 IntegrationPolicyArgs
    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 IntegrationPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IntegrationPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IntegrationPolicyArgs
    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 integrationPolicyResource = new AliCloud.Cms.IntegrationPolicy("integrationPolicyResource", new()
    {
        IntegrationPolicyName = "string",
        PolicyType = "string",
        Workspace = "string",
        EntityGroup = new AliCloud.Cms.Inputs.IntegrationPolicyEntityGroupArgs
        {
            ClusterEntityType = "string",
            ClusterId = "string",
        },
        Force = false,
    });
    
    example, err := cms.NewIntegrationPolicy(ctx, "integrationPolicyResource", &cms.IntegrationPolicyArgs{
    	IntegrationPolicyName: pulumi.String("string"),
    	PolicyType:            pulumi.String("string"),
    	Workspace:             pulumi.String("string"),
    	EntityGroup: &cms.IntegrationPolicyEntityGroupArgs{
    		ClusterEntityType: pulumi.String("string"),
    		ClusterId:         pulumi.String("string"),
    	},
    	Force: pulumi.Bool(false),
    })
    
    var integrationPolicyResource = new IntegrationPolicy("integrationPolicyResource", IntegrationPolicyArgs.builder()
        .integrationPolicyName("string")
        .policyType("string")
        .workspace("string")
        .entityGroup(IntegrationPolicyEntityGroupArgs.builder()
            .clusterEntityType("string")
            .clusterId("string")
            .build())
        .force(false)
        .build());
    
    integration_policy_resource = alicloud.cms.IntegrationPolicy("integrationPolicyResource",
        integration_policy_name="string",
        policy_type="string",
        workspace="string",
        entity_group={
            "cluster_entity_type": "string",
            "cluster_id": "string",
        },
        force=False)
    
    const integrationPolicyResource = new alicloud.cms.IntegrationPolicy("integrationPolicyResource", {
        integrationPolicyName: "string",
        policyType: "string",
        workspace: "string",
        entityGroup: {
            clusterEntityType: "string",
            clusterId: "string",
        },
        force: false,
    });
    
    type: alicloud:cms:IntegrationPolicy
    properties:
        entityGroup:
            clusterEntityType: string
            clusterId: string
        force: false
        integrationPolicyName: string
        policyType: string
        workspace: string
    

    IntegrationPolicy 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 IntegrationPolicy resource accepts the following input properties:

    IntegrationPolicyName string
    The policy name.
    PolicyType string
    The policy type.
    Workspace string
    The workspace.
    EntityGroup Pulumi.AliCloud.Cms.Inputs.IntegrationPolicyEntityGroup
    The entity group used to create the policy. See entityGroup below.
    Force bool
    Specifies whether to force delete the cloud native appliance. Valid values:
    IntegrationPolicyName string
    The policy name.
    PolicyType string
    The policy type.
    Workspace string
    The workspace.
    EntityGroup IntegrationPolicyEntityGroupArgs
    The entity group used to create the policy. See entityGroup below.
    Force bool
    Specifies whether to force delete the cloud native appliance. Valid values:
    integrationPolicyName String
    The policy name.
    policyType String
    The policy type.
    workspace String
    The workspace.
    entityGroup IntegrationPolicyEntityGroup
    The entity group used to create the policy. See entityGroup below.
    force Boolean
    Specifies whether to force delete the cloud native appliance. Valid values:
    integrationPolicyName string
    The policy name.
    policyType string
    The policy type.
    workspace string
    The workspace.
    entityGroup IntegrationPolicyEntityGroup
    The entity group used to create the policy. See entityGroup below.
    force boolean
    Specifies whether to force delete the cloud native appliance. Valid values:
    integration_policy_name str
    The policy name.
    policy_type str
    The policy type.
    workspace str
    The workspace.
    entity_group IntegrationPolicyEntityGroupArgs
    The entity group used to create the policy. See entityGroup below.
    force bool
    Specifies whether to force delete the cloud native appliance. Valid values:
    integrationPolicyName String
    The policy name.
    policyType String
    The policy type.
    workspace String
    The workspace.
    entityGroup Property Map
    The entity group used to create the policy. See entityGroup below.
    force Boolean
    Specifies whether to force delete the cloud native appliance. Valid values:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the IntegrationPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    The region ID of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    RegionId string
    The region ID of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    The region ID of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    regionId string
    The region ID of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    region_id str
    The region ID of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    regionId String
    The region ID of the resource.

    Look up Existing IntegrationPolicy Resource

    Get an existing IntegrationPolicy 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?: IntegrationPolicyState, opts?: CustomResourceOptions): IntegrationPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            entity_group: Optional[IntegrationPolicyEntityGroupArgs] = None,
            force: Optional[bool] = None,
            integration_policy_name: Optional[str] = None,
            policy_type: Optional[str] = None,
            region_id: Optional[str] = None,
            workspace: Optional[str] = None) -> IntegrationPolicy
    func GetIntegrationPolicy(ctx *Context, name string, id IDInput, state *IntegrationPolicyState, opts ...ResourceOption) (*IntegrationPolicy, error)
    public static IntegrationPolicy Get(string name, Input<string> id, IntegrationPolicyState? state, CustomResourceOptions? opts = null)
    public static IntegrationPolicy get(String name, Output<String> id, IntegrationPolicyState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:cms:IntegrationPolicy    get:      id: ${id}
    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:
    EntityGroup Pulumi.AliCloud.Cms.Inputs.IntegrationPolicyEntityGroup
    The entity group used to create the policy. See entityGroup below.
    Force bool
    Specifies whether to force delete the cloud native appliance. Valid values:
    IntegrationPolicyName string
    The policy name.
    PolicyType string
    The policy type.
    RegionId string
    The region ID of the resource.
    Workspace string
    The workspace.
    EntityGroup IntegrationPolicyEntityGroupArgs
    The entity group used to create the policy. See entityGroup below.
    Force bool
    Specifies whether to force delete the cloud native appliance. Valid values:
    IntegrationPolicyName string
    The policy name.
    PolicyType string
    The policy type.
    RegionId string
    The region ID of the resource.
    Workspace string
    The workspace.
    entityGroup IntegrationPolicyEntityGroup
    The entity group used to create the policy. See entityGroup below.
    force Boolean
    Specifies whether to force delete the cloud native appliance. Valid values:
    integrationPolicyName String
    The policy name.
    policyType String
    The policy type.
    regionId String
    The region ID of the resource.
    workspace String
    The workspace.
    entityGroup IntegrationPolicyEntityGroup
    The entity group used to create the policy. See entityGroup below.
    force boolean
    Specifies whether to force delete the cloud native appliance. Valid values:
    integrationPolicyName string
    The policy name.
    policyType string
    The policy type.
    regionId string
    The region ID of the resource.
    workspace string
    The workspace.
    entity_group IntegrationPolicyEntityGroupArgs
    The entity group used to create the policy. See entityGroup below.
    force bool
    Specifies whether to force delete the cloud native appliance. Valid values:
    integration_policy_name str
    The policy name.
    policy_type str
    The policy type.
    region_id str
    The region ID of the resource.
    workspace str
    The workspace.
    entityGroup Property Map
    The entity group used to create the policy. See entityGroup below.
    force Boolean
    Specifies whether to force delete the cloud native appliance. Valid values:
    integrationPolicyName String
    The policy name.
    policyType String
    The policy type.
    regionId String
    The region ID of the resource.
    workspace String
    The workspace.

    Supporting Types

    IntegrationPolicyEntityGroup, IntegrationPolicyEntityGroupArgs

    ClusterEntityType string
    The cluster entity type.
    ClusterId string
    The cluster ID.
    ClusterEntityType string
    The cluster entity type.
    ClusterId string
    The cluster ID.
    clusterEntityType String
    The cluster entity type.
    clusterId String
    The cluster ID.
    clusterEntityType string
    The cluster entity type.
    clusterId string
    The cluster ID.
    cluster_entity_type str
    The cluster entity type.
    cluster_id str
    The cluster ID.
    clusterEntityType String
    The cluster entity type.
    clusterId String
    The cluster ID.

    Import

    Cms Integration Policy can be imported using the id, e.g.

    $ pulumi import alicloud:cms/integrationPolicy:IntegrationPolicy 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
    Viewing docs for Alibaba Cloud v3.101.0
    published on Tuesday, Apr 28, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.