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
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: ApiGatewayArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiGateway(resource_name: str,
opts: Optional[ResourceOptions] = None,
spec: Optional[str] = None,
description: Optional[str] = None,
folder_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = 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.
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 Yandex.ApiGateway("apiGatewayResource", new()
{
Spec = "string",
Description = "string",
FolderId = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
});
example, err := yandex.NewApiGateway(ctx, "apiGatewayResource", &yandex.ApiGatewayArgs{
Spec: pulumi.String("string"),
Description: pulumi.String("string"),
FolderId: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var apiGatewayResource = new ApiGateway("apiGatewayResource", ApiGatewayArgs.builder()
.spec("string")
.description("string")
.folderId("string")
.labels(Map.of("string", "string"))
.name("string")
.build());
api_gateway_resource = yandex.ApiGateway("apiGatewayResource",
spec="string",
description="string",
folder_id="string",
labels={
"string": "string",
},
name="string")
const apiGatewayResource = new yandex.ApiGateway("apiGatewayResource", {
spec: "string",
description: "string",
folderId: "string",
labels: {
string: "string",
},
name: "string",
});
type: yandex:ApiGateway
properties:
description: string
folderId: string
labels:
string: string
name: string
spec: 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
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.
- Folder
Id 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.
- Folder
Id 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.
- folder
Id 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.
- folder
Id 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.
- folder
Id 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:
- Created
At 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.
- Log
Group stringId - Status string
- Status of the Yandex API Gateway.
- User
Domains List<string> - Set of user domains attached to Yandex API Gateway.
- Created
At 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.
- Log
Group stringId - Status string
- Status of the Yandex API Gateway.
- User
Domains []string - Set of user domains attached to Yandex API Gateway.
- created
At 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.
- log
Group StringId - status String
- Status of the Yandex API Gateway.
- user
Domains List<String> - Set of user domains attached to Yandex API Gateway.
- created
At 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.
- log
Group stringId - status string
- Status of the Yandex API Gateway.
- user
Domains 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_ strid - status str
- Status of the Yandex API Gateway.
- user_
domains Sequence[str] - Set of user domains attached to Yandex API Gateway.
- created
At 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.
- log
Group StringId - status String
- Status of the Yandex API Gateway.
- user
Domains 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.
- Created
At 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.
- Folder
Id 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.
- Log
Group stringId - 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.
- User
Domains List<string> - Set of user domains attached to Yandex API Gateway.
- Created
At 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.
- Folder
Id 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.
- Log
Group stringId - 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.
- User
Domains []string - Set of user domains attached to Yandex API Gateway.
- created
At 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.
- folder
Id 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.
- log
Group StringId - 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.
- user
Domains List<String> - Set of user domains attached to Yandex API Gateway.
- created
At 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.
- folder
Id 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.
- log
Group stringId - 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.
- user
Domains 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_ strid - 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.
- created
At 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.
- folder
Id 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.
- log
Group StringId - 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.
- user
Domains 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.