Skip to content

Commit

Permalink
feat(client-ssm-sap): This release provides updates to documentation …
Browse files Browse the repository at this point in the history
…and support for listing operations performed by AWS Systems Manager for SAP.
  • Loading branch information
awstools committed Jan 24, 2023
1 parent 0201bae commit dd335a9
Show file tree
Hide file tree
Showing 11 changed files with 575 additions and 145 deletions.
44 changes: 41 additions & 3 deletions clients/client-ssm-sap/src/SsmSap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ import {
ListDatabasesCommandInput,
ListDatabasesCommandOutput,
} from "./commands/ListDatabasesCommand";
import {
ListOperationsCommand,
ListOperationsCommandInput,
ListOperationsCommandOutput,
} from "./commands/ListOperationsCommand";
import {
ListTagsForResourceCommand,
ListTagsForResourceCommandInput,
Expand Down Expand Up @@ -394,6 +399,38 @@ export class SsmSap extends SsmSapClient {
}
}

/**
* <p>Lists the operations performed by AWS Systems Manager for SAP.</p>
*/
public listOperations(
args: ListOperationsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListOperationsCommandOutput>;
public listOperations(
args: ListOperationsCommandInput,
cb: (err: any, data?: ListOperationsCommandOutput) => void
): void;
public listOperations(
args: ListOperationsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListOperationsCommandOutput) => void
): void;
public listOperations(
args: ListOperationsCommandInput,
optionsOrCb?: __HttpHandlerOptions | ((err: any, data?: ListOperationsCommandOutput) => void),
cb?: (err: any, data?: ListOperationsCommandOutput) => void
): Promise<ListOperationsCommandOutput> | void {
const command = new ListOperationsCommand(args);
if (typeof optionsOrCb === "function") {
this.send(command, optionsOrCb);
} else if (typeof cb === "function") {
if (typeof optionsOrCb !== "object") throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
this.send(command, optionsOrCb || {}, cb);
} else {
return this.send(command, optionsOrCb);
}
}

/**
* <p>Lists all tags on an SAP HANA application and/or database registered with AWS Systems
* Manager for SAP.</p>
Expand Down Expand Up @@ -466,8 +503,8 @@ export class SsmSap extends SsmSapClient {
* on Amazon EC2.</p>
* <p>AWS Systems Manager Agent must be setup on an Amazon EC2 instance along with the required
* IAM permissions.</p>
* <p>Amazon EC2 instance(s) must have access to the secrets created in AWS Secrets
* Manager to manage SAP applications and components.</p>
* <p>Amazon EC2 instance(s) must have access to the secrets created in AWS Secrets Manager to
* manage SAP applications and components.</p>
*/
public registerApplication(
args: RegisterApplicationCommandInput,
Expand Down Expand Up @@ -557,7 +594,8 @@ export class SsmSap extends SsmSapClient {
}

/**
* <p/>
* <p>Updates the settings of an application registered with AWS Systems Manager for
* SAP.</p>
*/
public updateApplicationSettings(
args: UpdateApplicationSettingsCommandInput,
Expand Down
3 changes: 3 additions & 0 deletions clients/client-ssm-sap/src/SsmSapClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import {
import { ListApplicationsCommandInput, ListApplicationsCommandOutput } from "./commands/ListApplicationsCommand";
import { ListComponentsCommandInput, ListComponentsCommandOutput } from "./commands/ListComponentsCommand";
import { ListDatabasesCommandInput, ListDatabasesCommandOutput } from "./commands/ListDatabasesCommand";
import { ListOperationsCommandInput, ListOperationsCommandOutput } from "./commands/ListOperationsCommand";
import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
Expand Down Expand Up @@ -105,6 +106,7 @@ export type ServiceInputTypes =
| ListApplicationsCommandInput
| ListComponentsCommandInput
| ListDatabasesCommandInput
| ListOperationsCommandInput
| ListTagsForResourceCommandInput
| PutResourcePermissionCommandInput
| RegisterApplicationCommandInput
Expand All @@ -123,6 +125,7 @@ export type ServiceOutputTypes =
| ListApplicationsCommandOutput
| ListComponentsCommandOutput
| ListDatabasesCommandOutput
| ListOperationsCommandOutput
| ListTagsForResourceCommandOutput
| PutResourcePermissionCommandOutput
| RegisterApplicationCommandOutput
Expand Down
114 changes: 114 additions & 0 deletions clients/client-ssm-sap/src/commands/ListOperationsCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// smithy-typescript generated code
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
import { Command as $Command } from "@aws-sdk/smithy-client";
import {
FinalizeHandlerArguments,
Handler,
HandlerExecutionContext,
HttpHandlerOptions as __HttpHandlerOptions,
MetadataBearer as __MetadataBearer,
MiddlewareStack,
SerdeContext as __SerdeContext,
} from "@aws-sdk/types";

import {
ListOperationsInput,
ListOperationsInputFilterSensitiveLog,
ListOperationsOutput,
ListOperationsOutputFilterSensitiveLog,
} from "../models/models_0";
import {
deserializeAws_restJson1ListOperationsCommand,
serializeAws_restJson1ListOperationsCommand,
} from "../protocols/Aws_restJson1";
import { ServiceInputTypes, ServiceOutputTypes, SsmSapClientResolvedConfig } from "../SsmSapClient";

export interface ListOperationsCommandInput extends ListOperationsInput {}
export interface ListOperationsCommandOutput extends ListOperationsOutput, __MetadataBearer {}

/**
* <p>Lists the operations performed by AWS Systems Manager for SAP.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { SsmSapClient, ListOperationsCommand } from "@aws-sdk/client-ssm-sap"; // ES Modules import
* // const { SsmSapClient, ListOperationsCommand } = require("@aws-sdk/client-ssm-sap"); // CommonJS import
* const client = new SsmSapClient(config);
* const command = new ListOperationsCommand(input);
* const response = await client.send(command);
* ```
*
* @see {@link ListOperationsCommandInput} for command's `input` shape.
* @see {@link ListOperationsCommandOutput} for command's `response` shape.
* @see {@link SsmSapClientResolvedConfig | config} for SsmSapClient's `config` shape.
*
*/
export class ListOperationsCommand extends $Command<
ListOperationsCommandInput,
ListOperationsCommandOutput,
SsmSapClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties

public static getEndpointParameterInstructions(): EndpointParameterInstructions {
return {
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
Endpoint: { type: "builtInParams", name: "endpoint" },
Region: { type: "builtInParams", name: "region" },
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
};
}

constructor(readonly input: ListOperationsCommandInput) {
// Start section: command_constructor
super();
// End section: command_constructor
}

/**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: SsmSapClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<ListOperationsCommandInput, ListOperationsCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
this.middlewareStack.use(
getEndpointPlugin(configuration, ListOperationsCommand.getEndpointParameterInstructions())
);

const stack = clientStack.concat(this.middlewareStack);

const { logger } = configuration;
const clientName = "SsmSapClient";
const commandName = "ListOperationsCommand";
const handlerExecutionContext: HandlerExecutionContext = {
logger,
clientName,
commandName,
inputFilterSensitiveLog: ListOperationsInputFilterSensitiveLog,
outputFilterSensitiveLog: ListOperationsOutputFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
(request: FinalizeHandlerArguments<any>) =>
requestHandler.handle(request.request as __HttpRequest, options || {}),
handlerExecutionContext
);
}

private serialize(input: ListOperationsCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_restJson1ListOperationsCommand(input, context);
}

private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListOperationsCommandOutput> {
return deserializeAws_restJson1ListOperationsCommand(output, context);
}

// Start section: command_body_extra
// End section: command_body_extra
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export interface RegisterApplicationCommandOutput extends RegisterApplicationOut
* on Amazon EC2.</p>
* <p>AWS Systems Manager Agent must be setup on an Amazon EC2 instance along with the required
* IAM permissions.</p>
* <p>Amazon EC2 instance(s) must have access to the secrets created in AWS Secrets
* Manager to manage SAP applications and components.</p>
* <p>Amazon EC2 instance(s) must have access to the secrets created in AWS Secrets Manager to
* manage SAP applications and components.</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 @@ -29,7 +29,8 @@ export interface UpdateApplicationSettingsCommandInput extends UpdateApplication
export interface UpdateApplicationSettingsCommandOutput extends UpdateApplicationSettingsOutput, __MetadataBearer {}

/**
* <p/>
* <p>Updates the settings of an application registered with AWS Systems Manager for
* SAP.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
1 change: 1 addition & 0 deletions clients/client-ssm-sap/src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export * from "./GetResourcePermissionCommand";
export * from "./ListApplicationsCommand";
export * from "./ListComponentsCommand";
export * from "./ListDatabasesCommand";
export * from "./ListOperationsCommand";
export * from "./ListTagsForResourceCommand";
export * from "./PutResourcePermissionCommand";
export * from "./RegisterApplicationCommand";
Expand Down
23 changes: 11 additions & 12 deletions clients/client-ssm-sap/src/endpoint/ruleset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/ssm-sap.json */

const r="fn",
s="argv",
t="ref";
const q="fn",
r="argv",
s="ref";
const a=true,
b=false,
c="String",
Expand All @@ -17,14 +17,13 @@ e="tree",
f="error",
g="endpoint",
h={"required":true,"default":false,"type":"Boolean"},
i={[t]:"Endpoint"},
j={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
k={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
i={[s]:"Endpoint"},
j={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
k={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
l={},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:d},"supportsFIPS"]}]},
n={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:d},"supportsDualStack"]}]},
o=[i],
p=[j],
q=[k];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[r]:"aws.partition",[s]:[{[t]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[r]:"isSet",[s]:o},{[r]:"parseURL",[s]:o,assign:"url"}],type:e,rules:[{conditions:p,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:q,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{endpoint:{url:"https://ssm-sap-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:p,type:e,rules:[{conditions:[m],type:e,rules:[{endpoint:{url:"https://ssm-sap-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:q,type:e,rules:[{conditions:[n],type:e,rules:[{endpoint:{url:"https://ssm-sap.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{endpoint:{url:"https://ssm-sap.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]};
m={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsFIPS"]}]},
n={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:d},"supportsDualStack"]}]},
o=[j],
p=[k];
const _data={version:"1.0",parameters:{Region:{required:a,type:c},UseDualStack:h,UseFIPS:h,Endpoint:{required:b,type:c}},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:d}],type:e,rules:[{conditions:[{[q]:"isSet",[r]:[i]}],type:e,rules:[{conditions:o,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:f},{type:e,rules:[{conditions:p,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:f},{endpoint:{url:i,properties:l,headers:l},type:g}]}]},{conditions:[j,k],type:e,rules:[{conditions:[m,n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://ssm-sap-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:f}]},{conditions:o,type:e,rules:[{conditions:[m],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://ssm-sap-fips.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:f}]},{conditions:p,type:e,rules:[{conditions:[n],type:e,rules:[{type:e,rules:[{endpoint:{url:"https://ssm-sap.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:l,headers:l},type:g}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:f}]},{type:e,rules:[{endpoint:{url:"https://ssm-sap.{Region}.{PartitionResult#dnsSuffix}",properties:l,headers:l},type:g}]}]}]};
export const ruleSet: RuleSetObject = _data;
Loading

0 comments on commit dd335a9

Please sign in to comment.