ListIpMappingRules

更新时间:
复制 MD 格式

Call the ListIpMappingRules API to retrieve IP redirection information for authorization rules.

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

iotcc:ListIpMappingRules

list

*CloudConnector

acs:iotcc:{#regionId}:{#accountId}:cloudconnector/{#CloudConnectorId}

None None

Request parameters

Parameter

Type

Required

Description

Example

IoTCloudConnectorId

string

Yes

ID of the cloud connector instance.

iotcc-bp1odcab8tmno0hdq****

IpMappingRuleIds

array

No

IDs of authorization rules that require IP redirection.

string

No

IDs of authorization rules that require IP redirection. You can specify up to 20 IDs.

im-irrp3bzuu5nrbx****

MappingIps

array

No

IP addresses that require redirection.

string

No

IP addresses that require redirection. You can specify up to 20 addresses.

47.0.XX.XX

IpMappingRuleStatuses

array

No

Status of IP redirection for authorization rules. You can specify up to 20 statuses. Valid values:

  • Creating: The rule is being created.

  • Created: The rule is created.

  • Updating: The rule is being updated.

  • Associating: An IP address is being attached.

  • Dissociating: An IP address is being detached.

  • Deleting: The rule is being deleted.

  • Deleted: The rule is deleted.

string

No

Status of IP redirection for authorization rules. You can specify up to 20 statuses. Valid values:

  • Creating: The rule is being created.

  • Created: The rule is created.

  • Updating: The rule is being updated.

  • Associating: An IP address is being attached.

  • Dissociating: An IP address is being detached.

  • Deleting: The rule is being deleted.

  • Deleted: The rule is deleted.

Created

IpMappingRuleNames

array

No

Names of authorization rules that require IP redirection.

string

No

Names of authorization rules that require IP redirection. You can specify up to 20 names.

The name must be 2 to 128 characters in length and can contain letters, digits, periods (.), underscores (_), and hyphens (-). It must start with a letter or Chinese character.

name

DestinationIps

array

No

Target IP addresses for redirection.

string

No

Target IP addresses for redirection. You can specify up to 20 addresses.

192.168.10.8

NextToken

string

No

Token for the next query. Valid values:

  • Omit this parameter for the first query or when no more results are available.

  • For subsequent queries, use the NextToken value returned by the previous API call.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

No

The number of entries to display per page when you query in batches. Valid values are 1 to 100. The default value is 20.

20

RegionId

string

Yes

ID of the region where the instance resides.

You can call the ListRegions API to query region IDs.

cn-hangzhou

Response elements

Element

Type

Description

Example

object

Request ID.

RequestId

string

Request ID.

CEF72CEB-54B6-4AE8-B225-F876FF7BA984

TotalCount

integer

Total number of entries in the list.

10

NextToken

string

Token for the next query. Valid values:

  • If NextToken is empty, no more results are available.

  • If NextToken has a value, use it as the starting token for the next query.

FFmyTO70tTpLG6I3FmYAXGKPd****

MaxResults

integer

Maximum number of entries to return per page.

20

IpMappingRules

array<object>

List of IP redirection rules for authorization.

object

List of IP redirection rules for authorization.

IoTCloudConnectorId

string

ID of the cloud connector instance.

iotcc-bp1odcab8tmno0hdq****

IpMappingRuleId

string

ID of the authorization rule that requires IP redirection.

im-irrp3bzuu5nrbx****

IpMappingRuleStatus

string

Status of IP redirection for the authorization rule. Valid values:

  • Creating: The rule is being created.

  • Created: The rule is created.

  • Updating: The rule is being updated.

  • Associating: An IP address is being attached.

  • Dissociating: An IP address is being detached.

  • Deleting: The rule is being deleted.

  • Deleted: The rule is deleted.

Created

MappingIp

string

IP address that requires redirection.

47.0.XX.XX

DestinationIp

string

Target IP address for redirection.

192.168.10.8

IpMappingRuleName

string

Name of the authorization rule that requires IP redirection.

name

IpMappingRuleDescription

string

Description of the authorization rule that requires IP redirection.

description

Examples

Success response

JSON format

{
  "RequestId": "CEF72CEB-54B6-4AE8-B225-F876FF7BA984",
  "TotalCount": 10,
  "NextToken": "FFmyTO70tTpLG6I3FmYAXGKPd****",
  "MaxResults": 20,
  "IpMappingRules": [
    {
      "IoTCloudConnectorId": "iotcc-bp1odcab8tmno0hdq****",
      "IpMappingRuleId": "im-irrp3bzuu5nrbx****",
      "IpMappingRuleStatus": "Created",
      "MappingIp": "47.0.XX.XX",
      "DestinationIp": "192.168.10.8",
      "IpMappingRuleName": "name",
      "IpMappingRuleDescription": "description"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 Forbidden.RAM Ram user does not have permission to perform this operation. The error message returned because the RAM user does not have the permissions to perform the operation.
400 ResourceNotFound.IoTCloudConnector The param of IoTCloudConnectorId is illegal. The error message returned because the value of the IoTCloudConnectorId parameter is invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.