檢視服務資料 - AWS Proton

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

檢視服務資料

您可以使用AWS Proton主控台或檢視和列出服務詳細資訊資料AWS CLI。

AWS Management Console

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

  1. 若要檢視您的服務清單,請在功能窗格中選擇 [服務]。

  2. 若要檢視詳細資料,請選擇服務名稱。

    檢視服務詳細資料。

AWS CLI

檢視具有服務管線之服務的詳細資訊,如下列 CLI 範例命令和回應所示。

命令:

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

回應:

{ "service": { "arn": "arn:aws:proton:region-id:123456789012:service/simple-svc", "branchName": "mainline", "createdAt": "2020-11-28T22:40:50.512000+00:00", "lastModifiedAt": "2020-11-28T22:44:51.207000+00:00", "name": "simple-svc", "pipeline": { "arn": "arn:aws:proton:region-id:123456789012:service/simple-svc/pipeline/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111", "createdAt": "2020-11-28T22:40:50.512000+00:00", "deploymentStatus": "SUCCEEDED", "lastDeploymentAttemptedAt": "2020-11-28T22:40:50.512000+00:00", "lastDeploymentSucceededAt": "2020-11-28T22:40:50.512000+00:00", "spec": "proton: ServiceSpec\npipeline:\n my_sample_pipeline_required_input: hello\n my_sample_pipeline_optional_input: bye\ninstances:\n- name: instance-svc-simple\n environment: my-simple-env\n spec:\n my_sample_service_instance_required_input: hi\n my_sample_service_instance_optional_input: ho\n", "templateMajorVersion": "1", "templateMinorVersion": "1", "templateName": "svc-simple" }, "repositoryConnectionArn": "arn:aws:codestar-connections:region-id:123456789012:connection/a1b2c3d4-5678-90ab-cdef-EXAMPLE22222", "repositoryId": "myorg/myapp", "spec": "proton: ServiceSpec\npipeline:\n my_sample_pipeline_required_input: hello\n my_sample_pipeline_optional_input: bye\ninstances:\n- name: instance-svc-simple\n environment: my-simple-env\n spec:\n my_sample_service_instance_required_input: hi\n my_sample_service_instance_optional_input: ho\n", "status": "ACTIVE", "templateName": "svc-simple" } }

檢視沒有服務管線的服務詳細資訊,如下列 CLI 範例命令和回應所示。

命令:

$ aws proton get-service \ --name "simple-svc-no-pipeline"

回應:

{ "service": { "arn": "arn:aws:proton:region-id:123456789012:service/simple-svc-without-pipeline", "createdAt": "2020-11-28T22:40:50.512000+00:00", "lastModifiedAt": "2020-11-28T22:44:51.207000+00:00", "name": "simple-svc-without-pipeline", "spec": "proton: ServiceSpec\ninstances:\n- name: instance-svc-simple\n environment: my-simple-env\n spec:\n my_sample_service_instance_required_input: hi\n my_sample_service_instance_optional_input: ho\n", "status": "ACTIVE", "templateName": "svc-simple-no-pipeline" } }