LiteReservationArgs

data class LiteReservationArgs(val name: Output<String>? = null, val project: Output<String>? = null, val region: Output<String>? = null, val throughputCapacity: Output<Int>? = null) : ConvertibleToJava<LiteReservationArgs>

A named resource representing a shared pool of capacity. To get more information about Reservation, see:

Example Usage

Pubsub Lite Reservation Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const example = new gcp.pubsub.LiteReservation("example", {
name: "example-reservation",
project: project.then(project => project.number),
throughputCapacity: 2,
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
example = gcp.pubsub.LiteReservation("example",
name="example-reservation",
project=project.number,
throughput_capacity=2)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var example = new Gcp.PubSub.LiteReservation("example", new()
{
Name = "example-reservation",
Project = project.Apply(getProjectResult => getProjectResult.Number),
ThroughputCapacity = 2,
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/pubsub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
_, err = pubsub.NewLiteReservation(ctx, "example", &pubsub.LiteReservationArgs{
Name: pulumi.String("example-reservation"),
Project: pulumi.String(project.Number),
ThroughputCapacity: pulumi.Int(2),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.pubsub.LiteReservation;
import com.pulumi.gcp.pubsub.LiteReservationArgs;
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 project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
.build());
var example = new LiteReservation("example", LiteReservationArgs.builder()
.name("example-reservation")
.project(project.number())
.throughputCapacity(2)
.build());
}
}
resources:
example:
type: gcp:pubsub:LiteReservation
properties:
name: example-reservation
project: ${project.number}
throughputCapacity: 2
variables:
project:
fn::invoke:
function: gcp:organizations:getProject
arguments: {}

Import

Reservation can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{region}}/reservations/{{name}}

  • {{project}}/{{region}}/{{name}}

  • {{region}}/{{name}}

  • {{name}} When using the pulumi import command, Reservation can be imported using one of the formats above. For example:

$ pulumi import gcp:pubsub/liteReservation:LiteReservation default projects/{{project}}/locations/{{region}}/reservations/{{name}}
$ pulumi import gcp:pubsub/liteReservation:LiteReservation default {{project}}/{{region}}/{{name}}
$ pulumi import gcp:pubsub/liteReservation:LiteReservation default {{region}}/{{name}}
$ pulumi import gcp:pubsub/liteReservation:LiteReservation default {{name}}

Constructors

Link copied to clipboard
constructor(name: Output<String>? = null, project: Output<String>? = null, region: Output<String>? = null, throughputCapacity: Output<Int>? = null)

Properties

Link copied to clipboard
val name: Output<String>? = null

Name of the reservation.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard
val region: Output<String>? = null

The region of the pubsub lite reservation.

Link copied to clipboard
val throughputCapacity: Output<Int>? = null

The reserved throughput capacity. Every unit of throughput capacity is equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed messages.

Functions

Link copied to clipboard
open override fun toJava(): LiteReservationArgs