com.pulumi.azurenative.apimanagement.AuthorizationServer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.apimanagement;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.apimanagement.AuthorizationServerArgs;
import com.pulumi.azurenative.apimanagement.outputs.TokenBodyParameterContractResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* 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
*
*
* {@code
* 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}
* ```
*
*/
@ResourceType(type="azure-native:apimanagement:AuthorizationServer")
public class AuthorizationServer extends com.pulumi.resources.CustomResource {
/**
* OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
*
*/
@Export(name="authorizationEndpoint", refs={String.class}, tree="[0]")
private Output authorizationEndpoint;
/**
* @return OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
*
*/
public Output authorizationEndpoint() {
return this.authorizationEndpoint;
}
/**
* HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
*
*/
@Export(name="authorizationMethods", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> authorizationMethods;
/**
* @return HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
*
*/
public Output>> authorizationMethods() {
return Codegen.optional(this.authorizationMethods);
}
/**
* Specifies the mechanism by which access token is passed to the API.
*
*/
@Export(name="bearerTokenSendingMethods", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> bearerTokenSendingMethods;
/**
* @return Specifies the mechanism by which access token is passed to the API.
*
*/
public Output>> bearerTokenSendingMethods() {
return Codegen.optional(this.bearerTokenSendingMethods);
}
/**
* 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.
*
*/
@Export(name="clientAuthenticationMethod", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> clientAuthenticationMethod;
/**
* @return 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.
*
*/
public Output>> clientAuthenticationMethod() {
return Codegen.optional(this.clientAuthenticationMethod);
}
/**
* Client or app id registered with this authorization server.
*
*/
@Export(name="clientId", refs={String.class}, tree="[0]")
private Output clientId;
/**
* @return Client or app id registered with this authorization server.
*
*/
public Output clientId() {
return this.clientId;
}
/**
* Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
*
*/
@Export(name="clientRegistrationEndpoint", refs={String.class}, tree="[0]")
private Output clientRegistrationEndpoint;
/**
* @return Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
*
*/
public Output clientRegistrationEndpoint() {
return this.clientRegistrationEndpoint;
}
/**
* 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.
*
*/
@Export(name="clientSecret", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> clientSecret;
/**
* @return 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.
*
*/
public Output> clientSecret() {
return Codegen.optional(this.clientSecret);
}
/**
* 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.
*
*/
@Export(name="defaultScope", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> defaultScope;
/**
* @return 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.
*
*/
public Output> defaultScope() {
return Codegen.optional(this.defaultScope);
}
/**
* Description of the authorization server. Can contain HTML formatting tags.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return Description of the authorization server. Can contain HTML formatting tags.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* User-friendly authorization server name.
*
*/
@Export(name="displayName", refs={String.class}, tree="[0]")
private Output displayName;
/**
* @return User-friendly authorization server name.
*
*/
public Output displayName() {
return this.displayName;
}
/**
* Form of an authorization grant, which the client uses to request the access token.
*
*/
@Export(name="grantTypes", refs={List.class,String.class}, tree="[0,1]")
private Output> grantTypes;
/**
* @return Form of an authorization grant, which the client uses to request the access token.
*
*/
public Output> grantTypes() {
return this.grantTypes;
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
*
*/
@Export(name="resourceOwnerPassword", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> resourceOwnerPassword;
/**
* @return Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
*
*/
public Output> resourceOwnerPassword() {
return Codegen.optional(this.resourceOwnerPassword);
}
/**
* Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
*
*/
@Export(name="resourceOwnerUsername", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> resourceOwnerUsername;
/**
* @return Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
*
*/
public Output> resourceOwnerUsername() {
return Codegen.optional(this.resourceOwnerUsername);
}
/**
* If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
*
*/
@Export(name="supportState", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> supportState;
/**
* @return If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
*
*/
public Output> supportState() {
return Codegen.optional(this.supportState);
}
/**
* 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"}.
*
*/
@Export(name="tokenBodyParameters", refs={List.class,TokenBodyParameterContractResponse.class}, tree="[0,1]")
private Output* @Nullable */ List> tokenBodyParameters;
/**
* @return 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"}.
*
*/
public Output>> tokenBodyParameters() {
return Codegen.optional(this.tokenBodyParameters);
}
/**
* OAuth token endpoint. Contains absolute URI to entity being referenced.
*
*/
@Export(name="tokenEndpoint", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> tokenEndpoint;
/**
* @return OAuth token endpoint. Contains absolute URI to entity being referenced.
*
*/
public Output> tokenEndpoint() {
return Codegen.optional(this.tokenEndpoint);
}
/**
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
*
*/
public Output type() {
return this.type;
}
/**
* If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.
*
*/
@Export(name="useInApiDocumentation", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> useInApiDocumentation;
/**
* @return If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.
*
*/
public Output> useInApiDocumentation() {
return Codegen.optional(this.useInApiDocumentation);
}
/**
* If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
*
*/
@Export(name="useInTestConsole", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> useInTestConsole;
/**
* @return If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
*
*/
public Output> useInTestConsole() {
return Codegen.optional(this.useInTestConsole);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public AuthorizationServer(java.lang.String name) {
this(name, AuthorizationServerArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public AuthorizationServer(java.lang.String name, AuthorizationServerArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public AuthorizationServer(java.lang.String name, AuthorizationServerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:apimanagement:AuthorizationServer", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private AuthorizationServer(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:apimanagement:AuthorizationServer", name, null, makeResourceOptions(options, id), false);
}
private static AuthorizationServerArgs makeArgs(AuthorizationServerArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? AuthorizationServerArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:apimanagement/v20160707:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20161010:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20170301:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20180101:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20180601preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20190101:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20191201:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20191201preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20200601preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20201201:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20210101preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20210401preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20210801:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20211201preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20220401preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20220801:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20220901preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20230301preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20230501preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20230901preview:AuthorizationServer").build()),
Output.of(Alias.builder().type("azure-native:apimanagement/v20240501:AuthorizationServer").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static AuthorizationServer get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new AuthorizationServer(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy