azure-native.apimanagement.Authorization
Explore with Pulumi AI
Authorization contract. Azure REST API version: 2022-08-01.
Example Usage
ApiManagementCreateAuthorizationAADAuthCode
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var authorization = new AzureNative.ApiManagement.Authorization("authorization", new()
{
AuthorizationId = "authz2",
AuthorizationProviderId = "aadwithauthcode",
AuthorizationType = "OAuth2",
OAuth2GrantType = "AuthorizationCode",
ResourceGroupName = "rg1",
ServiceName = "apimService1",
});
});
package main
import (
"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.NewAuthorization(ctx, "authorization", &apimanagement.AuthorizationArgs{
AuthorizationId: pulumi.String("authz2"),
AuthorizationProviderId: pulumi.String("aadwithauthcode"),
AuthorizationType: pulumi.String("OAuth2"),
OAuth2GrantType: pulumi.String("AuthorizationCode"),
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.Authorization;
import com.pulumi.azurenative.apimanagement.AuthorizationArgs;
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 authorization = new Authorization("authorization", AuthorizationArgs.builder()
.authorizationId("authz2")
.authorizationProviderId("aadwithauthcode")
.authorizationType("OAuth2")
.oAuth2GrantType("AuthorizationCode")
.resourceGroupName("rg1")
.serviceName("apimService1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
authorization = azure_native.apimanagement.Authorization("authorization",
authorization_id="authz2",
authorization_provider_id="aadwithauthcode",
authorization_type="OAuth2",
o_auth2_grant_type="AuthorizationCode",
resource_group_name="rg1",
service_name="apimService1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const authorization = new azure_native.apimanagement.Authorization("authorization", {
authorizationId: "authz2",
authorizationProviderId: "aadwithauthcode",
authorizationType: "OAuth2",
oAuth2GrantType: "AuthorizationCode",
resourceGroupName: "rg1",
serviceName: "apimService1",
});
resources:
authorization:
type: azure-native:apimanagement:Authorization
properties:
authorizationId: authz2
authorizationProviderId: aadwithauthcode
authorizationType: OAuth2
oAuth2GrantType: AuthorizationCode
resourceGroupName: rg1
serviceName: apimService1
ApiManagementCreateAuthorizationAADClientCred
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var authorization = new AzureNative.ApiManagement.Authorization("authorization", new()
{
AuthorizationId = "authz1",
AuthorizationProviderId = "aadwithclientcred",
AuthorizationType = "OAuth2",
OAuth2GrantType = "AuthorizationCode",
Parameters =
{
{ "clientId", "53790925-fdd3-4b80-bc7a-4c3aaf25801d" },
{ "clientSecret", "FcJkQ3iPSaKAQRA7Ft8Q~fZ1X5vKmqzUAfJagcJ8" },
},
ResourceGroupName = "rg1",
ServiceName = "apimService1",
});
});
package main
import (
"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.NewAuthorization(ctx, "authorization", &apimanagement.AuthorizationArgs{
AuthorizationId: pulumi.String("authz1"),
AuthorizationProviderId: pulumi.String("aadwithclientcred"),
AuthorizationType: pulumi.String("OAuth2"),
OAuth2GrantType: pulumi.String("AuthorizationCode"),
Parameters: pulumi.StringMap{
"clientId": pulumi.String("53790925-fdd3-4b80-bc7a-4c3aaf25801d"),
"clientSecret": pulumi.String("FcJkQ3iPSaKAQRA7Ft8Q~fZ1X5vKmqzUAfJagcJ8"),
},
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.Authorization;
import com.pulumi.azurenative.apimanagement.AuthorizationArgs;
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 authorization = new Authorization("authorization", AuthorizationArgs.builder()
.authorizationId("authz1")
.authorizationProviderId("aadwithclientcred")
.authorizationType("OAuth2")
.oAuth2GrantType("AuthorizationCode")
.parameters(Map.ofEntries(
Map.entry("clientId", "53790925-fdd3-4b80-bc7a-4c3aaf25801d"),
Map.entry("clientSecret", "FcJkQ3iPSaKAQRA7Ft8Q~fZ1X5vKmqzUAfJagcJ8")
))
.resourceGroupName("rg1")
.serviceName("apimService1")
.build());
}
}
import pulumi
import pulumi_azure_native as azure_native
authorization = azure_native.apimanagement.Authorization("authorization",
authorization_id="authz1",
authorization_provider_id="aadwithclientcred",
authorization_type="OAuth2",
o_auth2_grant_type="AuthorizationCode",
parameters={
"clientId": "53790925-fdd3-4b80-bc7a-4c3aaf25801d",
"clientSecret": "FcJkQ3iPSaKAQRA7Ft8Q~fZ1X5vKmqzUAfJagcJ8",
},
resource_group_name="rg1",
service_name="apimService1")
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const authorization = new azure_native.apimanagement.Authorization("authorization", {
authorizationId: "authz1",
authorizationProviderId: "aadwithclientcred",
authorizationType: "OAuth2",
oAuth2GrantType: "AuthorizationCode",
parameters: {
clientId: "53790925-fdd3-4b80-bc7a-4c3aaf25801d",
clientSecret: "FcJkQ3iPSaKAQRA7Ft8Q~fZ1X5vKmqzUAfJagcJ8",
},
resourceGroupName: "rg1",
serviceName: "apimService1",
});
resources:
authorization:
type: azure-native:apimanagement:Authorization
properties:
authorizationId: authz1
authorizationProviderId: aadwithclientcred
authorizationType: OAuth2
oAuth2GrantType: AuthorizationCode
parameters:
clientId: 53790925-fdd3-4b80-bc7a-4c3aaf25801d
clientSecret: FcJkQ3iPSaKAQRA7Ft8Q~fZ1X5vKmqzUAfJagcJ8
resourceGroupName: rg1
serviceName: apimService1
Create Authorization Resource
new Authorization(name: string, args: AuthorizationArgs, opts?: CustomResourceOptions);
@overload
def Authorization(resource_name: str,
opts: Optional[ResourceOptions] = None,
authorization_id: Optional[str] = None,
authorization_provider_id: Optional[str] = None,
authorization_type: Optional[Union[str, AuthorizationType]] = None,
error: Optional[AuthorizationErrorArgs] = None,
o_auth2_grant_type: Optional[Union[str, OAuth2GrantType]] = None,
parameters: Optional[Mapping[str, str]] = None,
resource_group_name: Optional[str] = None,
service_name: Optional[str] = None,
status: Optional[str] = None)
@overload
def Authorization(resource_name: str,
args: AuthorizationArgs,
opts: Optional[ResourceOptions] = None)
func NewAuthorization(ctx *Context, name string, args AuthorizationArgs, opts ...ResourceOption) (*Authorization, error)
public Authorization(string name, AuthorizationArgs args, CustomResourceOptions? opts = null)
public Authorization(String name, AuthorizationArgs args)
public Authorization(String name, AuthorizationArgs args, CustomResourceOptions options)
type: azure-native:apimanagement:Authorization
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthorizationArgs
- 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 AuthorizationArgs
- 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 AuthorizationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AuthorizationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AuthorizationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Authorization 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 Authorization resource accepts the following input properties:
- string
Identifier of the authorization provider.
- 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.
- string | Pulumi.
Azure Native. Api Management. Authorization Type Authorization type options
- Error
Pulumi.
Azure Native. Api Management. Inputs. Authorization Error Authorization error details.
- OAuth2Grant
Type string | Pulumi.Azure Native. Api Management. OAuth2Grant Type OAuth2 grant type options
- Parameters Dictionary<string, string>
Authorization parameters
- Status string
Status of the Authorization
- string
Identifier of the authorization provider.
- 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.
- string | Authorization
Type Authorization type options
- Error
Authorization
Error Args Authorization error details.
- OAuth2Grant
Type string | OAuth2GrantType OAuth2 grant type options
- Parameters map[string]string
Authorization parameters
- Status string
Status of the Authorization
- String
Identifier of the authorization provider.
- 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.
- String | Authorization
Type Authorization type options
- error
Authorization
Error Authorization error details.
- o
Auth2Grant String | OAuth2GrantType Type OAuth2 grant type options
- parameters Map<String,String>
Authorization parameters
- status String
Status of the Authorization
- string
Identifier of the authorization provider.
- 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.
- string | Authorization
Type Authorization type options
- error
Authorization
Error Authorization error details.
- o
Auth2Grant string | OAuth2GrantType Type OAuth2 grant type options
- parameters {[key: string]: string}
Authorization parameters
- status string
Status of the Authorization
- str
Identifier of the authorization provider.
- 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.
- str | Authorization
Type Authorization type options
- error
Authorization
Error Args Authorization error details.
- o_
auth2_ str | OAuth2Grantgrant_ type Type OAuth2 grant type options
- parameters Mapping[str, str]
Authorization parameters
- status str
Status of the Authorization
- String
Identifier of the authorization provider.
- 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.
- String | "OAuth2"
Authorization type options
- error Property Map
Authorization error details.
- o
Auth2Grant String | "AuthorizationType Code" | "Client Credentials" OAuth2 grant type options
- parameters Map<String>
Authorization parameters
- status String
Status of the Authorization
Outputs
All input properties are implicitly available as output properties. Additionally, the Authorization resource produces the following output properties:
Supporting Types
AuthorizationError, AuthorizationErrorArgs
AuthorizationErrorResponse, AuthorizationErrorResponseArgs
AuthorizationType, AuthorizationTypeArgs
- OAuth2
- OAuth2
OAuth2 authorization type
- Authorization
Type OAuth2 - OAuth2
OAuth2 authorization type
- OAuth2
- OAuth2
OAuth2 authorization type
- OAuth2
- OAuth2
OAuth2 authorization type
- O_AUTH2
- OAuth2
OAuth2 authorization type
- "OAuth2"
- OAuth2
OAuth2 authorization type
OAuth2GrantType, OAuth2GrantTypeArgs
- Authorization
Code - AuthorizationCode
Authorization Code grant
- Client
Credentials - ClientCredentials
Client Credential grant
- OAuth2Grant
Type Authorization Code - AuthorizationCode
Authorization Code grant
- OAuth2Grant
Type Client Credentials - ClientCredentials
Client Credential grant
- Authorization
Code - AuthorizationCode
Authorization Code grant
- Client
Credentials - ClientCredentials
Client Credential grant
- Authorization
Code - AuthorizationCode
Authorization Code grant
- Client
Credentials - ClientCredentials
Client Credential grant
- AUTHORIZATION_CODE
- AuthorizationCode
Authorization Code grant
- CLIENT_CREDENTIALS
- ClientCredentials
Client Credential grant
- "Authorization
Code" - AuthorizationCode
Authorization Code grant
- "Client
Credentials" - ClientCredentials
Client Credential grant
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:Authorization authz1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0