Skip to main content

reassign-shared-payer-account

dci reassign-shared-payer-account <customerId> <assetId> [body]

Reassigns one AWS account under a linked shared payer - a member account or the payer's own management account - to the reseller itself or to a T3 end customer within its hierarchy. Requires the SharedPayersAdmin permission and DoiT API access (platform:externalApi). User API tokens must include the permission in their scope.

  • customerId — Customer ID. Must match the customer resolved from the bearer token - a token scoped to a different customer gets 403.
  • assetId — Asset ID of the AWS account to reassign, as returned by listSharedPayerAccountMappings.

Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.

Request​

Content-Type: application/json

FieldTypeRequiredDescription
customerIdstringyesCustomer to reassign the account to: \{customerId\} (the reseller itself) or a T3 end customer within its hierarchy.
Raw JSON schema
{
"type": "object",
"required": [
"customerId"
],
"properties": {
"customerId": {
"type": "string",
"description": "Customer to reassign the account to: `{customerId}` (the reseller itself) or a T3 end customer within its hierarchy."
}
}
}

Output​

OK - Account reassigned.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

FieldTypeDescription
assetIdstringAsset ID of the reassigned account.
customerIdstringCustomer the account was reassigned to.
Raw JSON schema
{
"type": "object",
"properties": {
"assetId": {
"type": "string",
"description": "Asset ID of the reassigned account."
},
"customerId": {
"type": "string",
"description": "Customer the account was reassigned to."
}
}
}

Errors​

On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.

HTTP status to exit code mapping
HTTP statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.
50040API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: reassignsharedpayeraccount