azure-native.apimanagement.AuthorizationProvider
Explore with Pulumi AI
Authorization Provider contract. Azure REST API version: 2022-08-01.
Other available API versions: 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview.
Example Usage
ApiManagementCreateAuthorizationProviderAADAuthCode
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var authorizationProvider = new AzureNative.ApiManagement.AuthorizationProvider("authorizationProvider", new()
{
AuthorizationProviderId = "aadwithauthcode",
DisplayName = "aadwithauthcode",
IdentityProvider = "aad",
Oauth2 = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2SettingsArgs
{
GrantTypes = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2GrantTypesArgs
{
AuthorizationCode =
{
{ "clientId", "59790825-fdd3-4b10-bc7a-4c3aaf25801d" },
{ "clientSecret", "xxxxxxxxxxxxxxxxxxxxxxxx" },
{ "resourceUri", "https://graph.microsoft.com" },
{ "scopes", "User.Read.All Group.Read.All" },
},
},
RedirectUrl = "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
},
ResourceGroupName = "rg1",
ServiceName = "apimService1",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewAuthorizationProvider(ctx, "authorizationProvider", &apimanagement.AuthorizationProviderArgs{
AuthorizationProviderId: pulumi.String("aadwithauthcode"),
DisplayName: pulumi.String("aadwithauthcode"),
IdentityProvider: pulumi.String("aad"),
Oauth2: &apimanagement.AuthorizationProviderOAuth2SettingsArgs{
GrantTypes: &apimanagement.AuthorizationProviderOAuth2GrantTypesArgs{
AuthorizationCode: pulumi.StringMap{
"clientId": pulumi.String("59790825-fdd3-4b10-bc7a-4c3aaf25801d"),
"clientSecret": pulumi.String("xxxxxxxxxxxxxxxxxxxxxxxx"),
"resourceUri": pulumi.String("https://graph.microsoft.com"),
"scopes": pulumi.String("User.Read.All Group.Read.All"),
},
},
RedirectUrl: pulumi.String("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
},
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.AuthorizationProvider;
import com.pulumi.azurenative.apimanagement.AuthorizationProviderArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthorizationProviderOAuth2SettingsArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthorizationProviderOAuth2GrantTypesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var authorizationProvider = new AuthorizationProvider("authorizationProvider", AuthorizationProviderArgs.builder()
.authorizationProviderId("aadwithauthcode")
.displayName("aadwithauthcode")
.identityProvider("aad")
.oauth2(AuthorizationProviderOAuth2SettingsArgs.builder()
.grantTypes(AuthorizationProviderOAuth2GrantTypesArgs.builder()
.authorizationCode(Map.ofEntries(
Map.entry("clientId", "59790825-fdd3-4b10-bc7a-4c3aaf25801d"),
Map.entry("clientSecret", "xxxxxxxxxxxxxxxxxxxxxxxx"),
Map.entry("resourceUri", "https://graph.microsoft.com"),
Map.entry("scopes", "User.Read.All Group.Read.All")
))
.build())
.redirectUrl("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1")
.build())
.resourceGroupName("rg1")
.serviceName("apimService1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
authorization_provider = azure_native.apimanagement.AuthorizationProvider("authorizationProvider",
authorization_provider_id="aadwithauthcode",
display_name="aadwithauthcode",
identity_provider="aad",
oauth2=azure_native.apimanagement.AuthorizationProviderOAuth2SettingsArgs(
grant_types=azure_native.apimanagement.AuthorizationProviderOAuth2GrantTypesArgs(
authorization_code={
"clientId": "59790825-fdd3-4b10-bc7a-4c3aaf25801d",
"clientSecret": "xxxxxxxxxxxxxxxxxxxxxxxx",
"resourceUri": "https://graph.microsoft.com",
"scopes": "User.Read.All Group.Read.All",
},
),
redirect_url="https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
),
resource_group_name="rg1",
service_name="apimService1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const authorizationProvider = new azure_native.apimanagement.AuthorizationProvider("authorizationProvider", {
authorizationProviderId: "aadwithauthcode",
displayName: "aadwithauthcode",
identityProvider: "aad",
oauth2: {
grantTypes: {
authorizationCode: {
clientId: "59790825-fdd3-4b10-bc7a-4c3aaf25801d",
clientSecret: "xxxxxxxxxxxxxxxxxxxxxxxx",
resourceUri: "https://graph.microsoft.com",
scopes: "User.Read.All Group.Read.All",
},
},
redirectUrl: "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
},
resourceGroupName: "rg1",
serviceName: "apimService1",
});
resources:
authorizationProvider:
type: azure-native:apimanagement:AuthorizationProvider
properties:
authorizationProviderId: aadwithauthcode
displayName: aadwithauthcode
identityProvider: aad
oauth2:
grantTypes:
authorizationCode:
clientId: 59790825-fdd3-4b10-bc7a-4c3aaf25801d
clientSecret: xxxxxxxxxxxxxxxxxxxxxxxx
resourceUri: https://graph.microsoft.com
scopes: User.Read.All Group.Read.All
redirectUrl: https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1
resourceGroupName: rg1
serviceName: apimService1
ApiManagementCreateAuthorizationProviderAADClientCred
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var authorizationProvider = new AzureNative.ApiManagement.AuthorizationProvider("authorizationProvider", new()
{
AuthorizationProviderId = "aadwithclientcred",
DisplayName = "aadwithclientcred",
IdentityProvider = "aad",
Oauth2 = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2SettingsArgs
{
GrantTypes = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2GrantTypesArgs
{
AuthorizationCode =
{
{ "resourceUri", "https://graph.microsoft.com" },
{ "scopes", "User.Read.All Group.Read.All" },
},
},
RedirectUrl = "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
},
ResourceGroupName = "rg1",
ServiceName = "apimService1",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewAuthorizationProvider(ctx, "authorizationProvider", &apimanagement.AuthorizationProviderArgs{
AuthorizationProviderId: pulumi.String("aadwithclientcred"),
DisplayName: pulumi.String("aadwithclientcred"),
IdentityProvider: pulumi.String("aad"),
Oauth2: &apimanagement.AuthorizationProviderOAuth2SettingsArgs{
GrantTypes: &apimanagement.AuthorizationProviderOAuth2GrantTypesArgs{
AuthorizationCode: pulumi.StringMap{
"resourceUri": pulumi.String("https://graph.microsoft.com"),
"scopes": pulumi.String("User.Read.All Group.Read.All"),
},
},
RedirectUrl: pulumi.String("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
},
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.AuthorizationProvider;
import com.pulumi.azurenative.apimanagement.AuthorizationProviderArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthorizationProviderOAuth2SettingsArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthorizationProviderOAuth2GrantTypesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var authorizationProvider = new AuthorizationProvider("authorizationProvider", AuthorizationProviderArgs.builder()
.authorizationProviderId("aadwithclientcred")
.displayName("aadwithclientcred")
.identityProvider("aad")
.oauth2(AuthorizationProviderOAuth2SettingsArgs.builder()
.grantTypes(AuthorizationProviderOAuth2GrantTypesArgs.builder()
.authorizationCode(Map.ofEntries(
Map.entry("resourceUri", "https://graph.microsoft.com"),
Map.entry("scopes", "User.Read.All Group.Read.All")
))
.build())
.redirectUrl("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1")
.build())
.resourceGroupName("rg1")
.serviceName("apimService1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
authorization_provider = azure_native.apimanagement.AuthorizationProvider("authorizationProvider",
authorization_provider_id="aadwithclientcred",
display_name="aadwithclientcred",
identity_provider="aad",
oauth2=azure_native.apimanagement.AuthorizationProviderOAuth2SettingsArgs(
grant_types=azure_native.apimanagement.AuthorizationProviderOAuth2GrantTypesArgs(
authorization_code={
"resourceUri": "https://graph.microsoft.com",
"scopes": "User.Read.All Group.Read.All",
},
),
redirect_url="https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
),
resource_group_name="rg1",
service_name="apimService1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const authorizationProvider = new azure_native.apimanagement.AuthorizationProvider("authorizationProvider", {
authorizationProviderId: "aadwithclientcred",
displayName: "aadwithclientcred",
identityProvider: "aad",
oauth2: {
grantTypes: {
authorizationCode: {
resourceUri: "https://graph.microsoft.com",
scopes: "User.Read.All Group.Read.All",
},
},
redirectUrl: "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
},
resourceGroupName: "rg1",
serviceName: "apimService1",
});
resources:
authorizationProvider:
type: azure-native:apimanagement:AuthorizationProvider
properties:
authorizationProviderId: aadwithclientcred
displayName: aadwithclientcred
identityProvider: aad
oauth2:
grantTypes:
authorizationCode:
resourceUri: https://graph.microsoft.com
scopes: User.Read.All Group.Read.All
redirectUrl: https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1
resourceGroupName: rg1
serviceName: apimService1
ApiManagementCreateAuthorizationProviderGenericOAuth2
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var authorizationProvider = new AzureNative.ApiManagement.AuthorizationProvider("authorizationProvider", new()
{
AuthorizationProviderId = "eventbrite",
DisplayName = "eventbrite",
IdentityProvider = "oauth2",
Oauth2 = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2SettingsArgs
{
GrantTypes = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2GrantTypesArgs
{
AuthorizationCode =
{
{ "authorizationUrl", "https://www.eventbrite.com/oauth/authorize" },
{ "clientId", "genericClientId" },
{ "clientSecret", "xxxxxxxxxxxxxxxxxxxxxxxx" },
{ "refreshUrl", "https://www.eventbrite.com/oauth/token" },
{ "scopes", "" },
{ "tokenUrl", "https://www.eventbrite.com/oauth/token" },
},
},
RedirectUrl = "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
},
ResourceGroupName = "rg1",
ServiceName = "apimService1",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewAuthorizationProvider(ctx, "authorizationProvider", &apimanagement.AuthorizationProviderArgs{
AuthorizationProviderId: pulumi.String("eventbrite"),
DisplayName: pulumi.String("eventbrite"),
IdentityProvider: pulumi.String("oauth2"),
Oauth2: &apimanagement.AuthorizationProviderOAuth2SettingsArgs{
GrantTypes: &apimanagement.AuthorizationProviderOAuth2GrantTypesArgs{
AuthorizationCode: pulumi.StringMap{
"authorizationUrl": pulumi.String("https://www.eventbrite.com/oauth/authorize"),
"clientId": pulumi.String("genericClientId"),
"clientSecret": pulumi.String("xxxxxxxxxxxxxxxxxxxxxxxx"),
"refreshUrl": pulumi.String("https://www.eventbrite.com/oauth/token"),
"scopes": pulumi.String(""),
"tokenUrl": pulumi.String("https://www.eventbrite.com/oauth/token"),
},
},
RedirectUrl: pulumi.String("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
},
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.AuthorizationProvider;
import com.pulumi.azurenative.apimanagement.AuthorizationProviderArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthorizationProviderOAuth2SettingsArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthorizationProviderOAuth2GrantTypesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var authorizationProvider = new AuthorizationProvider("authorizationProvider", AuthorizationProviderArgs.builder()
.authorizationProviderId("eventbrite")
.displayName("eventbrite")
.identityProvider("oauth2")
.oauth2(AuthorizationProviderOAuth2SettingsArgs.builder()
.grantTypes(AuthorizationProviderOAuth2GrantTypesArgs.builder()
.authorizationCode(Map.ofEntries(
Map.entry("authorizationUrl", "https://www.eventbrite.com/oauth/authorize"),
Map.entry("clientId", "genericClientId"),
Map.entry("clientSecret", "xxxxxxxxxxxxxxxxxxxxxxxx"),
Map.entry("refreshUrl", "https://www.eventbrite.com/oauth/token"),
Map.entry("scopes", ""),
Map.entry("tokenUrl", "https://www.eventbrite.com/oauth/token")
))
.build())
.redirectUrl("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1")
.build())
.resourceGroupName("rg1")
.serviceName("apimService1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
authorization_provider = azure_native.apimanagement.AuthorizationProvider("authorizationProvider",
authorization_provider_id="eventbrite",
display_name="eventbrite",
identity_provider="oauth2",
oauth2=azure_native.apimanagement.AuthorizationProviderOAuth2SettingsArgs(
grant_types=azure_native.apimanagement.AuthorizationProviderOAuth2GrantTypesArgs(
authorization_code={
"authorizationUrl": "https://www.eventbrite.com/oauth/authorize",
"clientId": "genericClientId",
"clientSecret": "xxxxxxxxxxxxxxxxxxxxxxxx",
"refreshUrl": "https://www.eventbrite.com/oauth/token",
"scopes": "",
"tokenUrl": "https://www.eventbrite.com/oauth/token",
},
),
redirect_url="https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
),
resource_group_name="rg1",
service_name="apimService1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const authorizationProvider = new azure_native.apimanagement.AuthorizationProvider("authorizationProvider", {
authorizationProviderId: "eventbrite",
displayName: "eventbrite",
identityProvider: "oauth2",
oauth2: {
grantTypes: {
authorizationCode: {
authorizationUrl: "https://www.eventbrite.com/oauth/authorize",
clientId: "genericClientId",
clientSecret: "xxxxxxxxxxxxxxxxxxxxxxxx",
refreshUrl: "https://www.eventbrite.com/oauth/token",
scopes: "",
tokenUrl: "https://www.eventbrite.com/oauth/token",
},
},
redirectUrl: "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
},
resourceGroupName: "rg1",
serviceName: "apimService1",
});
resources:
authorizationProvider:
type: azure-native:apimanagement:AuthorizationProvider
properties:
authorizationProviderId: eventbrite
displayName: eventbrite
identityProvider: oauth2
oauth2:
grantTypes:
authorizationCode:
authorizationUrl: https://www.eventbrite.com/oauth/authorize
clientId: genericClientId
clientSecret: xxxxxxxxxxxxxxxxxxxxxxxx
refreshUrl: https://www.eventbrite.com/oauth/token
scopes:
tokenUrl: https://www.eventbrite.com/oauth/token
redirectUrl: https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1
resourceGroupName: rg1
serviceName: apimService1
ApiManagementCreateAuthorizationProviderOOBGoogle
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var authorizationProvider = new AzureNative.ApiManagement.AuthorizationProvider("authorizationProvider", new()
{
AuthorizationProviderId = "google",
DisplayName = "google",
IdentityProvider = "google",
Oauth2 = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2SettingsArgs
{
GrantTypes = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2GrantTypesArgs
{
AuthorizationCode =
{
{ "clientId", "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com" },
{ "clientSecret", "XXXXXXXXXXXXXXXXXXXX" },
{ "scopes", "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email" },
},
},
RedirectUrl = "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
},
ResourceGroupName = "rg1",
ServiceName = "apimService1",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewAuthorizationProvider(ctx, "authorizationProvider", &apimanagement.AuthorizationProviderArgs{
AuthorizationProviderId: pulumi.String("google"),
DisplayName: pulumi.String("google"),
IdentityProvider: pulumi.String("google"),
Oauth2: &apimanagement.AuthorizationProviderOAuth2SettingsArgs{
GrantTypes: &apimanagement.AuthorizationProviderOAuth2GrantTypesArgs{
AuthorizationCode: pulumi.StringMap{
"clientId": pulumi.String("99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"),
"clientSecret": pulumi.String("XXXXXXXXXXXXXXXXXXXX"),
"scopes": pulumi.String("openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"),
},
},
RedirectUrl: pulumi.String("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1"),
},
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.apimanagement.AuthorizationProvider;
import com.pulumi.azurenative.apimanagement.AuthorizationProviderArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthorizationProviderOAuth2SettingsArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthorizationProviderOAuth2GrantTypesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var authorizationProvider = new AuthorizationProvider("authorizationProvider", AuthorizationProviderArgs.builder()
.authorizationProviderId("google")
.displayName("google")
.identityProvider("google")
.oauth2(AuthorizationProviderOAuth2SettingsArgs.builder()
.grantTypes(AuthorizationProviderOAuth2GrantTypesArgs.builder()
.authorizationCode(Map.ofEntries(
Map.entry("clientId", "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com"),
Map.entry("clientSecret", "XXXXXXXXXXXXXXXXXXXX"),
Map.entry("scopes", "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email")
))
.build())
.redirectUrl("https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1")
.build())
.resourceGroupName("rg1")
.serviceName("apimService1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
authorization_provider = azure_native.apimanagement.AuthorizationProvider("authorizationProvider",
authorization_provider_id="google",
display_name="google",
identity_provider="google",
oauth2=azure_native.apimanagement.AuthorizationProviderOAuth2SettingsArgs(
grant_types=azure_native.apimanagement.AuthorizationProviderOAuth2GrantTypesArgs(
authorization_code={
"clientId": "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
"clientSecret": "XXXXXXXXXXXXXXXXXXXX",
"scopes": "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email",
},
),
redirect_url="https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
),
resource_group_name="rg1",
service_name="apimService1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const authorizationProvider = new azure_native.apimanagement.AuthorizationProvider("authorizationProvider", {
authorizationProviderId: "google",
displayName: "google",
identityProvider: "google",
oauth2: {
grantTypes: {
authorizationCode: {
clientId: "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
clientSecret: "XXXXXXXXXXXXXXXXXXXX",
scopes: "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email",
},
},
redirectUrl: "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
},
resourceGroupName: "rg1",
serviceName: "apimService1",
});
resources:
authorizationProvider:
type: azure-native:apimanagement:AuthorizationProvider
properties:
authorizationProviderId: google
displayName: google
identityProvider: google
oauth2:
grantTypes:
authorizationCode:
clientId: 99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com
clientSecret: XXXXXXXXXXXXXXXXXXXX
scopes: openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
redirectUrl: https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1
resourceGroupName: rg1
serviceName: apimService1
Create AuthorizationProvider Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AuthorizationProvider(name: string, args: AuthorizationProviderArgs, opts?: CustomResourceOptions);
@overload
def AuthorizationProvider(resource_name: str,
args: AuthorizationProviderArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AuthorizationProvider(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
service_name: Optional[str] = None,
authorization_provider_id: Optional[str] = None,
display_name: Optional[str] = None,
identity_provider: Optional[str] = None,
oauth2: Optional[AuthorizationProviderOAuth2SettingsArgs] = None)
func NewAuthorizationProvider(ctx *Context, name string, args AuthorizationProviderArgs, opts ...ResourceOption) (*AuthorizationProvider, error)
public AuthorizationProvider(string name, AuthorizationProviderArgs args, CustomResourceOptions? opts = null)
public AuthorizationProvider(String name, AuthorizationProviderArgs args)
public AuthorizationProvider(String name, AuthorizationProviderArgs args, CustomResourceOptions options)
type: azure-native:apimanagement:AuthorizationProvider
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AuthorizationProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AuthorizationProviderArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AuthorizationProviderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthorizationProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AuthorizationProviderArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var authorizationProviderResource = new AzureNative.ApiManagement.AuthorizationProvider("authorizationProviderResource", new()
{
ResourceGroupName = "string",
ServiceName = "string",
AuthorizationProviderId = "string",
DisplayName = "string",
IdentityProvider = "string",
Oauth2 = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2SettingsArgs
{
GrantTypes = new AzureNative.ApiManagement.Inputs.AuthorizationProviderOAuth2GrantTypesArgs
{
AuthorizationCode =
{
{ "string", "string" },
},
ClientCredentials =
{
{ "string", "string" },
},
},
RedirectUrl = "string",
},
});
example, err := apimanagement.NewAuthorizationProvider(ctx, "authorizationProviderResource", &apimanagement.AuthorizationProviderArgs{
ResourceGroupName: pulumi.String("string"),
ServiceName: pulumi.String("string"),
AuthorizationProviderId: pulumi.String("string"),
DisplayName: pulumi.String("string"),
IdentityProvider: pulumi.String("string"),
Oauth2: &apimanagement.AuthorizationProviderOAuth2SettingsArgs{
GrantTypes: &apimanagement.AuthorizationProviderOAuth2GrantTypesArgs{
AuthorizationCode: pulumi.StringMap{
"string": pulumi.String("string"),
},
ClientCredentials: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
RedirectUrl: pulumi.String("string"),
},
})
var authorizationProviderResource = new AuthorizationProvider("authorizationProviderResource", AuthorizationProviderArgs.builder()
.resourceGroupName("string")
.serviceName("string")
.authorizationProviderId("string")
.displayName("string")
.identityProvider("string")
.oauth2(AuthorizationProviderOAuth2SettingsArgs.builder()
.grantTypes(AuthorizationProviderOAuth2GrantTypesArgs.builder()
.authorizationCode(Map.of("string", "string"))
.clientCredentials(Map.of("string", "string"))
.build())
.redirectUrl("string")
.build())
.build());
authorization_provider_resource = azure_native.apimanagement.AuthorizationProvider("authorizationProviderResource",
resource_group_name="string",
service_name="string",
authorization_provider_id="string",
display_name="string",
identity_provider="string",
oauth2=azure_native.apimanagement.AuthorizationProviderOAuth2SettingsArgs(
grant_types=azure_native.apimanagement.AuthorizationProviderOAuth2GrantTypesArgs(
authorization_code={
"string": "string",
},
client_credentials={
"string": "string",
},
),
redirect_url="string",
))
const authorizationProviderResource = new azure_native.apimanagement.AuthorizationProvider("authorizationProviderResource", {
resourceGroupName: "string",
serviceName: "string",
authorizationProviderId: "string",
displayName: "string",
identityProvider: "string",
oauth2: {
grantTypes: {
authorizationCode: {
string: "string",
},
clientCredentials: {
string: "string",
},
},
redirectUrl: "string",
},
});
type: azure-native:apimanagement:AuthorizationProvider
properties:
authorizationProviderId: string
displayName: string
identityProvider: string
oauth2:
grantTypes:
authorizationCode:
string: string
clientCredentials:
string: string
redirectUrl: string
resourceGroupName: string
serviceName: string
AuthorizationProvider Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AuthorizationProvider resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Service
Name string - The name of the API Management service.
- string
- Identifier of the authorization provider.
- Display
Name string - Authorization Provider name. Must be 1 to 300 characters long.
- Identity
Provider string - Identity provider name. Must be 1 to 300 characters long.
- Oauth2
Pulumi.
Azure Native. Api Management. Inputs. Authorization Provider OAuth2Settings - OAuth2 settings
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Service
Name string - The name of the API Management service.
- string
- Identifier of the authorization provider.
- Display
Name string - Authorization Provider name. Must be 1 to 300 characters long.
- Identity
Provider string - Identity provider name. Must be 1 to 300 characters long.
- Oauth2
Authorization
Provider OAuth2Settings Args - OAuth2 settings
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- service
Name String - The name of the API Management service.
- String
- Identifier of the authorization provider.
- display
Name String - Authorization Provider name. Must be 1 to 300 characters long.
- identity
Provider String - Identity provider name. Must be 1 to 300 characters long.
- oauth2
Authorization
Provider OAuth2Settings - OAuth2 settings
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- service
Name string - The name of the API Management service.
- string
- Identifier of the authorization provider.
- display
Name string - Authorization Provider name. Must be 1 to 300 characters long.
- identity
Provider string - Identity provider name. Must be 1 to 300 characters long.
- oauth2
Authorization
Provider OAuth2Settings - OAuth2 settings
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- service_
name str - The name of the API Management service.
- str
- Identifier of the authorization provider.
- display_
name str - Authorization Provider name. Must be 1 to 300 characters long.
- identity_
provider str - Identity provider name. Must be 1 to 300 characters long.
- oauth2
Authorization
Provider OAuth2Settings Args - OAuth2 settings
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- service
Name String - The name of the API Management service.
- String
- Identifier of the authorization provider.
- display
Name String - Authorization Provider name. Must be 1 to 300 characters long.
- identity
Provider String - Identity provider name. Must be 1 to 300 characters long.
- oauth2 Property Map
- OAuth2 settings
Outputs
All input properties are implicitly available as output properties. Additionally, the AuthorizationProvider resource produces the following output properties:
Supporting Types
AuthorizationProviderOAuth2GrantTypes, AuthorizationProviderOAuth2GrantTypesArgs
- Dictionary<string, string>
- OAuth2 authorization code grant parameters
- Client
Credentials Dictionary<string, string> - OAuth2 client credential grant parameters
- map[string]string
- OAuth2 authorization code grant parameters
- Client
Credentials map[string]string - OAuth2 client credential grant parameters
- Map<String,String>
- OAuth2 authorization code grant parameters
- client
Credentials Map<String,String> - OAuth2 client credential grant parameters
- {[key: string]: string}
- OAuth2 authorization code grant parameters
- client
Credentials {[key: string]: string} - OAuth2 client credential grant parameters
- Mapping[str, str]
- OAuth2 authorization code grant parameters
- client_
credentials Mapping[str, str] - OAuth2 client credential grant parameters
- Map<String>
- OAuth2 authorization code grant parameters
- client
Credentials Map<String> - OAuth2 client credential grant parameters
AuthorizationProviderOAuth2GrantTypesResponse, AuthorizationProviderOAuth2GrantTypesResponseArgs
- Dictionary<string, string>
- OAuth2 authorization code grant parameters
- Client
Credentials Dictionary<string, string> - OAuth2 client credential grant parameters
- map[string]string
- OAuth2 authorization code grant parameters
- Client
Credentials map[string]string - OAuth2 client credential grant parameters
- Map<String,String>
- OAuth2 authorization code grant parameters
- client
Credentials Map<String,String> - OAuth2 client credential grant parameters
- {[key: string]: string}
- OAuth2 authorization code grant parameters
- client
Credentials {[key: string]: string} - OAuth2 client credential grant parameters
- Mapping[str, str]
- OAuth2 authorization code grant parameters
- client_
credentials Mapping[str, str] - OAuth2 client credential grant parameters
- Map<String>
- OAuth2 authorization code grant parameters
- client
Credentials Map<String> - OAuth2 client credential grant parameters
AuthorizationProviderOAuth2Settings, AuthorizationProviderOAuth2SettingsArgs
- Grant
Types Pulumi.Azure Native. Api Management. Inputs. Authorization Provider OAuth2Grant Types - OAuth2 settings
- Redirect
Url string - Redirect URL to be set in the OAuth application.
- Grant
Types AuthorizationProvider OAuth2Grant Types - OAuth2 settings
- Redirect
Url string - Redirect URL to be set in the OAuth application.
- grant
Types AuthorizationProvider OAuth2Grant Types - OAuth2 settings
- redirect
Url String - Redirect URL to be set in the OAuth application.
- grant
Types AuthorizationProvider OAuth2Grant Types - OAuth2 settings
- redirect
Url string - Redirect URL to be set in the OAuth application.
- grant_
types AuthorizationProvider OAuth2Grant Types - OAuth2 settings
- redirect_
url str - Redirect URL to be set in the OAuth application.
- grant
Types Property Map - OAuth2 settings
- redirect
Url String - Redirect URL to be set in the OAuth application.
AuthorizationProviderOAuth2SettingsResponse, AuthorizationProviderOAuth2SettingsResponseArgs
- Grant
Types Pulumi.Azure Native. Api Management. Inputs. Authorization Provider OAuth2Grant Types Response - OAuth2 settings
- Redirect
Url string - Redirect URL to be set in the OAuth application.
- Grant
Types AuthorizationProvider OAuth2Grant Types Response - OAuth2 settings
- Redirect
Url string - Redirect URL to be set in the OAuth application.
- grant
Types AuthorizationProvider OAuth2Grant Types Response - OAuth2 settings
- redirect
Url String - Redirect URL to be set in the OAuth application.
- grant
Types AuthorizationProvider OAuth2Grant Types Response - OAuth2 settings
- redirect
Url string - Redirect URL to be set in the OAuth application.
- grant_
types AuthorizationProvider OAuth2Grant Types Response - OAuth2 settings
- redirect_
url str - Redirect URL to be set in the OAuth application.
- grant
Types Property Map - OAuth2 settings
- redirect
Url String - Redirect URL to be set in the OAuth application.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:AuthorizationProvider google /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0