zio / zio-aws

Low level ZIO interface for the full AWS
https://zio.dev/zio-aws
Apache License 2.0
139 stars 33 forks source link

kinesis.listShards should return a stream #6

Closed svroonland closed 4 years ago

svroonland commented 4 years ago

The response is paginated and has a NextToken which can be used to retrieve more.

There is probably a more generic type of SDK method this applies to.

vigoo commented 4 years ago

You are right, this could be detected by having NextToken in both the input and output shape. The reason why it's missing now is that I'm only generating streamed for pagination where the paginators (the paginators-1.json in the client lib) contains it. In other words, if the Java API has a xxxPaginator method.

I have no idea why they don't define a paginator API for listShards (and potentionally tons of other operations), but supporting them in zio-aws would be cool, I will try to add it!

vigoo commented 4 years ago

Implementing this will make 227 new operations streaming:

apigatewayv2 / GetApis
apigatewayv2 / GetAuthorizers
apigatewayv2 / GetDeployments
apigatewayv2 / GetDomainNames
apigatewayv2 / GetIntegrationResponses
apigatewayv2 / GetIntegrations
apigatewayv2 / GetModels
apigatewayv2 / GetRouteResponses
apigatewayv2 / GetRoutes
apigatewayv2 / GetStages
apigatewayv2 / GetVpcLinks
appstream / DescribeDirectoryConfigs
appstream / DescribeFleets
appstream / DescribeImageBuilders
appstream / DescribeSessions
appstream / DescribeStacks
appstream / DescribeUsageReportSubscriptions
appstream / DescribeUsers
appstream / DescribeUserStackAssociations
appstream / ListAssociatedFleets
appstream / ListAssociatedStacks
autoscaling / DescribeInstanceRefreshes
autoscaling / DescribeLoadBalancers
autoscaling / DescribeLoadBalancerTargetGroups
autoscalingplans / DescribeScalingPlanResources
autoscalingplans / DescribeScalingPlans
budgets / DescribeBudgetPerformanceHistory
budgets / DescribeBudgets
budgets / DescribeNotificationsForBudget
budgets / DescribeSubscribersForNotification
clouddirectory / ListIncomingTypedLinks
clouddirectory / ListOutgoingTypedLinks
cloudformation / DescribeChangeSet
cloudhsm / ListHapgs
cloudhsm / ListHsms
cloudhsm / ListLunaClients
cloudwatch / DescribeAnomalyDetectors
cloudwatchevents / ListEventBuses
cloudwatchevents / ListEventSources
cloudwatchevents / ListPartnerEventSourceAccounts
cloudwatchevents / ListPartnerEventSources
cloudwatchevents / ListRuleNamesByTarget
cloudwatchevents / ListRules
cloudwatchevents / ListTargetsByRule
codedeploy / ListTagsForResource
cognitoidentity / ListIdentities
cognitoidentity / ListIdentityPools
cognitoidentity / LookupDeveloperIdentity
cognitosync / ListDatasets
cognitosync / ListIdentityPoolUsage
cognitosync / ListRecords
comprehend / ListEndpoints
comprehendmedical / ListEntitiesDetectionV2Jobs
comprehendmedical / ListICD10CMInferenceJobs
comprehendmedical / ListPHIDetectionJobs
comprehendmedical / ListRxNormInferenceJobs
config / DescribeAggregateComplianceByConfigRules
config / DescribeAggregationAuthorizations
config / DescribeComplianceByConfigRule
config / DescribeComplianceByResource
config / DescribeConfigRuleEvaluationStatus
config / DescribeConfigRules
config / DescribeConfigurationAggregators
config / DescribeConfigurationAggregatorSourcesStatus
config / DescribeConformancePackCompliance
config / DescribeConformancePacks
config / DescribeConformancePackStatus
config / DescribeOrganizationConfigRules
config / DescribeOrganizationConfigRuleStatuses
config / DescribeOrganizationConformancePacks
config / DescribeOrganizationConformancePackStatuses
config / DescribePendingAggregationRequests
config / DescribeRetentionConfigurations
config / GetAggregateComplianceDetailsByConfigRule
config / GetAggregateConfigRuleComplianceSummary
config / GetAggregateDiscoveredResourceCounts
config / GetComplianceDetailsByConfigRule
config / GetComplianceDetailsByResource
config / GetConformancePackComplianceDetails
config / GetConformancePackComplianceSummary
config / GetOrganizationConfigRuleDetailedStatus
config / GetOrganizationConformancePackDetailedStatus
config / ListAggregateDiscoveredResources
config / ListTagsForResource
config / SelectResourceConfig
dax / DescribeClusters
dax / DescribeDefaultParameters
dax / DescribeEvents
dax / DescribeParameterGroups
dax / DescribeParameters
dax / DescribeSubnetGroups
dax / ListTags
directory / DescribeDirectories
directory / DescribeLDAPSSettings
directory / DescribeSharedDirectories
directory / DescribeSnapshots
directory / DescribeTrusts
directory / ListCertificates
directory / ListIpRoutes
directory / ListLogSubscriptions
directory / ListSchemaExtensions
directory / ListTagsForResource
dynamodb:dynamodb / ListTagsOfResource
ec2 / DescribeElasticGpus
ec2 / DescribeFleetHistory
ec2 / DescribeFleetInstances
ec2 / DescribeSpotFleetInstances
ec2 / DescribeSpotFleetRequestHistory
ec2 / DescribeVpcEndpointServices
ec2 / GetCapacityReservationUsage
elasticbeanstalk / DescribeApplicationVersions
elasticbeanstalk / DescribeEnvironments
elasticbeanstalk / DescribeInstancesHealth
eventbridge / ListEventBuses
eventbridge / ListEventSources
eventbridge / ListPartnerEventSourceAccounts
eventbridge / ListPartnerEventSources
eventbridge / ListRuleNamesByTarget
eventbridge / ListRules
eventbridge / ListTargetsByRule
fms / GetProtectionStatus
fms / ListAppsLists
fms / ListProtocolsLists
fsx / ListTagsForResource
gamelift / DescribeFleetAttributes
gamelift / DescribeFleetCapacity
gamelift / DescribeFleetEvents
gamelift / DescribeFleetUtilization
gamelift / DescribeGameSessionDetails
gamelift / DescribeGameSessionQueues
gamelift / DescribeGameSessions
gamelift / DescribeInstances
gamelift / DescribeMatchmakingConfigurations
gamelift / DescribeMatchmakingRuleSets
gamelift / DescribePlayerSessions
gamelift / DescribeScalingPolicies
gamelift / ListAliases
gamelift / ListBuilds
gamelift / ListFleets
gamelift / ListGameServerGroups
gamelift / ListGameServers
gamelift / ListScripts
gamelift / SearchGameSessions
globalaccelerator / ListAccelerators
globalaccelerator / ListByoipCidrs
globalaccelerator / ListEndpointGroups
globalaccelerator / ListListeners
glue / GetResourcePolicies
greengrass / GetConnectorDefinitionVersion
greengrass / GetDeviceDefinitionVersion
greengrass / GetFunctionDefinitionVersion
greengrass / GetSubscriptionDefinitionVersion
greengrass / ListBulkDeploymentDetailedReports
greengrass / ListBulkDeployments
greengrass / ListConnectorDefinitions
greengrass / ListConnectorDefinitionVersions
greengrass / ListCoreDefinitions
greengrass / ListCoreDefinitionVersions
greengrass / ListDeployments
greengrass / ListDeviceDefinitions
greengrass / ListDeviceDefinitionVersions
greengrass / ListFunctionDefinitions
greengrass / ListFunctionDefinitionVersions
greengrass / ListGroups
greengrass / ListGroupVersions
greengrass / ListLoggerDefinitions
greengrass / ListLoggerDefinitionVersions
greengrass / ListResourceDefinitions
greengrass / ListResourceDefinitionVersions
greengrass / ListSubscriptionDefinitions
greengrass / ListSubscriptionDefinitionVersions
iot1clickdevices / ListDeviceEvents
iot1clickdevices / ListDevices
kendra / ListFaqs
kinesis / ListShards
kinesisanalyticsv2 / ListApplications
kinesisanalyticsv2 / ListApplicationSnapshots
kinesisvideo / ListTagsForResource
kinesisvideo / ListTagsForStream
licensemanager / ListAssociationsForLicenseConfiguration
licensemanager / ListFailuresForLicenseConfigurationOperations
licensemanager / ListLicenseConfigurations
licensemanager / ListLicenseSpecificationsForResource
licensemanager / ListResourceInventory
licensemanager / ListUsageForLicenseConfiguration
marketplaceentitlement / GetEntitlements
mediatailor / ListPlaybackConfigurations
mq / DescribeBrokerEngineTypes
mq / DescribeBrokerInstanceOptions
mq / ListConfigurationRevisions
mq / ListConfigurations
mq / ListUsers
opsworks / ListTags
outposts / GetOutpostInstanceTypes
pi / DescribeDimensionKeys
pi / GetResourceMetrics
pinpointsmsvoice / ListConfigurationSets
polly / DescribeVoices
polly / ListLexicons
quicksight / ListGroupMemberships
quicksight / ListGroups
quicksight / ListIAMPolicyAssignments
quicksight / ListIAMPolicyAssignmentsForUser
quicksight / ListThemeAliases
quicksight / ListThemes
quicksight / ListThemeVersions
quicksight / ListUserGroups
quicksight / ListUsers
route53 / ListHostedZonesByVPC
route53 / ListVPCAssociationAuthorizations
route53resolver / ListTagsForResource
ses / ListConfigurationSets
ses / ListReceiptRuleSets
ses / ListTemplates
snowball / ListClusterJobs
snowball / ListClusters
snowball / ListCompatibleImages
ssm / ListInventoryEntries
textract / GetDocumentAnalysis
textract / GetDocumentTextDetection
workspaces / DescribeAccountModifications
workspaces / DescribeIpGroups
workspaces / DescribeWorkspaceImagePermissions
workspaces / DescribeWorkspaceImages
workspaces / DescribeWorkspacesConnectionStatus
workspaces / ListAvailableManagementCidrRanges
vigoo commented 4 years ago

The following special cases will not be covered by the first implementation:

budgets / DescribeBudgetPerformanceHistory
greengrass / GetDeviceDefinitionVersion
greengrass / GetSubscriptionDefinitionVersion
greengrass / GetFunctionDefinitionVersion
greengrass / GetConnectorDefinitionVersion