檢視服務實例資料 - AWS Proton

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

檢視服務實例資料

瞭解如何檢視AWS Proton服務執行個體詳細資料。您可以使用主控台或AWS CLI。

服務執行個體屬於服務。您只能在服務編輯、建立和刪除動作的前後關聯內建立刪除執行個體。若要了解如何從服務中新增和移除除的執行個體,請參閱編輯服務

AWS Management Console

使用AWS Proton主控台列出並檢視服務執行個體詳細資料,如下列步驟所示。

  1. 若要檢視服務執行個體清單,請在導覽窗格中選擇 [服務執行個體]。

  2. 若要檢視詳細資料,請選擇服務執行處理的名稱。

    檢視您的服務執行個體詳細資料。

AWS CLI

列出並檢視服務執行個體詳細資訊,如下列 CLI 範例命令和回應所示。

命令:

$ aws proton list-service-instances

回應:

{ "serviceInstances": [ { "arn": "arn:aws:proton:region-id:123456789012:service/simple-svc/service-instance/instance-one", "createdAt": "2020-11-28T22:40:50.512000+00:00", "deploymentStatus": "SUCCEEDED", "environmentArn": "arn:aws:proton:region-id:123456789012:environment/simple-env", "lastDeploymentAttemptedAt": "2020-11-28T22:40:50.512000+00:00", "lastDeploymentSucceededAt": "2020-11-28T22:40:50.512000+00:00", "name": "instance-one", "serviceName": "simple-svc", "templateMajorVersion": "1", "templateMinorVersion": "0", "templateName": "fargate-service" } ] }

命令:

$ aws proton get-service-instance \ --name "instance-one" \ --service-name "simple-svc"

回應:

{ "serviceInstance": { "arn": "arn:aws:proton:region-id:123456789012:service/simple-svc/service-instance/instance-one", "createdAt": "2020-11-28T22:40:50.512000+00:00", "deploymentStatus": "SUCCEEDED", "environmentName": "simple-env", "lastDeploymentAttemptedAt": "2020-11-28T22:40:50.512000+00:00", "lastDeploymentSucceededAt": "2020-11-28T22:40:50.512000+00:00", "name": "instance-one", "serviceName": "simple-svc", "spec": "proton: ServiceSpec\npipeline:\n my_sample_pipeline_optional_input: hello world\n my_sample_pipeline_required_input: pipeline up\ninstances:\n- name: instance-one\n environment: my-simple-env\n spec:\n my_sample_service_instance_optional_input: Ola\n my_sample_service_instance_required_input: Ciao\n", "templateMajorVersion": "1", "templateMinorVersion": "0", "templateName": "svc-simple" } }