authorization_server
Creates, updates, deletes, gets or lists an authorization_server resource.
Overview
| Name | authorization_server |
| Type | Resource |
| Id | azure.api_management.authorization_server |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_service
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
authorizationEndpoint | string | OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2 _. Required. |
authorizationMethods | array | HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. |
bearerTokenSendingMethods | array | Specifies the mechanism by which access token is passed to the API. |
clientAuthenticationMethod | array | Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. |
clientId | string | Client or app id registered with this authorization server. Required. |
clientRegistrationEndpoint | string | Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. Required. |
clientSecret | string | Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. |
defaultScope | string | Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. |
description | string | Description of the authorization server. Can contain HTML formatting tags. |
displayName | string | User-friendly authorization server name. Required. |
grantTypes | array | Form of an authorization grant, which the client uses to request the access token. Required. |
resourceOwnerPassword | string | Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. |
resourceOwnerUsername | string | Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. |
supportState | boolean | If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tokenBodyParameters | array | Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. |
tokenEndpoint | string | OAuth token endpoint. Contains absolute URI to entity being referenced. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useInApiDocumentation | boolean | If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. |
useInTestConsole | boolean | If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
authorizationEndpoint | string | OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2 _. Required. |
authorizationMethods | array | HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional. |
bearerTokenSendingMethods | array | Specifies the mechanism by which access token is passed to the API. |
clientAuthenticationMethod | array | Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format. |
clientId | string | Client or app id registered with this authorization server. Required. |
clientRegistrationEndpoint | string | Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced. Required. |
clientSecret | string | Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. |
defaultScope | string | Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values. |
description | string | Description of the authorization server. Can contain HTML formatting tags. |
displayName | string | User-friendly authorization server name. Required. |
grantTypes | array | Form of an authorization grant, which the client uses to request the access token. Required. |
resourceOwnerPassword | string | Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password. |
resourceOwnerUsername | string | Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username. |
supportState | boolean | If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tokenBodyParameters | array | Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}. |
tokenEndpoint | string | OAuth token endpoint. Contains absolute URI to entity being referenced. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
useInApiDocumentation | boolean | If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided. |
useInTestConsole | boolean | If true, the authorization server may be used in the developer portal test console. True by default if no value is provided. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, service_name, authsid, subscription_id | Gets the details of the authorization server specified by its identifier. | |
list_by_service | select | resource_group_name, service_name, subscription_id | $filter, $top, $skip | Lists a collection of authorization servers defined within a service instance. |
create_or_update | insert | resource_group_name, service_name, authsid, subscription_id | Creates new authorization server or updates an existing authorization server. | |
update | update | resource_group_name, service_name, authsid, subscription_id | Updates the details of the authorization server specified by its identifier. | |
create_or_update | replace | resource_group_name, service_name, authsid, subscription_id | Creates new authorization server or updates an existing authorization server. | |
delete | delete | resource_group_name, service_name, authsid, subscription_id | Deletes specific authorization server instance. | |
get_entity_tag | exec | resource_group_name, service_name, authsid, subscription_id | Gets the entity state (Etag) version of the authorizationServer specified by its identifier. | |
list_secrets | exec | resource_group_name, service_name, authsid, subscription_id | Gets the client secret details of the authorization server. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
authsid | string | Identifier of the authorization server. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
service_name | string | The name of the API Management service. Required. |
subscription_id | string | |
$filter | string | | Field | Usage | Supported operators | Supported functions ||-------------|-------------|-------------|-------------|| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith || displayName | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |. Default value is None. |
$skip | integer | Number of records to skip. Default value is None. |
$top | integer | Number of records to return. Default value is None. |
SELECT examples
- get
- list_by_service
Gets the details of the authorization server specified by its identifier.
SELECT
id,
name,
authorizationEndpoint,
authorizationMethods,
bearerTokenSendingMethods,
clientAuthenticationMethod,
clientId,
clientRegistrationEndpoint,
clientSecret,
defaultScope,
description,
displayName,
grantTypes,
resourceOwnerPassword,
resourceOwnerUsername,
supportState,
systemData,
tokenBodyParameters,
tokenEndpoint,
type,
useInApiDocumentation,
useInTestConsole
FROM azure.api_management.authorization_server
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND authsid = '{{ authsid }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists a collection of authorization servers defined within a service instance.
SELECT
id,
name,
authorizationEndpoint,
authorizationMethods,
bearerTokenSendingMethods,
clientAuthenticationMethod,
clientId,
clientRegistrationEndpoint,
clientSecret,
defaultScope,
description,
displayName,
grantTypes,
resourceOwnerPassword,
resourceOwnerUsername,
supportState,
systemData,
tokenBodyParameters,
tokenEndpoint,
type,
useInApiDocumentation,
useInTestConsole
FROM azure.api_management.authorization_server
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND service_name = '{{ service_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
AND $skip = '{{ $skip }}'
;
INSERT examples
- create_or_update
- Manifest
Creates new authorization server or updates an existing authorization server.
INSERT INTO azure.api_management.authorization_server (
properties,
resource_group_name,
service_name,
authsid,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ service_name }}',
'{{ authsid }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: authorization_server
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the authorization_server resource.
- name: service_name
value: "{{ service_name }}"
description: Required parameter for the authorization_server resource.
- name: authsid
value: "{{ authsid }}"
description: Required parameter for the authorization_server resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the authorization_server resource.
- name: properties
description: |
Properties of the External OAuth authorization server Contract.
value:
description: "{{ description }}"
authorizationMethods:
- "{{ authorizationMethods }}"
clientAuthenticationMethod:
- "{{ clientAuthenticationMethod }}"
tokenBodyParameters:
- name: "{{ name }}"
value: "{{ value }}"
tokenEndpoint: "{{ tokenEndpoint }}"
supportState: {{ supportState }}
defaultScope: "{{ defaultScope }}"
bearerTokenSendingMethods:
- "{{ bearerTokenSendingMethods }}"
resourceOwnerUsername: "{{ resourceOwnerUsername }}"
resourceOwnerPassword: "{{ resourceOwnerPassword }}"
displayName: "{{ displayName }}"
useInTestConsole: {{ useInTestConsole }}
useInApiDocumentation: {{ useInApiDocumentation }}
clientRegistrationEndpoint: "{{ clientRegistrationEndpoint }}"
authorizationEndpoint: "{{ authorizationEndpoint }}"
grantTypes:
- "{{ grantTypes }}"
clientId: "{{ clientId }}"
clientSecret: "{{ clientSecret }}"
UPDATE examples
- update
Updates the details of the authorization server specified by its identifier.
UPDATE azure.api_management.authorization_server
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND authsid = '{{ authsid }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
REPLACE examples
- create_or_update
Creates new authorization server or updates an existing authorization server.
REPLACE azure.api_management.authorization_server
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND authsid = '{{ authsid }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes specific authorization server instance.
DELETE FROM azure.api_management.authorization_server
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND service_name = '{{ service_name }}' --required
AND authsid = '{{ authsid }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_entity_tag
- list_secrets
Gets the entity state (Etag) version of the authorizationServer specified by its identifier.
EXEC azure.api_management.authorization_server.get_entity_tag
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@authsid='{{ authsid }}' --required,
@subscription_id='{{ subscription_id }}' --required
;
Gets the client secret details of the authorization server.
EXEC azure.api_management.authorization_server.list_secrets
@resource_group_name='{{ resource_group_name }}' --required,
@service_name='{{ service_name }}' --required,
@authsid='{{ authsid }}' --required,
@subscription_id='{{ subscription_id }}' --required
;