Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: [batch] update comments on ServiceAccount email and scopes fields #5223

Merged
merged 4 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,17 @@ message AllocationPolicy {
// Only instances[0] is supported now.
repeated InstancePolicyOrTemplate instances = 8;

// Service account that VMs will run as.
// Defines the service account for Batch-created VMs. If omitted, the [default
// Compute Engine service
// account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
// is used. Must match the service account specified in any used instance
// template configured in the Batch job.
//
// Includes the following fields:
// * email: The service account's email address. If not set, the default
// Compute Engine service account is used.
// * scopes: Additional OAuth scopes to grant the service account, beyond the
// default cloud-platform scope. (list of strings)
ServiceAccount service_account = 9;

// Labels applied to all VM instances and other resources
Expand Down Expand Up @@ -624,13 +634,9 @@ message TaskGroup {

// Carries information about a Google Cloud service account.
message ServiceAccount {
// Email address of the service account. If not specified, the default
// Compute Engine service account for the project will be used. If instance
// template is being used, the service account has to be specified in the
// instance template and it has to match the email field here.
// Email address of the service account.
string email = 1;

// List of scopes to be enabled for this service account on the VM, in
// addition to the cloud-platform API scope that will be added by default.
// List of scopes to be enabled for this service account.
repeated string scopes = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,17 @@ message AllocationPolicy {
// Deprecated: please use service_account instead.
string service_account_email = 5 [deprecated = true];

// Service account that VMs will run as.
// Defines the service account for Batch-created VMs. If omitted, the [default
// Compute Engine service
// account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
// is used. Must match the service account specified in any used instance
// template configured in the Batch job.
//
// Includes the following fields:
// * email: The service account's email address. If not set, the default
// Compute Engine service account is used.
// * scopes: Additional OAuth scopes to grant the service account, beyond the
// default cloud-platform scope. (list of strings)
ServiceAccount service_account = 9;

// Labels applied to all VM instances and other resources
Expand Down Expand Up @@ -711,17 +721,23 @@ message TaskGroup {
// information, see [About OS
// Login](https://cloud.google.com/compute/docs/oslogin).
bool run_as_non_root = 14 [(google.api.field_behavior) = OPTIONAL];

// Optional. ServiceAccount used by tasks within the task group for the access
// to other Cloud resources. This allows tasks to operate with permissions
// distinct from the service account for the VM set at `AllocationPolicy`. Use
// this field when tasks require different access rights than those of the VM.
//
// Specify the service account's `email` field. Ensure `scopes`
// include any necessary permissions for tasks, in addition to the default
// 'cloud-platform' scope.
ServiceAccount service_account = 15 [(google.api.field_behavior) = OPTIONAL];
}

// Carries information about a Google Cloud service account.
message ServiceAccount {
// Email address of the service account. If not specified, the default
// Compute Engine service account for the project will be used. If instance
// template is being used, the service account has to be specified in the
// instance template and it has to match the email field here.
// Email address of the service account.
string email = 1;

// List of scopes to be enabled for this service account on the VM, in
// addition to the cloud-platform API scope that will be added by default.
// List of scopes to be enabled for this service account.
repeated string scopes = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ message UsageResourceAllowanceStatus {

// Output only. Limit value of a UsageResourceAllowance within its one
// duration.
double limit = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
optional double limit = 2 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Accumulated consumption during `consumption_interval`.
double consumed = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
optional double consumed = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

message PeriodConsumption {
Expand All @@ -184,7 +184,7 @@ message UsageResourceAllowanceStatus {
[(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Accumulated consumption during `consumption_interval`.
double consumed = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
optional double consumed = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// ConsumptionReport is the report of ResourceAllowance consumptions in a time
Expand Down
21 changes: 18 additions & 3 deletions packages/google-cloud-batch/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading