azure.apimanagement.getGatewayHostNameConfiguration

Use this data source to access information about an existing API Management Gateway Host Configuration.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleService = Azure.ApiManagement.GetService.Invoke(new()
    {
        Name = "example-apim",
        ResourceGroupName = "example-resources",
    });

    var exampleGateway = Azure.ApiManagement.GetGateway.Invoke(new()
    {
        Name = "example-gateway",
        ApiManagementId = data.Azurerm_api_management.Main.Id,
    });

    var exampleGatewayHostNameConfiguration = Azure.ApiManagement.GetGatewayHostNameConfiguration.Invoke(new()
    {
        Name = "example-host-configuration",
        ApiManagementId = exampleService.Apply(getServiceResult => getServiceResult.Id),
        GatewayName = exampleGateway.Apply(getGatewayResult => getGatewayResult.Name),
    });

    return new Dictionary<string, object?>
    {
        ["hostName"] = exampleGatewayHostNameConfiguration.Apply(getGatewayHostNameConfigurationResult => getGatewayHostNameConfigurationResult.HostName),
    };
});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleService, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
			Name:              "example-apim",
			ResourceGroupName: "example-resources",
		}, nil)
		if err != nil {
			return err
		}
		exampleGateway, err := apimanagement.LookupGateway(ctx, &apimanagement.LookupGatewayArgs{
			Name:            "example-gateway",
			ApiManagementId: data.Azurerm_api_management.Main.Id,
		}, nil)
		if err != nil {
			return err
		}
		exampleGatewayHostNameConfiguration, err := apimanagement.LookupGatewayHostNameConfiguration(ctx, &apimanagement.LookupGatewayHostNameConfigurationArgs{
			Name:            "example-host-configuration",
			ApiManagementId: exampleService.Id,
			GatewayName:     exampleGateway.Name,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("hostName", exampleGatewayHostNameConfiguration.HostName)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.apimanagement.ApimanagementFunctions;
import com.pulumi.azure.apimanagement.inputs.GetServiceArgs;
import com.pulumi.azure.apimanagement.inputs.GetGatewayArgs;
import com.pulumi.azure.apimanagement.inputs.GetGatewayHostNameConfigurationArgs;
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) {
        final var exampleService = ApimanagementFunctions.getService(GetServiceArgs.builder()
            .name("example-apim")
            .resourceGroupName("example-resources")
            .build());

        final var exampleGateway = ApimanagementFunctions.getGateway(GetGatewayArgs.builder()
            .name("example-gateway")
            .apiManagementId(data.azurerm_api_management().main().id())
            .build());

        final var exampleGatewayHostNameConfiguration = ApimanagementFunctions.getGatewayHostNameConfiguration(GetGatewayHostNameConfigurationArgs.builder()
            .name("example-host-configuration")
            .apiManagementId(exampleService.applyValue(getServiceResult -> getServiceResult.id()))
            .gatewayName(exampleGateway.applyValue(getGatewayResult -> getGatewayResult.name()))
            .build());

        ctx.export("hostName", exampleGatewayHostNameConfiguration.applyValue(getGatewayHostNameConfigurationResult -> getGatewayHostNameConfigurationResult.hostName()));
    }
}
import pulumi
import pulumi_azure as azure

example_service = azure.apimanagement.get_service(name="example-apim",
    resource_group_name="example-resources")
example_gateway = azure.apimanagement.get_gateway(name="example-gateway",
    api_management_id=data["azurerm_api_management"]["main"]["id"])
example_gateway_host_name_configuration = azure.apimanagement.get_gateway_host_name_configuration(name="example-host-configuration",
    api_management_id=example_service.id,
    gateway_name=example_gateway.name)
pulumi.export("hostName", example_gateway_host_name_configuration.host_name)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleService = azure.apimanagement.getService({
    name: "example-apim",
    resourceGroupName: "example-resources",
});
const exampleGateway = azure.apimanagement.getGateway({
    name: "example-gateway",
    apiManagementId: data.azurerm_api_management.main.id,
});
const exampleGatewayHostNameConfiguration = Promise.all([exampleService, exampleGateway]).then(([exampleService, exampleGateway]) => azure.apimanagement.getGatewayHostNameConfiguration({
    name: "example-host-configuration",
    apiManagementId: exampleService.id,
    gatewayName: exampleGateway.name,
}));
export const hostName = exampleGatewayHostNameConfiguration.then(exampleGatewayHostNameConfiguration => exampleGatewayHostNameConfiguration.hostName);
variables:
  exampleService:
    fn::invoke:
      Function: azure:apimanagement:getService
      Arguments:
        name: example-apim
        resourceGroupName: example-resources
  exampleGateway:
    fn::invoke:
      Function: azure:apimanagement:getGateway
      Arguments:
        name: example-gateway
        apiManagementId: ${data.azurerm_api_management.main.id}
  exampleGatewayHostNameConfiguration:
    fn::invoke:
      Function: azure:apimanagement:getGatewayHostNameConfiguration
      Arguments:
        name: example-host-configuration
        apiManagementId: ${exampleService.id}
        gatewayName: ${exampleGateway.name}
outputs:
  hostName: ${exampleGatewayHostNameConfiguration.hostName}

Using getGatewayHostNameConfiguration

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getGatewayHostNameConfiguration(args: GetGatewayHostNameConfigurationArgs, opts?: InvokeOptions): Promise<GetGatewayHostNameConfigurationResult>
function getGatewayHostNameConfigurationOutput(args: GetGatewayHostNameConfigurationOutputArgs, opts?: InvokeOptions): Output<GetGatewayHostNameConfigurationResult>
def get_gateway_host_name_configuration(api_management_id: Optional[str] = None,
                                        gateway_name: Optional[str] = None,
                                        name: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetGatewayHostNameConfigurationResult
def get_gateway_host_name_configuration_output(api_management_id: Optional[pulumi.Input[str]] = None,
                                        gateway_name: Optional[pulumi.Input[str]] = None,
                                        name: Optional[pulumi.Input[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetGatewayHostNameConfigurationResult]
func LookupGatewayHostNameConfiguration(ctx *Context, args *LookupGatewayHostNameConfigurationArgs, opts ...InvokeOption) (*LookupGatewayHostNameConfigurationResult, error)
func LookupGatewayHostNameConfigurationOutput(ctx *Context, args *LookupGatewayHostNameConfigurationOutputArgs, opts ...InvokeOption) LookupGatewayHostNameConfigurationResultOutput

> Note: This function is named LookupGatewayHostNameConfiguration in the Go SDK.

public static class GetGatewayHostNameConfiguration 
{
    public static Task<GetGatewayHostNameConfigurationResult> InvokeAsync(GetGatewayHostNameConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetGatewayHostNameConfigurationResult> Invoke(GetGatewayHostNameConfigurationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetGatewayHostNameConfigurationResult> getGatewayHostNameConfiguration(GetGatewayHostNameConfigurationArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:apimanagement/getGatewayHostNameConfiguration:getGatewayHostNameConfiguration
  arguments:
    # arguments dictionary

The following arguments are supported:

ApiManagementId string

The ID of the API Management Service.

GatewayName string

The name of the API Management Gateway. *

Name string

The name of the API Management Gateway Host Name Configuration.

ApiManagementId string

The ID of the API Management Service.

GatewayName string

The name of the API Management Gateway. *

Name string

The name of the API Management Gateway Host Name Configuration.

apiManagementId String

The ID of the API Management Service.

gatewayName String

The name of the API Management Gateway. *

name String

The name of the API Management Gateway Host Name Configuration.

apiManagementId string

The ID of the API Management Service.

gatewayName string

The name of the API Management Gateway. *

name string

The name of the API Management Gateway Host Name Configuration.

api_management_id str

The ID of the API Management Service.

gateway_name str

The name of the API Management Gateway. *

name str

The name of the API Management Gateway Host Name Configuration.

apiManagementId String

The ID of the API Management Service.

gatewayName String

The name of the API Management Gateway. *

name String

The name of the API Management Gateway Host Name Configuration.

getGatewayHostNameConfiguration Result

The following output properties are available:

ApiManagementId string
CertificateId string

The ID of the certificate used for TLS connection establishment.

GatewayName string
HostName string

The host name used for the API Management Gateway Host Name Configuration.

Http2Enabled bool

Whether HTTP/2.0 is supported.

Id string

The provider-assigned unique ID for this managed resource.

Name string
RequestClientCertificateEnabled bool

Whether the API Management Gateway requests a client certificate.

Tls10Enabled bool

Whether TLS 1.0 is supported.

Tls11Enabled bool

Whether TLS 1.1 is supported.

ApiManagementId string
CertificateId string

The ID of the certificate used for TLS connection establishment.

GatewayName string
HostName string

The host name used for the API Management Gateway Host Name Configuration.

Http2Enabled bool

Whether HTTP/2.0 is supported.

Id string

The provider-assigned unique ID for this managed resource.

Name string
RequestClientCertificateEnabled bool

Whether the API Management Gateway requests a client certificate.

Tls10Enabled bool

Whether TLS 1.0 is supported.

Tls11Enabled bool

Whether TLS 1.1 is supported.

apiManagementId String
certificateId String

The ID of the certificate used for TLS connection establishment.

gatewayName String
hostName String

The host name used for the API Management Gateway Host Name Configuration.

http2Enabled Boolean

Whether HTTP/2.0 is supported.

id String

The provider-assigned unique ID for this managed resource.

name String
requestClientCertificateEnabled Boolean

Whether the API Management Gateway requests a client certificate.

tls10Enabled Boolean

Whether TLS 1.0 is supported.

tls11Enabled Boolean

Whether TLS 1.1 is supported.

apiManagementId string
certificateId string

The ID of the certificate used for TLS connection establishment.

gatewayName string
hostName string

The host name used for the API Management Gateway Host Name Configuration.

http2Enabled boolean

Whether HTTP/2.0 is supported.

id string

The provider-assigned unique ID for this managed resource.

name string
requestClientCertificateEnabled boolean

Whether the API Management Gateway requests a client certificate.

tls10Enabled boolean

Whether TLS 1.0 is supported.

tls11Enabled boolean

Whether TLS 1.1 is supported.

api_management_id str
certificate_id str

The ID of the certificate used for TLS connection establishment.

gateway_name str
host_name str

The host name used for the API Management Gateway Host Name Configuration.

http2_enabled bool

Whether HTTP/2.0 is supported.

id str

The provider-assigned unique ID for this managed resource.

name str
request_client_certificate_enabled bool

Whether the API Management Gateway requests a client certificate.

tls10_enabled bool

Whether TLS 1.0 is supported.

tls11_enabled bool

Whether TLS 1.1 is supported.

apiManagementId String
certificateId String

The ID of the certificate used for TLS connection establishment.

gatewayName String
hostName String

The host name used for the API Management Gateway Host Name Configuration.

http2Enabled Boolean

Whether HTTP/2.0 is supported.

id String

The provider-assigned unique ID for this managed resource.

name String
requestClientCertificateEnabled Boolean

Whether the API Management Gateway requests a client certificate.

tls10Enabled Boolean

Whether TLS 1.0 is supported.

tls11Enabled Boolean

Whether TLS 1.1 is supported.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.