aws-sdk-servicediscovery 1.89.0 → 1.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/VERSION +1 -1
- data/lib/aws-sdk-servicediscovery/client.rb +585 -11
- data/lib/aws-sdk-servicediscovery.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 685b22408ecde379deaecece317798a682479605cdd7088a3662759fbdf6c9d4
|
4
|
+
data.tar.gz: 19090c2593c3ffae1a460804245629e65fb8ac09bad4fe367dc80b43e180881b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03f3b4f0c5cf2ed4b8ce524de3ac4fa34df143de894f925d9a8246d160fe2c0002c49d2dd79ee281816adf2cf27fae0778ecaebbb32ff920865095de57f236c5
|
7
|
+
data.tar.gz: c3fc9f3a59903c5359391cbec14b79242a31295f6aadab718770cabca1108f411bc0043ca9c542d952eb5e6dc6e1ec02e736a6d9351151f17ddf31510d0ef263
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.90.0
|
@@ -919,6 +919,7 @@ module Aws::ServiceDiscovery
|
|
919
919
|
# service: {
|
920
920
|
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita",
|
921
921
|
# create_date: Time.parse(1587081768.334),
|
922
|
+
# created_by_account: "123456789012",
|
922
923
|
# creator_request_id: "567c1193-6b00-4308-bd57-ad38a8822d25",
|
923
924
|
# dns_config: {
|
924
925
|
# dns_records: [
|
@@ -931,8 +932,58 @@ module Aws::ServiceDiscovery
|
|
931
932
|
# routing_policy: "MULTIVALUE",
|
932
933
|
# },
|
933
934
|
# id: "srv-p5zdwlg5uvvzjita",
|
935
|
+
# instance_count: 0,
|
934
936
|
# name: "myservice",
|
935
937
|
# namespace_id: "ns-ylexjili4cdxy3xm",
|
938
|
+
# resource_owner: "123456789012",
|
939
|
+
# type: "DNS_HTTP",
|
940
|
+
# },
|
941
|
+
# }
|
942
|
+
#
|
943
|
+
# @example Example: Create service using namespace ARN
|
944
|
+
#
|
945
|
+
# # Namespace sharee creates a service using a namespace ARN instead of namespace ID, useful when working with shared
|
946
|
+
# # namespaces.
|
947
|
+
#
|
948
|
+
# resp = client.create_service({
|
949
|
+
# description: "Example service using namespace ARN",
|
950
|
+
# dns_config: {
|
951
|
+
# dns_records: [
|
952
|
+
# {
|
953
|
+
# ttl: 300,
|
954
|
+
# type: "A",
|
955
|
+
# },
|
956
|
+
# ],
|
957
|
+
# routing_policy: "MULTIVALUE",
|
958
|
+
# },
|
959
|
+
# name: "example-service",
|
960
|
+
# namespace_id: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-abcd1234xmpl5678",
|
961
|
+
# })
|
962
|
+
#
|
963
|
+
# resp.to_h outputs the following:
|
964
|
+
# {
|
965
|
+
# service: {
|
966
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
967
|
+
# create_date: Time.parse(1705161600.0),
|
968
|
+
# created_by_account: "111122223333",
|
969
|
+
# creator_request_id: "abcd1234-xmpl-5678-9012-abcd1234xmpl",
|
970
|
+
# description: "Example service using namespace ARN",
|
971
|
+
# dns_config: {
|
972
|
+
# dns_records: [
|
973
|
+
# {
|
974
|
+
# ttl: 300,
|
975
|
+
# type: "A",
|
976
|
+
# },
|
977
|
+
# ],
|
978
|
+
# namespace_id: "ns-abcd1234xmpl5678",
|
979
|
+
# routing_policy: "MULTIVALUE",
|
980
|
+
# },
|
981
|
+
# id: "srv-abcd1234xmpl5678",
|
982
|
+
# instance_count: 0,
|
983
|
+
# name: "example-service",
|
984
|
+
# namespace_id: "ns-abcd1234xmpl5678",
|
985
|
+
# resource_owner: "123456789012",
|
986
|
+
# type: "DNS_HTTP",
|
936
987
|
# },
|
937
988
|
# }
|
938
989
|
#
|
@@ -1024,7 +1075,20 @@ module Aws::ServiceDiscovery
|
|
1024
1075
|
#
|
1025
1076
|
# resp.to_h outputs the following:
|
1026
1077
|
# {
|
1027
|
-
# operation_id: "
|
1078
|
+
# operation_id: "abcd1234-xmpl-5678-9012-abcd1234xmplabcd",
|
1079
|
+
# }
|
1080
|
+
#
|
1081
|
+
# @example Example: Delete namespace using namespace ARN
|
1082
|
+
#
|
1083
|
+
# # Deletes a namespace using a namespace ARN instead of namespace ID, useful when working with shared namespaces.
|
1084
|
+
#
|
1085
|
+
# resp = client.delete_namespace({
|
1086
|
+
# id: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-abcd1234xmpl5678",
|
1087
|
+
# })
|
1088
|
+
#
|
1089
|
+
# resp.to_h outputs the following:
|
1090
|
+
# {
|
1091
|
+
# operation_id: "abcd1234-xmpl-5678-9012-abcd1234xmplabcd",
|
1028
1092
|
# }
|
1029
1093
|
#
|
1030
1094
|
# @example Request syntax with placeholder values
|
@@ -1076,6 +1140,18 @@ module Aws::ServiceDiscovery
|
|
1076
1140
|
# {
|
1077
1141
|
# }
|
1078
1142
|
#
|
1143
|
+
# @example Example: Delete service using service ARN
|
1144
|
+
#
|
1145
|
+
# # Deletes a service using a service ARN instead of service ID, useful when working with shared namespaces.
|
1146
|
+
#
|
1147
|
+
# resp = client.delete_service({
|
1148
|
+
# id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
1149
|
+
# })
|
1150
|
+
#
|
1151
|
+
# resp.to_h outputs the following:
|
1152
|
+
# {
|
1153
|
+
# }
|
1154
|
+
#
|
1079
1155
|
# @example Request syntax with placeholder values
|
1080
1156
|
#
|
1081
1157
|
# resp = client.delete_service({
|
@@ -1126,6 +1202,22 @@ module Aws::ServiceDiscovery
|
|
1126
1202
|
# {
|
1127
1203
|
# }
|
1128
1204
|
#
|
1205
|
+
# @example Example: Delete service attributes using service ARN
|
1206
|
+
#
|
1207
|
+
# # Deletes service attributes using a service ARN instead of service ID, useful for cross-account scenarios or when working
|
1208
|
+
# # with shared namespaces.
|
1209
|
+
#
|
1210
|
+
# resp = client.delete_service_attributes({
|
1211
|
+
# attributes: [
|
1212
|
+
# "Port",
|
1213
|
+
# ],
|
1214
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
1215
|
+
# })
|
1216
|
+
#
|
1217
|
+
# resp.to_h outputs the following:
|
1218
|
+
# {
|
1219
|
+
# }
|
1220
|
+
#
|
1129
1221
|
# @example Request syntax with placeholder values
|
1130
1222
|
#
|
1131
1223
|
# resp = client.delete_service_attributes({
|
@@ -1183,6 +1275,20 @@ module Aws::ServiceDiscovery
|
|
1183
1275
|
# operation_id: "4yejorelbukcjzpnr6tlmrghsjwpngf4-k98rnaiq",
|
1184
1276
|
# }
|
1185
1277
|
#
|
1278
|
+
# @example Example: Deregister instance using service ARN
|
1279
|
+
#
|
1280
|
+
# # Deregisters an instance using a service ARN instead of service ID, useful when working with shared namespaces.
|
1281
|
+
#
|
1282
|
+
# resp = client.deregister_instance({
|
1283
|
+
# instance_id: "i-abcd1234xmpl5678",
|
1284
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
1285
|
+
# })
|
1286
|
+
#
|
1287
|
+
# resp.to_h outputs the following:
|
1288
|
+
# {
|
1289
|
+
# operation_id: "abcd1234-xmpl-5678-9012-abcd1234xmpl",
|
1290
|
+
# }
|
1291
|
+
#
|
1186
1292
|
# @example Request syntax with placeholder values
|
1187
1293
|
#
|
1188
1294
|
# resp = client.deregister_instance({
|
@@ -1301,6 +1407,43 @@ module Aws::ServiceDiscovery
|
|
1301
1407
|
# ],
|
1302
1408
|
# }
|
1303
1409
|
#
|
1410
|
+
# @example Example: Discover instances using owner account
|
1411
|
+
#
|
1412
|
+
# # Discovers instances in a shared namespace by specifying the OwnerAccount parameter, useful when working with shared
|
1413
|
+
# # namespaces.
|
1414
|
+
#
|
1415
|
+
# resp = client.discover_instances({
|
1416
|
+
# namespace_name: "example-shared-namespace",
|
1417
|
+
# owner_account: "123456789012",
|
1418
|
+
# service_name: "shared-namespace-service",
|
1419
|
+
# })
|
1420
|
+
#
|
1421
|
+
# resp.to_h outputs the following:
|
1422
|
+
# {
|
1423
|
+
# instances: [
|
1424
|
+
# {
|
1425
|
+
# attributes: {
|
1426
|
+
# "AWS_INSTANCE_IPV4" => "192.0.2.44",
|
1427
|
+
# "AWS_INSTANCE_PORT" => "80",
|
1428
|
+
# },
|
1429
|
+
# health_status: "HEALTHY",
|
1430
|
+
# instance_id: "i-abcd1234xmpl5678",
|
1431
|
+
# namespace_name: "example-shared-namespace",
|
1432
|
+
# service_name: "shared-service",
|
1433
|
+
# },
|
1434
|
+
# {
|
1435
|
+
# attributes: {
|
1436
|
+
# "AWS_INSTANCE_IPV4" => "192.0.2.45",
|
1437
|
+
# "AWS_INSTANCE_PORT" => "80",
|
1438
|
+
# },
|
1439
|
+
# health_status: "HEALTHY",
|
1440
|
+
# instance_id: "i-efgh5678xmpl9012",
|
1441
|
+
# namespace_name: "example-shared-namespace",
|
1442
|
+
# service_name: "shared-service",
|
1443
|
+
# },
|
1444
|
+
# ],
|
1445
|
+
# }
|
1446
|
+
#
|
1304
1447
|
# @example Request syntax with placeholder values
|
1305
1448
|
#
|
1306
1449
|
# resp = client.discover_instances({
|
@@ -1378,6 +1521,22 @@ module Aws::ServiceDiscovery
|
|
1378
1521
|
# instances_revision: 123456,
|
1379
1522
|
# }
|
1380
1523
|
#
|
1524
|
+
# @example Example: Discover instances revision using owner account
|
1525
|
+
#
|
1526
|
+
# # Discovers the instances revision in a shared namespace by specifying the OwnerAccount parameter, useful when working
|
1527
|
+
# # with shared namespaces.
|
1528
|
+
#
|
1529
|
+
# resp = client.discover_instances_revision({
|
1530
|
+
# namespace_name: "example-shared-namespace",
|
1531
|
+
# owner_account: "123456789012",
|
1532
|
+
# service_name: "shared-service",
|
1533
|
+
# })
|
1534
|
+
#
|
1535
|
+
# resp.to_h outputs the following:
|
1536
|
+
# {
|
1537
|
+
# instances_revision: 1001,
|
1538
|
+
# }
|
1539
|
+
#
|
1381
1540
|
# @example Request syntax with placeholder values
|
1382
1541
|
#
|
1383
1542
|
# resp = client.discover_instances_revision({
|
@@ -1440,8 +1599,36 @@ module Aws::ServiceDiscovery
|
|
1440
1599
|
# "region" => "us-west-2",
|
1441
1600
|
# "stage" => "beta",
|
1442
1601
|
# },
|
1602
|
+
# created_by_account: "123456789012",
|
1443
1603
|
# id: "i-abcd1234",
|
1444
1604
|
# },
|
1605
|
+
# resource_owner: "123456789012",
|
1606
|
+
# }
|
1607
|
+
#
|
1608
|
+
# @example Example: Get instance details using service ARN for shared namespace
|
1609
|
+
#
|
1610
|
+
# # This example gets information about an instance using a service ARN instead of service ID. This is useful for listing
|
1611
|
+
# # instances associated with shared namespaces.
|
1612
|
+
#
|
1613
|
+
# resp = client.get_instance({
|
1614
|
+
# instance_id: "i-abcd1234",
|
1615
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-e4anhexample0004",
|
1616
|
+
# })
|
1617
|
+
#
|
1618
|
+
# resp.to_h outputs the following:
|
1619
|
+
# {
|
1620
|
+
# instance: {
|
1621
|
+
# attributes: {
|
1622
|
+
# "AWS_INSTANCE_IPV4" => "192.0.2.44",
|
1623
|
+
# "AWS_INSTANCE_PORT" => "80",
|
1624
|
+
# "color" => "green",
|
1625
|
+
# "region" => "us-west-2",
|
1626
|
+
# "stage" => "beta",
|
1627
|
+
# },
|
1628
|
+
# created_by_account: "111122223333",
|
1629
|
+
# id: "i-abcd1234",
|
1630
|
+
# },
|
1631
|
+
# resource_owner: "123456789012",
|
1445
1632
|
# }
|
1446
1633
|
#
|
1447
1634
|
# @example Request syntax with placeholder values
|
@@ -1542,6 +1729,23 @@ module Aws::ServiceDiscovery
|
|
1542
1729
|
# },
|
1543
1730
|
# }
|
1544
1731
|
#
|
1732
|
+
# @example Example: Get instances health status using service ARN for shared namespace
|
1733
|
+
#
|
1734
|
+
# # This example gets the current health status of instances using a service ARN instead of service ID. This is useful for
|
1735
|
+
# # checking health status of instances associated with shared namespaces.
|
1736
|
+
#
|
1737
|
+
# resp = client.get_instances_health_status({
|
1738
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-e4anhexample0004",
|
1739
|
+
# })
|
1740
|
+
#
|
1741
|
+
# resp.to_h outputs the following:
|
1742
|
+
# {
|
1743
|
+
# status: {
|
1744
|
+
# "i-abcd1234" => "HEALTHY",
|
1745
|
+
# "i-abcd1235" => "UNHEALTHY",
|
1746
|
+
# },
|
1747
|
+
# }
|
1748
|
+
#
|
1545
1749
|
# @example Request syntax with placeholder values
|
1546
1750
|
#
|
1547
1751
|
# resp = client.get_instances_health_status({
|
@@ -1608,6 +1812,40 @@ module Aws::ServiceDiscovery
|
|
1608
1812
|
# http_name: "example-http.com",
|
1609
1813
|
# },
|
1610
1814
|
# },
|
1815
|
+
# resource_owner: "123456789012",
|
1816
|
+
# type: "HTTP",
|
1817
|
+
# },
|
1818
|
+
# }
|
1819
|
+
#
|
1820
|
+
# @example Example: Get namespace using namespace ARN
|
1821
|
+
#
|
1822
|
+
# # Gets namespace information using a namespace ARN instead of namespace ID, useful when working with shared namespaces.
|
1823
|
+
# # Shows a namespace owned by another account (123456789012) that is shared with the current account.
|
1824
|
+
#
|
1825
|
+
# resp = client.get_namespace({
|
1826
|
+
# id: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-abcd1234xmpl5678",
|
1827
|
+
# })
|
1828
|
+
#
|
1829
|
+
# resp.to_h outputs the following:
|
1830
|
+
# {
|
1831
|
+
# namespace: {
|
1832
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-abcd1234xmpl5678",
|
1833
|
+
# create_date: Time.parse(1705161600.0),
|
1834
|
+
# creator_request_id: "abcd1234-xmpl-5678-9012-abcd1234xmpl",
|
1835
|
+
# description: "Example shared namespace",
|
1836
|
+
# id: "ns-abcd1234xmpl5678",
|
1837
|
+
# name: "example-shared-namespace",
|
1838
|
+
# properties: {
|
1839
|
+
# dns_properties: {
|
1840
|
+
# soa: {
|
1841
|
+
# },
|
1842
|
+
# },
|
1843
|
+
# http_properties: {
|
1844
|
+
# http_name: "example-shared-namespace",
|
1845
|
+
# },
|
1846
|
+
# },
|
1847
|
+
# resource_owner: "123456789012",
|
1848
|
+
# service_count: 3,
|
1611
1849
|
# type: "HTTP",
|
1612
1850
|
# },
|
1613
1851
|
# }
|
@@ -1690,6 +1928,30 @@ module Aws::ServiceDiscovery
|
|
1690
1928
|
# },
|
1691
1929
|
# }
|
1692
1930
|
#
|
1931
|
+
# @example Example: Get operation using owner account
|
1932
|
+
#
|
1933
|
+
# # Gets operation information by specifying the OwnerAccount parameter for operations associated with shared namespaces.
|
1934
|
+
#
|
1935
|
+
# resp = client.get_operation({
|
1936
|
+
# operation_id: "abcd1234-xmpl-5678-9012-abcd1234xmpl",
|
1937
|
+
# owner_account: "123456789012",
|
1938
|
+
# })
|
1939
|
+
#
|
1940
|
+
# resp.to_h outputs the following:
|
1941
|
+
# {
|
1942
|
+
# operation: {
|
1943
|
+
# create_date: Time.parse(1705161600.0),
|
1944
|
+
# id: "abcd1234-xmpl-5678-9012-abcd1234xmpl",
|
1945
|
+
# owner_account: "123456789012",
|
1946
|
+
# status: "SUCCESS",
|
1947
|
+
# targets: {
|
1948
|
+
# "SERVICE" => "srv-abcd1234xmpl5678",
|
1949
|
+
# },
|
1950
|
+
# type: "CREATE_SERVICE",
|
1951
|
+
# update_date: Time.parse(1705161605.0),
|
1952
|
+
# },
|
1953
|
+
# }
|
1954
|
+
#
|
1693
1955
|
# @example Request syntax with placeholder values
|
1694
1956
|
#
|
1695
1957
|
# resp = client.get_operation({
|
@@ -1750,6 +2012,7 @@ module Aws::ServiceDiscovery
|
|
1750
2012
|
# service: {
|
1751
2013
|
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-e4anhexample0004",
|
1752
2014
|
# create_date: Time.parse("20181118T211707Z"),
|
2015
|
+
# created_by_account: "123456789012",
|
1753
2016
|
# creator_request_id: "example-creator-request-id-0004",
|
1754
2017
|
# description: "Example.com AWS Cloud Map HTTP Service",
|
1755
2018
|
# health_check_config: {
|
@@ -1760,6 +2023,44 @@ module Aws::ServiceDiscovery
|
|
1760
2023
|
# id: "srv-e4anhexample0004",
|
1761
2024
|
# name: "example-http-service",
|
1762
2025
|
# namespace_id: "ns-e4anhexample0004",
|
2026
|
+
# resource_owner: "123456789012",
|
2027
|
+
# type: "HTTP",
|
2028
|
+
# },
|
2029
|
+
# }
|
2030
|
+
#
|
2031
|
+
# @example Example: Get service using service ARN
|
2032
|
+
#
|
2033
|
+
# # Gets service settings using a service ARN instead of service ID, useful when working with shared namespaces. Shows a
|
2034
|
+
# # service created by a sharee (111122223333) in a namespace owned by another account (123456789012).
|
2035
|
+
#
|
2036
|
+
# resp = client.get_service({
|
2037
|
+
# id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
2038
|
+
# })
|
2039
|
+
#
|
2040
|
+
# resp.to_h outputs the following:
|
2041
|
+
# {
|
2042
|
+
# service: {
|
2043
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
2044
|
+
# create_date: Time.parse(1705161600.0),
|
2045
|
+
# created_by_account: "111122223333",
|
2046
|
+
# creator_request_id: "abcd1234-xmpl-5678-9012-abcd1234xmpl",
|
2047
|
+
# description: "Example service",
|
2048
|
+
# dns_config: {
|
2049
|
+
# dns_records: [
|
2050
|
+
# {
|
2051
|
+
# ttl: 300,
|
2052
|
+
# type: "A",
|
2053
|
+
# },
|
2054
|
+
# ],
|
2055
|
+
# namespace_id: "ns-abcd1234xmpl5678",
|
2056
|
+
# routing_policy: "MULTIVALUE",
|
2057
|
+
# },
|
2058
|
+
# id: "srv-abcd1234xmpl5678",
|
2059
|
+
# instance_count: 2,
|
2060
|
+
# name: "example-service",
|
2061
|
+
# namespace_id: "ns-abcd1234xmpl5678",
|
2062
|
+
# resource_owner: "123456789012",
|
2063
|
+
# type: "DNS_HTTP",
|
1763
2064
|
# },
|
1764
2065
|
# }
|
1765
2066
|
#
|
@@ -1833,10 +2134,31 @@ module Aws::ServiceDiscovery
|
|
1833
2134
|
# attributes: {
|
1834
2135
|
# "port" => "80",
|
1835
2136
|
# },
|
2137
|
+
# resource_owner: "123456789012",
|
1836
2138
|
# service_arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-e4anhexample0004",
|
1837
2139
|
# },
|
1838
2140
|
# }
|
1839
2141
|
#
|
2142
|
+
# @example Example: Get service attributes using service ARN
|
2143
|
+
#
|
2144
|
+
# # Gets service attributes using a service ARN instead of service ID, useful when working with shared namespaces. Shows
|
2145
|
+
# # attributes for a service created by a sharee in a namespace owned by another account.
|
2146
|
+
#
|
2147
|
+
# resp = client.get_service_attributes({
|
2148
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
2149
|
+
# })
|
2150
|
+
#
|
2151
|
+
# resp.to_h outputs the following:
|
2152
|
+
# {
|
2153
|
+
# service_attributes: {
|
2154
|
+
# attributes: {
|
2155
|
+
# "Port" => "80",
|
2156
|
+
# },
|
2157
|
+
# resource_owner: "123456789012",
|
2158
|
+
# service_arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
2159
|
+
# },
|
2160
|
+
# }
|
2161
|
+
#
|
1840
2162
|
# @example Request syntax with placeholder values
|
1841
2163
|
#
|
1842
2164
|
# resp = client.get_service_attributes({
|
@@ -1916,6 +2238,29 @@ module Aws::ServiceDiscovery
|
|
1916
2238
|
# ],
|
1917
2239
|
# }
|
1918
2240
|
#
|
2241
|
+
# @example Example: List instances using service ARN for shared namespace
|
2242
|
+
#
|
2243
|
+
# # This example lists instances using a service ARN instead of service ID. This is useful for listing instances associated
|
2244
|
+
# # with shared namespaces.
|
2245
|
+
#
|
2246
|
+
# resp = client.list_instances({
|
2247
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-e4anhexample0004",
|
2248
|
+
# })
|
2249
|
+
#
|
2250
|
+
# resp.to_h outputs the following:
|
2251
|
+
# {
|
2252
|
+
# instances: [
|
2253
|
+
# {
|
2254
|
+
# attributes: {
|
2255
|
+
# "AWS_INSTANCE_IPV4" => "192.0.2.44",
|
2256
|
+
# "AWS_INSTANCE_PORT" => "80",
|
2257
|
+
# },
|
2258
|
+
# id: "i-abcd1234",
|
2259
|
+
# },
|
2260
|
+
# ],
|
2261
|
+
# resource_owner: "123456789012",
|
2262
|
+
# }
|
2263
|
+
#
|
1919
2264
|
# @example Request syntax with placeholder values
|
1920
2265
|
#
|
1921
2266
|
# resp = client.list_instances({
|
@@ -1994,47 +2339,105 @@ module Aws::ServiceDiscovery
|
|
1994
2339
|
# namespaces: [
|
1995
2340
|
# {
|
1996
2341
|
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-a3ccy2e7e3a7rile",
|
1997
|
-
# create_date: Time.parse(
|
2342
|
+
# create_date: Time.parse(1705161600.0),
|
1998
2343
|
# id: "ns-a3ccy2e7e3a7rile",
|
1999
2344
|
# name: "local",
|
2000
2345
|
# properties: {
|
2001
2346
|
# dns_properties: {
|
2002
2347
|
# hosted_zone_id: "Z06752353VBUDTC32S84S",
|
2348
|
+
# soa: {
|
2349
|
+
# ttl: 60,
|
2350
|
+
# },
|
2003
2351
|
# },
|
2004
2352
|
# http_properties: {
|
2005
2353
|
# http_name: "local",
|
2006
2354
|
# },
|
2007
2355
|
# },
|
2356
|
+
# resource_owner: "123456789012",
|
2357
|
+
# service_count: 2,
|
2008
2358
|
# type: "DNS_PRIVATE",
|
2009
2359
|
# },
|
2010
2360
|
# {
|
2011
2361
|
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-pocfyjtrsmwtvcxx",
|
2012
|
-
# create_date: Time.parse(
|
2362
|
+
# create_date: Time.parse(1705161600.0),
|
2013
2363
|
# description: "My second namespace",
|
2014
2364
|
# id: "ns-pocfyjtrsmwtvcxx",
|
2015
2365
|
# name: "My-second-namespace",
|
2016
2366
|
# properties: {
|
2017
2367
|
# dns_properties: {
|
2368
|
+
# soa: {
|
2369
|
+
# ttl: 60,
|
2370
|
+
# },
|
2018
2371
|
# },
|
2019
2372
|
# http_properties: {
|
2020
2373
|
# http_name: "My-second-namespace",
|
2021
2374
|
# },
|
2022
2375
|
# },
|
2376
|
+
# resource_owner: "123456789012",
|
2377
|
+
# service_count: 1,
|
2023
2378
|
# type: "HTTP",
|
2024
2379
|
# },
|
2025
2380
|
# {
|
2026
2381
|
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-ylexjili4cdxy3xm",
|
2027
|
-
# create_date: Time.parse(
|
2382
|
+
# create_date: Time.parse(1705161600.0),
|
2028
2383
|
# id: "ns-ylexjili4cdxy3xm",
|
2029
2384
|
# name: "example.com",
|
2030
2385
|
# properties: {
|
2031
2386
|
# dns_properties: {
|
2032
2387
|
# hosted_zone_id: "Z09983722P0QME1B3KC8I",
|
2388
|
+
# soa: {
|
2389
|
+
# ttl: 60,
|
2390
|
+
# },
|
2033
2391
|
# },
|
2034
2392
|
# http_properties: {
|
2035
2393
|
# http_name: "example.com",
|
2036
2394
|
# },
|
2037
2395
|
# },
|
2396
|
+
# resource_owner: "123456789012",
|
2397
|
+
# service_count: 3,
|
2398
|
+
# type: "DNS_PRIVATE",
|
2399
|
+
# },
|
2400
|
+
# ],
|
2401
|
+
# }
|
2402
|
+
#
|
2403
|
+
# @example Example: List namespaces filtered by resource owner
|
2404
|
+
#
|
2405
|
+
# # This example shows how to list namespaces that are shared with you from other AWS accounts using the RESOURCE_OWNER
|
2406
|
+
# # filter.
|
2407
|
+
#
|
2408
|
+
# resp = client.list_namespaces({
|
2409
|
+
# filters: [
|
2410
|
+
# {
|
2411
|
+
# name: "RESOURCE_OWNER",
|
2412
|
+
# values: [
|
2413
|
+
# "OTHER_ACCOUNTS",
|
2414
|
+
# ],
|
2415
|
+
# },
|
2416
|
+
# ],
|
2417
|
+
# })
|
2418
|
+
#
|
2419
|
+
# resp.to_h outputs the following:
|
2420
|
+
# {
|
2421
|
+
# namespaces: [
|
2422
|
+
# {
|
2423
|
+
# arn: "arn:aws:servicediscovery:us-west-2:111122223333:namespace/ns-abcd1234xmpl5678",
|
2424
|
+
# create_date: Time.parse(1705161600.0),
|
2425
|
+
# description: "Example private DNS namespace",
|
2426
|
+
# id: "ns-abcd1234xmpl5678",
|
2427
|
+
# name: "example-namespace",
|
2428
|
+
# properties: {
|
2429
|
+
# dns_properties: {
|
2430
|
+
# hosted_zone_id: "Z1D633PJN98FT9",
|
2431
|
+
# soa: {
|
2432
|
+
# ttl: 60,
|
2433
|
+
# },
|
2434
|
+
# },
|
2435
|
+
# http_properties: {
|
2436
|
+
# http_name: "example-namespace",
|
2437
|
+
# },
|
2438
|
+
# },
|
2439
|
+
# resource_owner: "111122223333",
|
2440
|
+
# service_count: 2,
|
2038
2441
|
# type: "DNS_PRIVATE",
|
2039
2442
|
# },
|
2040
2443
|
# ],
|
@@ -2233,6 +2636,7 @@ module Aws::ServiceDiscovery
|
|
2233
2636
|
# {
|
2234
2637
|
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-p5zdwlg5uvvzjita",
|
2235
2638
|
# create_date: Time.parse(1587081768.334),
|
2639
|
+
# created_by_account: "123456789012",
|
2236
2640
|
# dns_config: {
|
2237
2641
|
# dns_records: [
|
2238
2642
|
# {
|
@@ -2244,6 +2648,60 @@ module Aws::ServiceDiscovery
|
|
2244
2648
|
# },
|
2245
2649
|
# id: "srv-p5zdwlg5uvvzjita",
|
2246
2650
|
# name: "myservice",
|
2651
|
+
# resource_owner: "123456789012",
|
2652
|
+
# type: "DNS",
|
2653
|
+
# },
|
2654
|
+
# ],
|
2655
|
+
# }
|
2656
|
+
#
|
2657
|
+
# @example Example: List services in shared namespaces using resource owner filter
|
2658
|
+
#
|
2659
|
+
# # Lists services created in namespaces owned by other accounts using the RESOURCE_OWNER filter with OTHER_ACCOUNTS value,
|
2660
|
+
# # useful when working with shared namespaces. Account 111122223333 is making the request.
|
2661
|
+
#
|
2662
|
+
# resp = client.list_services({
|
2663
|
+
# filters: [
|
2664
|
+
# {
|
2665
|
+
# condition: "EQ",
|
2666
|
+
# name: "RESOURCE_OWNER",
|
2667
|
+
# values: [
|
2668
|
+
# "OTHER_ACCOUNTS",
|
2669
|
+
# ],
|
2670
|
+
# },
|
2671
|
+
# ],
|
2672
|
+
# })
|
2673
|
+
#
|
2674
|
+
# resp.to_h outputs the following:
|
2675
|
+
# {
|
2676
|
+
# services: [
|
2677
|
+
# {
|
2678
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
2679
|
+
# create_date: Time.parse(1705161600.0),
|
2680
|
+
# created_by_account: "111122223333",
|
2681
|
+
# dns_config: {
|
2682
|
+
# },
|
2683
|
+
# id: "srv-abcd1234xmpl5678",
|
2684
|
+
# name: "shared-service-1",
|
2685
|
+
# resource_owner: "123456789012",
|
2686
|
+
# type: "HTTP",
|
2687
|
+
# },
|
2688
|
+
# {
|
2689
|
+
# arn: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-efgh5678xmpl9012",
|
2690
|
+
# create_date: Time.parse(1705161700.0),
|
2691
|
+
# created_by_account: "123456789012",
|
2692
|
+
# dns_config: {
|
2693
|
+
# dns_records: [
|
2694
|
+
# {
|
2695
|
+
# ttl: 300,
|
2696
|
+
# type: "A",
|
2697
|
+
# },
|
2698
|
+
# ],
|
2699
|
+
# routing_policy: "MULTIVALUE",
|
2700
|
+
# },
|
2701
|
+
# id: "srv-efgh5678xmpl9012",
|
2702
|
+
# name: "shared-service-2",
|
2703
|
+
# resource_owner: "123456789012",
|
2704
|
+
# type: "DNS",
|
2247
2705
|
# },
|
2248
2706
|
# ],
|
2249
2707
|
# }
|
@@ -2586,6 +3044,25 @@ module Aws::ServiceDiscovery
|
|
2586
3044
|
# operation_id: "4yejorelbukcjzpnr6tlmrghsjwpngf4-k95yg2u7",
|
2587
3045
|
# }
|
2588
3046
|
#
|
3047
|
+
# @example Example: Register instance using service ARN
|
3048
|
+
#
|
3049
|
+
# # Registers an instance using a service ARN instead of service ID, useful when working with shared namespaces. Shows
|
3050
|
+
# # registering an instance to a service created by a sharee in a namespace owned by another account.
|
3051
|
+
#
|
3052
|
+
# resp = client.register_instance({
|
3053
|
+
# attributes: {
|
3054
|
+
# "AWS_INSTANCE_IPV4" => "192.0.2.44",
|
3055
|
+
# "AWS_INSTANCE_PORT" => "80",
|
3056
|
+
# },
|
3057
|
+
# instance_id: "i-abcd1234xmpl5678",
|
3058
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
3059
|
+
# })
|
3060
|
+
#
|
3061
|
+
# resp.to_h outputs the following:
|
3062
|
+
# {
|
3063
|
+
# operation_id: "abcd1234-xmpl-5678-9012-abcd1234xmpl",
|
3064
|
+
# }
|
3065
|
+
#
|
2589
3066
|
# @example Request syntax with placeholder values
|
2590
3067
|
#
|
2591
3068
|
# resp = client.register_instance({
|
@@ -2750,6 +3227,22 @@ module Aws::ServiceDiscovery
|
|
2750
3227
|
# operation_id: "ft52xe2koxhoeormaceymagglsdjyvEXAMPLE",
|
2751
3228
|
# }
|
2752
3229
|
#
|
3230
|
+
# @example Example: Update HTTP namespace using namespace ARN for shared namespace
|
3231
|
+
#
|
3232
|
+
# # This example updates an HTTP namespace using a namespace ARN instead of namespace ID.
|
3233
|
+
#
|
3234
|
+
# resp = client.update_http_namespace({
|
3235
|
+
# id: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-vh4nbmexample",
|
3236
|
+
# namespace: {
|
3237
|
+
# description: "Updated description for shared HTTP namespace.",
|
3238
|
+
# },
|
3239
|
+
# })
|
3240
|
+
#
|
3241
|
+
# resp.to_h outputs the following:
|
3242
|
+
# {
|
3243
|
+
# operation_id: "ft52xe2koxhoeormaceymagglsdjyvexample",
|
3244
|
+
# }
|
3245
|
+
#
|
2753
3246
|
# @example Request syntax with placeholder values
|
2754
3247
|
#
|
2755
3248
|
# resp = client.update_http_namespace({
|
@@ -2820,6 +3313,21 @@ module Aws::ServiceDiscovery
|
|
2820
3313
|
# status: "HEALTHY",
|
2821
3314
|
# })
|
2822
3315
|
#
|
3316
|
+
# @example Example: Update instance custom health status using service ARN
|
3317
|
+
#
|
3318
|
+
# # Updates instance custom health status using a service ARN instead of service ID, useful when working with shared
|
3319
|
+
# # namespaces.
|
3320
|
+
#
|
3321
|
+
# resp = client.update_instance_custom_health_status({
|
3322
|
+
# instance_id: "i-abcd1234xmpl5678",
|
3323
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
3324
|
+
# status: "HEALTHY",
|
3325
|
+
# })
|
3326
|
+
#
|
3327
|
+
# resp.to_h outputs the following:
|
3328
|
+
# {
|
3329
|
+
# }
|
3330
|
+
#
|
2823
3331
|
# @example Request syntax with placeholder values
|
2824
3332
|
#
|
2825
3333
|
# resp = client.update_instance_custom_health_status({
|
@@ -2877,21 +3385,20 @@ module Aws::ServiceDiscovery
|
|
2877
3385
|
# operation_id: "ft52xe2koxhoeormaceymagglsdjyvEXAMPLE",
|
2878
3386
|
# }
|
2879
3387
|
#
|
2880
|
-
# @example Example:
|
3388
|
+
# @example Example: Update private DNS namespace using namespace ARN for shared namespace
|
2881
3389
|
#
|
2882
|
-
# #
|
3390
|
+
# # This example updates a private DNS namespace using a namespace ARN instead of namespace ID.
|
2883
3391
|
#
|
2884
3392
|
# resp = client.update_private_dns_namespace({
|
2885
|
-
# id: "ns-
|
3393
|
+
# id: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-bk3aexample",
|
2886
3394
|
# namespace: {
|
2887
|
-
# description: "
|
3395
|
+
# description: "Updated description for shared private DNS namespace.",
|
2888
3396
|
# },
|
2889
|
-
# updater_request_id: "",
|
2890
3397
|
# })
|
2891
3398
|
#
|
2892
3399
|
# resp.to_h outputs the following:
|
2893
3400
|
# {
|
2894
|
-
# operation_id: "
|
3401
|
+
# operation_id: "ft52xe2koxhoeormaceymagglsdjyvexample",
|
2895
3402
|
# }
|
2896
3403
|
#
|
2897
3404
|
# @example Request syntax with placeholder values
|
@@ -2945,6 +3452,40 @@ module Aws::ServiceDiscovery
|
|
2945
3452
|
#
|
2946
3453
|
# * {Types::UpdatePublicDnsNamespaceResponse#operation_id #operation_id} => String
|
2947
3454
|
#
|
3455
|
+
#
|
3456
|
+
# @example Example: To update a public DNS namespace
|
3457
|
+
#
|
3458
|
+
# # The following example updates the description of a public DNS namespace.
|
3459
|
+
#
|
3460
|
+
# resp = client.update_public_dns_namespace({
|
3461
|
+
# id: "ns-bk3aEXAMPLE",
|
3462
|
+
# namespace: {
|
3463
|
+
# description: "The updated namespace description.",
|
3464
|
+
# },
|
3465
|
+
# updater_request_id: "",
|
3466
|
+
# })
|
3467
|
+
#
|
3468
|
+
# resp.to_h outputs the following:
|
3469
|
+
# {
|
3470
|
+
# operation_id: "ft52xe2koxhoeormaceymagglsdjEXAMPLE",
|
3471
|
+
# }
|
3472
|
+
#
|
3473
|
+
# @example Example: Update public DNS namespace using namespace ARN for shared namespace
|
3474
|
+
#
|
3475
|
+
# # This example updates a public DNS namespace using a namespace ARN instead of namespace ID.
|
3476
|
+
#
|
3477
|
+
# resp = client.update_public_dns_namespace({
|
3478
|
+
# id: "arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-bk3aexample",
|
3479
|
+
# namespace: {
|
3480
|
+
# description: "Updated description for shared public DNS namespace.",
|
3481
|
+
# },
|
3482
|
+
# })
|
3483
|
+
#
|
3484
|
+
# resp.to_h outputs the following:
|
3485
|
+
# {
|
3486
|
+
# operation_id: "ft52xe2koxhoeormaceymagglsdjexample",
|
3487
|
+
# }
|
3488
|
+
#
|
2948
3489
|
# @example Request syntax with placeholder values
|
2949
3490
|
#
|
2950
3491
|
# resp = client.update_public_dns_namespace({
|
@@ -3059,6 +3600,23 @@ module Aws::ServiceDiscovery
|
|
3059
3600
|
# operation_id: "m35hsdrkxwjffm3xef4bxyy6vc3ewakx-jdn3y5g5",
|
3060
3601
|
# }
|
3061
3602
|
#
|
3603
|
+
# @example Example: Update service using service ARN for shared namespace
|
3604
|
+
#
|
3605
|
+
# # This example updates a service using a service ARN instead of service ID. This is useful for updating services
|
3606
|
+
# # associated with shared namespaces.
|
3607
|
+
#
|
3608
|
+
# resp = client.update_service({
|
3609
|
+
# id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-e4anhexample0004",
|
3610
|
+
# service: {
|
3611
|
+
# description: "Updated service description for shared namespace",
|
3612
|
+
# },
|
3613
|
+
# })
|
3614
|
+
#
|
3615
|
+
# resp.to_h outputs the following:
|
3616
|
+
# {
|
3617
|
+
# operation_id: "m35hsdrkxwjffm3xef4bxyy6vc3ewakx-jdn3y5g5",
|
3618
|
+
# }
|
3619
|
+
#
|
3062
3620
|
# @example Request syntax with placeholder values
|
3063
3621
|
#
|
3064
3622
|
# resp = client.update_service({
|
@@ -3123,6 +3681,22 @@ module Aws::ServiceDiscovery
|
|
3123
3681
|
# {
|
3124
3682
|
# }
|
3125
3683
|
#
|
3684
|
+
# @example Example: Update service attributes using service ARN
|
3685
|
+
#
|
3686
|
+
# # Updates service attributes using a service ARN instead of service ID, useful when working with shared namespaces.
|
3687
|
+
#
|
3688
|
+
# resp = client.update_service_attributes({
|
3689
|
+
# attributes: {
|
3690
|
+
# "Port" => "8080",
|
3691
|
+
# "Protocol" => "HTTP",
|
3692
|
+
# },
|
3693
|
+
# service_id: "arn:aws:servicediscovery:us-west-2:123456789012:service/srv-abcd1234xmpl5678",
|
3694
|
+
# })
|
3695
|
+
#
|
3696
|
+
# resp.to_h outputs the following:
|
3697
|
+
# {
|
3698
|
+
# }
|
3699
|
+
#
|
3126
3700
|
# @example Request syntax with placeholder values
|
3127
3701
|
#
|
3128
3702
|
# resp = client.update_service_attributes({
|
@@ -3159,7 +3733,7 @@ module Aws::ServiceDiscovery
|
|
3159
3733
|
tracer: tracer
|
3160
3734
|
)
|
3161
3735
|
context[:gem_name] = 'aws-sdk-servicediscovery'
|
3162
|
-
context[:gem_version] = '1.
|
3736
|
+
context[:gem_version] = '1.90.0'
|
3163
3737
|
Seahorse::Client::Request.new(handlers, context)
|
3164
3738
|
end
|
3165
3739
|
|