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});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.Apigateway("example", metrics=True)
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
})
}
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,
});
});
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());
}
}
resources:
example:
type: ionoscloud:Apigateway
properties:
metrics: true
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 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 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 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 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 String
- The unique name of the resource.
- args 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",
},
});
example, err := ionoscloud.NewApigateway(ctx, "apigatewayResource", &ionoscloud.ApigatewayArgs{
CustomDomains: ionoscloud.ApigatewayCustomDomainArray{
&ionoscloud.ApigatewayCustomDomainArgs{
Name: pulumi.String("string"),
CertificateId: pulumi.String("string"),
},
},
Logs: pulumi.Bool(false),
Metrics: pulumi.Bool(false),
Name: pulumi.String("string"),
Timeouts: &ionoscloud.ApigatewayTimeoutsArgs{
Create: pulumi.String("string"),
Default: pulumi.String("string"),
Delete: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
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());
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",
})
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",
},
});
type: ionoscloud:Apigateway
properties:
customDomains:
- certificateId: string
name: string
logs: false
metrics: false
name: string
timeouts:
create: string
default: string
delete: string
update: string
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:
- Custom
Domains List<ApigatewayCustom Domain> - [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
Apigateway
Timeouts
- Custom
Domains []ApigatewayCustom Domain Args - [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
Apigateway
Timeouts Args
- custom
Domains List<ApigatewayCustom Domain> - [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
Apigateway
Timeouts
- custom
Domains ApigatewayCustom Domain[] - [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
Apigateway
Timeouts
- custom_
domains Sequence[ApigatewayCustom Domain Args] - [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
Apigateway
Timeouts Args
- custom
Domains 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.
- Public
Endpoint string - [string] The public endpoint of the API Gateway.
- Id string
- The provider-assigned unique ID for this managed resource.
- Public
Endpoint string - [string] The public endpoint of the API Gateway.
- id String
- The provider-assigned unique ID for this managed resource.
- public
Endpoint String - [string] The public endpoint of the API Gateway.
- id string
- The provider-assigned unique ID for this managed resource.
- public
Endpoint 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.
- public
Endpoint 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Custom
Domains List<ApigatewayCustom Domain> - [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.
- Public
Endpoint string - [string] The public endpoint of the API Gateway.
- Timeouts
Apigateway
Timeouts
- Custom
Domains []ApigatewayCustom Domain Args - [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.
- Public
Endpoint string - [string] The public endpoint of the API Gateway.
- Timeouts
Apigateway
Timeouts Args
- custom
Domains List<ApigatewayCustom Domain> - [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.
- public
Endpoint String - [string] The public endpoint of the API Gateway.
- timeouts
Apigateway
Timeouts
- custom
Domains ApigatewayCustom Domain[] - [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.
- public
Endpoint string - [string] The public endpoint of the API Gateway.
- timeouts
Apigateway
Timeouts
- custom_
domains Sequence[ApigatewayCustom Domain Args] - [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
Apigateway
Timeouts Args
- custom
Domains 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.
- public
Endpoint String - [string] The public endpoint of the API Gateway.
- timeouts Property Map
Supporting Types
ApigatewayCustomDomain, ApigatewayCustomDomainArgs
- Name string
- [string] The domain name. Externally reachable.
- Certificate
Id string - [string] The certificate ID for the domain. Must be a valid certificate in UUID form.
- Name string
- [string] The domain name. Externally reachable.
- Certificate
Id string - [string] The certificate ID for the domain. Must be a valid certificate in UUID form.
- name String
- [string] The domain name. Externally reachable.
- certificate
Id String - [string] The certificate ID for the domain. Must be a valid certificate in UUID form.
- name string
- [string] The domain name. Externally reachable.
- certificate
Id string - [string] The certificate ID for the domain. Must be a valid certificate in UUID form.
- name 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 String
- [string] The domain name. Externally reachable.
- certificate
Id String - [string] The certificate ID for the domain. Must be a valid certificate in UUID form.
ApigatewayTimeouts, ApigatewayTimeoutsArgs
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
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.