All Products
Search
Document Center

Cloud Governance Center:GetEnrolledAccount

Last Updated:Nov 15, 2024

Queries the details about an account that is enrolled in the account factory.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
governance:GetEnrolledAccountget
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AccountUidlongYes

The account ID.

19534534552****
RegionIdstringNo

The region ID.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object

The information about the account.

AccountUidlong

The account ID.

12868156179*****
BaselineIdstring

The ID of the baseline that is implemented.

afb-bp1adadfadsf***
BaselineItemsarray<object>

The array that contains baseline items.

BaselineItemobject

The configuration of the baseline item

Configstring

The configuration of the baseline item.

{\"Notifications\":[{\"GroupKey\":\"account_msg\",\"Contacts\":[{\"Name\":\"aa\"}],\"PmsgStatus\":1,\"EmailStatus\":1,\"SmsStatus\":1}]}
Namestring

The name of the baseline item.

ACS-BP_ACCOUNT_FACTORY_VPC
Skipboolean

Indicates whether baseline item is skipped. Valid values:

  • false
  • true
false
Versionstring

The version of the baseline item.

1.0
CreateTimestring

The time when the account was created.

2021-11-01T02:38:27Z
DisplayNamestring

The display name of the account.

test-account
ErrorInfoobject

The error message.

Note This parameter is returned if the value of Status is Failed or ScheduleFailed.
Codestring

The error code.

CompliancePackExists
Messagestring

The error message.

The compliance pack already exists.
Recommendstring

The recommended solution.

https://next.api.aliyun.com/troubleshoot?q=CompliancePackExists\\u0026product=Config
RequestIdstring

The request ID.

6D5EAA86-2D41-5CB7-8DA7-B60093ACAA4E
FolderIdstring

The ID of the parent folder.

fd-5ESoku****
Initializedboolean

Indicates whether the initialization is complete. Valid values:

  • false
  • true
true
Inputsobject

Input parameters used to create an account.

AccountNamePrefixstring

The prefix of the account name.

test-account
AccountUidlong

The account ID.

12868156179*****
BaselineItemsarray<object>

The baseline items.

BaselineItemobject
Configstring

The configurations of the baseline item.

{\"Contacts\":[{\"Name\":\"governance\",\"Email\":\"wibud****@gmail.com\",\"Mobile\":\"1234\",\"Position\":\"Other\"}]}
Namestring

The name of the baseline item.

ACS-BP_ACCOUNT_FACTORY_VPC
Skipboolean

Indicates whether baseline item is skipped. Valid values:

  • false
  • true
false
Versionstring

The version of the baseline item.

1.0
DisplayNamestring

The display name of the account.

test-account
FolderIdstring

The ID of the parent folder.

fd-5ESoku****
PayerAccountUidlong

The ID of the settlement account.

19534534552*****
Tagarray<object>

The tag.

tagobject

The tag.

Keystring

The tag key.

product
Valuestring

The tag value.

governance
MasterAccountUidlong

The ID of the management account of the resource directory to which the account belongs.

19534534552*****
PayerAccountUidlong

The ID of the settlement account.

19534534552*****
Progressarray<object>

The progress of the applying the baseline to the account.

Progresobject

The progress of applying the account baseline to the account.

Namestring

The name of the baseline item.

ACS-BP_ACCOUNT_FACTORY_VPC
Statusstring

The status of applying the baseline to the account. Valid values:

  • Pending: The baseline is pending to be applied to the account.
  • Running: The baseline is being applied to the account.
  • Finished: : The baseline is applied to the account.
  • Failed: : The baseline fails to be applied to the account.
Running
RequestIdstring

The request ID.

768F908D-A66A-5A5D-816C-20C93CBBFEE3
Statusstring

The status of the account. Valid values:

  • Pending: The account is pending to be created.
  • Running: The account is being created.
  • Finished: The account is created.
  • Failed: The account fails to be created.
  • Scheduling: The account is being scheduled.
  • ScheduleFailed: The account fails to be scheduled.
Finished
UpdateTimestring

The update time.

2021-11-01T02:38:27Z

Examples

Sample success responses

JSONformat

{
  "AccountUid": 0,
  "BaselineId": "afb-bp1adadfadsf***",
  "BaselineItems": [
    {
      "Config": "{\\\"Notifications\\\":[{\\\"GroupKey\\\":\\\"account_msg\\\",\\\"Contacts\\\":[{\\\"Name\\\":\\\"aa\\\"}],\\\"PmsgStatus\\\":1,\\\"EmailStatus\\\":1,\\\"SmsStatus\\\":1}]}",
      "Name": "ACS-BP_ACCOUNT_FACTORY_VPC",
      "Skip": false,
      "Version": "1.0"
    }
  ],
  "CreateTime": "2021-11-01T02:38:27Z",
  "DisplayName": "test-account",
  "ErrorInfo": {
    "Code": "CompliancePackExists",
    "Message": "The compliance pack already exists.\n",
    "Recommend": "https://next.api.aliyun.com/troubleshoot?q=CompliancePackExists\\\\u0026product=Config\n",
    "RequestId": "6D5EAA86-2D41-5CB7-8DA7-B60093ACAA4E"
  },
  "FolderId": "fd-5ESoku****",
  "Initialized": true,
  "Inputs": {
    "AccountNamePrefix": "test-account",
    "AccountUid": 0,
    "BaselineItems": [
      {
        "Config": "{\\\"Contacts\\\":[{\\\"Name\\\":\\\"governance\\\",\\\"Email\\\":\\\"wibud****@gmail.com\\\",\\\"Mobile\\\":\\\"1234\\\",\\\"Position\\\":\\\"Other\\\"}]}",
        "Name": "ACS-BP_ACCOUNT_FACTORY_VPC",
        "Skip": false,
        "Version": "1.0"
      }
    ],
    "DisplayName": "test-account",
    "FolderId": "fd-5ESoku****",
    "PayerAccountUid": 0,
    "Tag": [
      {
        "Key": "product",
        "Value": "governance"
      }
    ]
  },
  "MasterAccountUid": 0,
  "PayerAccountUid": 0,
  "Progress": [
    {
      "Name": "ACS-BP_ACCOUNT_FACTORY_VPC",
      "Status": "Running"
    }
  ],
  "RequestId": "768F908D-A66A-5A5D-816C-20C93CBBFEE3",
  "Status": "Finished",
  "UpdateTime": "2021-11-01T02:38:27Z"
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter %s is not valid.The specified parameter %s is invalid.
404InvalidUser.NotFoundThe specified user does not exist.The user does not exist.
404InvalidBlueprint.NotFoundThe specified blueprint does not exist.The specified blueprint does not exist.
404InvalidEnterpriseRealName.NotFoundThe specified account has not passed enterprise real name verification. Please complete the verification for the account first.The specified account has not passed enterprise real-name verification. Please complete the verification for the account first.
500InternalErrorA system error occurred.A system error occurred.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-03-12The Error code has changed. The response structure of the API has changedView Change Details