yandex logo
Yandex v0.13.0, Feb 22 22

yandex.ApiGateway

Explore with Pulumi AI

Allows management of Yandex Cloud API Gateway.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var test_api_gateway = new Yandex.ApiGateway("test-api-gateway", new Yandex.ApiGatewayArgs
        {
            Description = "any description",
            Labels = 
            {
                { "label", "label" },
                { "empty-label", "" },
            },
            Spec = @"openapi: ""3.0.0""
info:
  version: 1.0.0
  title: Test API
paths:
  /hello:
    get:
      summary: Say hello
      operationId: hello
      parameters:
        - name: user
          in: query
          description: User name to appear in greetings
          required: false
          schema:
            type: string
            default: 'world'
      responses:
        '200':
          description: Greeting
          content:
            'text/plain':
              schema:
                type: ""string""
      x-yc-apigateway-integration:
        type: dummy
        http_code: 200
        http_headers:
          'Content-Type': ""text/plain""
        content:
          'text/plain': ""Hello again, {user}!\n""
",
        });
    }

}
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := yandex.NewApiGateway(ctx, "test-api-gateway", &yandex.ApiGatewayArgs{
			Description: pulumi.String("any description"),
			Labels: pulumi.StringMap{
				"label":       pulumi.String("label"),
				"empty-label": pulumi.String(""),
			},
			Spec: pulumi.String(fmt.Sprintf("%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v%v", "openapi: \"3.0.0\"\n", "info:\n", "  version: 1.0.0\n", "  title: Test API\n", "paths:\n", "  /hello:\n", "    get:\n", "      summary: Say hello\n", "      operationId: hello\n", "      parameters:\n", "        - name: user\n", "          in: query\n", "          description: User name to appear in greetings\n", "          required: false\n", "          schema:\n", "            type: string\n", "            default: 'world'\n", "      responses:\n", "        '200':\n", "          description: Greeting\n", "          content:\n", "            'text/plain':\n", "              schema:\n", "                type: \"string\"\n", "      x-yc-apigateway-integration:\n", "        type: dummy\n", "        http_code: 200\n", "        http_headers:\n", "          'Content-Type': \"text/plain\"\n", "        content:\n", "          'text/plain': \"Hello again, {user}!\\n\"\n")),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_yandex as yandex

test_api_gateway = yandex.ApiGateway("test-api-gateway",
    description="any description",
    labels={
        "label": "label",
        "empty-label": "",
    },
    spec="""openapi: "3.0.0"
info:
  version: 1.0.0
  title: Test API
paths:
  /hello:
    get:
      summary: Say hello
      operationId: hello
      parameters:
        - name: user
          in: query
          description: User name to appear in greetings
          required: false
          schema:
            type: string
            default: 'world'
      responses:
        '200':
          description: Greeting
          content:
            'text/plain':
              schema:
                type: "string"
      x-yc-apigateway-integration:
        type: dummy
        http_code: 200
        http_headers:
          'Content-Type': "text/plain"
        content:
          'text/plain': "Hello again, {user}!\n"
""")
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const test_api_gateway = new yandex.ApiGateway("test-api-gateway", {
    description: "any description",
    labels: {
        label: "label",
        "empty-label": "",
    },
    spec: `openapi: "3.0.0"
info:
  version: 1.0.0
  title: Test API
paths:
  /hello:
    get:
      summary: Say hello
      operationId: hello
      parameters:
        - name: user
          in: query
          description: User name to appear in greetings
          required: false
          schema:
            type: string
            default: 'world'
      responses:
        '200':
          description: Greeting
          content:
            'text/plain':
              schema:
                type: "string"
      x-yc-apigateway-integration:
        type: dummy
        http_code: 200
        http_headers:
          'Content-Type': "text/plain"
        content:
          'text/plain': "Hello again, {user}!\n"
`,
});

Coming soon!

Create ApiGateway Resource

new ApiGateway(name: string, args: ApiGatewayArgs, opts?: CustomResourceOptions);
@overload
def ApiGateway(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               folder_id: Optional[str] = None,
               labels: Optional[Mapping[str, str]] = None,
               name: Optional[str] = None,
               spec: Optional[str] = None)
@overload
def ApiGateway(resource_name: str,
               args: ApiGatewayArgs,
               opts: Optional[ResourceOptions] = None)
func NewApiGateway(ctx *Context, name string, args ApiGatewayArgs, opts ...ResourceOption) (*ApiGateway, error)
public ApiGateway(string name, ApiGatewayArgs args, CustomResourceOptions? opts = null)
public ApiGateway(String name, ApiGatewayArgs args)
public ApiGateway(String name, ApiGatewayArgs args, CustomResourceOptions options)
type: yandex:ApiGateway
properties: # The arguments to resource properties.
options: # 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.
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.

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

The ApiGateway resource accepts the following input properties:

Spec string

OpenAPI specification for Yandex API Gateway.

Description string

Description of the Yandex Cloud API Gateway.

FolderId string

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

Labels Dictionary<string, string>

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

Name string

Yandex Cloud API Gateway name used to define API Gateway.

Spec string

OpenAPI specification for Yandex API Gateway.

Description string

Description of the Yandex Cloud API Gateway.

FolderId string

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

Labels map[string]string

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

Name string

Yandex Cloud API Gateway name used to define API Gateway.

spec String

OpenAPI specification for Yandex API Gateway.

description String

Description of the Yandex Cloud API Gateway.

folderId String

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

labels Map<String,String>

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

name String

Yandex Cloud API Gateway name used to define API Gateway.

spec string

OpenAPI specification for Yandex API Gateway.

description string

Description of the Yandex Cloud API Gateway.

folderId string

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

labels {[key: string]: string}

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

name string

Yandex Cloud API Gateway name used to define API Gateway.

spec str

OpenAPI specification for Yandex API Gateway.

description str

Description of the Yandex Cloud API Gateway.

folder_id str

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

labels Mapping[str, str]

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

name str

Yandex Cloud API Gateway name used to define API Gateway.

spec String

OpenAPI specification for Yandex API Gateway.

description String

Description of the Yandex Cloud API Gateway.

folderId String

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

labels Map<String>

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

name String

Yandex Cloud API Gateway name used to define API Gateway.

Outputs

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

CreatedAt string

Creation timestamp of the Yandex Cloud API Gateway.

Domain string

Default domain for the Yandex API Gateway. Generated at creation time.

Id string

The provider-assigned unique ID for this managed resource.

LogGroupId string
Status string

Status of the Yandex API Gateway.

UserDomains List<string>

Set of user domains attached to Yandex API Gateway.

CreatedAt string

Creation timestamp of the Yandex Cloud API Gateway.

Domain string

Default domain for the Yandex API Gateway. Generated at creation time.

Id string

The provider-assigned unique ID for this managed resource.

LogGroupId string
Status string

Status of the Yandex API Gateway.

UserDomains []string

Set of user domains attached to Yandex API Gateway.

createdAt String

Creation timestamp of the Yandex Cloud API Gateway.

domain String

Default domain for the Yandex API Gateway. Generated at creation time.

id String

The provider-assigned unique ID for this managed resource.

logGroupId String
status String

Status of the Yandex API Gateway.

userDomains List<String>

Set of user domains attached to Yandex API Gateway.

createdAt string

Creation timestamp of the Yandex Cloud API Gateway.

domain string

Default domain for the Yandex API Gateway. Generated at creation time.

id string

The provider-assigned unique ID for this managed resource.

logGroupId string
status string

Status of the Yandex API Gateway.

userDomains string[]

Set of user domains attached to Yandex API Gateway.

created_at str

Creation timestamp of the Yandex Cloud API Gateway.

domain str

Default domain for the Yandex API Gateway. Generated at creation time.

id str

The provider-assigned unique ID for this managed resource.

log_group_id str
status str

Status of the Yandex API Gateway.

user_domains Sequence[str]

Set of user domains attached to Yandex API Gateway.

createdAt String

Creation timestamp of the Yandex Cloud API Gateway.

domain String

Default domain for the Yandex API Gateway. Generated at creation time.

id String

The provider-assigned unique ID for this managed resource.

logGroupId String
status String

Status of the Yandex API Gateway.

userDomains List<String>

Set of user domains attached to Yandex 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,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        domain: Optional[str] = None,
        folder_id: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        log_group_id: Optional[str] = None,
        name: Optional[str] = None,
        spec: Optional[str] = None,
        status: Optional[str] = None,
        user_domains: Optional[Sequence[str]] = 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)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
CreatedAt string

Creation timestamp of the Yandex Cloud API Gateway.

Description string

Description of the Yandex Cloud API Gateway.

Domain string

Default domain for the Yandex API Gateway. Generated at creation time.

FolderId string

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

Labels Dictionary<string, string>

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

LogGroupId string
Name string

Yandex Cloud API Gateway name used to define API Gateway.

Spec string

OpenAPI specification for Yandex API Gateway.

Status string

Status of the Yandex API Gateway.

UserDomains List<string>

Set of user domains attached to Yandex API Gateway.

CreatedAt string

Creation timestamp of the Yandex Cloud API Gateway.

Description string

Description of the Yandex Cloud API Gateway.

Domain string

Default domain for the Yandex API Gateway. Generated at creation time.

FolderId string

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

Labels map[string]string

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

LogGroupId string
Name string

Yandex Cloud API Gateway name used to define API Gateway.

Spec string

OpenAPI specification for Yandex API Gateway.

Status string

Status of the Yandex API Gateway.

UserDomains []string

Set of user domains attached to Yandex API Gateway.

createdAt String

Creation timestamp of the Yandex Cloud API Gateway.

description String

Description of the Yandex Cloud API Gateway.

domain String

Default domain for the Yandex API Gateway. Generated at creation time.

folderId String

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

labels Map<String,String>

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

logGroupId String
name String

Yandex Cloud API Gateway name used to define API Gateway.

spec String

OpenAPI specification for Yandex API Gateway.

status String

Status of the Yandex API Gateway.

userDomains List<String>

Set of user domains attached to Yandex API Gateway.

createdAt string

Creation timestamp of the Yandex Cloud API Gateway.

description string

Description of the Yandex Cloud API Gateway.

domain string

Default domain for the Yandex API Gateway. Generated at creation time.

folderId string

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

labels {[key: string]: string}

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

logGroupId string
name string

Yandex Cloud API Gateway name used to define API Gateway.

spec string

OpenAPI specification for Yandex API Gateway.

status string

Status of the Yandex API Gateway.

userDomains string[]

Set of user domains attached to Yandex API Gateway.

created_at str

Creation timestamp of the Yandex Cloud API Gateway.

description str

Description of the Yandex Cloud API Gateway.

domain str

Default domain for the Yandex API Gateway. Generated at creation time.

folder_id str

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

labels Mapping[str, str]

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

log_group_id str
name str

Yandex Cloud API Gateway name used to define API Gateway.

spec str

OpenAPI specification for Yandex API Gateway.

status str

Status of the Yandex API Gateway.

user_domains Sequence[str]

Set of user domains attached to Yandex API Gateway.

createdAt String

Creation timestamp of the Yandex Cloud API Gateway.

description String

Description of the Yandex Cloud API Gateway.

domain String

Default domain for the Yandex API Gateway. Generated at creation time.

folderId String

Folder ID for the Yandex Cloud API Gateway. If it is not provided, the default provider folder is used.

labels Map<String>

A set of key/value label pairs to assign to the Yandex Cloud API Gateway.

logGroupId String
name String

Yandex Cloud API Gateway name used to define API Gateway.

spec String

OpenAPI specification for Yandex API Gateway.

status String

Status of the Yandex API Gateway.

userDomains List<String>

Set of user domains attached to Yandex API Gateway.

Package Details

Repository
Yandex pulumi/pulumi-yandex
License
Apache-2.0
Notes

This Pulumi package is based on the yandex Terraform Provider.