com.pulumi.azure.apimanagement.GatewayHostNameConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.azure.apimanagement;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.apimanagement.GatewayHostNameConfigurationArgs;
import com.pulumi.azure.apimanagement.inputs.GatewayHostNameConfigurationState;
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.Optional;
import javax.annotation.Nullable;
/**
* Manages an API Management Gateway Host Name Configuration.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.core.ResourceGroup;
* import com.pulumi.azure.core.ResourceGroupArgs;
* import com.pulumi.azure.apimanagement.Service;
* import com.pulumi.azure.apimanagement.ServiceArgs;
* import com.pulumi.azure.apimanagement.Gateway;
* import com.pulumi.azure.apimanagement.GatewayArgs;
* import com.pulumi.azure.apimanagement.inputs.GatewayLocationDataArgs;
* import com.pulumi.azure.apimanagement.Certificate;
* import com.pulumi.azure.apimanagement.CertificateArgs;
* import com.pulumi.azure.apimanagement.GatewayHostNameConfiguration;
* import com.pulumi.azure.apimanagement.GatewayHostNameConfigurationArgs;
* 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 }{{@code
* public static void main(String[] args) }{{@code
* Pulumi.run(App::stack);
* }}{@code
*
* public static void stack(Context ctx) }{{@code
* var example = new ResourceGroup("example", ResourceGroupArgs.builder()
* .name("example-resources")
* .location("West Europe")
* .build());
*
* var exampleService = new Service("exampleService", ServiceArgs.builder()
* .name("example-apim")
* .location(example.location())
* .resourceGroupName(example.name())
* .publisherName("pub1")
* .publisherEmail("pub1}{@literal @}{@code email.com")
* .skuName("Consumption_0")
* .build());
*
* var exampleGateway = new Gateway("exampleGateway", GatewayArgs.builder()
* .name("example-gateway")
* .apiManagementId(exampleService.id())
* .description("Example API Management gateway")
* .locationData(GatewayLocationDataArgs.builder()
* .name("example name")
* .city("example city")
* .district("example district")
* .region("example region")
* .build())
* .build());
*
* var exampleCertificate = new Certificate("exampleCertificate", CertificateArgs.builder()
* .name("example-cert")
* .apiManagementName(exampleService.name())
* .resourceGroupName(example.name())
* .data(StdFunctions.filebase64(Filebase64Args.builder()
* .input("example.pfx")
* .build()).result())
* .build());
*
* var exampleGatewayHostNameConfiguration = new GatewayHostNameConfiguration("exampleGatewayHostNameConfiguration", GatewayHostNameConfigurationArgs.builder()
* .name("example-host-name-configuration")
* .apiManagementId(exampleService.id())
* .gatewayName(exampleGateway.name())
* .certificateId(exampleCertificate.id())
* .hostName("example-host-name")
* .requestClientCertificateEnabled(true)
* .http2Enabled(true)
* .tls10Enabled(true)
* .tls11Enabled(false)
* .build());
*
* }}{@code
* }}{@code
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* API Management Gateway Host Name Configuration can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:apimanagement/gatewayHostNameConfiguration:GatewayHostNameConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/gateways/gateway1/hostnameConfigurations/hc1
* ```
*
*/
@ResourceType(type="azure:apimanagement/gatewayHostNameConfiguration:GatewayHostNameConfiguration")
public class GatewayHostNameConfiguration extends com.pulumi.resources.CustomResource {
/**
* The ID of the API Management Service. Changing this forces a new resource to be created.
*
*/
@Export(name="apiManagementId", refs={String.class}, tree="[0]")
private Output apiManagementId;
/**
* @return The ID of the API Management Service. Changing this forces a new resource to be created.
*
*/
public Output apiManagementId() {
return this.apiManagementId;
}
/**
* The certificate ID to be used for TLS connection establishment.
*
*/
@Export(name="certificateId", refs={String.class}, tree="[0]")
private Output certificateId;
/**
* @return The certificate ID to be used for TLS connection establishment.
*
*/
public Output certificateId() {
return this.certificateId;
}
/**
* The name of the API Management Gateway. Changing this forces a new resource to be created.
*
*/
@Export(name="gatewayName", refs={String.class}, tree="[0]")
private Output gatewayName;
/**
* @return The name of the API Management Gateway. Changing this forces a new resource to be created.
*
*/
public Output gatewayName() {
return this.gatewayName;
}
/**
* The host name to use for the API Management Gateway Host Name Configuration.
*
*/
@Export(name="hostName", refs={String.class}, tree="[0]")
private Output hostName;
/**
* @return The host name to use for the API Management Gateway Host Name Configuration.
*
*/
public Output hostName() {
return this.hostName;
}
/**
* Whether HTTP/2.0 is supported. Defaults to `true`.
*
*/
@Export(name="http2Enabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> http2Enabled;
/**
* @return Whether HTTP/2.0 is supported. Defaults to `true`.
*
*/
public Output> http2Enabled() {
return Codegen.optional(this.http2Enabled);
}
/**
* The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the API Management Gateway Host Name Configuration. Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* Whether the API Management Gateway requests a client certificate.
*
*/
@Export(name="requestClientCertificateEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> requestClientCertificateEnabled;
/**
* @return Whether the API Management Gateway requests a client certificate.
*
*/
public Output> requestClientCertificateEnabled() {
return Codegen.optional(this.requestClientCertificateEnabled);
}
/**
* Whether TLS 1.0 is supported.
*
*/
@Export(name="tls10Enabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> tls10Enabled;
/**
* @return Whether TLS 1.0 is supported.
*
*/
public Output> tls10Enabled() {
return Codegen.optional(this.tls10Enabled);
}
/**
* Whether TLS 1.1 is supported.
*
*/
@Export(name="tls11Enabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> tls11Enabled;
/**
* @return Whether TLS 1.1 is supported.
*
*/
public Output> tls11Enabled() {
return Codegen.optional(this.tls11Enabled);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public GatewayHostNameConfiguration(java.lang.String name) {
this(name, GatewayHostNameConfigurationArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public GatewayHostNameConfiguration(java.lang.String name, GatewayHostNameConfigurationArgs 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 GatewayHostNameConfiguration(java.lang.String name, GatewayHostNameConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:apimanagement/gatewayHostNameConfiguration:GatewayHostNameConfiguration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private GatewayHostNameConfiguration(java.lang.String name, Output id, @Nullable GatewayHostNameConfigurationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:apimanagement/gatewayHostNameConfiguration:GatewayHostNameConfiguration", name, state, makeResourceOptions(options, id), false);
}
private static GatewayHostNameConfigurationArgs makeArgs(GatewayHostNameConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? GatewayHostNameConfigurationArgs.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())
.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 state
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static GatewayHostNameConfiguration get(java.lang.String name, Output id, @Nullable GatewayHostNameConfigurationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new GatewayHostNameConfiguration(name, id, state, options);
}
}