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

ionoscloud.Apigateway

Explore with Pulumi AI

An API gateway consists of the generic rules and configurations.

Usage example

import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";

const example = new ionoscloud.Apigateway("example", {metrics: true});
Copy
import pulumi
import pulumi_ionoscloud as ionoscloud

example = ionoscloud.Apigateway("example", metrics=True)
Copy
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.NewApigateway(ctx, "example", &ionoscloud.ApigatewayArgs{
			Metrics: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;

return await Deployment.RunAsync(() => 
{
    var example = new Ionoscloud.Apigateway("example", new()
    {
        Metrics = true,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.Apigateway;
import com.pulumi.ionoscloud.ApigatewayArgs;
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 example = new Apigateway("example", ApigatewayArgs.builder()
            .metrics(true)
            .build());

    }
}
Copy
resources:
  example:
    type: ionoscloud:Apigateway
    properties:
      metrics: true
Copy

Create Apigateway Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Apigateway(name: string, args?: ApigatewayArgs, opts?: CustomResourceOptions);
@overload
def Apigateway(resource_name: str,
               args: Optional[ApigatewayArgs] = None,
               opts: Optional[ResourceOptions] = None)

@overload
def Apigateway(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               custom_domains: Optional[Sequence[ApigatewayCustomDomainArgs]] = None,
               logs: Optional[bool] = None,
               metrics: Optional[bool] = None,
               name: Optional[str] = None,
               timeouts: Optional[ApigatewayTimeoutsArgs] = None)
func NewApigateway(ctx *Context, name string, args *ApigatewayArgs, opts ...ResourceOption) (*Apigateway, error)
public Apigateway(string name, ApigatewayArgs? args = null, CustomResourceOptions? opts = null)
public Apigateway(String name, ApigatewayArgs args)
public Apigateway(String name, ApigatewayArgs args, CustomResourceOptions options)
type: ionoscloud:Apigateway
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args ApigatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args ApigatewayArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args ApigatewayArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args ApigatewayArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ApigatewayArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var apigatewayResource = new Ionoscloud.Apigateway("apigatewayResource", new()
{
    CustomDomains = new[]
    {
        new Ionoscloud.Inputs.ApigatewayCustomDomainArgs
        {
            Name = "string",
            CertificateId = "string",
        },
    },
    Logs = false,
    Metrics = false,
    Name = "string",
    Timeouts = new Ionoscloud.Inputs.ApigatewayTimeoutsArgs
    {
        Create = "string",
        Default = "string",
        Delete = "string",
        Update = "string",
    },
});
Copy
example, err := ionoscloud.NewApigateway(ctx, "apigatewayResource", &ionoscloud.ApigatewayArgs{
CustomDomains: .ApigatewayCustomDomainArray{
&.ApigatewayCustomDomainArgs{
Name: pulumi.String("string"),
CertificateId: pulumi.String("string"),
},
},
Logs: pulumi.Bool(false),
Metrics: pulumi.Bool(false),
Name: pulumi.String("string"),
Timeouts: &.ApigatewayTimeoutsArgs{
Create: pulumi.String("string"),
Default: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
Copy
var apigatewayResource = new Apigateway("apigatewayResource", ApigatewayArgs.builder()
    .customDomains(ApigatewayCustomDomainArgs.builder()
        .name("string")
        .certificateId("string")
        .build())
    .logs(false)
    .metrics(false)
    .name("string")
    .timeouts(ApigatewayTimeoutsArgs.builder()
        .create("string")
        .default_("string")
        .delete("string")
        .update("string")
        .build())
    .build());
Copy
apigateway_resource = ionoscloud.Apigateway("apigatewayResource",
    custom_domains=[{
        "name": "string",
        "certificate_id": "string",
    }],
    logs=False,
    metrics=False,
    name="string",
    timeouts={
        "create": "string",
        "default": "string",
        "delete": "string",
        "update": "string",
    })
Copy
const apigatewayResource = new ionoscloud.Apigateway("apigatewayResource", {
    customDomains: [{
        name: "string",
        certificateId: "string",
    }],
    logs: false,
    metrics: false,
    name: "string",
    timeouts: {
        create: "string",
        "default": "string",
        "delete": "string",
        update: "string",
    },
});
Copy
type: ionoscloud:Apigateway
properties:
    customDomains:
        - certificateId: string
          name: string
    logs: false
    metrics: false
    name: string
    timeouts:
        create: string
        default: string
        delete: string
        update: string
Copy

Apigateway Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Apigateway resource accepts the following input properties:

CustomDomains List<ApigatewayCustomDomain>
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
Logs bool
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
Metrics bool
[bool] Enable or disable metrics. Defaults to false.
Name string
[string] The name of the API Gateway.
Timeouts ApigatewayTimeouts
CustomDomains []ApigatewayCustomDomainArgs
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
Logs bool
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
Metrics bool
[bool] Enable or disable metrics. Defaults to false.
Name string
[string] The name of the API Gateway.
Timeouts ApigatewayTimeoutsArgs
customDomains List<ApigatewayCustomDomain>
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
logs Boolean
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
metrics Boolean
[bool] Enable or disable metrics. Defaults to false.
name String
[string] The name of the API Gateway.
timeouts ApigatewayTimeouts
customDomains ApigatewayCustomDomain[]
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
logs boolean
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
metrics boolean
[bool] Enable or disable metrics. Defaults to false.
name string
[string] The name of the API Gateway.
timeouts ApigatewayTimeouts
custom_domains Sequence[ApigatewayCustomDomainArgs]
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
logs bool
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
metrics bool
[bool] Enable or disable metrics. Defaults to false.
name str
[string] The name of the API Gateway.
timeouts ApigatewayTimeoutsArgs
customDomains List<Property Map>
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
logs Boolean
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
metrics Boolean
[bool] Enable or disable metrics. Defaults to false.
name String
[string] The name of the API Gateway.
timeouts Property Map

Outputs

All input properties are implicitly available as output properties. Additionally, the Apigateway resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
PublicEndpoint string
[string] The public endpoint of the API Gateway.
Id string
The provider-assigned unique ID for this managed resource.
PublicEndpoint string
[string] The public endpoint of the API Gateway.
id String
The provider-assigned unique ID for this managed resource.
publicEndpoint String
[string] The public endpoint of the API Gateway.
id string
The provider-assigned unique ID for this managed resource.
publicEndpoint string
[string] The public endpoint of the API Gateway.
id str
The provider-assigned unique ID for this managed resource.
public_endpoint str
[string] The public endpoint of the API Gateway.
id String
The provider-assigned unique ID for this managed resource.
publicEndpoint String
[string] The public endpoint of the API Gateway.

Look up Existing Apigateway Resource

Get an existing Apigateway resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ApigatewayState, opts?: CustomResourceOptions): Apigateway
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        custom_domains: Optional[Sequence[ApigatewayCustomDomainArgs]] = None,
        logs: Optional[bool] = None,
        metrics: Optional[bool] = None,
        name: Optional[str] = None,
        public_endpoint: Optional[str] = None,
        timeouts: Optional[ApigatewayTimeoutsArgs] = None) -> Apigateway
func GetApigateway(ctx *Context, name string, id IDInput, state *ApigatewayState, opts ...ResourceOption) (*Apigateway, error)
public static Apigateway Get(string name, Input<string> id, ApigatewayState? state, CustomResourceOptions? opts = null)
public static Apigateway get(String name, Output<String> id, ApigatewayState state, CustomResourceOptions options)
resources:  _:    type: ionoscloud:Apigateway    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CustomDomains List<ApigatewayCustomDomain>
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
Logs bool
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
Metrics bool
[bool] Enable or disable metrics. Defaults to false.
Name string
[string] The name of the API Gateway.
PublicEndpoint string
[string] The public endpoint of the API Gateway.
Timeouts ApigatewayTimeouts
CustomDomains []ApigatewayCustomDomainArgs
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
Logs bool
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
Metrics bool
[bool] Enable or disable metrics. Defaults to false.
Name string
[string] The name of the API Gateway.
PublicEndpoint string
[string] The public endpoint of the API Gateway.
Timeouts ApigatewayTimeoutsArgs
customDomains List<ApigatewayCustomDomain>
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
logs Boolean
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
metrics Boolean
[bool] Enable or disable metrics. Defaults to false.
name String
[string] The name of the API Gateway.
publicEndpoint String
[string] The public endpoint of the API Gateway.
timeouts ApigatewayTimeouts
customDomains ApigatewayCustomDomain[]
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
logs boolean
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
metrics boolean
[bool] Enable or disable metrics. Defaults to false.
name string
[string] The name of the API Gateway.
publicEndpoint string
[string] The public endpoint of the API Gateway.
timeouts ApigatewayTimeouts
custom_domains Sequence[ApigatewayCustomDomainArgs]
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
logs bool
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
metrics bool
[bool] Enable or disable metrics. Defaults to false.
name str
[string] The name of the API Gateway.
public_endpoint str
[string] The public endpoint of the API Gateway.
timeouts ApigatewayTimeoutsArgs
customDomains List<Property Map>
[list] Custom domains for the API Gateway, a list that contains elements with the following structure:
logs Boolean
[bool] Enable or disable logging. Defaults to false. NOTE: Central Logging must be enabled through the Logging API to enable this feature.
metrics Boolean
[bool] Enable or disable metrics. Defaults to false.
name String
[string] The name of the API Gateway.
publicEndpoint String
[string] The public endpoint of the API Gateway.
timeouts Property Map

Supporting Types

ApigatewayCustomDomain
, ApigatewayCustomDomainArgs

Name This property is required. string
[string] The domain name. Externally reachable.
CertificateId string
[string] The certificate ID for the domain. Must be a valid certificate in UUID form.
Name This property is required. string
[string] The domain name. Externally reachable.
CertificateId string
[string] The certificate ID for the domain. Must be a valid certificate in UUID form.
name This property is required. String
[string] The domain name. Externally reachable.
certificateId String
[string] The certificate ID for the domain. Must be a valid certificate in UUID form.
name This property is required. string
[string] The domain name. Externally reachable.
certificateId string
[string] The certificate ID for the domain. Must be a valid certificate in UUID form.
name This property is required. str
[string] The domain name. Externally reachable.
certificate_id str
[string] The certificate ID for the domain. Must be a valid certificate in UUID form.
name This property is required. String
[string] The domain name. Externally reachable.
certificateId String
[string] The certificate ID for the domain. Must be a valid certificate in UUID form.

ApigatewayTimeouts
, ApigatewayTimeoutsArgs

Create string
Default string
Delete string
Update string
Create string
Default string
Delete string
Update string
create String
default_ String
delete String
update String
create string
default string
delete string
update string
create String
default String
delete String
update String

Import

In order to import an API Gateway, you can define an empty API Gateway resource in the plan:

resource “ionoscloud_apigateway” “example” {

}

The resource can be imported using the gateway_id, for example:

$ pulumi import ionoscloud:index/apigateway:Apigateway example gateway_id
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
ionoscloud ionos-cloud/terraform-provider-ionoscloud
License
Notes
This Pulumi package is based on the ionoscloud Terraform Provider.