Skip to main content

authorizations

Creates, updates, deletes, gets or lists a authorizations resource.

Overview

Nameauthorizations
TypeResource
Idazure.api_management.authorizations

Fields

NameDatatypeDescription
authorizationIdtextfield from the properties object
authorizationProviderIdtextfield from the properties object
authorization_typetextfield from the properties object
errortextfield from the properties object
oauth2grant_typetextfield from the properties object
parameterstextfield from the properties object
resourceGroupNametextfield from the properties object
serviceNametextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTauthorizationId, authorizationProviderId, resourceGroupName, serviceName, subscriptionIdGets the details of the authorization specified by its identifier.
list_by_authorization_providerSELECTauthorizationProviderId, resourceGroupName, serviceName, subscriptionIdLists a collection of authorization providers defined within a authorization provider.
create_or_updateINSERTauthorizationId, authorizationProviderId, resourceGroupName, serviceName, subscriptionIdCreates or updates authorization.
deleteDELETEIf-Match, authorizationId, authorizationProviderId, resourceGroupName, serviceName, subscriptionIdDeletes specific Authorization from the Authorization provider.
confirm_consent_codeEXECauthorizationId, authorizationProviderId, resourceGroupName, serviceName, subscriptionIdConfirm valid consent code to suppress Authorizations anti-phishing page.

SELECT examples

Lists a collection of authorization providers defined within a authorization provider.

SELECT
authorizationId,
authorizationProviderId,
authorization_type,
error,
oauth2grant_type,
parameters,
resourceGroupName,
serviceName,
status,
subscriptionId
FROM azure.api_management.vw_authorizations
WHERE authorizationProviderId = '{{ authorizationProviderId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new authorizations resource.

/*+ create */
INSERT INTO azure.api_management.authorizations (
authorizationId,
authorizationProviderId,
resourceGroupName,
serviceName,
subscriptionId,
properties
)
SELECT
'{{ authorizationId }}',
'{{ authorizationProviderId }}',
'{{ resourceGroupName }}',
'{{ serviceName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;

DELETE example

Deletes the specified authorizations resource.

/*+ delete */
DELETE FROM azure.api_management.authorizations
WHERE If-Match = '{{ If-Match }}'
AND authorizationId = '{{ authorizationId }}'
AND authorizationProviderId = '{{ authorizationProviderId }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serviceName = '{{ serviceName }}'
AND subscriptionId = '{{ subscriptionId }}';