A Cloud Operations engineer is managing networking resources in a Google Cloud Virtual Private Cloud (VPC) network. To audit network traffic for an upcoming security compliance review, the engineer needs to enable VPC Flow Logs on an existing subnet named `sb-analytics` located in the `us-east1` region. The operational policy specifies that the aggregation interval must be set to 5 minutes () and the sampling rate must capture of traffic (). Which `gcloud` command must the engineer execute to correctly update the subnet configuration?
- gcloud compute networks subnets update sb-analytics --region=us-east1 --enable-flow-logs --logging-aggregation-interval=interval-5-min --logging-sample-rate=0.5Cevap
- Bgcloud compute networks subnets update sb-analytics --region=us-east1 --enable-flow-logs --logging-aggregation-interval=5m --logging-sample-rate=50
- Cgcloud compute networks update prod-vpc --subnet=sb-analytics --enable-flow-logs --logging-sampling=0.5
- Dgcloud compute subnets enable-logs sb-analytics --region=us-east1 --interval=5min --rate=0.5
Cevap
The correct command is `gcloud compute networks subnets update sb-analytics --region=us-east1 --enable-flow-logs --logging-aggregation-interval=interval-5-min --logging-sample-rate=0.5`.
The correct command uses the proper resource command group `gcloud compute networks subnets update`, specifies the required `--region=us-east1` flag, enables logging with `--enable-flow-logs`, sets the aggregation interval to the accepted enum `interval-5-min`, and expresses the 50% sample rate as a decimal float `0.5`.
Adım Adım Çözüm
Anahtar Kavram
VPC Subnet Operations & Flow Logs Configuration via gcloud CLI
Tahmini Süre:2m 0s