CreateIntegrationPolicy

Updated at:

Creates an access center policy.

Operation description

Creates an event integration.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:CreateIntegrationPolicy

create

*All Resource

*

None None

Request syntax

POST /integration-policies HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

entityGroup

object

No

The entity group used to create the policy. You can quickly create the policy by using the entity group. The clusterId and vpcId parameters are independent of each other.

clusterEntityType

string

No

The cluster entity type, such as acs.ack.cluster, acs.one.cluster, acs.asi.cluster, or others.

acs.ack.cluster

clusterId

string

No

The cluster ID.

na61prod3-na61cloudhdfsssd

entityUserId

string

No

The ID of the user to which the cluster belongs.

12xxxx

entityGroupId

string

No

The entity group ID.

eg-b79f65d11fb94e779867cf937c3a3002

vpcId

string

No

The VPC ID.

vpc-bp18fgg3ffxa9czna40xt

disablePolicyShare

boolean

No

Specifies whether to disable unique policy binding. If this feature is enabled, you can create multiple policies for a single container cluster.

true

clusterNamespace

string

No

The namespace where the probe is deployed.

arms-prom

policyName

string

No

The policy name.

prod-database

policyType

string

Yes

The policy type, such as CS, ECS, or Cloud.

CS

resourceGroupId

string

No

The resource group ID.

rg-aekz2km4kmhtbii

tags

array<object>

No

The resource tags.

object

No

The resource tags.

key

string

No

The tag key.

use

value

string

No

The tag value.

database

workspace

string

No

The workspace. If you do not specify this parameter, a default workspace is created or used.

prometheus

apiVersion

string

No

The policy creation version. Valid values: v1 and v2. If you do not specify this parameter or leave it empty, v2 is used. If you specify v1, a v1-compatible environment is created for ECS and Cloud.

v2

Response elements

Element

Type

Description

Example

object

policy

object

The policy.

entityGroupId

string

The entity group ID.

eg-b79f65d11fb94e779867cf937c3a3002

policyId

string

The policy ID.

policy-14c8e9a29b0a46da843f8781471062ff

policyName

string

The policy name.

metrics-inner-manage

policyType

string

The policy type.

CS

regionId

string

The region ID.

cn-heyuan

userId

string

The user ID.

u1234567

workspace

string

The workspace where the policy resides.

prometheus

requestId

string

The request ID.

CD8BA7D6-995D-578D-9941-78B0FECD14B5

created

boolean

Indicates whether the policy is created.

true

Examples

Success response

JSON format

{
  "policy": {
    "entityGroupId": "eg-b79f65d11fb94e779867cf937c3a3002",
    "policyId": "policy-14c8e9a29b0a46da843f8781471062ff",
    "policyName": "metrics-inner-manage",
    "policyType": "CS",
    "regionId": "cn-heyuan",
    "userId": "u1234567",
    "workspace": "prometheus"
  },
  "requestId": "CD8BA7D6-995D-578D-9941-78B0FECD14B5",
  "created": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.