Check existence of user created policy

Prev Next

Available in Classic and VPC

Check for the existence of a User Created policy in a permission set.

Request

This section describes the request format. The method and URI are as follows:

Method URI
GET /api/v1/permission-sets/{permissionSetId}/exists-policy

Request headers

For information about the headers common to all Ncloud Single Sign-On APIs, see Ncloud Single Sign-On request headers.

Request path parameters

You can use the following path parameters with your request:

Field Type Required Description
permissionSetId String Required Permission set ID

Request query parameters

You can use the following query parameters with your request:

Field Type Required Description
policyName String Required User Created policy name

Request example

The request example is as follows:

curl --location --request GET 'https://sso.apigw.ntruss.com/api/v1/permission-sets/23ab7cb3-****-****-****-0b2222cb93e5/exists-policy?policyName=policy000' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
success Boolean - API processing result
  • true | false
    • true: There is no account to which the permission set is assigned, or the target account has a user created policy
    • false: There is an account assigned a permission set, but the target account does not have a user created policy
message Array - Result message
  • Displayed if success is false

message

The following describes message.

Field Type Required Description
accountName String - Account username
accountMbrNo Number - Account member ID (MemberNo)

Response status codes

For information about the response status codes common to all Ncloud Single Sign-On APIs, see Ncloud Single Sign-On response status codes.

Response example

The response example is as follows:

If user created policy exists

The following is a sample response if an user created policy exists.

{
    "success": true
}

If user created policy does not exist

The following is a sample response if an user created policy doesn't exist.

{
    "success": false,
    "message": [
        {
            "accountName": "Gildong Hong",
            "accountMbrNo": *******
        }
    ]
}