Get information about a Google Compute Engine Reservation Sub-Block. Reservation sub-blocks are automatically created by Google Cloud within reservation blocks and represent a finer-grained physical grouping of resources.
For more information see the official documentation and the API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const subBlock = gcp.compute.getReservationSubBlock({
name: "my-reservation-sub-block",
reservationBlock: "my-reservation-block",
reservation: "my-reservation",
zone: "us-central1-a",
});
export const subBlockStatus = subBlock.then(subBlock => subBlock.status);
export const subBlockHealth = subBlock.then(subBlock => subBlock.healthInfos);
import pulumi
import pulumi_gcp as gcp
sub_block = gcp.compute.get_reservation_sub_block(name="my-reservation-sub-block",
reservation_block="my-reservation-block",
reservation="my-reservation",
zone="us-central1-a")
pulumi.export("subBlockStatus", sub_block.status)
pulumi.export("subBlockHealth", sub_block.health_infos)
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
subBlock, err := compute.GetReservationSubBlock(ctx, &compute.GetReservationSubBlockArgs{
Name: "my-reservation-sub-block",
ReservationBlock: "my-reservation-block",
Reservation: "my-reservation",
Zone: pulumi.StringRef("us-central1-a"),
}, nil)
if err != nil {
return err
}
ctx.Export("subBlockStatus", subBlock.Status)
ctx.Export("subBlockHealth", subBlock.HealthInfos)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var subBlock = Gcp.Compute.GetReservationSubBlock.Invoke(new()
{
Name = "my-reservation-sub-block",
ReservationBlock = "my-reservation-block",
Reservation = "my-reservation",
Zone = "us-central1-a",
});
return new Dictionary<string, object?>
{
["subBlockStatus"] = subBlock.Apply(getReservationSubBlockResult => getReservationSubBlockResult.Status),
["subBlockHealth"] = subBlock.Apply(getReservationSubBlockResult => getReservationSubBlockResult.HealthInfos),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetReservationSubBlockArgs;
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 subBlock = ComputeFunctions.getReservationSubBlock(GetReservationSubBlockArgs.builder()
.name("my-reservation-sub-block")
.reservationBlock("my-reservation-block")
.reservation("my-reservation")
.zone("us-central1-a")
.build());
ctx.export("subBlockStatus", subBlock.status());
ctx.export("subBlockHealth", subBlock.healthInfos());
}
}
variables:
subBlock:
fn::invoke:
function: gcp:compute:getReservationSubBlock
arguments:
name: my-reservation-sub-block
reservationBlock: my-reservation-block
reservation: my-reservation
zone: us-central1-a
outputs:
subBlockStatus: ${subBlock.status}
subBlockHealth: ${subBlock.healthInfos}
Using getReservationSubBlock
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getReservationSubBlock(args: GetReservationSubBlockArgs, opts?: InvokeOptions): Promise<GetReservationSubBlockResult>
function getReservationSubBlockOutput(args: GetReservationSubBlockOutputArgs, opts?: InvokeOptions): Output<GetReservationSubBlockResult>def get_reservation_sub_block(name: Optional[str] = None,
project: Optional[str] = None,
reservation: Optional[str] = None,
reservation_block: Optional[str] = None,
zone: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetReservationSubBlockResult
def get_reservation_sub_block_output(name: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
reservation: Optional[pulumi.Input[str]] = None,
reservation_block: Optional[pulumi.Input[str]] = None,
zone: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetReservationSubBlockResult]func GetReservationSubBlock(ctx *Context, args *GetReservationSubBlockArgs, opts ...InvokeOption) (*GetReservationSubBlockResult, error)
func GetReservationSubBlockOutput(ctx *Context, args *GetReservationSubBlockOutputArgs, opts ...InvokeOption) GetReservationSubBlockResultOutput> Note: This function is named GetReservationSubBlock in the Go SDK.
public static class GetReservationSubBlock
{
public static Task<GetReservationSubBlockResult> InvokeAsync(GetReservationSubBlockArgs args, InvokeOptions? opts = null)
public static Output<GetReservationSubBlockResult> Invoke(GetReservationSubBlockInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetReservationSubBlockResult> getReservationSubBlock(GetReservationSubBlockArgs args, InvokeOptions options)
public static Output<GetReservationSubBlockResult> getReservationSubBlock(GetReservationSubBlockArgs args, InvokeOptions options)
fn::invoke:
function: gcp:compute/getReservationSubBlock:getReservationSubBlock
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the reservation sub-block.
- Reservation string
- The name of the parent reservation.
- Reservation
Block string - The name of the parent reservation block.
- Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- Zone string
- The zone where the reservation sub-block resides.
- Name string
- The name of the reservation sub-block.
- Reservation string
- The name of the parent reservation.
- Reservation
Block string - The name of the parent reservation block.
- Project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- Zone string
- The zone where the reservation sub-block resides.
- name String
- The name of the reservation sub-block.
- reservation String
- The name of the parent reservation.
- reservation
Block String - The name of the parent reservation block.
- project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
- zone String
- The zone where the reservation sub-block resides.
- name string
- The name of the reservation sub-block.
- reservation string
- The name of the parent reservation.
- reservation
Block string - The name of the parent reservation block.
- project string
- The project in which the resource belongs. If it is not provided, the provider project is used.
- zone string
- The zone where the reservation sub-block resides.
- name str
- The name of the reservation sub-block.
- reservation str
- The name of the parent reservation.
- reservation_
block str - The name of the parent reservation block.
- project str
- The project in which the resource belongs. If it is not provided, the provider project is used.
- zone str
- The zone where the reservation sub-block resides.
- name String
- The name of the reservation sub-block.
- reservation String
- The name of the parent reservation.
- reservation
Block String - The name of the parent reservation block.
- project String
- The project in which the resource belongs. If it is not provided, the provider project is used.
- zone String
- The zone where the reservation sub-block resides.
getReservationSubBlock Result
The following output properties are available:
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Health
Infos List<GetReservation Sub Block Health Info> - Health information for the reservation sub-block. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- In
Use intCount - The number of instances that are currently in use on this reservation sub-block.
- Kind string
- Type of the resource. Always
compute#reservationSubBlockfor reservation sub-blocks. - Name string
- Physical
Topologies List<GetReservation Sub Block Physical Topology> - The physical topology of the reservation sub-block. Structure is documented below.
- Project string
- Reservation string
- Reservation
Block string - Reservation
Sub List<GetBlock Maintenances Reservation Sub Block Reservation Sub Block Maintenance> - Maintenance information for this reservation sub-block. Structure is documented below.
- Resource
Id string - The unique identifier for the resource.
- Self
Link string - Server-defined fully-qualified URL for this resource.
- Self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- Status string
- Status of the reservation sub-block.
- Sub
Block intCount - The number of hosts that are allocated in this reservation sub-block.
- Zone string
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Health
Infos []GetReservation Sub Block Health Info - Health information for the reservation sub-block. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- In
Use intCount - The number of instances that are currently in use on this reservation sub-block.
- Kind string
- Type of the resource. Always
compute#reservationSubBlockfor reservation sub-blocks. - Name string
- Physical
Topologies []GetReservation Sub Block Physical Topology - The physical topology of the reservation sub-block. Structure is documented below.
- Project string
- Reservation string
- Reservation
Block string - Reservation
Sub []GetBlock Maintenances Reservation Sub Block Reservation Sub Block Maintenance - Maintenance information for this reservation sub-block. Structure is documented below.
- Resource
Id string - The unique identifier for the resource.
- Self
Link string - Server-defined fully-qualified URL for this resource.
- Self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- Status string
- Status of the reservation sub-block.
- Sub
Block intCount - The number of hosts that are allocated in this reservation sub-block.
- Zone string
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- health
Infos List<GetReservation Sub Block Health Info> - Health information for the reservation sub-block. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- in
Use IntegerCount - The number of instances that are currently in use on this reservation sub-block.
- kind String
- Type of the resource. Always
compute#reservationSubBlockfor reservation sub-blocks. - name String
- physical
Topologies List<GetReservation Sub Block Physical Topology> - The physical topology of the reservation sub-block. Structure is documented below.
- project String
- reservation String
- reservation
Block String - reservation
Sub List<GetBlock Maintenances Reservation Sub Block Reservation Sub Block Maintenance> - Maintenance information for this reservation sub-block. Structure is documented below.
- resource
Id String - The unique identifier for the resource.
- self
Link String - Server-defined fully-qualified URL for this resource.
- self
Link StringWith Id - Server-defined URL for this resource with the resource id.
- status String
- Status of the reservation sub-block.
- sub
Block IntegerCount - The number of hosts that are allocated in this reservation sub-block.
- zone String
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- health
Infos GetReservation Sub Block Health Info[] - Health information for the reservation sub-block. Structure is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- in
Use numberCount - The number of instances that are currently in use on this reservation sub-block.
- kind string
- Type of the resource. Always
compute#reservationSubBlockfor reservation sub-blocks. - name string
- physical
Topologies GetReservation Sub Block Physical Topology[] - The physical topology of the reservation sub-block. Structure is documented below.
- project string
- reservation string
- reservation
Block string - reservation
Sub GetBlock Maintenances Reservation Sub Block Reservation Sub Block Maintenance[] - Maintenance information for this reservation sub-block. Structure is documented below.
- resource
Id string - The unique identifier for the resource.
- self
Link string - Server-defined fully-qualified URL for this resource.
- self
Link stringWith Id - Server-defined URL for this resource with the resource id.
- status string
- Status of the reservation sub-block.
- sub
Block numberCount - The number of hosts that are allocated in this reservation sub-block.
- zone string
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- health_
infos Sequence[GetReservation Sub Block Health Info] - Health information for the reservation sub-block. Structure is documented below.
- id str
- The provider-assigned unique ID for this managed resource.
- in_
use_ intcount - The number of instances that are currently in use on this reservation sub-block.
- kind str
- Type of the resource. Always
compute#reservationSubBlockfor reservation sub-blocks. - name str
- physical_
topologies Sequence[GetReservation Sub Block Physical Topology] - The physical topology of the reservation sub-block. Structure is documented below.
- project str
- reservation str
- reservation_
block str - reservation_
sub_ Sequence[Getblock_ maintenances Reservation Sub Block Reservation Sub Block Maintenance] - Maintenance information for this reservation sub-block. Structure is documented below.
- resource_
id str - The unique identifier for the resource.
- self_
link str - Server-defined fully-qualified URL for this resource.
- self_
link_ strwith_ id - Server-defined URL for this resource with the resource id.
- status str
- Status of the reservation sub-block.
- sub_
block_ intcount - The number of hosts that are allocated in this reservation sub-block.
- zone str
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- health
Infos List<Property Map> - Health information for the reservation sub-block. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- in
Use NumberCount - The number of instances that are currently in use on this reservation sub-block.
- kind String
- Type of the resource. Always
compute#reservationSubBlockfor reservation sub-blocks. - name String
- physical
Topologies List<Property Map> - The physical topology of the reservation sub-block. Structure is documented below.
- project String
- reservation String
- reservation
Block String - reservation
Sub List<Property Map>Block Maintenances - Maintenance information for this reservation sub-block. Structure is documented below.
- resource
Id String - The unique identifier for the resource.
- self
Link String - Server-defined fully-qualified URL for this resource.
- self
Link StringWith Id - Server-defined URL for this resource with the resource id.
- status String
- Status of the reservation sub-block.
- sub
Block NumberCount - The number of hosts that are allocated in this reservation sub-block.
- zone String
Supporting Types
GetReservationSubBlockHealthInfo
- Degraded
Host intCount - The number of degraded hosts in the reservation sub-block.
- Degraded
Infra intCount - The number of degraded infrastructure (e.g. NVLink domain) in the reservation sub-block.
- Health
Status string - The health status of the reservation sub-block.
- Healthy
Host intCount - The number of healthy hosts in the reservation sub-block.
- Healthy
Infra intCount - The number of healthy infrastructure (e.g. NVLink domain) in the reservation sub-block.
- Degraded
Host intCount - The number of degraded hosts in the reservation sub-block.
- Degraded
Infra intCount - The number of degraded infrastructure (e.g. NVLink domain) in the reservation sub-block.
- Health
Status string - The health status of the reservation sub-block.
- Healthy
Host intCount - The number of healthy hosts in the reservation sub-block.
- Healthy
Infra intCount - The number of healthy infrastructure (e.g. NVLink domain) in the reservation sub-block.
- degraded
Host IntegerCount - The number of degraded hosts in the reservation sub-block.
- degraded
Infra IntegerCount - The number of degraded infrastructure (e.g. NVLink domain) in the reservation sub-block.
- health
Status String - The health status of the reservation sub-block.
- healthy
Host IntegerCount - The number of healthy hosts in the reservation sub-block.
- healthy
Infra IntegerCount - The number of healthy infrastructure (e.g. NVLink domain) in the reservation sub-block.
- degraded
Host numberCount - The number of degraded hosts in the reservation sub-block.
- degraded
Infra numberCount - The number of degraded infrastructure (e.g. NVLink domain) in the reservation sub-block.
- health
Status string - The health status of the reservation sub-block.
- healthy
Host numberCount - The number of healthy hosts in the reservation sub-block.
- healthy
Infra numberCount - The number of healthy infrastructure (e.g. NVLink domain) in the reservation sub-block.
- degraded_
host_ intcount - The number of degraded hosts in the reservation sub-block.
- degraded_
infra_ intcount - The number of degraded infrastructure (e.g. NVLink domain) in the reservation sub-block.
- health_
status str - The health status of the reservation sub-block.
- healthy_
host_ intcount - The number of healthy hosts in the reservation sub-block.
- healthy_
infra_ intcount - The number of healthy infrastructure (e.g. NVLink domain) in the reservation sub-block.
- degraded
Host NumberCount - The number of degraded hosts in the reservation sub-block.
- degraded
Infra NumberCount - The number of degraded infrastructure (e.g. NVLink domain) in the reservation sub-block.
- health
Status String - The health status of the reservation sub-block.
- healthy
Host NumberCount - The number of healthy hosts in the reservation sub-block.
- healthy
Infra NumberCount - The number of healthy infrastructure (e.g. NVLink domain) in the reservation sub-block.
GetReservationSubBlockPhysicalTopology
GetReservationSubBlockReservationSubBlockMaintenance
- Instance
Maintenance intOngoing Count - Number of instances that have ongoing maintenance.
- Instance
Maintenance intPending Count - Number of instances that have pending maintenance.
- Maintenance
Ongoing intCount - Number of hosts in the sub-block that have ongoing maintenance.
- Maintenance
Pending intCount - Number of hosts in the sub-block that have pending maintenance.
- Scheduling
Type string - The type of maintenance for the reservation.
- Subblock
Infra intMaintenance Ongoing Count - Number of sub-block infrastructure that has ongoing maintenance.
- Subblock
Infra intMaintenance Pending Count - Number of sub-block infrastructure that has pending maintenance.
- Instance
Maintenance intOngoing Count - Number of instances that have ongoing maintenance.
- Instance
Maintenance intPending Count - Number of instances that have pending maintenance.
- Maintenance
Ongoing intCount - Number of hosts in the sub-block that have ongoing maintenance.
- Maintenance
Pending intCount - Number of hosts in the sub-block that have pending maintenance.
- Scheduling
Type string - The type of maintenance for the reservation.
- Subblock
Infra intMaintenance Ongoing Count - Number of sub-block infrastructure that has ongoing maintenance.
- Subblock
Infra intMaintenance Pending Count - Number of sub-block infrastructure that has pending maintenance.
- instance
Maintenance IntegerOngoing Count - Number of instances that have ongoing maintenance.
- instance
Maintenance IntegerPending Count - Number of instances that have pending maintenance.
- maintenance
Ongoing IntegerCount - Number of hosts in the sub-block that have ongoing maintenance.
- maintenance
Pending IntegerCount - Number of hosts in the sub-block that have pending maintenance.
- scheduling
Type String - The type of maintenance for the reservation.
- subblock
Infra IntegerMaintenance Ongoing Count - Number of sub-block infrastructure that has ongoing maintenance.
- subblock
Infra IntegerMaintenance Pending Count - Number of sub-block infrastructure that has pending maintenance.
- instance
Maintenance numberOngoing Count - Number of instances that have ongoing maintenance.
- instance
Maintenance numberPending Count - Number of instances that have pending maintenance.
- maintenance
Ongoing numberCount - Number of hosts in the sub-block that have ongoing maintenance.
- maintenance
Pending numberCount - Number of hosts in the sub-block that have pending maintenance.
- scheduling
Type string - The type of maintenance for the reservation.
- subblock
Infra numberMaintenance Ongoing Count - Number of sub-block infrastructure that has ongoing maintenance.
- subblock
Infra numberMaintenance Pending Count - Number of sub-block infrastructure that has pending maintenance.
- instance_
maintenance_ intongoing_ count - Number of instances that have ongoing maintenance.
- instance_
maintenance_ intpending_ count - Number of instances that have pending maintenance.
- maintenance_
ongoing_ intcount - Number of hosts in the sub-block that have ongoing maintenance.
- maintenance_
pending_ intcount - Number of hosts in the sub-block that have pending maintenance.
- scheduling_
type str - The type of maintenance for the reservation.
- subblock_
infra_ intmaintenance_ ongoing_ count - Number of sub-block infrastructure that has ongoing maintenance.
- subblock_
infra_ intmaintenance_ pending_ count - Number of sub-block infrastructure that has pending maintenance.
- instance
Maintenance NumberOngoing Count - Number of instances that have ongoing maintenance.
- instance
Maintenance NumberPending Count - Number of instances that have pending maintenance.
- maintenance
Ongoing NumberCount - Number of hosts in the sub-block that have ongoing maintenance.
- maintenance
Pending NumberCount - Number of hosts in the sub-block that have pending maintenance.
- scheduling
Type String - The type of maintenance for the reservation.
- subblock
Infra NumberMaintenance Ongoing Count - Number of sub-block infrastructure that has ongoing maintenance.
- subblock
Infra NumberMaintenance Pending Count - Number of sub-block infrastructure that has pending maintenance.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
