Skip to main content

Gets a policy

GET 

https://apis.<domain>/iam/policies/:id

Returns the details for a policy.

Authorization Action:

iam:policies:get

Request

Path Parameters

    id stringrequired

    ID of the policy.

Responses

A successful response.

Schema
    policy object
    namestring

    Name for the policy.

    idstring

    Unique ID. Cannot be changed.

    typecompiuta.api.iam.v2.Type (string)

    Possible values: [COMPIUTA_MANAGED, CUSTOM]

    Default value: COMPIUTA_MANAGED
    membersstring[]

    Members affected by this policy. May be empty.

    statements object[]

    Statements for the policy. Will contain one or more.

  • Array [
  • effectcompiuta.api.iam.v2.Statement.Effect (string)

    Possible values: [ALLOW, DENY]

    Default value: ALLOW
    actionsstring[]

    Actions defined inline. May be empty. Best practices recommend that you use custom roles rather than inline actions where practical.

    rolestring

    The role defines a set of actions that the statement is scoped to.

    resourcesstring[]

    Resources defined inline.

    tenantsstring[]

    The tenant list defines the set of resources that the statement is scoped to. May be empty.

  • ]
  • tenantsstring[]

    List of tenants this policy belongs to. May be empty.

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://apis.<domain>/iam/policies/:id");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://apis.<domain>
Parameters
— pathrequired