![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azurenative.apimanagement.kotlin.AuthorizationServerArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-azure-native-kotlin Show documentation
Show all versions of pulumi-azure-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.apimanagement.kotlin
import com.pulumi.azurenative.apimanagement.AuthorizationServerArgs.builder
import com.pulumi.azurenative.apimanagement.kotlin.enums.AuthorizationMethod
import com.pulumi.azurenative.apimanagement.kotlin.enums.BearerTokenSendingMethod
import com.pulumi.azurenative.apimanagement.kotlin.enums.ClientAuthenticationMethod
import com.pulumi.azurenative.apimanagement.kotlin.enums.GrantType
import com.pulumi.azurenative.apimanagement.kotlin.inputs.TokenBodyParameterContractArgs
import com.pulumi.azurenative.apimanagement.kotlin.inputs.TokenBodyParameterContractArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* External OAuth authorization server settings.
* Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.
* Other available API versions: 2016-07-07, 2016-10-10, 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01.
* ## Example Usage
* ### ApiManagementCreateAuthorizationServer
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var authorizationServer = new AzureNative.ApiManagement.AuthorizationServer("authorizationServer", new()
* {
* AuthorizationEndpoint = "https://www.contoso.com/oauth2/auth",
* AuthorizationMethods = new[]
* {
* AzureNative.ApiManagement.AuthorizationMethod.GET,
* },
* Authsid = "newauthServer",
* BearerTokenSendingMethods = new[]
* {
* AzureNative.ApiManagement.BearerTokenSendingMethod.AuthorizationHeader,
* },
* ClientId = "1",
* ClientRegistrationEndpoint = "https://www.contoso.com/apps",
* ClientSecret = "2",
* DefaultScope = "read write",
* Description = "test server",
* DisplayName = "test2",
* GrantTypes = new[]
* {
* AzureNative.ApiManagement.GrantType.AuthorizationCode,
* AzureNative.ApiManagement.GrantType.@Implicit,
* },
* ResourceGroupName = "rg1",
* ResourceOwnerPassword = "pwd",
* ResourceOwnerUsername = "un",
* ServiceName = "apimService1",
* SupportState = true,
* TokenEndpoint = "https://www.contoso.com/oauth2/token",
* UseInApiDocumentation = true,
* UseInTestConsole = false,
* });
* });
* ```
* ```go
* 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.NewAuthorizationServer(ctx, "authorizationServer", &apimanagement.AuthorizationServerArgs{
* AuthorizationEndpoint: pulumi.String("https://www.contoso.com/oauth2/auth"),
* AuthorizationMethods: apimanagement.AuthorizationMethodArray{
* apimanagement.AuthorizationMethodGET,
* },
* Authsid: pulumi.String("newauthServer"),
* BearerTokenSendingMethods: pulumi.StringArray{
* pulumi.String(apimanagement.BearerTokenSendingMethodAuthorizationHeader),
* },
* ClientId: pulumi.String("1"),
* ClientRegistrationEndpoint: pulumi.String("https://www.contoso.com/apps"),
* ClientSecret: pulumi.String("2"),
* DefaultScope: pulumi.String("read write"),
* Description: pulumi.String("test server"),
* DisplayName: pulumi.String("test2"),
* GrantTypes: pulumi.StringArray{
* pulumi.String(apimanagement.GrantTypeAuthorizationCode),
* pulumi.String(apimanagement.GrantTypeImplicit),
* },
* ResourceGroupName: pulumi.String("rg1"),
* ResourceOwnerPassword: pulumi.String("pwd"),
* ResourceOwnerUsername: pulumi.String("un"),
* ServiceName: pulumi.String("apimService1"),
* SupportState: pulumi.Bool(true),
* TokenEndpoint: pulumi.String("https://www.contoso.com/oauth2/token"),
* UseInApiDocumentation: pulumi.Bool(true),
* UseInTestConsole: pulumi.Bool(false),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.apimanagement.AuthorizationServer;
* import com.pulumi.azurenative.apimanagement.AuthorizationServerArgs;
* 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 authorizationServer = new AuthorizationServer("authorizationServer", AuthorizationServerArgs.builder()
* .authorizationEndpoint("https://www.contoso.com/oauth2/auth")
* .authorizationMethods("GET")
* .authsid("newauthServer")
* .bearerTokenSendingMethods("authorizationHeader")
* .clientId("1")
* .clientRegistrationEndpoint("https://www.contoso.com/apps")
* .clientSecret("2")
* .defaultScope("read write")
* .description("test server")
* .displayName("test2")
* .grantTypes(
* "authorizationCode",
* "implicit")
* .resourceGroupName("rg1")
* .resourceOwnerPassword("pwd")
* .resourceOwnerUsername("un")
* .serviceName("apimService1")
* .supportState(true)
* .tokenEndpoint("https://www.contoso.com/oauth2/token")
* .useInApiDocumentation(true)
* .useInTestConsole(false)
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:apimanagement:AuthorizationServer newauthServer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationServers/{authsid}
* ```
* @property authorizationEndpoint OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
* @property authorizationMethods HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
* @property authsid Identifier of the authorization server.
* @property bearerTokenSendingMethods Specifies the mechanism by which access token is passed to the API.
* @property clientAuthenticationMethod 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.
* @property clientId Client or app id registered with this authorization server.
* @property clientRegistrationEndpoint Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
* @property clientSecret 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.
* @property defaultScope 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.
* @property description Description of the authorization server. Can contain HTML formatting tags.
* @property displayName User-friendly authorization server name.
* @property grantTypes Form of an authorization grant, which the client uses to request the access token.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property resourceOwnerPassword Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
* @property resourceOwnerUsername Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
* @property serviceName The name of the API Management service.
* @property supportState If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
* @property tokenBodyParameters 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"}.
* @property tokenEndpoint OAuth token endpoint. Contains absolute URI to entity being referenced.
* @property useInApiDocumentation If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.
* @property useInTestConsole If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
*/
public data class AuthorizationServerArgs(
public val authorizationEndpoint: Output? = null,
public val authorizationMethods: Output>? = null,
public val authsid: Output? = null,
public val bearerTokenSendingMethods: Output>>? =
null,
public val clientAuthenticationMethod: Output>>? =
null,
public val clientId: Output? = null,
public val clientRegistrationEndpoint: Output? = null,
public val clientSecret: Output? = null,
public val defaultScope: Output? = null,
public val description: Output? = null,
public val displayName: Output? = null,
public val grantTypes: Output>>? = null,
public val resourceGroupName: Output? = null,
public val resourceOwnerPassword: Output? = null,
public val resourceOwnerUsername: Output? = null,
public val serviceName: Output? = null,
public val supportState: Output? = null,
public val tokenBodyParameters: Output>? = null,
public val tokenEndpoint: Output? = null,
public val useInApiDocumentation: Output? = null,
public val useInTestConsole: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.apimanagement.AuthorizationServerArgs =
com.pulumi.azurenative.apimanagement.AuthorizationServerArgs.builder()
.authorizationEndpoint(authorizationEndpoint?.applyValue({ args0 -> args0 }))
.authorizationMethods(
authorizationMethods?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.authsid(authsid?.applyValue({ args0 -> args0 }))
.bearerTokenSendingMethods(
bearerTokenSendingMethods?.applyValue({ args0 ->
args0.map({ args0 ->
args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
})
}),
)
.clientAuthenticationMethod(
clientAuthenticationMethod?.applyValue({ args0 ->
args0.map({ args0 ->
args0.transform({ args0 -> args0 }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
})
}),
)
.clientId(clientId?.applyValue({ args0 -> args0 }))
.clientRegistrationEndpoint(clientRegistrationEndpoint?.applyValue({ args0 -> args0 }))
.clientSecret(clientSecret?.applyValue({ args0 -> args0 }))
.defaultScope(defaultScope?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.displayName(displayName?.applyValue({ args0 -> args0 }))
.grantTypes(
grantTypes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
})
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.resourceOwnerPassword(resourceOwnerPassword?.applyValue({ args0 -> args0 }))
.resourceOwnerUsername(resourceOwnerUsername?.applyValue({ args0 -> args0 }))
.serviceName(serviceName?.applyValue({ args0 -> args0 }))
.supportState(supportState?.applyValue({ args0 -> args0 }))
.tokenBodyParameters(
tokenBodyParameters?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.tokenEndpoint(tokenEndpoint?.applyValue({ args0 -> args0 }))
.useInApiDocumentation(useInApiDocumentation?.applyValue({ args0 -> args0 }))
.useInTestConsole(useInTestConsole?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [AuthorizationServerArgs].
*/
@PulumiTagMarker
public class AuthorizationServerArgsBuilder internal constructor() {
private var authorizationEndpoint: Output? = null
private var authorizationMethods: Output>? = null
private var authsid: Output? = null
private var bearerTokenSendingMethods: Output>>? =
null
private var clientAuthenticationMethod: Output>>? =
null
private var clientId: Output? = null
private var clientRegistrationEndpoint: Output? = null
private var clientSecret: Output? = null
private var defaultScope: Output? = null
private var description: Output? = null
private var displayName: Output? = null
private var grantTypes: Output>>? = null
private var resourceGroupName: Output? = null
private var resourceOwnerPassword: Output? = null
private var resourceOwnerUsername: Output? = null
private var serviceName: Output? = null
private var supportState: Output? = null
private var tokenBodyParameters: Output>? = null
private var tokenEndpoint: Output? = null
private var useInApiDocumentation: Output? = null
private var useInTestConsole: Output? = null
/**
* @param value OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
*/
@JvmName("gngmbyfyjlqiygee")
public suspend fun authorizationEndpoint(`value`: Output) {
this.authorizationEndpoint = value
}
/**
* @param value HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
*/
@JvmName("qcilrinblpdepvgf")
public suspend fun authorizationMethods(`value`: Output>) {
this.authorizationMethods = value
}
@JvmName("ukrgfwdhinawafqn")
public suspend fun authorizationMethods(vararg values: Output) {
this.authorizationMethods = Output.all(values.asList())
}
/**
* @param values HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
*/
@JvmName("oymvdkxpybehvpfi")
public suspend fun authorizationMethods(values: List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy