Updated on 2022-09-01 GMT+08:00

Modifying an Access Control Policy

Function

This API is used to modify a specified access control policy. Only attributes acl_name, acl_type, and acl_value can be modified.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

PUT

/v1.0/apigw/acls/{id}

The following table lists the parameter in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

id

Yes

String

ID of the access control policy that you want to modify. Obtain the ID by querying the access control policy.

Request

Table 3 Parameter description

Parameter

Type

Description

acl_name

String

Name of the access control policy

The name of an access control policy consists of 3–64 characters, starting with a letter. Only letters, digits, and underscores (_) are allowed.

acl_type

String

Access control type, which can be:

  • PERMIT (whitelist)
  • DENY (blacklist)

acl_value

String

One or more objects from which the access will be controlled. Separate multiple objects with commas.

Example request:

{
"acl_name": "string",
	"acl_type": "PERMIT",
	"acl_value": "19asdfaf-adfadf"
}

Response

Table 4 Parameter description

Name

Type

Description

id

String

Access control policy ID

acl_name

String

Access control policy name

acl_type

String

Access control type, which can be:

  • PERMIT (whitelist)
  • DENY (blacklist)

acl_value

String

Access control objects

update_time

Timestamp

Time when the access control policy was last updated

Example response:

{
	"id": "d402b35e-1054-4280-b1c5-0d741a28c995",
	"acl_name": "goodone",

	"acl_type": "PERMIT",
	"acl_value": "19asdfaf-adfadf",
	"update_time": "2017-11-18T14:27:36.918578+08:00"
}

Status Codes

Table 5 Status codes

Status Code

Description

200

OK

400

Bad Request

403

Forbidden

404

Not Found