AWS code-library documentation change
Summary
Removed multiple AWS CLI code examples for Service Discovery commands including create-http-namespace, create-public-dns-namespace, delete-service-attributes, discover-instances-revision, get-instance, get-service-attributes, and others
Security assessment
Changes involve removal of standard CLI usage examples without any references to security vulnerabilities, patches, or security feature implementations
Diff
diff --git a/code-library/latest/ug/cli_2_servicediscovery_code_examples.md b/code-library/latest/ug/cli_2_servicediscovery_code_examples.md index 223cefd20..3cf677b20 100644 --- a/code-library/latest/ug/cli_2_servicediscovery_code_examples.md +++ b/code-library/latest/ug/cli_2_servicediscovery_code_examples.md @@ -25,31 +24,0 @@ Each example includes a link to the complete source code, where you can find ins -The following code example shows how to use `create-http-namespace`. - -**AWS CLI** - - -**To create an HTTP namespace** - -The following `create-http-namespace` example creates an HTTP namespace `example.com`. - - - aws servicediscovery create-http-namespace \ - --name example.com \ - --creator-request-id example-request-id - - -Output: - - - { - "OperationId": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd" - } - -To confirm that the operation succeeded, you can run `get-operation`. For more information, see [get-operation](https://docs.aws.amazon.com/cli/latest/reference/servicediscovery/get-operation.html) . - -For more information about creating a namespace, see [Creating an AWS Cloud Map namespace to group application services](https://docs.aws.amazon.com/cloud-map/latest/dg/creating-namespaces.html) in the _AWS Cloud Map Developer Guide_. - - * For API details, see [CreateHttpNamespace](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/servicediscovery/create-http-namespace.html) in _AWS CLI Command Reference_. - - - - @@ -87,32 +55,0 @@ For more information, see [Creating namespaces](https://docs.aws.amazon.com/clou -The following code example shows how to use `create-public-dns-namespace`. - -**AWS CLI** - - -**To create an public DNS namespace** - -The following `create-public-dns-namespace` example creates an public DNS namespace `example.com`. - - - aws servicediscovery create-public-dns-namespace \ - --name example-public-dns.com \ - --creator-request-id example-public-request-id \ - --properties DnsProperties={SOA={TTL=60}} - - -Output: - - - { - "OperationId": "gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd" - } - -To confirm that the operation succeeded, you can run `get-operation`. - -For more information about creating a namespace, see [Creating an AWS Cloud Map namespace to group application services](https://docs.aws.amazon.com/cloud-map/latest/dg/creating-namespaces.html) in the _AWS Cloud Map Developer Guide_. - - * For API details, see [CreatePublicDnsNamespace](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/servicediscovery/create-public-dns-namespace.html) in _AWS CLI Command Reference_. - - - - @@ -196,24 +132,0 @@ For more information, see [Deleting namespaces](https://docs.aws.amazon.com/clou -The following code example shows how to use `delete-service-attributes`. - -**AWS CLI** - - -**To delete a service attribute** - -The following `delete-service-attributes` example deletes a service attribute with the key `Port` that is associated with the specified service. - - - aws servicediscovery delete-service-attributes \ - --service-id srv-e4anhexample0004 \ - --attributes Port - - -This command produces no output. - -For more information, see [Deleting namespaces](https://docs.aws.amazon.com/cloud-map/latest/dg/deleting-namespaces.html) in the _AWS Cloud Map Developer Guide_. - - * For API details, see [DeleteServiceAttributes](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/servicediscovery/delete-service-attributes.html) in _AWS CLI Command Reference_. - - - - @@ -274,29 +186,0 @@ For more information, see [Deregistering service instances](https://docs.aws.ama -The following code example shows how to use `discover-instances-revision`. - -**AWS CLI** - - -**To discover the revision of an instance** - -The following `discover-instances-revision` example discovers the increasing revision of an instance. - - - aws servicediscovery discover-instances-revision \ - --namespace-name example.com \ - --service-name myservice - - -Output: - - - { - "InstancesRevision": 123456 - } - -For more information, see [AWS Cloud Map service instances](https://docs.aws.amazon.com/cloud-map/latest/dg/working-with-instances.html) in the _AWS Cloud Map Developer Guide_. - - * For API details, see [DiscoverInstancesRevision](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/servicediscovery/discover-instances-revision.html) in _AWS CLI Command Reference_. - - - - @@ -338,2 +221,0 @@ Output: -For more information, see [AWS Cloud Map service instances](https://docs.aws.amazon.com/cloud-map/latest/dg/working-with-instances.html) in the _AWS Cloud Map Developer Guide_. - @@ -345,111 +226,0 @@ For more information, see [AWS Cloud Map service instances](https://docs.aws.ama -The following code example shows how to use `get-instance`. - -**AWS CLI** - - -**To get the details of an instance** - -The following `get-instance` example gets the attributes of a service. - - - aws servicediscovery get-instance \ - --service-id srv-e4anhexample0004 - --instance-id i-abcd1234 - - -Output: - - - { - "Instances": { - "Id": "arn:aws:servicediscovery:us-west-2:111122223333;:service/srv-e4anhexample0004", - "Attributes": { - "AWS_INSTANCE_IPV4": "192.0.2.44", - "AWS_INSTANCE_PORT": "80", - "color": "green", - "region": "us-west-2", - "stage": "beta" - } - } - } - -For more information, see [AWS Cloud Map service instances](https://docs.aws.amazon.com/cloud-map/latest/dg/working-with-instances.html) in the _AWS Cloud Map Developer Guide_. - - * For API details, see [GetInstance](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/servicediscovery/get-instance.html) in _AWS CLI Command Reference_. - - - - -The following code example shows how to use `get-instances-health-status`. - -**AWS CLI** - - -**To get the health status of instances associated with a service** - -The following `get-instances-health-status` example gets the health status of instances associated with the specified service. - - - aws servicediscovery get-instances-health-status \ - --service-id srv-e4anhexample0004 - - -Output: - - - { - "Status": { - "i-abcd1234": "HEALTHY", - "i-abcd1235": "UNHEALTHY" - } - } - -For more information, see [AWS Cloud Map service instances](https://docs.aws.amazon.com/cloud-map/latest/dg/working-with-instances.html) in the _AWS Cloud Map Developer Guide_. - - * For API details, see [GetInstancesHealthStatus](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/servicediscovery/get-instances-health-status.html) in _AWS CLI Command Reference_. - - - - -The following code example shows how to use `get-namespace`. - -**AWS CLI**