All Products
Search
Document Center

ApsaraMQ for Kafka:UpdateAllowedIp

Last Updated:Mar 15, 2024

Updates the IP address whitelist of an ApsaraMQ for Kafka instance. Only IP addresses and ports that are configured in the IP address whitelist of an instance can access the instance.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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
alikafka:UpdateInstanceWrite
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

The ID of the region where the instance resides.

cn-hangzhou
UpdateTypestringYes

The type of configuration change. Valid values:

  • add
  • delete
add
PortRangestringYes

The port range. Valid values:

  • 9092/9092: the port range for access from virtual private clouds (VPCs) by using the default endpoint.
  • 9093/9093: the port range for access from the Internet.
  • 9094/9094: the port range for access from VPCs by using the Simple Authentication and Security Layer (SASL) endpoint.
  • 9095/9095: the port range for access from VPCs by using the Secure Sockets Layer (SSL) endpoint.

This parameter must correspond to AllowdedListType.

9092/9092
AllowedListTypestringYes

The type of the whitelist. Valid values:

  • vpc: a whitelist for access from a VPC.
  • internet: a whitelist for access from the Internet.
vpc
AllowedListIpstringYes

The IP addresses that you want to manage. You can specify a CIDR block. Example: 192.168.0.0/16.

  • If the UpdateType parameter is set to add, specify one or more IP addresses for this parameter. Separate multiple IP addresses with commas (,).
  • If the UpdateType parameter is set to delete, specify only one IP address.
  • Exercise caution when you delete IP addresses.
0.0.0.0/0
InstanceIdstringYes

The ID of the instance.

alikafka_pre-cn-0pp1cng20***
DescriptionstringNo

The description of the whitelist.

tf-testAccEcsImageConfigBasic3549descriptionChange

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code that is returned. The HTTP status code 200 indicates that the request is successful.

200
Messagestring

The message returned.

operation success.
RequestIdstring

The ID of the request.

17D425C2-4EA3-4AB8-928D-E10511ECF***
Successboolean

Indicates whether the request is successful.

true

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "operation success.",
  "RequestId": "17D425C2-4EA3-4AB8-928D-E10511ECF***",
  "Success": true
}

Error codes

HTTP status codeError codeError message
400WHITE.PARAM.ERROR%s. Please check and try again later.
400WHITE.OVER.LENGTH.ERROR%s. Please check and try again later.
400WHITE.IPLIST.OVERLONG.ERROR%s. Please check and try again later.
400WHITE.IP.ILLEGAL.ERROR%s. Please check and try again later.
400WHITE.IP.ALREADY.EXISTS.ERROR%s. Please check and try again later.
400WHITE.DELETE.ERROR%s. Please check and try again later.

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

Change history

Change timeSummary of changesOperation
2022-09-20The Error code has changed. The request parameters of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Description