AuthorizationServer

Manages an Authorization Server within an API Management Service.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleApi = Output.Create(Azure.ApiManagement.GetApi.InvokeAsync(new Azure.ApiManagement.GetApiArgs
        {
            Name = "search-api",
            ApiManagementName = "search-api-management",
            ResourceGroupName = "search-service",
            Revision = "2",
        }));
        var exampleAuthorizationServer = new Azure.ApiManagement.AuthorizationServer("exampleAuthorizationServer", new Azure.ApiManagement.AuthorizationServerArgs
        {
            ApiManagementName = data.Azurerm_api_management.Example.Name,
            ResourceGroupName = data.Azurerm_api_management.Example.Resource_group_name,
            DisplayName = "Test Server",
            AuthorizationEndpoint = "https://example.mydomain.com/client/authorize",
            ClientId = "42424242-4242-4242-4242-424242424242",
            ClientRegistrationEndpoint = "https://example.mydomain.com/client/register",
            GrantTypes = 
            {
                "authorizationCode",
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/apimanagement"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := apimanagement.LookupApi(ctx, &apimanagement.LookupApiArgs{
            Name:              "search-api",
            ApiManagementName: "search-api-management",
            ResourceGroupName: "search-service",
            Revision:          "2",
        }, nil)
        if err != nil {
            return err
        }
        _, err = apimanagement.NewAuthorizationServer(ctx, "exampleAuthorizationServer", &apimanagement.AuthorizationServerArgs{
            ApiManagementName:          pulumi.String(data.Azurerm_api_management.Example.Name),
            ResourceGroupName:          pulumi.String(data.Azurerm_api_management.Example.Resource_group_name),
            DisplayName:                pulumi.String("Test Server"),
            AuthorizationEndpoint:      pulumi.String("https://example.mydomain.com/client/authorize"),
            ClientId:                   pulumi.String("42424242-4242-4242-4242-424242424242"),
            ClientRegistrationEndpoint: pulumi.String("https://example.mydomain.com/client/register"),
            GrantTypes: pulumi.StringArray{
                pulumi.String("authorizationCode"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

example_api = azure.apimanagement.get_api(name="search-api",
    api_management_name="search-api-management",
    resource_group_name="search-service",
    revision="2")
example_authorization_server = azure.apimanagement.AuthorizationServer("exampleAuthorizationServer",
    api_management_name=data["azurerm_api_management"]["example"]["name"],
    resource_group_name=data["azurerm_api_management"]["example"]["resource_group_name"],
    display_name="Test Server",
    authorization_endpoint="https://example.mydomain.com/client/authorize",
    client_id="42424242-4242-4242-4242-424242424242",
    client_registration_endpoint="https://example.mydomain.com/client/register",
    grant_types=["authorizationCode"])
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleApi = azure.apimanagement.getApi({
    name: "search-api",
    apiManagementName: "search-api-management",
    resourceGroupName: "search-service",
    revision: "2",
});
const exampleAuthorizationServer = new azure.apimanagement.AuthorizationServer("exampleAuthorizationServer", {
    apiManagementName: data.azurerm_api_management.example.name,
    resourceGroupName: data.azurerm_api_management.example.resource_group_name,
    displayName: "Test Server",
    authorizationEndpoint: "https://example.mydomain.com/client/authorize",
    clientId: "42424242-4242-4242-4242-424242424242",
    clientRegistrationEndpoint: "https://example.mydomain.com/client/register",
    grantTypes: ["authorizationCode"],
});

Create a AuthorizationServer Resource

def AuthorizationServer(resource_name, opts=None, api_management_name=None, authorization_endpoint=None, authorization_methods=None, bearer_token_sending_methods=None, client_authentication_methods=None, client_id=None, client_registration_endpoint=None, client_secret=None, default_scope=None, description=None, display_name=None, grant_types=None, name=None, resource_group_name=None, resource_owner_password=None, resource_owner_username=None, support_state=None, token_body_parameters=None, token_endpoint=None, __props__=None);
name string
The unique name of the resource.
args AuthorizationServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args AuthorizationServerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AuthorizationServerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

AuthorizationServer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The AuthorizationServer resource accepts the following input properties:

ApiManagementName string

The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.

AuthorizationEndpoint string

The OAUTH Authorization Endpoint.

AuthorizationMethods List<string>

The HTTP Verbs supported by the Authorization Endpoint. Possible values are DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE.

ClientId string

The Client/App ID registered with this Authorization Server.

ClientRegistrationEndpoint string

The URI of page where Client/App Registration is performed for this Authorization Server.

DisplayName string

The user-friendly name of this Authorization Server.

GrantTypes List<string>

Form of Authorization Grants required when requesting an Access Token. Possible values are authorizationCode, clientCredentials, implicit and resourceOwnerPassword.

ResourceGroupName string

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

BearerTokenSendingMethods List<string>

The mechanism by which Access Tokens are passed to the API. Possible values are authorizationHeader and query.

ClientAuthenticationMethods List<string>

The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are Basic and Body.

ClientSecret string

The Client/App Secret registered with this Authorization Server.

DefaultScope string

The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.

Description string

A description of the Authorization Server, which may contain HTML formatting tags.

Name string

The name of this Authorization Server. Changing this forces a new resource to be created.

ResourceOwnerPassword string

The password associated with the Resource Owner.

ResourceOwnerUsername string

The username associated with the Resource Owner.

SupportState bool

Does this Authorization Server support State? If this is set to true the client may use the state parameter to raise protocol security.

TokenBodyParameters List<AuthorizationServerTokenBodyParameterArgs>
TokenEndpoint string

The OAUTH Token Endpoint.

ApiManagementName string

The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.

AuthorizationEndpoint string

The OAUTH Authorization Endpoint.

AuthorizationMethods []string

The HTTP Verbs supported by the Authorization Endpoint. Possible values are DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE.

ClientId string

The Client/App ID registered with this Authorization Server.

ClientRegistrationEndpoint string

The URI of page where Client/App Registration is performed for this Authorization Server.

DisplayName string

The user-friendly name of this Authorization Server.

GrantTypes []string

Form of Authorization Grants required when requesting an Access Token. Possible values are authorizationCode, clientCredentials, implicit and resourceOwnerPassword.

ResourceGroupName string

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

BearerTokenSendingMethods []string

The mechanism by which Access Tokens are passed to the API. Possible values are authorizationHeader and query.

ClientAuthenticationMethods []string

The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are Basic and Body.

ClientSecret string

The Client/App Secret registered with this Authorization Server.

DefaultScope string

The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.

Description string

A description of the Authorization Server, which may contain HTML formatting tags.

Name string

The name of this Authorization Server. Changing this forces a new resource to be created.

ResourceOwnerPassword string

The password associated with the Resource Owner.

ResourceOwnerUsername string

The username associated with the Resource Owner.

SupportState bool

Does this Authorization Server support State? If this is set to true the client may use the state parameter to raise protocol security.

TokenBodyParameters []AuthorizationServerTokenBodyParameter
TokenEndpoint string

The OAUTH Token Endpoint.

apiManagementName string

The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.

authorizationEndpoint string

The OAUTH Authorization Endpoint.

authorizationMethods string[]

The HTTP Verbs supported by the Authorization Endpoint. Possible values are DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE.

clientId string

The Client/App ID registered with this Authorization Server.

clientRegistrationEndpoint string

The URI of page where Client/App Registration is performed for this Authorization Server.

displayName string

The user-friendly name of this Authorization Server.

grantTypes string[]

Form of Authorization Grants required when requesting an Access Token. Possible values are authorizationCode, clientCredentials, implicit and resourceOwnerPassword.

resourceGroupName string

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

bearerTokenSendingMethods string[]

The mechanism by which Access Tokens are passed to the API. Possible values are authorizationHeader and query.

clientAuthenticationMethods string[]

The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are Basic and Body.

clientSecret string

The Client/App Secret registered with this Authorization Server.

defaultScope string

The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.

description string

A description of the Authorization Server, which may contain HTML formatting tags.

name string

The name of this Authorization Server. Changing this forces a new resource to be created.

resourceOwnerPassword string

The password associated with the Resource Owner.

resourceOwnerUsername string

The username associated with the Resource Owner.

supportState boolean

Does this Authorization Server support State? If this is set to true the client may use the state parameter to raise protocol security.

tokenBodyParameters AuthorizationServerTokenBodyParameter[]
tokenEndpoint string

The OAUTH Token Endpoint.

api_management_name str

The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.

authorization_endpoint str

The OAUTH Authorization Endpoint.

authorization_methods List[str]

The HTTP Verbs supported by the Authorization Endpoint. Possible values are DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE.

client_id str

The Client/App ID registered with this Authorization Server.

client_registration_endpoint str

The URI of page where Client/App Registration is performed for this Authorization Server.

display_name str

The user-friendly name of this Authorization Server.

grant_types List[str]

Form of Authorization Grants required when requesting an Access Token. Possible values are authorizationCode, clientCredentials, implicit and resourceOwnerPassword.

resource_group_name str

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

bearer_token_sending_methods List[str]

The mechanism by which Access Tokens are passed to the API. Possible values are authorizationHeader and query.

client_authentication_methods List[str]

The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are Basic and Body.

client_secret str

The Client/App Secret registered with this Authorization Server.

default_scope str

The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.

description str

A description of the Authorization Server, which may contain HTML formatting tags.

name str

The name of this Authorization Server. Changing this forces a new resource to be created.

resource_owner_password str

The password associated with the Resource Owner.

resource_owner_username str

The username associated with the Resource Owner.

support_state bool

Does this Authorization Server support State? If this is set to true the client may use the state parameter to raise protocol security.

token_body_parameters List[AuthorizationServerTokenBodyParameter]
token_endpoint str

The OAUTH Token Endpoint.

Outputs

All input properties are implicitly available as output properties. Additionally, the AuthorizationServer resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing AuthorizationServer Resource

Get an existing AuthorizationServer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, api_management_name=None, authorization_endpoint=None, authorization_methods=None, bearer_token_sending_methods=None, client_authentication_methods=None, client_id=None, client_registration_endpoint=None, client_secret=None, default_scope=None, description=None, display_name=None, grant_types=None, name=None, resource_group_name=None, resource_owner_password=None, resource_owner_username=None, support_state=None, token_body_parameters=None, token_endpoint=None, __props__=None);
func GetAuthorizationServer(ctx *Context, name string, id IDInput, state *AuthorizationServerState, opts ...ResourceOption) (*AuthorizationServer, error)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ApiManagementName string

The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.

AuthorizationEndpoint string

The OAUTH Authorization Endpoint.

AuthorizationMethods List<string>

The HTTP Verbs supported by the Authorization Endpoint. Possible values are DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE.

BearerTokenSendingMethods List<string>

The mechanism by which Access Tokens are passed to the API. Possible values are authorizationHeader and query.

ClientAuthenticationMethods List<string>

The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are Basic and Body.

ClientId string

The Client/App ID registered with this Authorization Server.

ClientRegistrationEndpoint string

The URI of page where Client/App Registration is performed for this Authorization Server.

ClientSecret string

The Client/App Secret registered with this Authorization Server.

DefaultScope string

The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.

Description string

A description of the Authorization Server, which may contain HTML formatting tags.

DisplayName string

The user-friendly name of this Authorization Server.

GrantTypes List<string>

Form of Authorization Grants required when requesting an Access Token. Possible values are authorizationCode, clientCredentials, implicit and resourceOwnerPassword.

Name string

The name of this Authorization Server. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

ResourceOwnerPassword string

The password associated with the Resource Owner.

ResourceOwnerUsername string

The username associated with the Resource Owner.

SupportState bool

Does this Authorization Server support State? If this is set to true the client may use the state parameter to raise protocol security.

TokenBodyParameters List<AuthorizationServerTokenBodyParameterArgs>
TokenEndpoint string

The OAUTH Token Endpoint.

ApiManagementName string

The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.

AuthorizationEndpoint string

The OAUTH Authorization Endpoint.

AuthorizationMethods []string

The HTTP Verbs supported by the Authorization Endpoint. Possible values are DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE.

BearerTokenSendingMethods []string

The mechanism by which Access Tokens are passed to the API. Possible values are authorizationHeader and query.

ClientAuthenticationMethods []string

The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are Basic and Body.

ClientId string

The Client/App ID registered with this Authorization Server.

ClientRegistrationEndpoint string

The URI of page where Client/App Registration is performed for this Authorization Server.

ClientSecret string

The Client/App Secret registered with this Authorization Server.

DefaultScope string

The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.

Description string

A description of the Authorization Server, which may contain HTML formatting tags.

DisplayName string

The user-friendly name of this Authorization Server.

GrantTypes []string

Form of Authorization Grants required when requesting an Access Token. Possible values are authorizationCode, clientCredentials, implicit and resourceOwnerPassword.

Name string

The name of this Authorization Server. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

ResourceOwnerPassword string

The password associated with the Resource Owner.

ResourceOwnerUsername string

The username associated with the Resource Owner.

SupportState bool

Does this Authorization Server support State? If this is set to true the client may use the state parameter to raise protocol security.

TokenBodyParameters []AuthorizationServerTokenBodyParameter
TokenEndpoint string

The OAUTH Token Endpoint.

apiManagementName string

The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.

authorizationEndpoint string

The OAUTH Authorization Endpoint.

authorizationMethods string[]

The HTTP Verbs supported by the Authorization Endpoint. Possible values are DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE.

bearerTokenSendingMethods string[]

The mechanism by which Access Tokens are passed to the API. Possible values are authorizationHeader and query.

clientAuthenticationMethods string[]

The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are Basic and Body.

clientId string

The Client/App ID registered with this Authorization Server.

clientRegistrationEndpoint string

The URI of page where Client/App Registration is performed for this Authorization Server.

clientSecret string

The Client/App Secret registered with this Authorization Server.

defaultScope string

The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.

description string

A description of the Authorization Server, which may contain HTML formatting tags.

displayName string

The user-friendly name of this Authorization Server.

grantTypes string[]

Form of Authorization Grants required when requesting an Access Token. Possible values are authorizationCode, clientCredentials, implicit and resourceOwnerPassword.

name string

The name of this Authorization Server. Changing this forces a new resource to be created.

resourceGroupName string

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

resourceOwnerPassword string

The password associated with the Resource Owner.

resourceOwnerUsername string

The username associated with the Resource Owner.

supportState boolean

Does this Authorization Server support State? If this is set to true the client may use the state parameter to raise protocol security.

tokenBodyParameters AuthorizationServerTokenBodyParameter[]
tokenEndpoint string

The OAUTH Token Endpoint.

api_management_name str

The name of the API Management Service in which this Authorization Server should be created. Changing this forces a new resource to be created.

authorization_endpoint str

The OAUTH Authorization Endpoint.

authorization_methods List[str]

The HTTP Verbs supported by the Authorization Endpoint. Possible values are DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT and TRACE.

bearer_token_sending_methods List[str]

The mechanism by which Access Tokens are passed to the API. Possible values are authorizationHeader and query.

client_authentication_methods List[str]

The Authentication Methods supported by the Token endpoint of this Authorization Server.. Possible values are Basic and Body.

client_id str

The Client/App ID registered with this Authorization Server.

client_registration_endpoint str

The URI of page where Client/App Registration is performed for this Authorization Server.

client_secret str

The Client/App Secret registered with this Authorization Server.

default_scope str

The Default Scope used when requesting an Access Token, specified as a string containing space-delimited values.

description str

A description of the Authorization Server, which may contain HTML formatting tags.

display_name str

The user-friendly name of this Authorization Server.

grant_types List[str]

Form of Authorization Grants required when requesting an Access Token. Possible values are authorizationCode, clientCredentials, implicit and resourceOwnerPassword.

name str

The name of this Authorization Server. Changing this forces a new resource to be created.

resource_group_name str

The name of the Resource Group in which the API Management Service exists. Changing this forces a new resource to be created.

resource_owner_password str

The password associated with the Resource Owner.

resource_owner_username str

The username associated with the Resource Owner.

support_state bool

Does this Authorization Server support State? If this is set to true the client may use the state parameter to raise protocol security.

token_body_parameters List[AuthorizationServerTokenBodyParameter]
token_endpoint str

The OAUTH Token Endpoint.

Supporting Types

AuthorizationServerTokenBodyParameter

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Name string

The Name of the Parameter.

Value string

The Value of the Parameter.

Name string

The Name of the Parameter.

Value string

The Value of the Parameter.

name string

The Name of the Parameter.

value string

The Value of the Parameter.

name str

The Name of the Parameter.

value str

The Value of the Parameter.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.