1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. getApigateway
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.getApigateway

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    The API Gateway data source can be used to search for and return an existing API Gateway. You can provide a string for the name parameter which will be compared with provisioned API Gateways. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.

    Example Usage

    By ID

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.getApigateway({
        id: "your_apigateway_id",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_apigateway(id="your_apigateway_id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.LookupApigateway(ctx, &ionoscloud.LookupApigatewayArgs{
    			Id: pulumi.StringRef("your_apigateway_id"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.GetApigateway.Invoke(new()
        {
            Id = "your_apigateway_id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetApigatewayArgs;
    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 = IonoscloudFunctions.getApigateway(GetApigatewayArgs.builder()
                .id("your_apigateway_id")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getApigateway
          arguments:
            id: your_apigateway_id
    

    By Name

    Needs to have the resource be previously created, or a depends_on clause to ensure that the resource is created before this data source is called.

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = ionoscloud.getApigateway({
        name: "example-apigateway",
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.get_apigateway(name="example-apigateway")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ionoscloud.LookupApigateway(ctx, &ionoscloud.LookupApigatewayArgs{
    			Name: pulumi.StringRef("example-apigateway"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ionoscloud = Pulumi.Ionoscloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ionoscloud.GetApigateway.Invoke(new()
        {
            Name = "example-apigateway",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.IonoscloudFunctions;
    import com.pulumi.ionoscloud.inputs.GetApigatewayArgs;
    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 = IonoscloudFunctions.getApigateway(GetApigatewayArgs.builder()
                .name("example-apigateway")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ionoscloud:getApigateway
          arguments:
            name: example-apigateway
    

    Using getApigateway

    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 getApigateway(args: GetApigatewayArgs, opts?: InvokeOptions): Promise<GetApigatewayResult>
    function getApigatewayOutput(args: GetApigatewayOutputArgs, opts?: InvokeOptions): Output<GetApigatewayResult>
    def get_apigateway(id: Optional[str] = None,
                       name: Optional[str] = None,
                       partial_match: Optional[bool] = None,
                       opts: Optional[InvokeOptions] = None) -> GetApigatewayResult
    def get_apigateway_output(id: Optional[pulumi.Input[str]] = None,
                       name: Optional[pulumi.Input[str]] = None,
                       partial_match: Optional[pulumi.Input[bool]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetApigatewayResult]
    func LookupApigateway(ctx *Context, args *LookupApigatewayArgs, opts ...InvokeOption) (*LookupApigatewayResult, error)
    func LookupApigatewayOutput(ctx *Context, args *LookupApigatewayOutputArgs, opts ...InvokeOption) LookupApigatewayResultOutput

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

    public static class GetApigateway 
    {
        public static Task<GetApigatewayResult> InvokeAsync(GetApigatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetApigatewayResult> Invoke(GetApigatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApigatewayResult> getApigateway(GetApigatewayArgs args, InvokeOptions options)
    public static Output<GetApigatewayResult> getApigateway(GetApigatewayArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ionoscloud:index/getApigateway:getApigateway
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    ID of an existing API Gateway that you want to search for.
    Name string
    Name of an existing API Gateway that you want to search for.
    PartialMatch bool
    Whether partial matching is allowed or not when using the name filter. Defaults to false.
    Id string
    ID of an existing API Gateway that you want to search for.
    Name string
    Name of an existing API Gateway that you want to search for.
    PartialMatch bool
    Whether partial matching is allowed or not when using the name filter. Defaults to false.
    id String
    ID of an existing API Gateway that you want to search for.
    name String
    Name of an existing API Gateway that you want to search for.
    partialMatch Boolean
    Whether partial matching is allowed or not when using the name filter. Defaults to false.
    id string
    ID of an existing API Gateway that you want to search for.
    name string
    Name of an existing API Gateway that you want to search for.
    partialMatch boolean
    Whether partial matching is allowed or not when using the name filter. Defaults to false.
    id str
    ID of an existing API Gateway that you want to search for.
    name str
    Name of an existing API Gateway that you want to search for.
    partial_match bool
    Whether partial matching is allowed or not when using the name filter. Defaults to false.
    id String
    ID of an existing API Gateway that you want to search for.
    name String
    Name of an existing API Gateway that you want to search for.
    partialMatch Boolean
    Whether partial matching is allowed or not when using the name filter. Defaults to false.

    getApigateway Result

    The following output properties are available:

    CustomDomains List<GetApigatewayCustomDomain>
    Id string
    ID of the API Gateway.
    Logs bool
    Shows whether the collection and reporting of logs for observability of this instance is enabled or disabled.
    Metrics bool
    Shows whether the collection and reporting of metrics for observability of this instance is enabled or disabled.
    Name string
    The domain name of the distribution.
    PublicEndpoint string
    The public endpoint of the API Gateway.
    PartialMatch bool
    CustomDomains []GetApigatewayCustomDomain
    Id string
    ID of the API Gateway.
    Logs bool
    Shows whether the collection and reporting of logs for observability of this instance is enabled or disabled.
    Metrics bool
    Shows whether the collection and reporting of metrics for observability of this instance is enabled or disabled.
    Name string
    The domain name of the distribution.
    PublicEndpoint string
    The public endpoint of the API Gateway.
    PartialMatch bool
    customDomains List<GetApigatewayCustomDomain>
    id String
    ID of the API Gateway.
    logs Boolean
    Shows whether the collection and reporting of logs for observability of this instance is enabled or disabled.
    metrics Boolean
    Shows whether the collection and reporting of metrics for observability of this instance is enabled or disabled.
    name String
    The domain name of the distribution.
    publicEndpoint String
    The public endpoint of the API Gateway.
    partialMatch Boolean
    customDomains GetApigatewayCustomDomain[]
    id string
    ID of the API Gateway.
    logs boolean
    Shows whether the collection and reporting of logs for observability of this instance is enabled or disabled.
    metrics boolean
    Shows whether the collection and reporting of metrics for observability of this instance is enabled or disabled.
    name string
    The domain name of the distribution.
    publicEndpoint string
    The public endpoint of the API Gateway.
    partialMatch boolean
    custom_domains Sequence[GetApigatewayCustomDomain]
    id str
    ID of the API Gateway.
    logs bool
    Shows whether the collection and reporting of logs for observability of this instance is enabled or disabled.
    metrics bool
    Shows whether the collection and reporting of metrics for observability of this instance is enabled or disabled.
    name str
    The domain name of the distribution.
    public_endpoint str
    The public endpoint of the API Gateway.
    partial_match bool
    customDomains List<Property Map>
    id String
    ID of the API Gateway.
    logs Boolean
    Shows whether the collection and reporting of logs for observability of this instance is enabled or disabled.
    metrics Boolean
    Shows whether the collection and reporting of metrics for observability of this instance is enabled or disabled.
    name String
    The domain name of the distribution.
    publicEndpoint String
    The public endpoint of the API Gateway.
    partialMatch Boolean

    Supporting Types

    GetApigatewayCustomDomain

    CertificateId string
    The ID of the certificate to use for the distribution.
    Name string
    Name of an existing API Gateway that you want to search for.
    CertificateId string
    The ID of the certificate to use for the distribution.
    Name string
    Name of an existing API Gateway that you want to search for.
    certificateId String
    The ID of the certificate to use for the distribution.
    name String
    Name of an existing API Gateway that you want to search for.
    certificateId string
    The ID of the certificate to use for the distribution.
    name string
    Name of an existing API Gateway that you want to search for.
    certificate_id str
    The ID of the certificate to use for the distribution.
    name str
    Name of an existing API Gateway that you want to search for.
    certificateId String
    The ID of the certificate to use for the distribution.
    name String
    Name of an existing API Gateway that you want to search for.

    Package Details

    Repository
    ionoscloud ionos-cloud/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud