All Products
Search
Document Center

Resource Management:RejectResourceShareInvitation

Last Updated:Nov 19, 2024

Rejects a resource sharing invitation.

Operation description

This topic provides an example on how to call the API operation to reject the resource sharing invitation i-yyTWbkjHArYh**** in the cn-hangzhou region.

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
resourcesharing:RejectResourceShareInvitationupdate
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ResourceShareInvitationIdstringYes

The ID of the resource sharing invitation.

You can call the ListResourceShareInvitations operation to obtain the ID of a resource sharing invitation.

i-yyTWbkjHArYh****

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

E446D6DE-BFC8-5F37-A494-33D7B118147D
ResourceShareInvitationobject

The information of the resource sharing invitation.

ResourceShareInvitationIdstring

The ID of the invitation.

i-yyTWbkjHArYh****
ResourceShareIdstring

The ID of the resource share.

rs-JoA1Ayjm****
ResourceShareNamestring

The name of the resource share.

example
SenderAccountIdstring

The Alibaba Cloud account ID of the inviter.

151266687691****
ReceiverAccountIdstring

The Alibaba Cloud account ID of the invitee.

134254031178****
CreateTimestring

The time when the invitation was created. The time is displayed in UTC.

2022-09-02T07:07:30.809Z
Statusstring

The status of the invitation. Valid values:

  • Pending: The invitation is waiting for confirmation.
  • Accepted: The invitation is accepted.
  • Cancelled: The invitation is canceled.
  • Rejected: The invitation is rejected.
  • Expired: The invitation has expired.
Rejected

Examples

Sample success responses

JSONformat

{
  "RequestId": "E446D6DE-BFC8-5F37-A494-33D7B118147D",
  "ResourceShareInvitation": {
    "ResourceShareInvitationId": "i-yyTWbkjHArYh****",
    "ResourceShareId": "rs-JoA1Ayjm****",
    "ResourceShareName": "example",
    "SenderAccountId": "151266687691****",
    "ReceiverAccountId": "134254031178****",
    "CreateTime": "2022-09-02T07:07:30.809Z",
    "Status": "Rejected"
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameter.ResourceShareInvitationIdThe ResourceShareInvitationId is invalid.The invitation ID is invalid.
400MissingParameter.ResourceShareInvitationIdYou must specify ResourceShareInvitationId.You must specify an invitation ID.
409InvitationStatus.ExpiredThe resource share invitation status is expired.The invitation has expired.
409EntityNotExists.ResourceShareInvitationThe resource share invitation does not exist in the current account.The invitation does not exist.
409InvitationStatus.AlreadyRejectedThe resource share invitation status is rejected.The invitation has been rejected.
409InvitationStatus.AlreadyAcceptedThe resource share invitation status is alredy accepted.The invitation has been accepted.

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

Change history

Change timeSummary of changesOperation
No change history