Skip to content

Commit

Permalink
feat(client-opensearch): You can specify ipv4 or dualstack IPAddressT…
Browse files Browse the repository at this point in the history
…ype for cluster endpoints. If you specify IPAddressType as dualstack, the new endpoint will be visible under the 'EndpointV2' parameter and will support IPv4 and IPv6 requests. Whereas, the 'Endpoint' will continue to serve IPv4 requests.
  • Loading branch information
awstools committed Oct 26, 2023
1 parent f0791f1 commit a9637b1
Show file tree
Hide file tree
Showing 14 changed files with 315 additions and 72 deletions.
3 changes: 3 additions & 0 deletions clients/client-opensearch/src/commands/CreateDomainCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface CreateDomainCommandOutput extends CreateDomainResponse, __Metad
* Throughput: Number("int"),
* },
* AccessPolicies: "STRING_VALUE",
* IPAddressType: "ipv4" || "dualstack",
* SnapshotOptions: { // SnapshotOptions
* AutomatedSnapshotStartHour: Number("int"),
* },
Expand Down Expand Up @@ -178,6 +179,7 @@ export interface CreateDomainCommandOutput extends CreateDomainResponse, __Metad
* // Created: true || false,
* // Deleted: true || false,
* // Endpoint: "STRING_VALUE",
* // EndpointV2: "STRING_VALUE",
* // Endpoints: { // EndpointsMap
* // "<keys>": "STRING_VALUE",
* // },
Expand Down Expand Up @@ -210,6 +212,7 @@ export interface CreateDomainCommandOutput extends CreateDomainResponse, __Metad
* // Throughput: Number("int"),
* // },
* // AccessPolicies: "STRING_VALUE",
* // IPAddressType: "ipv4" || "dualstack",
* // SnapshotOptions: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
Expand Down
2 changes: 2 additions & 0 deletions clients/client-opensearch/src/commands/DeleteDomainCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export interface DeleteDomainCommandOutput extends DeleteDomainResponse, __Metad
* // Created: true || false,
* // Deleted: true || false,
* // Endpoint: "STRING_VALUE",
* // EndpointV2: "STRING_VALUE",
* // Endpoints: { // EndpointsMap
* // "<keys>": "STRING_VALUE",
* // },
Expand Down Expand Up @@ -90,6 +91,7 @@ export interface DeleteDomainCommandOutput extends DeleteDomainResponse, __Metad
* // Throughput: Number("int"),
* // },
* // AccessPolicies: "STRING_VALUE",
* // IPAddressType: "ipv4" || "dualstack",
* // SnapshotOptions: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export interface DescribeDomainCommandOutput extends DescribeDomainResponse, __M
* // Created: true || false,
* // Deleted: true || false,
* // Endpoint: "STRING_VALUE",
* // EndpointV2: "STRING_VALUE",
* // Endpoints: { // EndpointsMap
* // "<keys>": "STRING_VALUE",
* // },
Expand Down Expand Up @@ -90,6 +91,7 @@ export interface DescribeDomainCommandOutput extends DescribeDomainResponse, __M
* // Throughput: Number("int"),
* // },
* // AccessPolicies: "STRING_VALUE",
* // IPAddressType: "ipv4" || "dualstack",
* // SnapshotOptions: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,8 @@ export interface DescribeDomainConfigCommandOutput extends DescribeDomainConfigR
* // PendingDeletion: true || false,
* // },
* // },
* // SnapshotOptions: { // SnapshotOptionsStatus
* // Options: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
* // IPAddressType: { // IPAddressTypeStatus
* // Options: "ipv4" || "dualstack", // required
* // Status: {
* // CreationDate: new Date("TIMESTAMP"), // required
* // UpdateDate: new Date("TIMESTAMP"), // required
Expand All @@ -126,6 +124,12 @@ export interface DescribeDomainConfigCommandOutput extends DescribeDomainConfigR
* // PendingDeletion: true || false,
* // },
* // },
* // SnapshotOptions: { // SnapshotOptionsStatus
* // Options: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
* // Status: "<OptionStatus>", // required
* // },
* // VPCOptions: { // VPCDerivedInfoStatus
* // Options: { // VPCDerivedInfo
* // VPCId: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export interface DescribeDomainsCommandOutput extends DescribeDomainsResponse, _
* // Created: true || false,
* // Deleted: true || false,
* // Endpoint: "STRING_VALUE",
* // EndpointV2: "STRING_VALUE",
* // Endpoints: { // EndpointsMap
* // "<keys>": "STRING_VALUE",
* // },
Expand Down Expand Up @@ -93,6 +94,7 @@ export interface DescribeDomainsCommandOutput extends DescribeDomainsResponse, _
* // Throughput: Number("int"),
* // },
* // AccessPolicies: "STRING_VALUE",
* // IPAddressType: "ipv4" || "dualstack",
* // SnapshotOptions: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export interface DescribeDryRunProgressCommandOutput extends DescribeDryRunProgr
* // Created: true || false,
* // Deleted: true || false,
* // Endpoint: "STRING_VALUE",
* // EndpointV2: "STRING_VALUE",
* // Endpoints: { // EndpointsMap
* // "<keys>": "STRING_VALUE",
* // },
Expand Down Expand Up @@ -104,6 +105,7 @@ export interface DescribeDryRunProgressCommandOutput extends DescribeDryRunProgr
* // Throughput: Number("int"),
* // },
* // AccessPolicies: "STRING_VALUE",
* // IPAddressType: "ipv4" || "dualstack",
* // SnapshotOptions: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface GetDomainMaintenanceStatusCommandOutput extends GetDomainMainte

/**
* @public
* <p>Get the status of the maintenance action.</p>
* <p>The status of the maintenance action.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface ListDomainMaintenancesCommandOutput extends ListDomainMaintenan

/**
* @public
* <p>Get the list of the maintenance action.</p>
* <p>A list of maintenance actions for the domain.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ export interface StartDomainMaintenanceCommandOutput extends StartDomainMaintena

/**
* @public
* <p>Starts the node maintenance (Node restart, Node reboot, Opensearch/Elasticsearch process restart,
* Dashboard/kibana restart) on the data node.</p>
* <p>Starts the node maintenance process on the data node. These processes can include a node reboot, an Opensearch or Elasticsearch process restart,
* or a Dashboard or Kibana restart.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export interface UpdateDomainConfigCommandOutput extends UpdateDomainConfigRespo
* "<keys>": "STRING_VALUE",
* },
* AccessPolicies: "STRING_VALUE",
* IPAddressType: "ipv4" || "dualstack",
* LogPublishingOptions: { // LogPublishingOptions
* "<keys>": { // LogPublishingOption
* CloudWatchLogsLogGroupArn: "STRING_VALUE",
Expand Down Expand Up @@ -236,10 +237,8 @@ export interface UpdateDomainConfigCommandOutput extends UpdateDomainConfigRespo
* // PendingDeletion: true || false,
* // },
* // },
* // SnapshotOptions: { // SnapshotOptionsStatus
* // Options: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
* // IPAddressType: { // IPAddressTypeStatus
* // Options: "ipv4" || "dualstack", // required
* // Status: {
* // CreationDate: new Date("TIMESTAMP"), // required
* // UpdateDate: new Date("TIMESTAMP"), // required
Expand All @@ -248,6 +247,12 @@ export interface UpdateDomainConfigCommandOutput extends UpdateDomainConfigRespo
* // PendingDeletion: true || false,
* // },
* // },
* // SnapshotOptions: { // SnapshotOptionsStatus
* // Options: { // SnapshotOptions
* // AutomatedSnapshotStartHour: Number("int"),
* // },
* // Status: "<OptionStatus>", // required
* // },
* // VPCOptions: { // VPCDerivedInfoStatus
* // Options: { // VPCDerivedInfo
* // VPCId: "STRING_VALUE",
Expand Down
35 changes: 19 additions & 16 deletions clients/client-opensearch/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,30 @@ import { RuleSetObject } from "@smithy/types";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/opensearch.json */

const s="required",
t="fn",
u="argv",
v="ref";
const v="required",
w="fn",
x="argv",
y="ref";
const a=true,
b="isSet",
c="booleanEquals",
d="error",
e="endpoint",
f="tree",
g="PartitionResult",
h={[s]:false,"type":"String"},
i={[s]:true,"default":false,"type":"Boolean"},
j={[v]:"Endpoint"},
k={[t]:c,[u]:[{[v]:"UseFIPS"},true]},
l={[t]:c,[u]:[{[v]:"UseDualStack"},true]},
m={},
n={[t]:"getAttr",[u]:[{[v]:g},"supportsFIPS"]},
o={[t]:c,[u]:[true,{[t]:"getAttr",[u]:[{[v]:g},"supportsDualStack"]}]},
p=[k],
q=[l],
r=[{[v]:"Region"}];
const _data={version:"1.0",parameters:{Region:h,UseDualStack:i,UseFIPS:i,Endpoint:h},rules:[{conditions:[{[t]:b,[u]:[j]}],rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:j,properties:m,headers:m},type:e}],type:f},{conditions:[{[t]:b,[u]:r}],rules:[{conditions:[{[t]:"aws.partition",[u]:r,assign:g}],rules:[{conditions:[k,l],rules:[{conditions:[{[t]:c,[u]:[a,n]},o],rules:[{endpoint:{url:"https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:p,rules:[{conditions:[{[t]:c,[u]:[n,a]}],rules:[{endpoint:{url:"https://es-fips.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:q,rules:[{conditions:[o],rules:[{endpoint:{url:"https://es.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:m,headers:m},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://es.{Region}.{PartitionResult#dnsSuffix}",properties:m,headers:m},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
h="stringEquals",
i={[v]:false,"type":"String"},
j={[v]:true,"default":false,"type":"Boolean"},
k={[y]:"Endpoint"},
l={[w]:c,[x]:[{[y]:"UseFIPS"},true]},
m={[w]:c,[x]:[{[y]:"UseDualStack"},true]},
n={},
o={[w]:"getAttr",[x]:[{[y]:g},"supportsFIPS"]},
p={[w]:c,[x]:[true,{[w]:"getAttr",[x]:[{[y]:g},"supportsDualStack"]}]},
q={[w]:"getAttr",[x]:[{[y]:g},"name"]},
r={"url":"https://aos.{Region}.api.aws","properties":{},"headers":{}},
s=[l],
t=[m],
u=[{[y]:"Region"}];
const _data={version:"1.0",parameters:{Region:i,UseDualStack:j,UseFIPS:j,Endpoint:i},rules:[{conditions:[{[w]:b,[x]:[k]}],rules:[{conditions:s,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:d},{conditions:t,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:d},{endpoint:{url:k,properties:n,headers:n},type:e}],type:f},{conditions:[{[w]:b,[x]:u}],rules:[{conditions:[{[w]:"aws.partition",[x]:u,assign:g}],rules:[{conditions:[l,m],rules:[{conditions:[{[w]:c,[x]:[a,o]},p],rules:[{endpoint:{url:"https://es-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:d}],type:f},{conditions:s,rules:[{conditions:[{[w]:c,[x]:[o,a]}],rules:[{endpoint:{url:"https://es-fips.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"FIPS is enabled but this partition does not support FIPS",type:d}],type:f},{conditions:t,rules:[{conditions:[p],rules:[{conditions:[{[w]:h,[x]:["aws",q]}],endpoint:r,type:e},{conditions:[{[w]:h,[x]:["aws-cn",q]}],endpoint:{url:"https://aos.{Region}.api.amazonwebservices.com.cn",properties:n,headers:n},type:e},{conditions:[{[w]:h,[x]:["aws-us-gov",q]}],endpoint:r,type:e},{endpoint:{url:"https://es.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:n,headers:n},type:e}],type:f},{error:"DualStack is enabled but this partition does not support DualStack",type:d}],type:f},{endpoint:{url:"https://es.{Region}.{PartitionResult#dnsSuffix}",properties:n,headers:n},type:e}],type:f}],type:f},{error:"Invalid Configuration: Missing Region",type:d}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit a9637b1

Please sign in to comment.