From 215404a2c67959e08b148754c623e4326eeb7a8a Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Fri, 24 Jun 2022 19:04:11 +0000 Subject: [PATCH] Regenerated Clients --- .../cd70a69bf589450cac6b3c2d0f85a156.json | 8 + .../f9db0559f6a94ebe8a71c3e314e59511.json | 8 + service/glue/api_op_CreateCrawler.go | 2 +- service/glue/api_op_ListCrawls.go | 150 ++++++++ service/glue/api_op_UpdateCrawler.go | 2 +- service/glue/deserializers.go | 356 ++++++++++++++++++ service/glue/generated.json | 1 + service/glue/go_module_metadata.go | 2 +- service/glue/serializers.go | 119 ++++++ service/glue/types/enums.go | 72 ++++ service/glue/types/types.go | 87 ++++- service/glue/validators.go | 39 ++ service/internal/integrationtest/go.mod | 2 +- .../rdsdata/api_op_BatchExecuteStatement.go | 18 +- service/rdsdata/api_op_BeginTransaction.go | 4 +- service/rdsdata/api_op_ExecuteSql.go | 4 +- service/rdsdata/api_op_ExecuteStatement.go | 5 +- service/rdsdata/go_module_metadata.go | 2 +- .../redshiftserverless/go_module_metadata.go | 2 +- 19 files changed, 867 insertions(+), 16 deletions(-) create mode 100644 .changelog/cd70a69bf589450cac6b3c2d0f85a156.json create mode 100644 .changelog/f9db0559f6a94ebe8a71c3e314e59511.json create mode 100644 service/glue/api_op_ListCrawls.go diff --git a/.changelog/cd70a69bf589450cac6b3c2d0f85a156.json b/.changelog/cd70a69bf589450cac6b3c2d0f85a156.json new file mode 100644 index 00000000000..7a4eb69e667 --- /dev/null +++ b/.changelog/cd70a69bf589450cac6b3c2d0f85a156.json @@ -0,0 +1,8 @@ +{ + "id": "cd70a69b-f589-450c-ac6b-3c2d0f85a156", + "type": "feature", + "description": "This release enables the new ListCrawls API for viewing the AWS Glue Crawler run history.", + "modules": [ + "service/glue" + ] +} \ No newline at end of file diff --git a/.changelog/f9db0559f6a94ebe8a71c3e314e59511.json b/.changelog/f9db0559f6a94ebe8a71c3e314e59511.json new file mode 100644 index 00000000000..2453824a5e7 --- /dev/null +++ b/.changelog/f9db0559f6a94ebe8a71c3e314e59511.json @@ -0,0 +1,8 @@ +{ + "id": "f9db0559-f6a9-4ebe-8a71-c3e314e59511", + "type": "documentation", + "description": "Documentation updates for RDS Data API", + "modules": [ + "service/rdsdata" + ] +} \ No newline at end of file diff --git a/service/glue/api_op_CreateCrawler.go b/service/glue/api_op_CreateCrawler.go index 46efb3078ba..c50300a2588 100644 --- a/service/glue/api_op_CreateCrawler.go +++ b/service/glue/api_op_CreateCrawler.go @@ -67,7 +67,7 @@ type CreateCrawlerInput struct { // A description of the new crawler. Description *string - // Specifies AWS Lake Formation configuration settings for the crawler. + // Specifies Lake Formation configuration settings for the crawler. LakeFormationConfiguration *types.LakeFormationConfiguration // Specifies data lineage configuration settings for the crawler. diff --git a/service/glue/api_op_ListCrawls.go b/service/glue/api_op_ListCrawls.go new file mode 100644 index 00000000000..f9c3ccbab98 --- /dev/null +++ b/service/glue/api_op_ListCrawls.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package glue + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/glue/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns all the crawls of a specified crawler. Returns only the crawls that have +// occurred since the launch date of the crawler history feature, and only retains +// up to 12 months of crawls. Older crawls will not be returned. You may use this +// API to: +// +// * Retrive all the crawls of a specified crawler. +// +// * Retrieve all the +// crawls of a specified crawler within a limited count. +// +// * Retrieve all the crawls +// of a specified crawler in a specific time range. +// +// * Retrieve all the crawls of a +// specified crawler with a particular state, crawl ID, or DPU hour value. +func (c *Client) ListCrawls(ctx context.Context, params *ListCrawlsInput, optFns ...func(*Options)) (*ListCrawlsOutput, error) { + if params == nil { + params = &ListCrawlsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCrawls", params, optFns, c.addOperationListCrawlsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCrawlsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListCrawlsInput struct { + + // The name of the crawler whose runs you want to retrieve. + // + // This member is required. + CrawlerName *string + + // Filters the crawls by the criteria you specify in a list of CrawlsFilter + // objects. + Filters []types.CrawlsFilter + + // The maximum number of results to return. The default is 20, and maximum is 100. + MaxResults *int32 + + // A continuation token, if this is a continuation call. + NextToken *string + + noSmithyDocumentSerde +} + +type ListCrawlsOutput struct { + + // A list of CrawlerHistory objects representing the crawl runs that meet your + // criteria. + Crawls []types.CrawlerHistory + + // A continuation token for paginating the returned list of tokens, returned if the + // current segment of the list is not the last. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCrawlsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListCrawls{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListCrawls{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpListCrawlsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCrawls(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListCrawls(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "glue", + OperationName: "ListCrawls", + } +} diff --git a/service/glue/api_op_UpdateCrawler.go b/service/glue/api_op_UpdateCrawler.go index 6819f820805..90fce3a8fc1 100644 --- a/service/glue/api_op_UpdateCrawler.go +++ b/service/glue/api_op_UpdateCrawler.go @@ -55,7 +55,7 @@ type UpdateCrawlerInput struct { // A description of the new crawler. Description *string - // Specifies AWS Lake Formation configuration settings for the crawler. + // Specifies Lake Formation configuration settings for the crawler. LakeFormationConfiguration *types.LakeFormationConfiguration // Specifies data lineage configuration settings for the crawler. diff --git a/service/glue/deserializers.go b/service/glue/deserializers.go index ae1bf4fbb15..0ef1c3411ab 100644 --- a/service/glue/deserializers.go +++ b/service/glue/deserializers.go @@ -15294,6 +15294,123 @@ func awsAwsjson11_deserializeOpErrorListCrawlers(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpListCrawls struct { +} + +func (*awsAwsjson11_deserializeOpListCrawls) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListCrawls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorListCrawls(response, &metadata) + } + output := &ListCrawlsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentListCrawlsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListCrawls(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("EntityNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorEntityNotFoundException(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("OperationTimeoutException", errorCode): + return awsAwsjson11_deserializeErrorOperationTimeoutException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpListCustomEntityTypes struct { } @@ -27655,6 +27772,200 @@ func awsAwsjson11_deserializeDocumentCrawler(v **types.Crawler, value interface{ return nil } +func awsAwsjson11_deserializeDocumentCrawlerHistory(v **types.CrawlerHistory, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CrawlerHistory + if *v == nil { + sv = &types.CrawlerHistory{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CrawlId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CrawlId to be of type string, got %T instead", value) + } + sv.CrawlId = ptr.String(jtv) + } + + case "DPUHour": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DPUHour = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.DPUHour = f64 + + default: + return fmt.Errorf("expected NonNegativeDouble to be a JSON Number, got %T instead", value) + + } + } + + case "EndTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DescriptionString to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "LogGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroup to be of type string, got %T instead", value) + } + sv.LogGroup = ptr.String(jtv) + } + + case "LogStream": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogStream to be of type string, got %T instead", value) + } + sv.LogStream = ptr.String(jtv) + } + + case "MessagePrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessagePrefix to be of type string, got %T instead", value) + } + sv.MessagePrefix = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "State": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CrawlerHistoryState to be of type string, got %T instead", value) + } + sv.State = types.CrawlerHistoryState(jtv) + } + + case "Summary": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Summary = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentCrawlerHistoryList(v *[]types.CrawlerHistory, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CrawlerHistory + if *v == nil { + cv = []types.CrawlerHistory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CrawlerHistory + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCrawlerHistory(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentCrawlerList(v *[]types.Crawler, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -50649,6 +50960,51 @@ func awsAwsjson11_deserializeOpDocumentListCrawlersOutput(v **ListCrawlersOutput return nil } +func awsAwsjson11_deserializeOpDocumentListCrawlsOutput(v **ListCrawlsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListCrawlsOutput + if *v == nil { + sv = &ListCrawlsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Crawls": + if err := awsAwsjson11_deserializeDocumentCrawlerHistoryList(&sv.Crawls, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListCustomEntityTypesOutput(v **ListCustomEntityTypesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/glue/generated.json b/service/glue/generated.json index a8f3e367b2c..4335edfee37 100644 --- a/service/glue/generated.json +++ b/service/glue/generated.json @@ -134,6 +134,7 @@ "api_op_ImportCatalogToGlue.go", "api_op_ListBlueprints.go", "api_op_ListCrawlers.go", + "api_op_ListCrawls.go", "api_op_ListCustomEntityTypes.go", "api_op_ListDevEndpoints.go", "api_op_ListJobs.go", diff --git a/service/glue/go_module_metadata.go b/service/glue/go_module_metadata.go index cdb22146210..f098289f127 100644 --- a/service/glue/go_module_metadata.go +++ b/service/glue/go_module_metadata.go @@ -3,4 +3,4 @@ package glue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.25.1" +const goModuleVersion = "1.26.0" diff --git a/service/glue/serializers.go b/service/glue/serializers.go index 4ca6db3c803..64c0caab732 100644 --- a/service/glue/serializers.go +++ b/service/glue/serializers.go @@ -6947,6 +6947,61 @@ func (m *awsAwsjson11_serializeOpListCrawlers) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListCrawls struct { +} + +func (*awsAwsjson11_serializeOpListCrawls) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListCrawls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListCrawlsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSGlue.ListCrawls") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListCrawlsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListCustomEntityTypes struct { } @@ -11566,6 +11621,41 @@ func awsAwsjson11_serializeDocumentCrawlerTargets(v *types.CrawlerTargets, value return nil } +func awsAwsjson11_serializeDocumentCrawlsFilter(v *types.CrawlsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FieldName) > 0 { + ok := object.Key("FieldName") + ok.String(string(v.FieldName)) + } + + if v.FieldValue != nil { + ok := object.Key("FieldValue") + ok.String(*v.FieldValue) + } + + if len(v.FilterOperator) > 0 { + ok := object.Key("FilterOperator") + ok.String(string(v.FilterOperator)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentCrawlsFilterList(v []types.CrawlsFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentCrawlsFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentCreateCsvClassifierRequest(v *types.CreateCsvClassifierRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -19821,6 +19911,35 @@ func awsAwsjson11_serializeOpDocumentListCrawlersInput(v *ListCrawlersInput, val return nil } +func awsAwsjson11_serializeOpDocumentListCrawlsInput(v *ListCrawlsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CrawlerName != nil { + ok := object.Key("CrawlerName") + ok.String(*v.CrawlerName) + } + + if v.Filters != nil { + ok := object.Key("Filters") + if err := awsAwsjson11_serializeDocumentCrawlsFilterList(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListCustomEntityTypesInput(v *ListCustomEntityTypesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/glue/types/enums.go b/service/glue/types/enums.go index 14a59797f71..a95090993f8 100644 --- a/service/glue/types/enums.go +++ b/service/glue/types/enums.go @@ -352,6 +352,28 @@ func (ConnectionType) Values() []ConnectionType { } } +type CrawlerHistoryState string + +// Enum values for CrawlerHistoryState +const ( + CrawlerHistoryStateRunning CrawlerHistoryState = "RUNNING" + CrawlerHistoryStateCompleted CrawlerHistoryState = "COMPLETED" + CrawlerHistoryStateFailed CrawlerHistoryState = "FAILED" + CrawlerHistoryStateStopped CrawlerHistoryState = "STOPPED" +) + +// Values returns all known values for CrawlerHistoryState. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (CrawlerHistoryState) Values() []CrawlerHistoryState { + return []CrawlerHistoryState{ + "RUNNING", + "COMPLETED", + "FAILED", + "STOPPED", + } +} + type CrawlerLineageSettings string // Enum values for CrawlerLineageSettings @@ -512,6 +534,30 @@ func (ExistCondition) Values() []ExistCondition { } } +type FieldName string + +// Enum values for FieldName +const ( + FieldNameCrawlId FieldName = "CRAWL_ID" + FieldNameState FieldName = "STATE" + FieldNameStartTime FieldName = "START_TIME" + FieldNameEndTime FieldName = "END_TIME" + FieldNameDpuHour FieldName = "DPU_HOUR" +) + +// Values returns all known values for FieldName. Note that this can be expanded in +// the future, and so it is only as up to date as the client. The ordering of this +// slice is not guaranteed to be stable across updates. +func (FieldName) Values() []FieldName { + return []FieldName{ + "CRAWL_ID", + "STATE", + "START_TIME", + "END_TIME", + "DPU_HOUR", + } +} + type FilterLogicalOperator string // Enum values for FilterLogicalOperator @@ -558,6 +604,32 @@ func (FilterOperation) Values() []FilterOperation { } } +type FilterOperator string + +// Enum values for FilterOperator +const ( + FilterOperatorGt FilterOperator = "GT" + FilterOperatorGe FilterOperator = "GE" + FilterOperatorLt FilterOperator = "LT" + FilterOperatorLe FilterOperator = "LE" + FilterOperatorEq FilterOperator = "EQ" + FilterOperatorNe FilterOperator = "NE" +) + +// Values returns all known values for FilterOperator. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (FilterOperator) Values() []FilterOperator { + return []FilterOperator{ + "GT", + "GE", + "LT", + "LE", + "EQ", + "NE", + } +} + type FilterValueType string // Enum values for FilterValueType diff --git a/service/glue/types/types.go b/service/glue/types/types.go index 3c825a25b0f..50640282d7e 100644 --- a/service/glue/types/types.go +++ b/service/glue/types/types.go @@ -1343,7 +1343,7 @@ type Crawler struct { // A description of the crawler. Description *string - // Specifies whether the crawler should use AWS Lake Formation credentials for the + // Specifies whether the crawler should use Lake Formation credentials for the // crawler instead of the IAM role credentials. LakeFormationConfiguration *LakeFormationConfiguration @@ -1389,6 +1389,43 @@ type Crawler struct { noSmithyDocumentSerde } +// Contains the information for a run of a crawler. +type CrawlerHistory struct { + + // A UUID identifier for each crawl. + CrawlId *string + + // The number of data processing units (DPU) used in hours for the crawl. + DPUHour float64 + + // The date and time on which the crawl ended. + EndTime *time.Time + + // If an error occurred, the error message associated with the crawl. + ErrorMessage *string + + // The log group associated with the crawl. + LogGroup *string + + // The log stream associated with the crawl. + LogStream *string + + // The prefix for a CloudWatch message about this crawl. + MessagePrefix *string + + // The date and time on which the crawl started. + StartTime *time.Time + + // The state of the crawl. + State CrawlerHistoryState + + // A run summary for the specific crawl in JSON. Contains the catalog tables and + // partitions that were added, updated, or deleted. + Summary *string + + noSmithyDocumentSerde +} + // Metrics for a specified crawler. type CrawlerMetrics struct { @@ -1453,6 +1490,48 @@ type CrawlerTargets struct { noSmithyDocumentSerde } +// A list of fields, comparators and value that you can use to filter the crawler +// runs for a specified crawler. +type CrawlsFilter struct { + + // A key used to filter the crawler runs for a specified crawler. Valid values for + // each of the field names are: + // + // * CRAWL_ID: A string representing the UUID + // identifier for a crawl. + // + // * STATE: A string representing the state of the + // crawl. + // + // * START_TIME and END_TIME: The epoch timestamp in milliseconds. + // + // * + // DPU_HOUR: The number of data processing unit (DPU) hours used for the crawl. + FieldName FieldName + + // The value provided for comparison on the crawl field. + FieldValue *string + + // A defined comparator that operates on the value. The available operators are: + // + // * + // GT: Greater than. + // + // * GE: Greater than or equal to. + // + // * LT: Less than. + // + // * LE: Less + // than or equal to. + // + // * EQ: Equal to. + // + // * NE: Not equal to. + FilterOperator FilterOperator + + noSmithyDocumentSerde +} + // Specifies a custom CSV classifier for CreateClassifier to create. type CreateCsvClassifierRequest struct { @@ -3532,15 +3611,15 @@ type LabelingSetGenerationTaskRunProperties struct { noSmithyDocumentSerde } -// Specifies AWS Lake Formation configuration settings for the crawler. +// Specifies Lake Formation configuration settings for the crawler. type LakeFormationConfiguration struct { // Required for cross account crawls. For same account crawls as the target data, // this can be left as null. AccountId *string - // Specifies whether to use AWS Lake Formation credentials for the crawler instead - // of the IAM role credentials. + // Specifies whether to use Lake Formation credentials for the crawler instead of + // the IAM role credentials. UseLakeFormationCredentials *bool noSmithyDocumentSerde diff --git a/service/glue/validators.go b/service/glue/validators.go index 2dcd99ec49d..f15d409d9d6 100644 --- a/service/glue/validators.go +++ b/service/glue/validators.go @@ -2150,6 +2150,26 @@ func (m *validateOpGetWorkflowRuns) HandleInitialize(ctx context.Context, in mid return next.HandleInitialize(ctx, in) } +type validateOpListCrawls struct { +} + +func (*validateOpListCrawls) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListCrawls) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListCrawlsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListCrawlsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListMLTransforms struct { } @@ -3518,6 +3538,10 @@ func addOpGetWorkflowRunsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetWorkflowRuns{}, middleware.After) } +func addOpListCrawlsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListCrawls{}, middleware.After) +} + func addOpListMLTransformsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMLTransforms{}, middleware.After) } @@ -8545,6 +8569,21 @@ func validateOpGetWorkflowRunsInput(v *GetWorkflowRunsInput) error { } } +func validateOpListCrawlsInput(v *ListCrawlsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListCrawlsInput"} + if v.CrawlerName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CrawlerName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListMLTransformsInput(v *ListMLTransformsInput) error { if v == nil { return nil diff --git a/service/internal/integrationtest/go.mod b/service/internal/integrationtest/go.mod index b84ea1e7424..94234088197 100644 --- a/service/internal/integrationtest/go.mod +++ b/service/internal/integrationtest/go.mod @@ -46,7 +46,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/firehose v1.14.7 github.com/aws/aws-sdk-go-v2/service/gamelift v1.14.6 github.com/aws/aws-sdk-go-v2/service/glacier v1.13.6 - github.com/aws/aws-sdk-go-v2/service/glue v1.25.1 + github.com/aws/aws-sdk-go-v2/service/glue v1.26.0 github.com/aws/aws-sdk-go-v2/service/health v1.15.8 github.com/aws/aws-sdk-go-v2/service/iam v1.18.7 github.com/aws/aws-sdk-go-v2/service/inspector v1.12.6 diff --git a/service/rdsdata/api_op_BatchExecuteStatement.go b/service/rdsdata/api_op_BatchExecuteStatement.go index c80372d51ee..a1f706520a1 100644 --- a/service/rdsdata/api_op_BatchExecuteStatement.go +++ b/service/rdsdata/api_op_BatchExecuteStatement.go @@ -16,7 +16,15 @@ import ( // parameter sets. Bulk operations can provide a significant performance // improvement over individual insert and update operations. If a call isn't part // of a transaction because it doesn't include the transactionID parameter, changes -// that result from the call are committed automatically. +// that result from the call are committed automatically. There isn't a fixed upper +// limit on the number of parameter sets. However, the maximum size of the HTTP +// request submitted through the Data API is 4 MiB. If the request exceeds this +// limit, the Data API returns an error and doesn't process the request. This 4-MiB +// limit includes the size of the HTTP headers and the JSON notation in the +// request. Thus, the number of parameter sets that you can include depends on a +// combination of factors, such as the size of the SQL statement and the size of +// each parameter set. The response size limit is 1 MiB. If the call returns more +// than 1 MiB of response data, the call is terminated. func (c *Client) BatchExecuteStatement(ctx context.Context, params *BatchExecuteStatementInput, optFns ...func(*Options)) (*BatchExecuteStatementOutput, error) { if params == nil { params = &BatchExecuteStatementInput{} @@ -41,12 +49,16 @@ type BatchExecuteStatementInput struct { // This member is required. ResourceArn *string - // The name or ARN of the secret that enables access to the DB cluster. + // The ARN of the secret that enables access to the DB cluster. Enter the database + // user name and password for the credentials in the secret. For information about + // creating the secret, see Create a database secret + // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html). // // This member is required. SecretArn *string - // The SQL statement to run. + // The SQL statement to run. Don't include a semicolon (;) at the end of the SQL + // statement. // // This member is required. Sql *string diff --git a/service/rdsdata/api_op_BeginTransaction.go b/service/rdsdata/api_op_BeginTransaction.go index 8e4bea2de21..c425102c716 100644 --- a/service/rdsdata/api_op_BeginTransaction.go +++ b/service/rdsdata/api_op_BeginTransaction.go @@ -10,7 +10,9 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Starts a SQL transaction. A transaction can run for a maximum of 24 hours. A +// Starts a SQL transaction. +// +// A transaction can run for a maximum of 24 hours. A // transaction is terminated and rolled back automatically after 24 hours. A // transaction times out if no calls use its transaction ID in three minutes. If a // transaction times out before it's committed, it's rolled back automatically. DDL diff --git a/service/rdsdata/api_op_ExecuteSql.go b/service/rdsdata/api_op_ExecuteSql.go index 87d1306f550..239aac3cc5e 100644 --- a/service/rdsdata/api_op_ExecuteSql.go +++ b/service/rdsdata/api_op_ExecuteSql.go @@ -36,7 +36,9 @@ func (c *Client) ExecuteSql(ctx context.Context, params *ExecuteSqlInput, optFns type ExecuteSqlInput struct { // The Amazon Resource Name (ARN) of the secret that enables access to the DB - // cluster. + // cluster. Enter the database user name and password for the credentials in the + // secret. For information about creating the secret, see Create a database secret + // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html). // // This member is required. AwsSecretStoreArn *string diff --git a/service/rdsdata/api_op_ExecuteStatement.go b/service/rdsdata/api_op_ExecuteStatement.go index 22438a113fc..5f567a43673 100644 --- a/service/rdsdata/api_op_ExecuteStatement.go +++ b/service/rdsdata/api_op_ExecuteStatement.go @@ -39,7 +39,10 @@ type ExecuteStatementInput struct { // This member is required. ResourceArn *string - // The name or ARN of the secret that enables access to the DB cluster. + // The ARN of the secret that enables access to the DB cluster. Enter the database + // user name and password for the credentials in the secret. For information about + // creating the secret, see Create a database secret + // (https://docs.aws.amazon.com/secretsmanager/latest/userguide/create_database_secret.html). // // This member is required. SecretArn *string diff --git a/service/rdsdata/go_module_metadata.go b/service/rdsdata/go_module_metadata.go index 95dd8df74ba..1637a563fe8 100644 --- a/service/rdsdata/go_module_metadata.go +++ b/service/rdsdata/go_module_metadata.go @@ -3,4 +3,4 @@ package rdsdata // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.12.2" +const goModuleVersion = "1.12.3" diff --git a/service/redshiftserverless/go_module_metadata.go b/service/redshiftserverless/go_module_metadata.go index d4e66dc4713..102b65f0338 100644 --- a/service/redshiftserverless/go_module_metadata.go +++ b/service/redshiftserverless/go_module_metadata.go @@ -3,4 +3,4 @@ package redshiftserverless // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.1.0" +const goModuleVersion = "1.1.1"