Microsoft Azure Roles API

The Roles API from Microsoft Azure, for roles.

GitHub OpenAPI

Operations 14

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName} Get a role on a PostgreSQL cluster · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I look up one database role on my Azure PostgreSQL cluster?”
“What permissions does a specific role on a Postgres cluster have?”
Tell an agent
Get role {roleName} on PostgreSQL cluster {clusterName}.
Show the details of cluster role {roleName} in {clusterName}.
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName} Create or update a role on a PostgreSQL cluster · Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“Can I add a new database role to my Azure PostgreSQL cluster through the API?”
“How do I change an existing role on a Postgres cluster?”
Tell an agent
Create role {roleName} on PostgreSQL cluster {clusterName}.
Create or update cluster role {roleName} in {clusterName} with the given properties.
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName} Delete a role from a PostgreSQL cluster · Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I drop a role from my Azure PostgreSQL cluster?”
“Is removing a cluster role permanent?”
Tell an agent destructive · confirm first
Delete role {roleName} from PostgreSQL cluster {clusterName}.
Remove the cluster role {roleName} on {clusterName}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles List roles on a PostgreSQL cluster · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“Which roles exist on my Azure PostgreSQL cluster?”
“Can I see every database role defined in a Postgres cluster?”
Tell an agent
List all roles on PostgreSQL cluster {clusterName}.
Show every role defined in cluster {clusterName}.
GET /roles List the roles in an application · Microsoft Azure Get The List Of Roles In An Application #
Ask an LLM
“What roles are defined in my application?”
“Can I get the full list of application roles in one call?”
Tell an agent
List the roles in my application.
Show every application role using API version {apiVersion}.
GET /roles/{roleId} Get an application role by ID · Microsoft Azure Get A Role By Id #
Ask an LLM
“How do I fetch one application role when I know its ID?”
“What does a particular application role contain?”
Tell an agent
Get application role {roleId}.
Show the details of the role with ID {roleId}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roles List roles for a Customer Insights hub · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“Which roles are available in my Customer Insights hub?”
“Can I list the access roles defined for a Customer Insights hub?”
Tell an agent
List the roles for Customer Insights hub {hubName} in resource group {resourceGroupName} (subscription {subscriptionId}).
Show hub {hubName} roles in {resourceGroupName}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles List roles on a Data Box Edge device · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“What roles are configured on my Data Box Edge or Data Box Gateway device?”
“Can I see which compute roles are set up on an edge device?”
Tell an agent
List the roles on Data Box Edge device {deviceName} in {resourceGroupName} (subscription {subscriptionId}).
Show every role configured on edge device {deviceName} in resource group {resourceGroupName}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name} Get a role on a Data Box Edge device · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I read a single role's settings on a Data Box Edge device?”
“What kind of role is a named role on my edge device?”
Tell an agent
Get role {name} on Data Box Edge device {deviceName} in {resourceGroupName} (subscription {subscriptionId}).
Show the settings for edge device role {name} on {deviceName}, resource group {resourceGroupName}.
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name} Create or update a role on a Data Box Edge device · Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I add a compute role such as IoT to a Data Box Edge device?”
“Which role kind do I have to specify when configuring an edge device role?”
Tell an agent
Create a {kind} role named {name} on Data Box Edge device {deviceName} in {resourceGroupName} (subscription {subscriptionId}).
Update edge device role {name} on {deviceName} in {resourceGroupName} as kind {kind}.
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name} Delete a role from a Data Box Edge device · Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I remove a role from my Data Box Edge device?”
“Can I delete a compute role on an edge gateway without resetting the device?”
Tell an agent destructive · confirm first
Delete role {name} from Data Box Edge device {deviceName} in {resourceGroupName} (subscription {subscriptionId}).
Remove the edge device role {name} on {deviceName}, resource group {resourceGroupName}.
PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/serverGroupsv2/{serverGroupName}/roles/{roleName} Create or update a role on a Postgres server group · Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I add a role to a Hyperscale Postgres server group?”
“Can I update an existing role on a server group rather than a cluster?”
Tell an agent
Create role {roleName} on Postgres server group {serverGroupName}.
Create or update server group role {roleName} in {serverGroupName}.
DELETE /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/serverGroupsv2/{serverGroupName}/roles/{roleName} Delete a role from a Postgres server group · Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I remove a role from a Hyperscale Postgres server group?”
“Does deleting a server group role affect other roles on the group?”
Tell an agent destructive · confirm first
Delete role {roleName} from Postgres server group {serverGroupName}.
Remove server group role {roleName} on {serverGroupName}.
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/serverGroupsv2/{serverGroupName}/roles List roles on a Postgres server group · Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“Which roles exist on my Hyperscale Postgres server group?”
“Can I see every role configured on a server group?”
Tell an agent
List all roles on Postgres server group {serverGroupName}.
Show every role defined in server group {serverGroupName}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/microsoft-azure:microsoft-azure-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

microsoft-azure-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure Azure Cosmos DB for PostgreSQL Roles API
  description: Azure Cosmos DB for PostgreSQL database service resource provider REST APIs
  version: 2023-03-02-preview
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: Roles
paths:
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles/{roleName}
  : get:
      description: Gets information about a cluster role.
      tags:
      - Roles
      operationId: microsoftAzureRolesGet
      x-ms-examples:
        Get the role of the cluster:
          $ref: ./examples/RoleGet.json
      parameters:
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter
      - $ref: '#/components/parameters/ClusterNameParameter'
      - $ref: '#/components/parameters/RoleNameParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
    put:
      tags:
      - Roles
      operationId: microsoftAzureRolesCreate
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: azure-async-operation
      x-ms-examples:
        RoleCreate:
          $ref: ./examples/RoleCreate.json
      description: Creates a new role or updates an existing role.
      parameters:
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter
      - $ref: '#/components/parameters/ClusterNameParameter'
      - $ref: '#/components/parameters/RoleNameParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        '201':
          description: Accepted
          headers:
            location:
              schema:
                type: string
            azure-async-operation:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse
      summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Role'
        description: The required parameters for creating or updating a role.
        required: true
    delete:
      tags:
      - Roles
      operationId: microsoftAzureRolesDelete
      x-ms-long-running-operation: true
      x-ms-long-running-operation-options:
        final-state-via: location
      x-ms-examples:
        RoleDelete:
          $ref: ./examples/RoleDelete.json
      description: Deletes a cluster role.
      parameters:
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter
      - $ref: '#/components/parameters/ClusterNameParameter'
      - $ref: '#/components/parameters/RoleNameParameter'
      responses:
        '202':
          description: Accepted
          headers:
            location:
              schema:
                type: string
            azure-async-operation:
              schema:
                type: string
        '204':
          description: NoContent
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse
      summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups…
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}/roles
  : get:
      tags:
      - Roles
      operationId: microsoftAzureRolesListbycluster
      x-ms-examples:
        RoleList:
          $ref: ./examples/RoleListByCluster.json
      description: List all the roles in a given cluster.
      parameters:
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/parameters/ResourceGroupNameParameter
      - $ref: '#/components/parameters/ClusterNameParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: ../../../../../common-types/resource-management/v4/types.json#/definitions/ErrorResponse
      x-ms-pageable:
        nextLinkName: null
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
  /roles:
    get:
      operationId: microsoftAzureRolesList
      summary: Microsoft Azure Get The List Of Roles In An Application
      x-ms-examples:
        List roles:
          $ref: ./examples/roles_list.json
      parameters:
      - $ref: '#/components/parameters/Version'
      x-ms-pageable:
        nextLinkName: nextLink
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleCollection'
        default:
          description: An error response received from the IoT Central Service.
          headers:
            x-ms-error-code:
              description: Error code for specific error that occurred.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      description: Needs a more full description created.
      tags:
      - Roles
  /roles/{roleId}:
    get:
      operationId: microsoftAzureRolesGet
      summary: Microsoft Azure Get A Role By Id
      x-ms-examples:
        Get role by ID:
          $ref: ./examples/roles_get.json
      parameters:
      - $ref: '#/components/parameters/Version'
      - in: path
        name: roleId
        description: Unique ID for the role.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        default:
          description: An error response received from the IoT Central Service.
          headers:
            x-ms-error-code:
              description: Error code for specific error that occurred.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      description: Needs a more full description created.
      tags:
      - Roles
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/roles
  : get:
      tags:
      - Roles
      operationId: microsoftAzureRolesListbyhub
      x-ms-examples:
        Roles_ListByHub:
          $ref: ./examples/RolesListByHub.json
      description: Gets all the roles for the hub.
      parameters:
      - name: resourceGroupName
        in: path
        required: true
        description: The name of the resource group.
        schema:
          type: string
      - name: hubName
        in: path
        required: true
        description: The name of the hub.
        schema:
          type: string
      - $ref: '#/components/parameters/ApiVersionParameter'
      - $ref: '#/components/parameters/SubscriptionIdParameter'
      responses:
        '200':
          description: OK. Successfully get all the roles in the hub.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleListResult'
      x-ms-pageable:
        nextLinkName: nextLink
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles
  : get:
      tags:
      - Roles
      description: Lists all the roles configured in a Data Box Edge/Data Box Gateway device.
      operationId: microsoftAzureRolesListbydataboxedgedevice
      parameters:
      - name: deviceName
        in: path
        description: The device name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/subscriptionIdParameter'
      - $ref: '#/components/parameters/resourceGroupNameParameter'
      - $ref: '#/components/parameters/apiVersionParameter'
      responses:
        '200':
          description: List of all the roles configured in the device.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleList'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: nextLink
      x-ms-examples:
        RoleGetAllInDevice:
          $ref: ./examples/RoleGetAllInDevice.json
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/roles/{name}
  : get:
      tags:
      - Roles
      description: Gets a specific role by name.
      operationId: microsoftAzureRolesGet
      parameters:
      - name: deviceName
        in: path
        description: The device name.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The role name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/subscriptionIdParameter'
      - $ref: '#/components/parameters/resourceGroupNameParameter'
      - $ref: '#/components/parameters/apiVersionParameter'
      responses:
        '200':
          description: The role with the specified name in the given device.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-examples:
        RoleGet:
          $ref: ./examples/RoleGet.json
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
    put:
      tags:
      - Roles
      description: Create or update a role.
      operationId: microsoftAzureRolesCreateorupdate
      parameters:
      - name: deviceName
        in: path
        description: The device name.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The role name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/subscriptionIdParameter'
      - $ref: '#/components/parameters/resourceGroupNameParameter'
      - $ref: '#/components/parameters/apiVersionParameter'
      responses:
        '200':
          description: Successfully created or updated the role.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        '202':
          description: Accepted the request to create or update the role.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-examples:
        RolePut:
          $ref: ./examples/RolePut.json
      summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Role'
        description: The role properties.
        required: true
    delete:
      tags:
      - Roles
      description: Deletes the role on the device.
      operationId: microsoftAzureRolesDelete
      parameters:
      - name: deviceName
        in: path
        description: The device name.
        required: true
        schema:
          type: string
      - name: name
        in: path
        description: The role name.
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/subscriptionIdParameter'
      - $ref: '#/components/parameters/resourceGroupNameParameter'
      - $ref: '#/components/parameters/apiVersionParameter'
      responses:
        '200':
          description: Successfully deleted the role.
        '202':
          description: Accepted the request to delete the role.
        '204':
          description: The role is already deleted.
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-long-running-operation: true
      x-ms-examples:
        RoleDelete:
          $ref: ./examples/RoleDelete.json
      summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups…
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/serverGroupsv2/{serverGroupName}/roles/{roleName}
  : put:
      tags:
      - Roles
      operationId: microsoftAzureRolesCreate
      x-ms-long-running-operation: true
      x-ms-examples:
        RoleCreate:
          $ref: ./examples/RoleCreate.json
      description: Creates a new role or updates an existing role.
      parameters:
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter
      - $ref: '#/components/parameters/ServerGroupNameParameter'
      - $ref: '#/components/parameters/RoleNameParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Role'
        '202':
          description: Accepted
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Microsoft Azure Put Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Role'
        description: The required parameters for creating or updating a role.
        required: true
    delete:
      tags:
      - Roles
      operationId: microsoftAzureRolesDelete
      x-ms-long-running-operation: true
      x-ms-examples:
        RoleDelete:
          $ref: ./examples/RoleDelete.json
      description: Deletes a server group role.
      parameters:
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter
      - $ref: '#/components/parameters/ServerGroupNameParameter'
      - $ref: '#/components/parameters/RoleNameParameter'
      responses:
        '200':
          description: OK
        '202':
          description: Accepted
        '204':
          description: NoContent
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      summary: Microsoft Azure Delete Subscriptions Subscriptionid Resourcegroups…
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/serverGroupsv2/{serverGroupName}/roles
  : get:
      tags:
      - Roles
      operationId: microsoftAzureRolesListbyservergroup
      x-ms-examples:
        RoleList:
          $ref: ./examples/RoleListByServerGroup.json
      description: List all the roles in a given server group.
      parameters:
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter
      - $ref: '#/components/parameters/ServerGroupNameParameter'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleListResult'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudError'
      x-ms-pageable:
        nextLinkName: null
      summary: Microsoft Azure Get Subscriptions Subscriptionid Resourcegroups…
components:
  schemas:
    Role:
      description: Represents a cluster role.
      type: object
      allOf:
      - $ref: ../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource
      properties:
        properties:
          $ref: '#/components/schemas/RoleProperties'
          x-ms-client-flatten: true
          description: The properties of a role.
      required:
      - properties
    ProvisioningState:
      type: string
      readOnly: true
      description: The current provisioning state.
      enum:
      - Succeeded
      - Canceled
      - InProgress
      - Failed
      x-ms-enum:
        name: ProvisioningState
        modelAsString: true
    RoleListResult:
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/Role'
          description: The list of roles in a cluster.
      description: A list of roles.
      type: object
    RoleProperties:
      properties:
        roleType:
          type: string
          enum:
          - user
          - admin
          default: user
          x-ms-enum:
            name: RoleType
            modelAsString: true
        password:
          type: string
          x-ms-secret: true
          format: password
          x-ms-mutability:
          - create
          - update
          description: The password of the cluster role. If an identity is used, password will not be required.
        externalIdentity:
          type: object
          required:
          - objectId
          - principalType
          properties:
            objectId:
              type: string
              format: arm-id
            principalType:
              type: string
              enum:
              - user
              - servicePrincipal
              - group
              x-ms-enum:
                name: PrincipalType
                modelAsString: true
            tenantId:
              type: string
              format: arm-id
          x-ms-client-flatten: true
        provisioningState:
          $ref: '#/components/schemas/ProvisioningState'
          description: Provisioning state of the role
          readOnly: true
      description: The properties of a cluster role.
      type: object
    Error:
      description: The response error definition.
      type: object
      properties:
        error:
          description: Error details for current request.
          $ref: '#/components/schemas/ErrorDetails'
      required:
      - error
    RoleCollection:
      description: The paged results of roles.
      type: object
      properties:
        value:
          description: The collection of roles.
          type: array
          items:
            $ref: '#/components/schemas/Role'
        nextLink:
          description: URL to get the next page of roles.
          type: string
      required:
      - value
    ErrorDetails:
      description: The detail information of the error.
      type: object
      properties:
        code:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message details.
        requestId:
          type: string
          description: Correlation Id for current request.
        time:
          type: string
          format: date-time-rfc1123
          description: The time that error request failed.
      required:
      - code
      - message
    ProxyResource:
      properties:
        id:
          readOnly: true
          type: string
          description: Resource ID.
        name:
          readOnly: true
          type: string
          description: Resource name.
        type:
          readOnly: true
          type: string
          description: Resource type.
      x-ms-azure-resource: true
      description: Common properties of proxy resource.
    RoleResourceFormat:
      description: The role resource format.
      properties:
        properties:
          x-ms-client-flatten: true
          $ref: '#/components/schemas/Role'
      allOf:
      - $ref: '#/components/schemas/ProxyResource'
    CloudErrorBody:
      description: An error response from the service.
      type: object
      properties:
        code:
          description: An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
          type: string
        message:
          description: A message describing the error, intended to be suitable for display in a user interface.
          type: string
        details:
          description: A list of additional details about the error.
          type: array
          items:
            $ref: '#/components/schemas/CloudErrorBody'
          x-ms-identifiers: []
      x-ms-external: true
    CloudError:
      description: An error response from the service.
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CloudErrorBody'
          description: The error details.
      x-ms-external: true
    RoleList:
      description: Collection of all the roles on the Data Box Edge device.
      type: object
      properties:
        value:
          description: The Value.
          uniqueItems: false
          type: array
          items:
            $ref: '#/components/schemas/Role'
          readOnly: true
          x-ms-identifiers: []
        nextLink:
          description: Link to the next set of results.
          type: string
          readOnly: true
    ARMBaseModel:
      description: Represents the base class for all object models.
      type: object
      properties:
        id:
          description: The path ID that uniquely identifies the object.
          type: string
          readOnly: true
        name:
          description: The object name.
          type: string
          readOnly: true
        type:
          description: The hierarchical type of the object.
          type: string
          readOnly: true
      x-ms-azure-resource: true
  parameters:
    RoleNameParameter:
      name: roleName
      in: path
      required: true
      description: The name of the cluster role.
      x-ms-parameter-location: method
      schema:
        type: string
        pattern: ^[-\w\._]+$
    ClusterNameParameter:
      name: clusterName
      in: path
      required: true
      description: The name of the cluster.
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 40
        minLength: 3
        pattern: ^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(?<!-)$
    Version:
      in: query
      name: api-version
      description: The version of the API being called.
      x-ms-parameter-location: client
      required: true
      schema:
        type: string
    SubscriptionIdParameter:
      name: subscriptionId
      in: path
      required: true
      description: Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
      schema:
        type: string
    ApiVersionParameter:
      name: api-version
      in: query
      required: true
      description: Client Api Version.
      schema:
        type: string
    resourceGroupNameParameter:
      name: resourceGroupName
      in: path
      description: The resource group name.
      required: true
      x-ms-parameter-location: method
      schema:
        type: string
    apiVersionParameter:
      name: api-version
      in: query
      description: The API version.
      required: true
      schema:
        type: string
    subscriptionIdParameter:
      name: subscriptionId
      in: path
      description: The subscription ID.
      required: true
      schema:
        type: string
    ServerGroupNameParameter:
      name: serverGroupName
      in: path
      required: true
      description: The name of the server group.
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 90
        minLength: 1
  securitySchemes:
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: Impersonate your user account.
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow