本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
查看服务实例数据
了解如何查看 AWS Proton 服务实例详细数据。您可以使用控制台或 AWS CLI。
服务实例属于服务。您只能在服务编辑、创建和删除操作的上下文中创建或删除实例。要了解如何在服务中添加和删除实例,请参阅编辑服务。
- AWS Management Console
-
使用 AWS Proton 控制台
列出和查看服务实例详细信息,如以下步骤中所示。 -
要查看服务实例列表,请在导航窗格中选择服务实例。
-
要查看详细数据,请选择一个服务实例的名称。
查看您的服务实例详细数据。
-
- 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" } }
删除
更新实例