Queries listeners associated with specified security policies.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListSecurityPolicyRelations

The operation that you want to perform. Set the value to ListSecurityPolicyRelations.

SecurityPolicyIds Array of String Yes spy-n0kn923****

The IDs of the security policies. You can specify up to 5 security policies at a time.

Response parameters

Parameter Type Example Description
RequestId String 593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3

The ID of the request.

SecrityPolicyRelations Array of SecrityPolicyRelation

The relations between the security policies and the listeners that are associated with them.

RelatedListeners Array of RelatedListener

The listeners that associated with the security policy.

ListenerId String lsn-0bfuc****

The ID of the listener.

ListenerPort Long 80

The port that is used by the listener.

ListenerProtocol String HTTPS

The protocol that is used by the listener.

LoadBalancerId String lb-bp1o94dp5i6ea****

The ID of the SLB instance.

SecurityPolicyId String scp-bp1bpn0kn9****

The ID of the security policy.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListSecurityPolicyRelations
&SecurityPolicyIds=["spy-n0kn923****"]
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListSecurityPolicyRelationsResponse>
    <RequestId>593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3</RequestId>
    <SecrityPolicyRelations>
        <RelatedListeners>
            <ListenerId>lsn-0bfuc****</ListenerId>
            <ListenerPort>80</ListenerPort>
            <ListenerProtocol>HTTPS</ListenerProtocol>
            <LoadBalancerId>lb-bp1o94dp5i6ea****</LoadBalancerId>
        </RelatedListeners>
        <SecurityPolicyId>scp-bp1bpn0kn9****</SecurityPolicyId>
    </SecrityPolicyRelations>
</ListSecurityPolicyRelationsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "593B0448-D13E-4C56-AC0D-FDF0FDE0E9A3",
  "SecrityPolicyRelations" : [ {
    "RelatedListeners" : [ {
      "ListenerId" : "lsn-0bfuc****",
      "ListenerPort" : 80,
      "ListenerProtocol" : "HTTPS",
      "LoadBalancerId" : "lb-bp1o94dp5i6ea****"
    } ],
    "SecurityPolicyId" : "scp-bp1bpn0kn9****"
  } ]
}

Error codes

HttpCode Error code Error message Description
404 ResourceNotFound.SecurityPolicy The specified resource %s is not found. The error message returned because the specified resource %s does not exist.

For a list of error codes, visit the API Error Center.