Class ProjectsResource.LocationsResource.CapacityCommitmentsResource
The "capacityCommitments" collection of methods.
Inheritance
Inherited Members
Namespace: Google.Apis.BigQueryReservation.v1beta1
Assembly: Google.Apis.BigQueryReservation.v1beta1.dll
Syntax
public class CapacityCommitmentsResource
Constructors
CapacityCommitmentsResource(IClientService)
Constructs a new resource.
Declaration
public CapacityCommitmentsResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
Google.Apis.Services.IClientService | service |
Methods
Create(CapacityCommitment, String)
Creates a new capacity commitment resource.
Declaration
public virtual ProjectsResource.LocationsResource.CapacityCommitmentsResource.CreateRequest Create(CapacityCommitment body, string parent)
Parameters
Type | Name | Description |
---|---|---|
CapacityCommitment | body | The body of the request. |
System.String | parent | Required. Resource name of the parent reservation. E.g., |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.CapacityCommitmentsResource.CreateRequest |
Delete(String)
Deletes a capacity commitment. Attempting to delete capacity commitment before its
commitment_end_time will fail with the error code google.rpc.Code.FAILED_PRECONDITION
.
Declaration
public virtual ProjectsResource.LocationsResource.CapacityCommitmentsResource.DeleteRequest Delete(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the capacity commitment to delete. E.g.,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.CapacityCommitmentsResource.DeleteRequest |
Get(String)
Returns information about the capacity commitment.
Declaration
public virtual ProjectsResource.LocationsResource.CapacityCommitmentsResource.GetRequest Get(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Required. Resource name of the capacity commitment to retrieve. E.g.,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.CapacityCommitmentsResource.GetRequest |
List(String)
Lists all the capacity commitments for the admin project.
Declaration
public virtual ProjectsResource.LocationsResource.CapacityCommitmentsResource.ListRequest List(string parent)
Parameters
Type | Name | Description |
---|---|---|
System.String | parent | Required. Resource name of the parent reservation. E.g., |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.CapacityCommitmentsResource.ListRequest |
Merge(MergeCapacityCommitmentsRequest, String)
Merges capacity commitments of the same plan into a single commitment. The resulting capacity
commitment has the greater commitment_end_time out of the to-be-merged capacity commitments.
Attempting to merge capacity commitments of different plan will fail with the error code
google.rpc.Code.FAILED_PRECONDITION
.
Declaration
public virtual ProjectsResource.LocationsResource.CapacityCommitmentsResource.MergeRequest Merge(MergeCapacityCommitmentsRequest body, string parent)
Parameters
Type | Name | Description |
---|---|---|
MergeCapacityCommitmentsRequest | body | The body of the request. |
System.String | parent | Parent resource that identifies admin project and location e.g., |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.CapacityCommitmentsResource.MergeRequest |
Patch(CapacityCommitment, String)
Updates an existing capacity commitment. Only plan
and renewal_plan
fields can be updated. Plan
can only be changed to a plan of a longer commitment period. Attempting to change to a plan with
shorter commitment period will fail with the error code google.rpc.Code.FAILED_PRECONDITION
.
Declaration
public virtual ProjectsResource.LocationsResource.CapacityCommitmentsResource.PatchRequest Patch(CapacityCommitment body, string name)
Parameters
Type | Name | Description |
---|---|---|
CapacityCommitment | body | The body of the request. |
System.String | name | Output only. The resource name of the capacity commitment, e.g.,
|
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.CapacityCommitmentsResource.PatchRequest |
Split(SplitCapacityCommitmentRequest, String)
Splits capacity commitment to two commitments of the same plan and commitment_end_time
. A common
use case is to enable downgrading commitments. For example, in order to downgrade from 10000 slots
to 8000, you might split a 10000 capacity commitment into commitments of 2000 and 8000. Then, you
delete the first one after the commitment end time passes.
Declaration
public virtual ProjectsResource.LocationsResource.CapacityCommitmentsResource.SplitRequest Split(SplitCapacityCommitmentRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
SplitCapacityCommitmentRequest | body | The body of the request. |
System.String | name | Required. The resource name e.g.,: |
Returns
Type | Description |
---|---|
ProjectsResource.LocationsResource.CapacityCommitmentsResource.SplitRequest |