CreateUserProvisioning

Updated at:
Copy as MD

Invokes CreateUserProvisioning to create a Resource Access Management (RAM) user synchronization.

Operation description

You can create a Resource Access Management (RAM) user synchronization to synchronously create a Resource Access Management (RAM) user that has the same name as a CloudSSO user in the destination account in a resource directory, and then use the Resource Access Management (RAM) user to access resources in the account.

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

cloudsso:CreateUserProvisioning

create

*UserProvisioning

acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}/user-provisioning/*

*Account

acs:resourcemanager::{#accountId}:account/{#AccountId}

Group

acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}/group/{#GroupId}

User

acs:cloudsso:{#regionId}:{#accountId}:directory/{#DirectoryId}/user/{#UserId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DirectoryId

string

Yes

The ID of the CloudSSO directory.

d-003qew84****

DuplicationStrategy

string

Yes

The conflict resolution policy. This policy specifies how to handle conflicts when a CloudSSO user is synchronized to Resource Access Management (RAM) user with the same name already exists. Valid values:

  • KeepBoth: Keep both. When a CloudSSO user is synchronized to Resource Access Management (RAM) user with the same name already exists, the system appends the _sso suffix to the username of the CloudSSO user and attempts to create a RAM user with the new username.

  • TakeOver: Take over. When a CloudSSO user is synchronized to Resource Access Management (RAM) user with the same name already exists, the system directly replaces the existing RAM user with the synchronized CloudSSO user.

KeepBoth

DeletionStrategy

string

Yes

The deletion policy. This policy specifies how to handle the synchronized Resource Access Management (RAM) users when the Resource Access Management (RAM) user synchronization is deleted. Valid values:

  • Delete: Delete. When the Resource Access Management (RAM) user synchronization is deleted, the Resource Access Management (RAM) users that have been synchronized from CloudSSO to RAM are deleted.

  • Keep: Keep. When the Resource Access Management (RAM) user synchronization is deleted, the Resource Access Management (RAM) users that have been synchronized from CloudSSO to RAM are retained.

Delete

Description

string

No

The description.

This is a user provisioning.

PrincipalId

string

Yes

The ID of the identity for the Resource Access Management (RAM) user synchronization. Valid values:

  • If PrincipalType is set to Group, the value is the ID of the CloudSSO group (g-********).

  • If PrincipalType is set to User, the value is the ID of the CloudSSO user (u-********).

g-02ha881d*****

PrincipalType

string

Yes

The type of the Resource Access Management (RAM) user synchronization. Valid values:

  • User: The Resource Access Management (RAM) user synchronization is a CloudSSO user.

  • Group: The Resource Access Management (RAM) user synchronization is a CloudSSO group.

Group

TargetId

string

Yes

The ID of the destination for the Resource Access Management (RAM) user synchronization. Currently, the value is the ID of the account in a resource directory.

1743382******

TargetType

string

Yes

The type of the destination for the Resource Access Management (RAM) user synchronization. Currently, the value is RD-Account.

RD-Account

Response elements

Element

Type

Description

Example

object

The response parameters.

UserProvisioning

object

The Resource Access Management (RAM) user synchronization information.

Status

string

The status of the Resource Access Management (RAM) user synchronization. Valid values:

  • Enabled: The Resource Access Management (RAM) user synchronization is enabled.

  • Disabled: The Resource Access Management (RAM) user synchronization is disabled.

Enabled

Description

string

The description.

This is a user provisioning.

UserProvisioningId

string

The ID of the Resource Access Management (RAM) user synchronization.

up-002axzhapcbz6e63****

PrincipalId

string

The ID of the identity for the Resource Access Management (RAM) user synchronization. Valid values:

  • If PrincipalType is set to Group, the value is the ID of the CloudSSO group (g-********).

  • If PrincipalType is set to User, the value is the ID of the CloudSSO user (u-********).

g-02ha881d*****

TargetPath

string

The path of the destination account in a resource directory for the Resource Access Management (RAM) user synchronization.

rd-******/root/test**

UpdateTime

string

The update time. The time is displayed in UTC.

2022-11-28T03:55:42Z

DuplicationStrategy

string

The conflict resolution policy. This policy specifies how to handle conflicts when a CloudSSO user is synchronized to Resource Access Management (RAM) user with the same name already exists. Valid values:

  • KeepBoth: Keep both. When a CloudSSO user is synchronized to Resource Access Management (RAM) user with the same name already exists, the system appends the _sso suffix to the username of the CloudSSO user and attempts to create a RAM user with the new username.

  • TakeOver: Take over. When a CloudSSO user is synchronized to Resource Access Management (RAM) user with the same name already exists, the system directly replaces the existing RAM user with the synchronized CloudSSO user.

KeepBoth

DeletionStrategy

string

The deletion policy. This policy specifies how to handle the synchronized Resource Access Management (RAM) users when the Resource Access Management (RAM) user synchronization is deleted. Valid values:

  • Delete: Delete. When the Resource Access Management (RAM) user synchronization is deleted, the Resource Access Management (RAM) users that have been synchronized from CloudSSO to RAM are deleted.

  • Keep: Keep. When the Resource Access Management (RAM) user synchronization is deleted, the Resource Access Management (RAM) users that have been synchronized from CloudSSO to RAM are retained.

Delete

PrincipalName

string

The name of the identity for the Resource Access Management (RAM) user synchronization. Valid values:

  • If PrincipalType is set to Group, the value is the name of the CloudSSO group.

  • If PrincipalType is set to User, the value is the CloudSSO username.

testGroupName

TargetName

string

The name of the destination for the Resource Access Management (RAM) user synchronization. Currently, the value is the name of the account in a resource directory.

testTargetName

TargetId

string

The ID of the destination for the Resource Access Management (RAM) user synchronization. Currently, the value is the ID of the account in a resource directory.

1743382******

CreateTime

string

The creation time. The time is displayed in UTC.

2022-11-28T03:55:42Z

DirectoryId

string

The ID of the CloudSSO directory.

d-003qew84****

OwnerPk

string

The ID of the Alibaba Cloud account to which the CloudSSO directory belongs.

1639738******

TargetType

string

The type of the destination for the Resource Access Management (RAM) user synchronization. Currently, the value is RD-Account.

RD-Account

PrincipalType

string

The type of the Resource Access Management (RAM) user synchronization. Valid values:

  • User: The Resource Access Management (RAM) user synchronization is a CloudSSO user.

  • Group: The Resource Access Management (RAM) user synchronization is a CloudSSO group.

Group

RequestId

string

The request ID.

F6F90F3D-4502-5877-B80B-97476F6AE2CC

Examples

Success response

JSON format

{
  "UserProvisioning": {
    "Status": "Enabled",
    "Description": "This is a user provisioning.",
    "UserProvisioningId": "up-002axzhapcbz6e63****",
    "PrincipalId": "g-02ha881d*****",
    "TargetPath": "rd-******/root/test**",
    "UpdateTime": "2022-11-28T03:55:42Z",
    "DuplicationStrategy": "KeepBoth",
    "DeletionStrategy": "Delete",
    "PrincipalName": "testGroupName",
    "TargetName": "testTargetName",
    "TargetId": "1743382******",
    "CreateTime": "2022-11-28T03:55:42Z",
    "DirectoryId": "d-003qew84****",
    "OwnerPk": "1639738******",
    "TargetType": "RD-Account",
    "PrincipalType": "Group"
  },
  "RequestId": "F6F90F3D-4502-5877-B80B-97476F6AE2CC"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.