1. Packages
  2. Azure Classic
  3. API Docs
  4. apimanagement
  5. getGatewayHostNameConfiguration

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.apimanagement.getGatewayHostNameConfiguration

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.apimanagement.getService({
        name: "example-apim",
        resourceGroupName: "example-resources",
    });
    const exampleGetGateway = azure.apimanagement.getGateway({
        name: "example-gateway",
        apiManagementId: main.id,
    });
    const exampleGetGatewayHostNameConfiguration = Promise.all([example, exampleGetGateway]).then(([example, exampleGetGateway]) => azure.apimanagement.getGatewayHostNameConfiguration({
        name: "example-host-configuration",
        apiManagementId: example.id,
        gatewayName: exampleGetGateway.name,
    }));
    export const hostName = exampleGetGatewayHostNameConfiguration.then(exampleGetGatewayHostNameConfiguration => exampleGetGatewayHostNameConfiguration.hostName);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.apimanagement.get_service(name="example-apim",
        resource_group_name="example-resources")
    example_get_gateway = azure.apimanagement.get_gateway(name="example-gateway",
        api_management_id=main["id"])
    example_get_gateway_host_name_configuration = azure.apimanagement.get_gateway_host_name_configuration(name="example-host-configuration",
        api_management_id=example.id,
        gateway_name=example_get_gateway.name)
    pulumi.export("hostName", example_get_gateway_host_name_configuration.host_name)
    
    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 {
    		example, err := apimanagement.LookupService(ctx, &apimanagement.LookupServiceArgs{
    			Name:              "example-apim",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetGateway, err := apimanagement.LookupGateway(ctx, &apimanagement.LookupGatewayArgs{
    			Name:            "example-gateway",
    			ApiManagementId: main.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleGetGatewayHostNameConfiguration, err := apimanagement.LookupGatewayHostNameConfiguration(ctx, &apimanagement.LookupGatewayHostNameConfigurationArgs{
    			Name:            "example-host-configuration",
    			ApiManagementId: example.Id,
    			GatewayName:     exampleGetGateway.Name,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("hostName", exampleGetGatewayHostNameConfiguration.HostName)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.ApiManagement.GetService.Invoke(new()
        {
            Name = "example-apim",
            ResourceGroupName = "example-resources",
        });
    
        var exampleGetGateway = Azure.ApiManagement.GetGateway.Invoke(new()
        {
            Name = "example-gateway",
            ApiManagementId = main.Id,
        });
    
        var exampleGetGatewayHostNameConfiguration = Azure.ApiManagement.GetGatewayHostNameConfiguration.Invoke(new()
        {
            Name = "example-host-configuration",
            ApiManagementId = example.Apply(getServiceResult => getServiceResult.Id),
            GatewayName = exampleGetGateway.Apply(getGatewayResult => getGatewayResult.Name),
        });
    
        return new Dictionary<string, object?>
        {
            ["hostName"] = exampleGetGatewayHostNameConfiguration.Apply(getGatewayHostNameConfigurationResult => getGatewayHostNameConfigurationResult.HostName),
        };
    });
    
    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 example = ApimanagementFunctions.getService(GetServiceArgs.builder()
                .name("example-apim")
                .resourceGroupName("example-resources")
                .build());
    
            final var exampleGetGateway = ApimanagementFunctions.getGateway(GetGatewayArgs.builder()
                .name("example-gateway")
                .apiManagementId(main.id())
                .build());
    
            final var exampleGetGatewayHostNameConfiguration = ApimanagementFunctions.getGatewayHostNameConfiguration(GetGatewayHostNameConfigurationArgs.builder()
                .name("example-host-configuration")
                .apiManagementId(example.applyValue(getServiceResult -> getServiceResult.id()))
                .gatewayName(exampleGetGateway.applyValue(getGatewayResult -> getGatewayResult.name()))
                .build());
    
            ctx.export("hostName", exampleGetGatewayHostNameConfiguration.applyValue(getGatewayHostNameConfigurationResult -> getGatewayHostNameConfigurationResult.hostName()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: azure:apimanagement:getService
          Arguments:
            name: example-apim
            resourceGroupName: example-resources
      exampleGetGateway:
        fn::invoke:
          Function: azure:apimanagement:getGateway
          Arguments:
            name: example-gateway
            apiManagementId: ${main.id}
      exampleGetGatewayHostNameConfiguration:
        fn::invoke:
          Function: azure:apimanagement:getGatewayHostNameConfiguration
          Arguments:
            name: example-host-configuration
            apiManagementId: ${example.id}
            gatewayName: ${exampleGetGateway.name}
    outputs:
      hostName: ${exampleGetGatewayHostNameConfiguration.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.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi