From e6a4a1e28f1685b62cbb47c9f15229fe7b740b7f Mon Sep 17 00:00:00 2001 From: George Fu Date: Tue, 23 Jan 2024 10:37:16 -0500 Subject: [PATCH] docs: fix example generation for empty inputs (#5710) --- .../src/commands/DescribeAccountLimitsCommand.ts | 2 +- .../src/commands/DescribeAdjustmentTypesCommand.ts | 2 +- .../DescribeAutoScalingNotificationTypesCommand.ts | 2 +- .../src/commands/DescribeLifecycleHookTypesCommand.ts | 2 +- .../src/commands/DescribeMetricCollectionTypesCommand.ts | 2 +- .../src/commands/DescribeScalingProcessTypesCommand.ts | 2 +- .../src/commands/DescribeTerminationPolicyTypesCommand.ts | 2 +- clients/client-ec2/src/commands/AllocateAddressCommand.ts | 2 +- .../src/commands/CreateInternetGatewayCommand.ts | 2 +- .../src/commands/DeleteSpotDatafeedSubscriptionCommand.ts | 2 +- .../src/commands/DescribeAccountAttributesCommand.ts | 2 +- .../client-ec2/src/commands/DescribeAddressesCommand.ts | 2 +- .../src/commands/DescribeAvailabilityZonesCommand.ts | 2 +- .../src/commands/DescribeMovingAddressesCommand.ts | 2 +- clients/client-ec2/src/commands/DescribeRegionsCommand.ts | 2 +- .../commands/DescribeSpotDatafeedSubscriptionCommand.ts | 2 +- clients/client-ec2/src/models/models_2.ts | 1 - clients/client-ec2/src/models/models_3.ts | 2 -- clients/client-ec2/src/models/models_4.ts | 3 --- clients/client-ec2/src/models/models_5.ts | 4 ---- clients/client-ec2/src/models/models_6.ts | 5 ----- clients/client-ec2/src/models/models_7.ts | 5 ----- .../src/commands/CreateStorageLocationCommand.ts | 2 +- .../src/commands/ListAvailableSolutionStacksCommand.ts | 2 +- .../src/commands/DeleteAccountPasswordPolicyCommand.ts | 2 +- .../src/commands/GetAccountPasswordPolicyCommand.ts | 2 +- .../client-iam/src/commands/GetAccountSummaryCommand.ts | 2 +- .../src/commands/DescribeCrossAccountAccessRoleCommand.ts | 2 +- clients/client-kms/src/commands/ListAliasesCommand.ts | 2 +- clients/client-kms/src/commands/ListKeysCommand.ts | 2 +- .../src/commands/DescribeOrganizationCommand.ts | 2 +- .../src/commands/LeaveOrganizationCommand.ts | 2 +- .../src/commands/ListHandshakesForAccountCommand.ts | 2 +- .../src/commands/ListHandshakesForOrganizationCommand.ts | 2 +- clients/client-s3/src/commands/ListBucketsCommand.ts | 2 +- .../src/commands/DisableSecurityHubCommand.ts | 2 +- .../DisassociateFromAdministratorAccountCommand.ts | 2 +- .../src/commands/GetAdministratorAccountCommand.ts | 2 +- .../src/commands/GetInvitationsCountCommand.ts | 2 +- .../src/commands/ListEnabledProductsForImportCommand.ts | 2 +- .../src/commands/ListInvitationsCommand.ts | 2 +- .../client-securityhub/src/commands/ListMembersCommand.ts | 2 +- .../src/commands/ListOrganizationAdminAccountsCommand.ts | 2 +- .../src/commands/GetAccountSendingEnabledCommand.ts | 2 +- clients/client-ses/src/commands/GetSendQuotaCommand.ts | 2 +- .../client-ses/src/commands/GetSendStatisticsCommand.ts | 2 +- .../client-ses/src/commands/ListReceiptFiltersCommand.ts | 2 +- .../src/commands/ListVerifiedEmailAddressesCommand.ts | 2 +- scripts/api-examples/merge-examples.js | 7 ++++--- 49 files changed, 46 insertions(+), 65 deletions(-) diff --git a/clients/client-auto-scaling/src/commands/DescribeAccountLimitsCommand.ts b/clients/client-auto-scaling/src/commands/DescribeAccountLimitsCommand.ts index 36b53a6c7f9d..e65a4455dc0c 100644 --- a/clients/client-auto-scaling/src/commands/DescribeAccountLimitsCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeAccountLimitsCommand.ts @@ -67,7 +67,7 @@ export interface DescribeAccountLimitsCommandOutput extends DescribeAccountLimit * @example To describe your Auto Scaling account limits * ```javascript * // This example describes the Amazon EC2 Auto Scaling service quotas for your account. - * const input = undefined; + * const input = {}; * const command = new DescribeAccountLimitsCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-auto-scaling/src/commands/DescribeAdjustmentTypesCommand.ts b/clients/client-auto-scaling/src/commands/DescribeAdjustmentTypesCommand.ts index 7b2cf0d4014f..3fe4339cd887 100644 --- a/clients/client-auto-scaling/src/commands/DescribeAdjustmentTypesCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeAdjustmentTypesCommand.ts @@ -83,7 +83,7 @@ export interface DescribeAdjustmentTypesCommandOutput extends DescribeAdjustment * @example To describe the Amazon EC2 Auto Scaling adjustment types * ```javascript * // This example describes the available adjustment types. - * const input = undefined; + * const input = {}; * const command = new DescribeAdjustmentTypesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-auto-scaling/src/commands/DescribeAutoScalingNotificationTypesCommand.ts b/clients/client-auto-scaling/src/commands/DescribeAutoScalingNotificationTypesCommand.ts index aef45165f0cd..24e3c0190246 100644 --- a/clients/client-auto-scaling/src/commands/DescribeAutoScalingNotificationTypesCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeAutoScalingNotificationTypesCommand.ts @@ -67,7 +67,7 @@ export interface DescribeAutoScalingNotificationTypesCommandOutput * @example To describe the Auto Scaling notification types * ```javascript * // This example describes the available notification types. - * const input = undefined; + * const input = {}; * const command = new DescribeAutoScalingNotificationTypesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-auto-scaling/src/commands/DescribeLifecycleHookTypesCommand.ts b/clients/client-auto-scaling/src/commands/DescribeLifecycleHookTypesCommand.ts index 6e1044a62f00..4599985036de 100644 --- a/clients/client-auto-scaling/src/commands/DescribeLifecycleHookTypesCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeLifecycleHookTypesCommand.ts @@ -75,7 +75,7 @@ export interface DescribeLifecycleHookTypesCommandOutput extends DescribeLifecyc * @example To describe the available types of lifecycle hooks * ```javascript * // This example describes the available lifecycle hook types. - * const input = undefined; + * const input = {}; * const command = new DescribeLifecycleHookTypesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-auto-scaling/src/commands/DescribeMetricCollectionTypesCommand.ts b/clients/client-auto-scaling/src/commands/DescribeMetricCollectionTypesCommand.ts index 2ee3087575a2..0c028cfe1c98 100644 --- a/clients/client-auto-scaling/src/commands/DescribeMetricCollectionTypesCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeMetricCollectionTypesCommand.ts @@ -74,7 +74,7 @@ export interface DescribeMetricCollectionTypesCommandOutput * @example To describe the Auto Scaling metric collection types * ```javascript * // This example describes the available metric collection types. - * const input = undefined; + * const input = {}; * const command = new DescribeMetricCollectionTypesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-auto-scaling/src/commands/DescribeScalingProcessTypesCommand.ts b/clients/client-auto-scaling/src/commands/DescribeScalingProcessTypesCommand.ts index 17baea078e99..a61478cfe7b4 100644 --- a/clients/client-auto-scaling/src/commands/DescribeScalingProcessTypesCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeScalingProcessTypesCommand.ts @@ -65,7 +65,7 @@ export interface DescribeScalingProcessTypesCommandOutput extends ProcessesType, * @example To describe the Auto Scaling process types * ```javascript * // This example describes the Auto Scaling process types. - * const input = undefined; + * const input = {}; * const command = new DescribeScalingProcessTypesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-auto-scaling/src/commands/DescribeTerminationPolicyTypesCommand.ts b/clients/client-auto-scaling/src/commands/DescribeTerminationPolicyTypesCommand.ts index 8563c343a648..498a5c906b33 100644 --- a/clients/client-auto-scaling/src/commands/DescribeTerminationPolicyTypesCommand.ts +++ b/clients/client-auto-scaling/src/commands/DescribeTerminationPolicyTypesCommand.ts @@ -70,7 +70,7 @@ export interface DescribeTerminationPolicyTypesCommandOutput * @example To describe termination policy types * ```javascript * // This example describes the available termination policy types. - * const input = undefined; + * const input = {}; * const command = new DescribeTerminationPolicyTypesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/commands/AllocateAddressCommand.ts b/clients/client-ec2/src/commands/AllocateAddressCommand.ts index e35fc03d37d5..1b6203233872 100644 --- a/clients/client-ec2/src/commands/AllocateAddressCommand.ts +++ b/clients/client-ec2/src/commands/AllocateAddressCommand.ts @@ -92,7 +92,7 @@ export interface AllocateAddressCommandOutput extends AllocateAddressResult, __M * @example To allocate an Elastic IP address * ```javascript * // This example allocates an Elastic IP address. - * const input = undefined; + * const input = {}; * const command = new AllocateAddressCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/commands/CreateInternetGatewayCommand.ts b/clients/client-ec2/src/commands/CreateInternetGatewayCommand.ts index 59b778edffb9..e9bf45d61770 100644 --- a/clients/client-ec2/src/commands/CreateInternetGatewayCommand.ts +++ b/clients/client-ec2/src/commands/CreateInternetGatewayCommand.ts @@ -87,7 +87,7 @@ export interface CreateInternetGatewayCommandOutput extends CreateInternetGatewa * @example To create an Internet gateway * ```javascript * // This example creates an Internet gateway. - * const input = undefined; + * const input = {}; * const command = new CreateInternetGatewayCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/commands/DeleteSpotDatafeedSubscriptionCommand.ts b/clients/client-ec2/src/commands/DeleteSpotDatafeedSubscriptionCommand.ts index bd4d240cce05..5f197ff42aa7 100644 --- a/clients/client-ec2/src/commands/DeleteSpotDatafeedSubscriptionCommand.ts +++ b/clients/client-ec2/src/commands/DeleteSpotDatafeedSubscriptionCommand.ts @@ -59,7 +59,7 @@ export interface DeleteSpotDatafeedSubscriptionCommandOutput extends __MetadataB * @example To cancel a Spot Instance data feed subscription * ```javascript * // This example deletes a Spot data feed subscription for the account. - * const input = undefined; + * const input = {}; * const command = new DeleteSpotDatafeedSubscriptionCommand(input); * await client.send(command); * // example id: ec2-delete-spot-datafeed-subscription-1 diff --git a/clients/client-ec2/src/commands/DescribeAccountAttributesCommand.ts b/clients/client-ec2/src/commands/DescribeAccountAttributesCommand.ts index 337c16a178cc..b49cdf5de8ec 100644 --- a/clients/client-ec2/src/commands/DescribeAccountAttributesCommand.ts +++ b/clients/client-ec2/src/commands/DescribeAccountAttributesCommand.ts @@ -130,7 +130,7 @@ export interface DescribeAccountAttributesCommandOutput extends DescribeAccountA * @example To describe all attributes for your AWS account * ```javascript * // This example describes the attributes for your AWS account. - * const input = undefined; + * const input = {}; * const command = new DescribeAccountAttributesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/commands/DescribeAddressesCommand.ts b/clients/client-ec2/src/commands/DescribeAddressesCommand.ts index 9bd65b77c841..5651c7c35708 100644 --- a/clients/client-ec2/src/commands/DescribeAddressesCommand.ts +++ b/clients/client-ec2/src/commands/DescribeAddressesCommand.ts @@ -94,7 +94,7 @@ export interface DescribeAddressesCommandOutput extends DescribeAddressesResult, * @example To describe your Elastic IP addresses * ```javascript * // This example describes your Elastic IP addresses. - * const input = undefined; + * const input = {}; * const command = new DescribeAddressesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/commands/DescribeAvailabilityZonesCommand.ts b/clients/client-ec2/src/commands/DescribeAvailabilityZonesCommand.ts index 8496166ee088..10c31b20933c 100644 --- a/clients/client-ec2/src/commands/DescribeAvailabilityZonesCommand.ts +++ b/clients/client-ec2/src/commands/DescribeAvailabilityZonesCommand.ts @@ -96,7 +96,7 @@ export interface DescribeAvailabilityZonesCommandOutput extends DescribeAvailabi * @example To describe your Availability Zones * ```javascript * // This example describes the Availability Zones that are available to you. The response includes Availability Zones only for the current region. - * const input = undefined; + * const input = {}; * const command = new DescribeAvailabilityZonesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/commands/DescribeMovingAddressesCommand.ts b/clients/client-ec2/src/commands/DescribeMovingAddressesCommand.ts index e74037e4980d..c74520419972 100644 --- a/clients/client-ec2/src/commands/DescribeMovingAddressesCommand.ts +++ b/clients/client-ec2/src/commands/DescribeMovingAddressesCommand.ts @@ -81,7 +81,7 @@ export interface DescribeMovingAddressesCommandOutput extends DescribeMovingAddr * @example To describe your moving addresses * ```javascript * // This example describes all of your moving Elastic IP addresses. - * const input = undefined; + * const input = {}; * const command = new DescribeMovingAddressesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/commands/DescribeRegionsCommand.ts b/clients/client-ec2/src/commands/DescribeRegionsCommand.ts index ef32cd95315e..5abc25167c35 100644 --- a/clients/client-ec2/src/commands/DescribeRegionsCommand.ts +++ b/clients/client-ec2/src/commands/DescribeRegionsCommand.ts @@ -79,7 +79,7 @@ export interface DescribeRegionsCommandOutput extends DescribeRegionsResult, __M * @example To describe your regions * ```javascript * // This example describes all the regions that are available to you. - * const input = undefined; + * const input = {}; * const command = new DescribeRegionsCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/commands/DescribeSpotDatafeedSubscriptionCommand.ts b/clients/client-ec2/src/commands/DescribeSpotDatafeedSubscriptionCommand.ts index fafb501faf7b..39d4d1b8919b 100644 --- a/clients/client-ec2/src/commands/DescribeSpotDatafeedSubscriptionCommand.ts +++ b/clients/client-ec2/src/commands/DescribeSpotDatafeedSubscriptionCommand.ts @@ -73,7 +73,7 @@ export interface DescribeSpotDatafeedSubscriptionCommandOutput * @example To describe the datafeed for your AWS account * ```javascript * // This example describes the Spot Instance datafeed subscription for your AWS account. - * const input = undefined; + * const input = {}; * const command = new DescribeSpotDatafeedSubscriptionCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ec2/src/models/models_2.ts b/clients/client-ec2/src/models/models_2.ts index ce782618b590..ff1668bcb107 100644 --- a/clients/client-ec2/src/models/models_2.ts +++ b/clients/client-ec2/src/models/models_2.ts @@ -30,7 +30,6 @@ import { VpcAttachment, VpcPeeringConnection, } from "./models_0"; - import { CarrierGateway, ClientVpnEndpointStatus, diff --git a/clients/client-ec2/src/models/models_3.ts b/clients/client-ec2/src/models/models_3.ts index 19d31170fdb1..34d343b4f0fa 100644 --- a/clients/client-ec2/src/models/models_3.ts +++ b/clients/client-ec2/src/models/models_3.ts @@ -36,7 +36,6 @@ import { VerifiedAccessTrustProvider, VerifiedAccessTrustProviderFilterSensitiveLog, } from "./models_0"; - import { AttributeValue, BlockDeviceMapping, @@ -71,7 +70,6 @@ import { TrafficType, TransportProtocol, } from "./models_1"; - import { FleetStateCode, SubnetCidrReservation, diff --git a/clients/client-ec2/src/models/models_4.ts b/clients/client-ec2/src/models/models_4.ts index 2acb81700cad..48d41d0bd683 100644 --- a/clients/client-ec2/src/models/models_4.ts +++ b/clients/client-ec2/src/models/models_4.ts @@ -24,7 +24,6 @@ import { TagSpecification, UserIdGroupPair, } from "./models_0"; - import { AmdSevSnpSpecification, AttributeValue, @@ -69,7 +68,6 @@ import { TargetCapacityUnitType, Tenancy, } from "./models_1"; - import { NetworkInterface, NetworkInterfacePermission, @@ -83,7 +81,6 @@ import { SpotInstanceStateFault, StorageTier, } from "./models_2"; - import { ArchitectureValues, BootModeValues, diff --git a/clients/client-ec2/src/models/models_5.ts b/clients/client-ec2/src/models/models_5.ts index 715f92e42137..40f5ea04c75f 100644 --- a/clients/client-ec2/src/models/models_5.ts +++ b/clients/client-ec2/src/models/models_5.ts @@ -31,9 +31,7 @@ import { VpcIpv6CidrBlockAssociation, VpcPeeringConnection, } from "./models_0"; - import { DiskImageFormat, InstanceRequirementsRequest, IpamResourceTag, Subnet, VolumeType, Vpc } from "./models_1"; - import { ConnectionNotification, DnsEntry, @@ -63,7 +61,6 @@ import { VpnConnectionFilterSensitiveLog, VpnGateway, } from "./models_2"; - import { ExportTaskS3Location, FastLaunchLaunchTemplateSpecificationResponse, @@ -79,7 +76,6 @@ import { StatisticType, VirtualizationType, } from "./models_3"; - import { ArchitectureType, AttributeBooleanValue } from "./models_4"; /** diff --git a/clients/client-ec2/src/models/models_6.ts b/clients/client-ec2/src/models/models_6.ts index f30a7ff09bed..3a895fe1b584 100644 --- a/clients/client-ec2/src/models/models_6.ts +++ b/clients/client-ec2/src/models/models_6.ts @@ -37,7 +37,6 @@ import { VerifiedAccessTrustProvider, VerifiedAccessTrustProviderFilterSensitiveLog, } from "./models_0"; - import { AttributeValue, BlockDeviceMapping, @@ -74,7 +73,6 @@ import { TargetCapacityUnitType, VolumeType, } from "./models_1"; - import { AutoAcceptSharedAttachmentsValue, DefaultRouteTableAssociationValue, @@ -109,7 +107,6 @@ import { VpnEcmpSupportValue, VpnTunnelLogOptionsSpecification, } from "./models_2"; - import { ArchitectureValues, BootModeValues, @@ -130,7 +127,6 @@ import { TpmSupportValues, VirtualizationType, } from "./models_3"; - import { AnalysisStatus, ArchitectureType, @@ -155,7 +151,6 @@ import { SnapshotTaskDetail, SnapshotTaskDetailFilterSensitiveLog, } from "./models_4"; - import { InstanceFamilyCreditSpecification, IpamComplianceStatus, diff --git a/clients/client-ec2/src/models/models_7.ts b/clients/client-ec2/src/models/models_7.ts index 57e723e9753e..aeb9b98dc86c 100644 --- a/clients/client-ec2/src/models/models_7.ts +++ b/clients/client-ec2/src/models/models_7.ts @@ -20,7 +20,6 @@ import { TransitGatewayVpcAttachment, UnsuccessfulItem, } from "./models_0"; - import { AmdSevSnpSpecification, BlockDeviceMapping, @@ -38,11 +37,8 @@ import { ShutdownBehavior, SpotInstanceType, } from "./models_1"; - import { SnapshotState, SSEType, TransitGatewayRoute } from "./models_2"; - import { ClientVpnConnectionStatus, Filter } from "./models_3"; - import { HttpTokensState, InstanceAttributeName, @@ -62,7 +58,6 @@ import { SpotInstanceRequestFilterSensitiveLog, SpotPlacement, } from "./models_4"; - import { CapacityReservationSpecification, InstanceMonitoring, diff --git a/clients/client-elastic-beanstalk/src/commands/CreateStorageLocationCommand.ts b/clients/client-elastic-beanstalk/src/commands/CreateStorageLocationCommand.ts index cf80df8fa4f0..b9c158325903 100644 --- a/clients/client-elastic-beanstalk/src/commands/CreateStorageLocationCommand.ts +++ b/clients/client-elastic-beanstalk/src/commands/CreateStorageLocationCommand.ts @@ -70,7 +70,7 @@ export interface CreateStorageLocationCommandOutput extends CreateStorageLocatio * @example To create a new environment for an application * ```javascript * // The following operation creates a new environment for version v1 of a java application named my-app: - * const input = undefined; + * const input = {}; * const command = new CreateStorageLocationCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-elastic-beanstalk/src/commands/ListAvailableSolutionStacksCommand.ts b/clients/client-elastic-beanstalk/src/commands/ListAvailableSolutionStacksCommand.ts index 9fde85209ca0..6d8e0c94ec35 100644 --- a/clients/client-elastic-beanstalk/src/commands/ListAvailableSolutionStacksCommand.ts +++ b/clients/client-elastic-beanstalk/src/commands/ListAvailableSolutionStacksCommand.ts @@ -69,7 +69,7 @@ export interface ListAvailableSolutionStacksCommandOutput * @example To view solution stacks * ```javascript * // The following operation lists solution stacks for all currently available platform configurations and any that you have used in the past: - * const input = undefined; + * const input = {}; * const command = new ListAvailableSolutionStacksCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-iam/src/commands/DeleteAccountPasswordPolicyCommand.ts b/clients/client-iam/src/commands/DeleteAccountPasswordPolicyCommand.ts index 3e66337efab4..a22b08af22a5 100644 --- a/clients/client-iam/src/commands/DeleteAccountPasswordPolicyCommand.ts +++ b/clients/client-iam/src/commands/DeleteAccountPasswordPolicyCommand.ts @@ -65,7 +65,7 @@ export interface DeleteAccountPasswordPolicyCommandOutput extends __MetadataBear * @example To delete the current account password policy * ```javascript * // The following command removes the password policy from the current AWS account: - * const input = undefined; + * const input = {}; * const command = new DeleteAccountPasswordPolicyCommand(input); * await client.send(command); * // example id: 9ddf755e-495c-49bc-ae3b-ea6cc9b8ebcf diff --git a/clients/client-iam/src/commands/GetAccountPasswordPolicyCommand.ts b/clients/client-iam/src/commands/GetAccountPasswordPolicyCommand.ts index ee23100df391..582b6c5dbd14 100644 --- a/clients/client-iam/src/commands/GetAccountPasswordPolicyCommand.ts +++ b/clients/client-iam/src/commands/GetAccountPasswordPolicyCommand.ts @@ -78,7 +78,7 @@ export interface GetAccountPasswordPolicyCommandOutput extends GetAccountPasswor * @example To see the current account password policy * ```javascript * // The following command displays details about the password policy for the current AWS account. - * const input = undefined; + * const input = {}; * const command = new GetAccountPasswordPolicyCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-iam/src/commands/GetAccountSummaryCommand.ts b/clients/client-iam/src/commands/GetAccountSummaryCommand.ts index b04d1c9500df..26ab68fe0531 100644 --- a/clients/client-iam/src/commands/GetAccountSummaryCommand.ts +++ b/clients/client-iam/src/commands/GetAccountSummaryCommand.ts @@ -65,7 +65,7 @@ export interface GetAccountSummaryCommandOutput extends GetAccountSummaryRespons * @example To get information about IAM entity quotas and usage in the current account * ```javascript * // The following command returns information about the IAM entity quotas and usage in the current AWS account. - * const input = undefined; + * const input = {}; * const command = new GetAccountSummaryCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-inspector/src/commands/DescribeCrossAccountAccessRoleCommand.ts b/clients/client-inspector/src/commands/DescribeCrossAccountAccessRoleCommand.ts index c0c2d650fb85..902c479ad301 100644 --- a/clients/client-inspector/src/commands/DescribeCrossAccountAccessRoleCommand.ts +++ b/clients/client-inspector/src/commands/DescribeCrossAccountAccessRoleCommand.ts @@ -67,7 +67,7 @@ export interface DescribeCrossAccountAccessRoleCommandOutput * @example Describte cross account access role * ```javascript * // Describes the IAM role that enables Amazon Inspector to access your AWS account. - * const input = undefined; + * const input = {}; * const command = new DescribeCrossAccountAccessRoleCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-kms/src/commands/ListAliasesCommand.ts b/clients/client-kms/src/commands/ListAliasesCommand.ts index 82cd54dfeb6e..789ddc9f9c8a 100644 --- a/clients/client-kms/src/commands/ListAliasesCommand.ts +++ b/clients/client-kms/src/commands/ListAliasesCommand.ts @@ -133,7 +133,7 @@ export interface ListAliasesCommandOutput extends ListAliasesResponse, __Metadat * @example To list aliases * ```javascript * // The following example lists aliases. - * const input = undefined; + * const input = {}; * const command = new ListAliasesCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-kms/src/commands/ListKeysCommand.ts b/clients/client-kms/src/commands/ListKeysCommand.ts index 1dbdd23901f0..65dcd4664dec 100644 --- a/clients/client-kms/src/commands/ListKeysCommand.ts +++ b/clients/client-kms/src/commands/ListKeysCommand.ts @@ -110,7 +110,7 @@ export interface ListKeysCommandOutput extends ListKeysResponse, __MetadataBeare * @example To list KMS keys * ```javascript * // The following example lists KMS keys. - * const input = undefined; + * const input = {}; * const command = new ListKeysCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-organizations/src/commands/DescribeOrganizationCommand.ts b/clients/client-organizations/src/commands/DescribeOrganizationCommand.ts index 4e815dfdc581..a21d37701511 100644 --- a/clients/client-organizations/src/commands/DescribeOrganizationCommand.ts +++ b/clients/client-organizations/src/commands/DescribeOrganizationCommand.ts @@ -100,7 +100,7 @@ export interface DescribeOrganizationCommandOutput extends DescribeOrganizationR * @example To get information about an organization * ```javascript * // The following example shows how to request information about the current user's organization:/n/n - * const input = undefined; + * const input = {}; * const command = new DescribeOrganizationCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-organizations/src/commands/LeaveOrganizationCommand.ts b/clients/client-organizations/src/commands/LeaveOrganizationCommand.ts index 743bd22c9359..d1568666b161 100644 --- a/clients/client-organizations/src/commands/LeaveOrganizationCommand.ts +++ b/clients/client-organizations/src/commands/LeaveOrganizationCommand.ts @@ -455,7 +455,7 @@ export interface LeaveOrganizationCommandOutput extends __MetadataBearer {} * @example To leave an organization as a member account * ```javascript * // TThe following example shows how to remove your member account from an organization: - * const input = undefined; + * const input = {}; * const command = new LeaveOrganizationCommand(input); * await client.send(command); * // example id: to-leave-an-organization-as-a-member-account-1472508784736 diff --git a/clients/client-organizations/src/commands/ListHandshakesForAccountCommand.ts b/clients/client-organizations/src/commands/ListHandshakesForAccountCommand.ts index 3c550504975d..e5b413321872 100644 --- a/clients/client-organizations/src/commands/ListHandshakesForAccountCommand.ts +++ b/clients/client-organizations/src/commands/ListHandshakesForAccountCommand.ts @@ -234,7 +234,7 @@ export interface ListHandshakesForAccountCommandOutput extends ListHandshakesFor * @example To retrieve a list of the handshakes sent to an account * ```javascript * // The following example shows you how to get a list of handshakes that are associated with the account of the credentials used to call the operation: - * const input = undefined; + * const input = {}; * const command = new ListHandshakesForAccountCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-organizations/src/commands/ListHandshakesForOrganizationCommand.ts b/clients/client-organizations/src/commands/ListHandshakesForOrganizationCommand.ts index 4514d5a233f8..c2a4d5cf8c62 100644 --- a/clients/client-organizations/src/commands/ListHandshakesForOrganizationCommand.ts +++ b/clients/client-organizations/src/commands/ListHandshakesForOrganizationCommand.ts @@ -246,7 +246,7 @@ export interface ListHandshakesForOrganizationCommandOutput * @example To retrieve a list of the handshakes associated with an organization * ```javascript * // The following example shows you how to get a list of handshakes associated with the current organization: - * const input = undefined; + * const input = {}; * const command = new ListHandshakesForOrganizationCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-s3/src/commands/ListBucketsCommand.ts b/clients/client-s3/src/commands/ListBucketsCommand.ts index 0491e014957a..3f4be32cda02 100644 --- a/clients/client-s3/src/commands/ListBucketsCommand.ts +++ b/clients/client-s3/src/commands/ListBucketsCommand.ts @@ -71,7 +71,7 @@ export interface ListBucketsCommandOutput extends ListBucketsOutput, __MetadataB * @example To list all buckets * ```javascript * // The following example returns all the buckets owned by the sender of this request. - * const input = undefined; + * const input = {}; * const command = new ListBucketsCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-securityhub/src/commands/DisableSecurityHubCommand.ts b/clients/client-securityhub/src/commands/DisableSecurityHubCommand.ts index 96b3b13b7a40..6a8ba4afafee 100644 --- a/clients/client-securityhub/src/commands/DisableSecurityHubCommand.ts +++ b/clients/client-securityhub/src/commands/DisableSecurityHubCommand.ts @@ -77,7 +77,7 @@ export interface DisableSecurityHubCommandOutput extends DisableSecurityHubRespo * @example To deactivate Security Hub * ```javascript * // The following example deactivates Security Hub for the current account and Region. - * const input = undefined; + * const input = {}; * const command = new DisableSecurityHubCommand(input); * await client.send(command); * // example id: to-deactivate-security-hub-1676583894245 diff --git a/clients/client-securityhub/src/commands/DisassociateFromAdministratorAccountCommand.ts b/clients/client-securityhub/src/commands/DisassociateFromAdministratorAccountCommand.ts index df69a4d65bb6..d047832a8a75 100644 --- a/clients/client-securityhub/src/commands/DisassociateFromAdministratorAccountCommand.ts +++ b/clients/client-securityhub/src/commands/DisassociateFromAdministratorAccountCommand.ts @@ -83,7 +83,7 @@ export interface DisassociateFromAdministratorAccountCommandOutput * @example To disassociate requesting account from administrator account * ```javascript * // The following example dissociates the requesting account from its associated administrator account. - * const input = undefined; + * const input = {}; * const command = new DisassociateFromAdministratorAccountCommand(input); * await client.send(command); * // example id: to-disassociate-requesting-account-from-administrator-account-1676584168509 diff --git a/clients/client-securityhub/src/commands/GetAdministratorAccountCommand.ts b/clients/client-securityhub/src/commands/GetAdministratorAccountCommand.ts index 0c722e35e96c..a9fcdb768a5a 100644 --- a/clients/client-securityhub/src/commands/GetAdministratorAccountCommand.ts +++ b/clients/client-securityhub/src/commands/GetAdministratorAccountCommand.ts @@ -80,7 +80,7 @@ export interface GetAdministratorAccountCommandOutput extends GetAdministratorAc * @example To get details about the Security Hub administrator account * ```javascript * // The following example provides details about the Security Hub administrator account for the requesting member account. - * const input = undefined; + * const input = {}; * const command = new GetAdministratorAccountCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-securityhub/src/commands/GetInvitationsCountCommand.ts b/clients/client-securityhub/src/commands/GetInvitationsCountCommand.ts index 4ff32aeb38b9..ffbd0bdf4c0f 100644 --- a/clients/client-securityhub/src/commands/GetInvitationsCountCommand.ts +++ b/clients/client-securityhub/src/commands/GetInvitationsCountCommand.ts @@ -73,7 +73,7 @@ export interface GetInvitationsCountCommandOutput extends GetInvitationsCountRes * // The following example returns a count of invitations that the Security Hub administrator sent to the current member account, not including the currently accepted invitation. * // * // - * const input = undefined; + * const input = {}; * const command = new GetInvitationsCountCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-securityhub/src/commands/ListEnabledProductsForImportCommand.ts b/clients/client-securityhub/src/commands/ListEnabledProductsForImportCommand.ts index f90c398f109a..e39e6302e450 100644 --- a/clients/client-securityhub/src/commands/ListEnabledProductsForImportCommand.ts +++ b/clients/client-securityhub/src/commands/ListEnabledProductsForImportCommand.ts @@ -78,7 +78,7 @@ export interface ListEnabledProductsForImportCommandOutput * @example To list ARNs for enabled integrations * ```javascript * // The following example returns a list of subscription Amazon Resource Names (ARNs) for the product integrations that you have currently enabled in Security Hub. - * const input = undefined; + * const input = {}; * const command = new ListEnabledProductsForImportCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-securityhub/src/commands/ListInvitationsCommand.ts b/clients/client-securityhub/src/commands/ListInvitationsCommand.ts index fb48772f724a..55a9dc0edd24 100644 --- a/clients/client-securityhub/src/commands/ListInvitationsCommand.ts +++ b/clients/client-securityhub/src/commands/ListInvitationsCommand.ts @@ -83,7 +83,7 @@ export interface ListInvitationsCommandOutput extends ListInvitationsResponse, _ * @example To list membership invitations to calling account * ```javascript * // The following example returns a list of Security Hub member invitations sent to the calling AWS account. Only accounts that are invited manually use this operation. It's not for use by accounts that are managed through AWS Organizations. - * const input = undefined; + * const input = {}; * const command = new ListInvitationsCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-securityhub/src/commands/ListMembersCommand.ts b/clients/client-securityhub/src/commands/ListMembersCommand.ts index d4132edfacc3..6c4040827bb2 100644 --- a/clients/client-securityhub/src/commands/ListMembersCommand.ts +++ b/clients/client-securityhub/src/commands/ListMembersCommand.ts @@ -88,7 +88,7 @@ export interface ListMembersCommandOutput extends ListMembersResponse, __Metadat * @example To list member account details * ```javascript * // The following example returns details about member accounts for the calling Security Hub administrator account. The response includes member accounts that are managed through AWS Organizations and those that were invited manually. - * const input = undefined; + * const input = {}; * const command = new ListMembersCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-securityhub/src/commands/ListOrganizationAdminAccountsCommand.ts b/clients/client-securityhub/src/commands/ListOrganizationAdminAccountsCommand.ts index f737714726eb..5a5f51e03aea 100644 --- a/clients/client-securityhub/src/commands/ListOrganizationAdminAccountsCommand.ts +++ b/clients/client-securityhub/src/commands/ListOrganizationAdminAccountsCommand.ts @@ -85,7 +85,7 @@ export interface ListOrganizationAdminAccountsCommandOutput * @example To list administrator acccounts for an organization * ```javascript * // The following example lists the Security Hub administrator accounts for an organization. Only the organization management account can call this operation. - * const input = undefined; + * const input = {}; * const command = new ListOrganizationAdminAccountsCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ses/src/commands/GetAccountSendingEnabledCommand.ts b/clients/client-ses/src/commands/GetAccountSendingEnabledCommand.ts index ce841c70e67f..8e29227f9b4c 100644 --- a/clients/client-ses/src/commands/GetAccountSendingEnabledCommand.ts +++ b/clients/client-ses/src/commands/GetAccountSendingEnabledCommand.ts @@ -57,7 +57,7 @@ export interface GetAccountSendingEnabledCommandOutput extends GetAccountSending * @example GetAccountSendingEnabled * ```javascript * // The following example returns if sending status for an account is enabled. (true / false): - * const input = undefined; + * const input = {}; * const command = new GetAccountSendingEnabledCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ses/src/commands/GetSendQuotaCommand.ts b/clients/client-ses/src/commands/GetSendQuotaCommand.ts index 952dde308028..4f9f67f15c79 100644 --- a/clients/client-ses/src/commands/GetSendQuotaCommand.ts +++ b/clients/client-ses/src/commands/GetSendQuotaCommand.ts @@ -59,7 +59,7 @@ export interface GetSendQuotaCommandOutput extends GetSendQuotaResponse, __Metad * @example GetSendQuota * ```javascript * // The following example returns the Amazon SES sending limits for an AWS account: - * const input = undefined; + * const input = {}; * const command = new GetSendQuotaCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ses/src/commands/GetSendStatisticsCommand.ts b/clients/client-ses/src/commands/GetSendStatisticsCommand.ts index 76801d0fea56..16ec1780eed2 100644 --- a/clients/client-ses/src/commands/GetSendStatisticsCommand.ts +++ b/clients/client-ses/src/commands/GetSendStatisticsCommand.ts @@ -67,7 +67,7 @@ export interface GetSendStatisticsCommandOutput extends GetSendStatisticsRespons * @example GetSendStatistics * ```javascript * // The following example returns Amazon SES sending statistics: - * const input = undefined; + * const input = {}; * const command = new GetSendStatisticsCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ses/src/commands/ListReceiptFiltersCommand.ts b/clients/client-ses/src/commands/ListReceiptFiltersCommand.ts index 5c4593b06cd9..dca6d82fa86b 100644 --- a/clients/client-ses/src/commands/ListReceiptFiltersCommand.ts +++ b/clients/client-ses/src/commands/ListReceiptFiltersCommand.ts @@ -68,7 +68,7 @@ export interface ListReceiptFiltersCommandOutput extends ListReceiptFiltersRespo * @example ListReceiptFilters * ```javascript * // The following example lists the IP address filters that are associated with an AWS account: - * const input = undefined; + * const input = {}; * const command = new ListReceiptFiltersCommand(input); * const response = await client.send(command); * /* response == diff --git a/clients/client-ses/src/commands/ListVerifiedEmailAddressesCommand.ts b/clients/client-ses/src/commands/ListVerifiedEmailAddressesCommand.ts index bd468f40d44d..105f166ba866 100644 --- a/clients/client-ses/src/commands/ListVerifiedEmailAddressesCommand.ts +++ b/clients/client-ses/src/commands/ListVerifiedEmailAddressesCommand.ts @@ -59,7 +59,7 @@ export interface ListVerifiedEmailAddressesCommandOutput extends ListVerifiedEma * @example ListVerifiedEmailAddresses * ```javascript * // The following example lists all email addresses that have been submitted for verification with Amazon SES: - * const input = undefined; + * const input = {}; * const command = new ListVerifiedEmailAddressesCommand(input); * const response = await client.send(command); * /* response == diff --git a/scripts/api-examples/merge-examples.js b/scripts/api-examples/merge-examples.js index ec0905b9dabd..b8f0b6b7241f 100644 --- a/scripts/api-examples/merge-examples.js +++ b/scripts/api-examples/merge-examples.js @@ -43,7 +43,7 @@ module.exports = { console.error(`${folder} does not have a Smithy model.`); continue; } - const modelFolders = readdirSync(join(location, folder)).filter(name => !name.startsWith(".")); + const modelFolders = readdirSync(join(location, folder)).filter((name) => !name.startsWith(".")); for (const c2jFolder of modelFolders.filter((name) => name !== "smithy")) { const c2jFiles = readdirSync(join(location, folder, c2jFolder)); for (const examples of c2jFiles.filter((file) => file.includes("examples"))) { @@ -126,6 +126,7 @@ module.exports = { for (const [operation, examples] of Object.entries(examplesFile.examples)) { const commandFile = join(commandsFolder, operation + "Command.ts"); + if (existsSync(commandFile)) { for (const example of examples) { let buffer = []; @@ -136,13 +137,13 @@ ${(example.description || "") .split("\n") .map((line) => `// ${line}`) .join("\n")} -const input = ${JSON.stringify(example.input, null, 2)}; +const input = ${JSON.stringify(example.input || {}, null, 2)}; const command = new ${operation}Command(input); ${ Object.keys(example.output || {}).length > 0 ? `const response = await client.send(command); /* response == -${JSON.stringify(example.output, null, 2)} +${JSON.stringify(example.output, null, 2)} *\\/` : `await client.send(command);` }