「Gcloud」:修訂間差異

出自Gea-Suan Lin's Wiki
跳至導覽 跳至搜尋
本頁面具有訪問限制。如果您看見此訊息,這代表您沒有訪問本頁面的權限。
行 18: 行 18:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
gcloud storage buckets list --format=json
gcloud storage buckets list --format=json
</syntaxhighlight>
=== DNS ===
<syntaxhighlight lang="bash">
gcloud dns record-sets transaction start --zone=example-net
gcloud dns record-sets transaction add 10.1.2.3 --name=foo.example.net --ttl=300 --type=A --zone=example-net
gcloud dns record-sets transaction execute --zone=example-net
</syntaxhighlight>
</syntaxhighlight>



於 2023年3月6日 (一) 20:31 的修訂

gcloudGCP的命令列工具。

範例

Compute Engine

gcloud compute instances create test-by-gslin --zone=asia-east1-a --machine-type=e2-micro --image-project=ubuntu-os-cloud --image-family=ubuntu-2204-lts --tags=allow-whitelist-ssh --network=vpc-default --subnet=subnet-asia-east-1 --private-network-ip=ip-10-143-0-200 --address=eip-test-by-gslin --metadata-from-file ssh-keys=${HOME}/.ssh/example.pub
gcloud compute ssh ubuntu@test-by-gslin --zone asia-east1-a --project myproject-123456 --ssh-key-file ~/.ssh/id_rsa

Cloud Storage

gcloud storage buckets list --format=json

DNS

gcloud dns record-sets transaction start --zone=example-net
gcloud dns record-sets transaction add 10.1.2.3 --name=foo.example.net --ttl=300 --type=A --zone=example-net
gcloud dns record-sets transaction execute --zone=example-net

連結